-
Notifications
You must be signed in to change notification settings - Fork 2
/
actions.h
executable file
·164 lines (142 loc) · 4.6 KB
/
actions.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
#ifndef ACTIONS_H
#define ACTIONS_H
#include "tumb.h"
#include <QObject>
#include <QWidget>
#include <QActionGroup>
#include <QMenu>
#define P_PlayOne 0
#define P_RepeatOne 1
#define P_Squent 2
#define P_Repeat 3
#define P_Random 4
class ACtions : public QObject
{
Q_OBJECT
public:
explicit ACtions(QObject *parent = nullptr);
static ACtions *instance();
//-- playBack
static QAction *PlayAct() {return instance()-> actPlay;}
static QAction *PauseAct() {return instance()->actPause;}
//--Seek
static QAction *seekPlusAct() {return instance()-> actSeekPlus;}
static QAction *seekMinusAct() {return instance()->actSeekMinus;}
static QAction *NextAct() {return instance()->actNext;}
static QAction *PrevAct() {return instance()->actPrev;}
static QAction *PlayPauseAct() {return instance()->actPlayPause;}
static QAction *StopAct() {return instance()->actStop;}
static QAction *toggleLibreryAct() {return instance()->actToggleLibrery;}
//-- Volume
static QAction *volumeAct() {return instance()->actVolume;}
static QAction *volumeUpAct() {return instance()->actVolumeUp;}
static QAction *volumeDownAct() {return instance()->actVolumeDown;}
static QAction *muteUnmuteAct() {return instance()->actMuteUnmute;}
static void setPlayIcon(){instance()-> actPlayPause->setIcon(instance()->playIcon);}
static void setPauseIcon(){instance()-> actPlayPause->setIcon(instance()->pauseIcon);}
//-- Main
static QAction *openFilesAct(){return instance()->actOpenFile;}
static QAction *openOpenUrlsAct(){return instance()->actOpenUrl;}
static QAction *showSettingsAct(){return instance()->actShowSettings;}
static QAction *swichMimiPlayerAct(){return instance()->actSwich;}
static QAction *quitAct(){return instance()->actQuit;}
static QAction *updateAllAct(){return instance()->actUpdateAll;}
static QAction *searchAct(){return instance()->actSearch;}
static QAction *rmNonExistAct(){return instance()->actRmNonExist;}
static QAction *showMenuAct(){return instance()->actShowMenu;}
//-- Paylist
static QMenu *menuPlayBackMode(){return instance()->mnuPlayMode;}
static QAction *modeAct(){return instance()->actMode;}
static QAction *removeItemAct(){return instance()->actRemoveItem;}
static QAction *cleanListAct(){return instance()->actCleanList;}
//-- help
static QAction *helpAct(){return instance()->actHelp;}
static QAction *aboutAct(){return instance()->actAbout;}
static QAction *aboutQtAct(){return instance()->actAboutQt;}
//-- Style
static QString stylShete(int h);
signals:
//-- playBack
void play();
void Pause();
void Stop();
void previous();
void next();
void playPause();
void toggleLibreryChanged(bool);
//--seek
void seekPlusChanged();
void seekMinusChanged();
//--Volume
void volumeUpChanged();
void volumeDownChanged();
void muteUnmuteChanged(bool);
//-- Main
void openFiles();
void openOpenUrls();
void showSettingsClicked();
void swichMimiPlayer(bool);
void updateAll();
void rmNonExist();
void showMenuChanged(bool);
void quit();
void showSearchChanged();
void showOptions();
//-- PLayalist
void playbackModeChanged(int);
void removeItem();
void clearList();
public slots:
private:
//-- playBack
QAction *actPlay;
QAction *actPause;
QAction *actNext;
QAction *actPrev;
QAction *actPlayPause;
QAction *actStop;
//-- seek
QAction *actSeekPlus;
QAction *actSeekMinus;
//-Volume
QAction *actVolumeUp;
QAction *actVolumeDown;
QAction *actMuteUnmute;
QAction *actVolume;
//-- Main
QAction *actOpenFile;
QAction *actOpenUrl;
QAction *actShowSettings;
QAction *actSwich;
QAction *actQuit;
QAction *actUpdateAll;
QAction *actSearch;
QAction *actRmNonExist;
QAction *actShowMenu;
//-- PlayList Mode
QMenu *mnuPlayMode;
QActionGroup *actGroup;
QAction *actPlayOne;
QAction *actRepeatOne;
QAction *actSquent;
QAction *actRepeatAlbum;
QAction *actRandom;
QAction *actMode;
QAction *actRemoveItem;
QAction *actCleanList;
QAction *actHelp;
QAction *actAbout;
QAction *actAboutQt;
QAction *actToggleLibrery;
QIcon playIcon;
QIcon pauseIcon;
public slots:
void setupIcons();
private slots:
void setPlayMode(QAction *action);
void toggleLibreryIcon(bool checked);
void about();
void help();
}
;
#endif // ACTIONS_H