mirror of
https://github.com/mapmapteam/mapmap.git
synced 2026-04-03 05:59:38 +02:00
add PreferencesDialog - not yet effective
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
|
||||
MainWindow::MainWindow()
|
||||
{
|
||||
|
||||
// Create model.
|
||||
if (Media::hasVideoSupport())
|
||||
std::cout << "Video support: yes" << std::endl;
|
||||
@@ -73,6 +74,8 @@ MainWindow::MainWindow()
|
||||
|
||||
// Start playing by default.
|
||||
play();
|
||||
|
||||
_preferences_dialog = new PreferencesDialog(this, this);
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
@@ -306,6 +309,11 @@ void MainWindow::open()
|
||||
videoTimer->start();
|
||||
}
|
||||
|
||||
void MainWindow::preferences()
|
||||
{
|
||||
this->_preferences_dialog->show();
|
||||
}
|
||||
|
||||
bool MainWindow::save()
|
||||
{
|
||||
// Popup save-as dialog if file has never been saved.
|
||||
@@ -1160,6 +1168,14 @@ void MainWindow::createActions()
|
||||
deleteAction->setIconVisibleInMenu(false);
|
||||
connect(deleteAction, SIGNAL(triggered()), this, SLOT(deleteItem()));
|
||||
|
||||
// Preferences...
|
||||
preferencesAction = new QAction(tr("&Preferences..."), this);
|
||||
//preferencesAction->setIcon(QIcon(":/preferences"));
|
||||
preferencesAction->setShortcut(QKeySequence::Preferences);
|
||||
preferencesAction->setStatusTip(tr("Configure preferences..."));
|
||||
//preferencesAction->setIconVisibleInMenu(false);
|
||||
connect(preferencesAction, SIGNAL(triggered()), this, SLOT(preferences()));
|
||||
|
||||
// Add quad/mesh.
|
||||
addMeshAction = new QAction(tr("Add Quad/&Mesh"), this);
|
||||
addMeshAction->setShortcut(tr("CTRL+M"));
|
||||
@@ -1344,6 +1360,7 @@ void MainWindow::createMenus()
|
||||
// editMenu->addAction(copyAction);
|
||||
// editMenu->addAction(pasteAction);
|
||||
editMenu->addAction(deleteAction);
|
||||
editMenu->addAction(preferencesAction);
|
||||
|
||||
// View.
|
||||
viewMenu = menuBar->addMenu(tr("&View"));
|
||||
|
||||
Reference in New Issue
Block a user