Skip to content

Commit ae6ffd3

Browse files
author
ThePBone
committed
Menu editor for systray context menu
1 parent 9d47b10 commit ae6ffd3

25 files changed

+1086
-131
lines changed

V4L_Frontend.pro

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ SOURCES += \
5858
dialog/palettedlg.cpp \
5959
dialog/presetdlg.cpp \
6060
dialog/qanimatedslider.cpp \
61+
dialog/qmenueditor.cpp \
6162
dialog/qmessageoverlay.cpp \
6263
dialog/settingsdlg.cpp \
6364
dialog/slidingstackedwidget.cpp \
@@ -108,6 +109,7 @@ HEADERS += \
108109
dialog/palettedlg.h \
109110
dialog/presetdlg.h \
110111
dialog/qanimatedslider.h \
112+
dialog/qmenueditor.h \
111113
dialog/qmessageoverlay.h \
112114
dialog/settingsdlg.h \
113115
dialog/slidingstackedwidget.h \
@@ -131,7 +133,9 @@ FORMS += \
131133
dialog/convolver.ui \
132134
dialog/firstlaunchwizard.ui \
133135
dialog/importandroid.ui \
136+
dialog/items/detailitem.ui \
134137
dialog/log.ui \
138+
dialog/menueditor.ui \
135139
dialog/palettedlg.ui \
136140
dialog/preset.ui \
137141
dialog/settings.ui \

config/appconfigwrapper.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,14 @@ void AppConfigWrapper::setTrayMode(int mode){
150150
appconf->setValue("session.tray.mode",QVariant(mode));
151151
saveAppConfig();
152152
}
153+
void AppConfigWrapper::setTrayContextMenu(const QString& ctx){
154+
appconf->setValue("session.tray.contextmenu",QVariant(ctx));
155+
saveAppConfig();
156+
}
157+
QString AppConfigWrapper::getTrayContextMenu(){
158+
QString name = appconf->getString("session.tray.contextmenu");
159+
return name;
160+
}
153161
void AppConfigWrapper::setSpectrumEnable(bool b){
154162
appconf->setValue("visualizer.spectrum.enable",QVariant(b));
155163
emit spectrumChanged();

config/appconfigwrapper.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ class AppConfigWrapper : public QObject
8888
bool getEqualizerPermanentHandles();
8989
void setIntroShown(bool b);
9090
bool getIntroShown();
91+
QString getTrayContextMenu();
92+
void setTrayContextMenu(const QString &ctx);
93+
9194
signals:
9295
void spectrumChanged();
9396
void spectrumReloadRequired();

dialog/items/detailitem.ui

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ui version="4.0">
3+
<class>configitem</class>
4+
<widget class="QWidget" name="configitem">
5+
<property name="geometry">
6+
<rect>
7+
<x>0</x>
8+
<y>0</y>
9+
<width>288</width>
10+
<height>65</height>
11+
</rect>
12+
</property>
13+
<property name="windowTitle">
14+
<string>Form</string>
15+
</property>
16+
<layout class="QVBoxLayout" name="verticalLayout_2">
17+
<item>
18+
<layout class="QVBoxLayout" name="verticalLayout">
19+
<property name="spacing">
20+
<number>3</number>
21+
</property>
22+
<item>
23+
<widget class="QLabel" name="title">
24+
<property name="styleSheet">
25+
<string notr="true">*{
26+
font-weight: 600;
27+
}</string>
28+
</property>
29+
<property name="text">
30+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&amp;lt;Name&amp;gt; &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
31+
</property>
32+
</widget>
33+
</item>
34+
<item>
35+
<widget class="QLabel" name="desc">
36+
<property name="text">
37+
<string>&lt;Desc&gt;</string>
38+
</property>
39+
</widget>
40+
</item>
41+
<item>
42+
<spacer name="verticalSpacer">
43+
<property name="orientation">
44+
<enum>Qt::Vertical</enum>
45+
</property>
46+
<property name="sizeHint" stdset="0">
47+
<size>
48+
<width>20</width>
49+
<height>40</height>
50+
</size>
51+
</property>
52+
</spacer>
53+
</item>
54+
</layout>
55+
</item>
56+
</layout>
57+
</widget>
58+
<resources/>
59+
<connections/>
60+
</ui>

0 commit comments

Comments
 (0)