mirror of
https://github.com/overte-org/overte.git
synced 2025-06-21 17:41:24 +02:00
add a Go To User option to the menu
This commit is contained in:
parent
f7a0dd514e
commit
d66137e314
2 changed files with 32 additions and 1 deletions
|
@ -99,6 +99,11 @@ Menu::Menu() :
|
||||||
Qt::CTRL | Qt::SHIFT | Qt::Key_L,
|
Qt::CTRL | Qt::SHIFT | Qt::Key_L,
|
||||||
this,
|
this,
|
||||||
SLOT(goToLocation()));
|
SLOT(goToLocation()));
|
||||||
|
addActionToQMenuAndActionHash(fileMenu,
|
||||||
|
MenuOption::GoToUser,
|
||||||
|
Qt::CTRL | Qt::SHIFT | Qt::Key_U,
|
||||||
|
this,
|
||||||
|
SLOT(goToUser()));
|
||||||
|
|
||||||
|
|
||||||
addDisabledActionAndSeparator(fileMenu, "Settings");
|
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() {
|
void Menu::bandwidthDetails() {
|
||||||
|
|
||||||
|
|
|
@ -73,6 +73,7 @@ private slots:
|
||||||
void editPreferences();
|
void editPreferences();
|
||||||
void goToDomain();
|
void goToDomain();
|
||||||
void goToLocation();
|
void goToLocation();
|
||||||
|
void goToUser();
|
||||||
void bandwidthDetailsClosed();
|
void bandwidthDetailsClosed();
|
||||||
void voxelStatsDetailsClosed();
|
void voxelStatsDetailsClosed();
|
||||||
void cycleFrustumRenderMode();
|
void cycleFrustumRenderMode();
|
||||||
|
@ -121,7 +122,6 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace MenuOption {
|
namespace MenuOption {
|
||||||
|
|
||||||
const QString AboutApp = "About Interface";
|
const QString AboutApp = "About Interface";
|
||||||
const QString AmbientOcclusion = "Ambient Occlusion";
|
const QString AmbientOcclusion = "Ambient Occlusion";
|
||||||
const QString Avatars = "Avatars";
|
const QString Avatars = "Avatars";
|
||||||
|
@ -162,6 +162,7 @@ namespace MenuOption {
|
||||||
const QString GlowMode = "Cycle Glow Mode";
|
const QString GlowMode = "Cycle Glow Mode";
|
||||||
const QString GoToDomain = "Go To Domain...";
|
const QString GoToDomain = "Go To Domain...";
|
||||||
const QString GoToLocation = "Go To Location...";
|
const QString GoToLocation = "Go To Location...";
|
||||||
|
const QString GoToUser = "Go To User...";
|
||||||
const QString ImportVoxels = "Import Voxels";
|
const QString ImportVoxels = "Import Voxels";
|
||||||
const QString ImportVoxelsClipboard = "Import Voxels to Clipboard";
|
const QString ImportVoxelsClipboard = "Import Voxels to Clipboard";
|
||||||
const QString IncreaseAvatarSize = "Increase Avatar Size";
|
const QString IncreaseAvatarSize = "Increase Avatar Size";
|
||||||
|
|
Loading…
Reference in a new issue