Showing the changes to interface/src/Menu.cpp (1 of 2 files). Show all
Unified · Split
| @@ -99,6 +99,11 @@ Menu::Menu() : · 98 unmodified lines | |||
| 99 | Qt::CTRL | Qt::SHIFT | Qt::Key_L, | 99 | Qt::CTRL | Qt::SHIFT | Qt::Key_L, |
| 100 | this, | 100 | this, |
| 101 | SLOT(goToLocation())); | 101 | SLOT(goToLocation())); |
| 102 | addActionToQMenuAndActionHash(fileMenu, | ||
| 103 | MenuOption::GoToUser, | ||
| 104 | Qt::CTRL | Qt::SHIFT | Qt::Key_U, | ||
| 105 | this, | ||
| 106 | SLOT(goToUser())); | ||
| 102 | 107 | ||
| 103 | 108 | ||
| 104 | addDisabledActionAndSeparator(fileMenu, "Settings"); | 109 | addDisabledActionAndSeparator(fileMenu, "Settings"); |
| @@ -966,6 +971,31 @@ void Menu::goToLocation() { · 861 unmodified lines | |||
| 966 | } | 971 | } |
| 967 | } | 972 | } |
| 968 | 973 | ||
| 974 | void Menu::goToUser() { | ||
| 975 | Application* applicationInstance = Application::getInstance(); | ||
| 976 | QDialog dialog(applicationInstance->getGLWidget()); | ||
| 977 | dialog.setWindowTitle("Go To User"); | ||
| 978 | QBoxLayout* layout = new QBoxLayout(QBoxLayout::TopToBottom); | ||
| 979 | dialog.setLayout(layout); | ||
| 980 | |||
| 981 | QFormLayout* form = new QFormLayout(); | ||
| 982 | layout->addLayout(form, 1); | ||
| 983 | |||
| 984 | QLineEdit* usernameLineEdit = new QLineEdit(); | ||
| 985 | usernameLineEdit->setMinimumWidth(QLINE_MINIMUM_WIDTH); | ||
| 986 | form->addRow("", usernameLineEdit); | ||
| 987 | |||
| 988 | QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); | ||
| 989 | dialog.connect(buttons, SIGNAL(accepted()), SLOT(accept())); | ||
| 990 | dialog.connect(buttons, SIGNAL(rejected()), SLOT(reject())); | ||
| 991 | layout->addWidget(buttons); | ||
| 992 | |||
| 993 | int ret = dialog.exec(); | ||
| 994 | applicationInstance->getWindow()->activateWindow(); | ||
| 995 | if (ret != QDialog::Accepted) { | ||
| 996 | return; | ||
| 997 | } | ||
| 998 | } | ||
| 969 | 999 | ||
| 970 | void Menu::bandwidthDetails() { | 1000 | void Menu::bandwidthDetails() { |
| 971 | 1001 | ||