diff options
Diffstat (limited to 'utils/wpseditor/gui/src/qtrackstate.cpp')
-rw-r--r-- | utils/wpseditor/gui/src/qtrackstate.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/utils/wpseditor/gui/src/qtrackstate.cpp b/utils/wpseditor/gui/src/qtrackstate.cpp new file mode 100644 index 0000000000..dad2f9a4aa --- /dev/null +++ b/utils/wpseditor/gui/src/qtrackstate.cpp | |||
@@ -0,0 +1,41 @@ | |||
1 | #include "qtrackstate.h" | ||
2 | #include <stdlib.h> | ||
3 | |||
4 | // | ||
5 | QTrackState::QTrackState( ) | ||
6 | : QObject() { | ||
7 | memset(&state,0,sizeof(state)); | ||
8 | state.title = (char*)"title"; | ||
9 | state.artist = (char*)"artist"; | ||
10 | state.album = (char*)"album"; | ||
11 | state.length = 100; | ||
12 | state.elapsed = 50; | ||
13 | } | ||
14 | |||
15 | void QTrackState::setTitle(const QString& name) { | ||
16 | state.title = new char[name.length()]; | ||
17 | strcpy(state.title,name.toAscii()); | ||
18 | emit stateChanged(state); | ||
19 | } | ||
20 | |||
21 | void QTrackState::setArtist(const QString& name) { | ||
22 | state.artist = new char[name.length()]; | ||
23 | strcpy(state.artist,name.toAscii()); | ||
24 | emit stateChanged(state); | ||
25 | } | ||
26 | |||
27 | void QTrackState::setAlbum(const QString& name) { | ||
28 | state.album = new char[name.length()]; | ||
29 | strcpy(state.album,name.toAscii()); | ||
30 | emit stateChanged(state); | ||
31 | } | ||
32 | |||
33 | void QTrackState::setLength(int le) { | ||
34 | state.length = le; | ||
35 | emit stateChanged(state); | ||
36 | } | ||
37 | |||
38 | void QTrackState::setElapsed(int le) { | ||
39 | state.elapsed = le; | ||
40 | emit stateChanged(state); | ||
41 | } | ||