History

Merge branch 'master' of https://github.com/highfidelity/hifi into placement_tool

Atlante45 committed 12 years ago

Commit 8a7a5902 parents c4102e3 16cd2ca21 files · +567 −102Browse files

Showing the changes to interface/src/Application.cpp (1 of 21 files). Show all

Unified · Split

interface/src/Application.cpp+42−0
@@ -356,6 +356,8 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 355 unmodified lines
356 QMutexLocker locker(&_settingsMutex);356 QMutexLocker locker(&_settingsMutex);
357 _previousScriptLocation = _settings->value("LastScriptLocation", QVariant("")).toString();357 _previousScriptLocation = _settings->value("LastScriptLocation", QVariant("")).toString();
358 }358 }
359 //When -url in command line, teleport to location
360 urlGoTo(argc, constArgv);
359}361}
360 362
361Application::~Application() {363Application::~Application() {
@@ -1679,8 +1681,12 @@ void Application::init() { · 1317 unmodified lines
1679 _audioReflector.setMyAvatar(getAvatar());1681 _audioReflector.setMyAvatar(getAvatar());
1680 _audioReflector.setVoxels(_voxels.getTree());1682 _audioReflector.setVoxels(_voxels.getTree());
1681 _audioReflector.setAudio(getAudio());1683 _audioReflector.setAudio(getAudio());
1684 _audioReflector.setAvatarManager(&_avatarManager);
1685
1682 connect(getAudio(), &Audio::processInboundAudio, &_audioReflector, &AudioReflector::processInboundAudio,Qt::DirectConnection);1686 connect(getAudio(), &Audio::processInboundAudio, &_audioReflector, &AudioReflector::processInboundAudio,Qt::DirectConnection);
1683 connect(getAudio(), &Audio::processLocalAudio, &_audioReflector, &AudioReflector::processLocalAudio,Qt::DirectConnection);1687 connect(getAudio(), &Audio::processLocalAudio, &_audioReflector, &AudioReflector::processLocalAudio,Qt::DirectConnection);
1688 connect(getAudio(), &Audio::preProcessOriginalInboundAudio, &_audioReflector,
1689 &AudioReflector::preProcessOriginalInboundAudio,Qt::DirectConnection);
1684 1690
1685 // save settings when avatar changes1691 // save settings when avatar changes
1686 connect(_myAvatar, &MyAvatar::transformChanged, this, &Application::bumpSettings);1692 connect(_myAvatar, &MyAvatar::transformChanged, this, &Application::bumpSettings);
@@ -3020,6 +3026,7 @@ void Application::resetSensors() { · 1333 unmodified lines
3020 _mouseX = _glWidget->width() / 2;3026 _mouseX = _glWidget->width() / 2;
3021 _mouseY = _glWidget->height() / 2;3027 _mouseY = _glWidget->height() / 2;
3022 3028
3029 _faceplus.reset();
3023 _faceshift.reset();3030 _faceshift.reset();
3024 _visage.reset();3031 _visage.reset();
3025 3032
@@ -3561,3 +3568,38 @@ void Application::takeSnapshot() { · 535 unmodified lines
3561 3568
3562 Snapshot::saveSnapshot(_glWidget, _myAvatar);3569 Snapshot::saveSnapshot(_glWidget, _myAvatar);
3563}3570}
3571
3572void Application::urlGoTo(int argc, const char * constArgv[]) {
3573 //Gets the url (hifi://domain/destination/orientation)
3574 QString customUrl = getCmdOption(argc, constArgv, "-url");
3575
3576 if (customUrl.startsWith("hifi://")) {
3577 QStringList urlParts = customUrl.remove(0, CUSTOM_URL_SCHEME.length() + 2).split('/', QString::SkipEmptyParts);
3578 if (urlParts.count() > 1) {
3579 // if url has 2 or more parts, the first one is domain name
3580 QString domain = urlParts[0];
3581
3582 // second part is either a destination coordinate or
3583 // a place name
3584 QString destination = urlParts[1];
3585
3586 // any third part is an avatar orientation.
3587 QString orientation = urlParts.count() > 2 ? urlParts[2] : QString();
3588
3589 Menu::goToDomain(domain);
3590
3591 // goto either @user, #place, or x-xx,y-yy,z-zz
3592 // style co-ordinate.
3593 Menu::goTo(destination);
3594
3595 if (!orientation.isEmpty()) {
3596 // location orientation
3597 Menu::goToOrientation(orientation);
3598 }
3599 } else if (urlParts.count() == 1) {
3600 // location coordinates or place name
3601 QString destination = urlParts[0];
3602 Menu::goTo(destination);
3603 }
3604 }
3605}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t