diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index 4f4b94d5d0..76478cb148 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -99,6 +99,11 @@ Menu::Menu() : Qt::CTRL | Qt::SHIFT | Qt::Key_L, this, SLOT(goToLocation())); + addActionToQMenuAndActionHash(fileMenu, + MenuOption::GoToUser, + Qt::CTRL | Qt::SHIFT | Qt::Key_U, + this, + SLOT(goToUser())); addDisabledActionAndSeparator(fileMenu, "Settings"); @@ -966,6 +971,31 @@ void Menu::goToLocation() { } } +void Menu::goToUser() { + Application* applicationInstance = Application::getInstance(); + QDialog dialog(applicationInstance->getGLWidget()); + dialog.setWindowTitle("Go To User"); + QBoxLayout* layout = new QBoxLayout(QBoxLayout::TopToBottom); + dialog.setLayout(layout); + + QFormLayout* form = new QFormLayout(); + layout->addLayout(form, 1); + + QLineEdit* usernameLineEdit = new QLineEdit(); + usernameLineEdit->setMinimumWidth(QLINE_MINIMUM_WIDTH); + form->addRow("", usernameLineEdit); + + QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); + dialog.connect(buttons, SIGNAL(accepted()), SLOT(accept())); + dialog.connect(buttons, SIGNAL(rejected()), SLOT(reject())); + layout->addWidget(buttons); + + int ret = dialog.exec(); + applicationInstance->getWindow()->activateWindow(); + if (ret != QDialog::Accepted) { + return; + } +} void Menu::bandwidthDetails() { diff --git a/interface/src/Menu.h b/interface/src/Menu.h index c4146986c6..6eb1914d6e 100644 --- a/interface/src/Menu.h +++ b/interface/src/Menu.h @@ -73,6 +73,7 @@ private slots: void editPreferences(); void goToDomain(); void goToLocation(); + void goToUser(); void bandwidthDetailsClosed(); void voxelStatsDetailsClosed(); void cycleFrustumRenderMode(); @@ -121,7 +122,6 @@ private: }; namespace MenuOption { - const QString AboutApp = "About Interface"; const QString AmbientOcclusion = "Ambient Occlusion"; const QString Avatars = "Avatars"; @@ -162,6 +162,7 @@ namespace MenuOption { const QString GlowMode = "Cycle Glow Mode"; const QString GoToDomain = "Go To Domain..."; const QString GoToLocation = "Go To Location..."; + const QString GoToUser = "Go To User..."; const QString ImportVoxels = "Import Voxels"; const QString ImportVoxelsClipboard = "Import Voxels to Clipboard"; const QString IncreaseAvatarSize = "Increase Avatar Size";