diff options
Diffstat (limited to 'utils/wpseditor/gui/src/qtrackstate.h')
-rw-r--r-- | utils/wpseditor/gui/src/qtrackstate.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/utils/wpseditor/gui/src/qtrackstate.h b/utils/wpseditor/gui/src/qtrackstate.h new file mode 100644 index 0000000000..b57f7a8376 --- /dev/null +++ b/utils/wpseditor/gui/src/qtrackstate.h | |||
@@ -0,0 +1,57 @@ | |||
1 | #ifndef __QTRACKSTATE_H__ | ||
2 | #define __QTRACKSTATE_H__ | ||
3 | |||
4 | #include "wpsstate.h" | ||
5 | #include <QObject> | ||
6 | |||
7 | class QWpsState; | ||
8 | |||
9 | class QTrackState : public QObject { | ||
10 | Q_OBJECT | ||
11 | Q_CLASSINFO ( "QTrackState", "Mp3 State" ); | ||
12 | Q_PROPERTY ( QString Title READ title WRITE setTitle DESIGNABLE true USER true ) | ||
13 | Q_PROPERTY ( QString Artist READ artist WRITE setArtist DESIGNABLE true USER true ) | ||
14 | Q_PROPERTY ( QString Album READ album WRITE setAlbum DESIGNABLE true USER true ) | ||
15 | Q_PROPERTY ( int Length READ length WRITE setLength DESIGNABLE true USER true ) | ||
16 | Q_CLASSINFO("Length", "readOnly=true;value=100"); | ||
17 | Q_PROPERTY ( int Elapsed READ elapsed WRITE setElapsed DESIGNABLE true USER true ) | ||
18 | Q_CLASSINFO("Elapsed", "minimum=0;maximum=100;value=50"); | ||
19 | |||
20 | |||
21 | trackstate state; | ||
22 | |||
23 | public: | ||
24 | QTrackState(); | ||
25 | |||
26 | public slots: | ||
27 | QString title() const { | ||
28 | return state.title; | ||
29 | } | ||
30 | void setTitle ( const QString& name ); | ||
31 | |||
32 | QString artist() const { | ||
33 | return state.artist; | ||
34 | } | ||
35 | void setArtist ( const QString& name ); | ||
36 | |||
37 | QString album() const { | ||
38 | return state.album; | ||
39 | } | ||
40 | void setAlbum ( const QString& name ); | ||
41 | |||
42 | int length() const { | ||
43 | return state.length; | ||
44 | } | ||
45 | void setLength ( int l ); | ||
46 | |||
47 | int elapsed() const { | ||
48 | return state.elapsed; | ||
49 | } | ||
50 | void setElapsed ( int l ); | ||
51 | |||
52 | signals: | ||
53 | void stateChanged ( trackstate state ); | ||
54 | |||
55 | }; | ||
56 | |||
57 | #endif // __QTRACKSTATE_H__ | ||