File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,17 @@ AppMenuBar::AppMenuBar(QObject *parent) :
6969 m_editMenu->addItem (m_projectSettingsItem);
7070 connect (m_projectSettingsItem, &MenuItemModel::clicked, this , &AppMenuBar::projectSettingsTriggered);
7171
72+ // Edit -> (separator)
73+ m_editSeparator = new MenuItemModel (m_editMenu);
74+ m_editSeparator->setIsSeparator (true );
75+ m_editMenu->addItem (m_editSeparator);
76+
77+ // Edit -> Preferences
78+ m_preferencesItem = new MenuItemModel (m_editMenu);
79+ m_preferencesItem->setText (tr (" Preferences..." ));
80+ m_editMenu->addItem (m_preferencesItem);
81+ connect (m_preferencesItem, &MenuItemModel::clicked, this , &AppMenuBar::preferencesTriggered);
82+
7283 // Help menu
7384 m_helpMenu = new MenuModel (m_model);
7485 m_helpMenu->setTitle (tr (" &Help" ));
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ class AppMenuBar : public QObject
5252 void fps60ModeChanged ();
5353 void muteChanged ();
5454 void projectSettingsTriggered ();
55+ void preferencesTriggered ();
5556 void aboutAppTriggered ();
5657
5758 private:
@@ -72,6 +73,8 @@ class AppMenuBar : public QObject
7273 uicomponents::MenuItemModel *m_fps60ModeItem = nullptr ;
7374 uicomponents::MenuItemModel *m_muteItem = nullptr ;
7475 uicomponents::MenuItemModel *m_projectSettingsItem = nullptr ;
76+ uicomponents::MenuItemModel *m_editSeparator = nullptr ;
77+ uicomponents::MenuItemModel *m_preferencesItem = nullptr ;
7578
7679 uicomponents::MenuModel *m_helpMenu = nullptr ;
7780 uicomponents::MenuItemModel *m_aboutAppItem = nullptr ;
Original file line number Diff line number Diff line change @@ -44,6 +44,10 @@ ApplicationWindow {
4444 projectSettingsDialog .open ();
4545 }
4646
47+ function onPreferencesTriggered () {
48+ preferencesDialog .open ();
49+ }
50+
4751 function onAboutAppTriggered () {
4852 aboutDialog .open ();
4953 }
@@ -57,6 +61,8 @@ ApplicationWindow {
5761 projectPlayer: player
5862 }
5963
64+ PreferencesDialog { id: preferencesDialog }
65+
6066 CustomMessageDialog {
6167 id: unsupportedBlocksDialog
6268 title: qsTr (" Warning" )
You can’t perform that action at this time.
0 commit comments