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) :
69
69
m_editMenu->addItem (m_projectSettingsItem);
70
70
connect (m_projectSettingsItem, &MenuItemModel::clicked, this , &AppMenuBar::projectSettingsTriggered);
71
71
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
+
72
83
// Help menu
73
84
m_helpMenu = new MenuModel (m_model);
74
85
m_helpMenu->setTitle (tr (" &Help" ));
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ class AppMenuBar : public QObject
52
52
void fps60ModeChanged ();
53
53
void muteChanged ();
54
54
void projectSettingsTriggered ();
55
+ void preferencesTriggered ();
55
56
void aboutAppTriggered ();
56
57
57
58
private:
@@ -72,6 +73,8 @@ class AppMenuBar : public QObject
72
73
uicomponents::MenuItemModel *m_fps60ModeItem = nullptr ;
73
74
uicomponents::MenuItemModel *m_muteItem = nullptr ;
74
75
uicomponents::MenuItemModel *m_projectSettingsItem = nullptr ;
76
+ uicomponents::MenuItemModel *m_editSeparator = nullptr ;
77
+ uicomponents::MenuItemModel *m_preferencesItem = nullptr ;
75
78
76
79
uicomponents::MenuModel *m_helpMenu = nullptr ;
77
80
uicomponents::MenuItemModel *m_aboutAppItem = nullptr ;
Original file line number Diff line number Diff line change @@ -44,6 +44,10 @@ ApplicationWindow {
44
44
projectSettingsDialog .open ();
45
45
}
46
46
47
+ function onPreferencesTriggered () {
48
+ preferencesDialog .open ();
49
+ }
50
+
47
51
function onAboutAppTriggered () {
48
52
aboutDialog .open ();
49
53
}
@@ -57,6 +61,8 @@ ApplicationWindow {
57
61
projectPlayer: player
58
62
}
59
63
64
+ PreferencesDialog { id: preferencesDialog }
65
+
60
66
CustomMessageDialog {
61
67
id: unsupportedBlocksDialog
62
68
title: qsTr (" Warning" )
You can’t perform that action at this time.
0 commit comments