summaryrefslogtreecommitdiff
path: root/utils/wpseditor/gui/src/qtrackstate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/wpseditor/gui/src/qtrackstate.cpp')
-rw-r--r--utils/wpseditor/gui/src/qtrackstate.cpp41
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 0000000..dad2f9a
--- /dev/null
+++ b/utils/wpseditor/gui/src/qtrackstate.cpp
@@ -0,0 +1,41 @@
+#include "qtrackstate.h"
+#include <stdlib.h>
+
+//
+QTrackState::QTrackState( )
+ : QObject() {
+ memset(&state,0,sizeof(state));
+ state.title = (char*)"title";
+ state.artist = (char*)"artist";
+ state.album = (char*)"album";
+ state.length = 100;
+ state.elapsed = 50;
+}
+
+void QTrackState::setTitle(const QString& name) {
+ state.title = new char[name.length()];
+ strcpy(state.title,name.toAscii());
+ emit stateChanged(state);
+}
+
+void QTrackState::setArtist(const QString& name) {
+ state.artist = new char[name.length()];
+ strcpy(state.artist,name.toAscii());
+ emit stateChanged(state);
+}
+
+void QTrackState::setAlbum(const QString& name) {
+ state.album = new char[name.length()];
+ strcpy(state.album,name.toAscii());
+ emit stateChanged(state);
+}
+
+void QTrackState::setLength(int le) {
+ state.length = le;
+ emit stateChanged(state);
+}
+
+void QTrackState::setElapsed(int le) {
+ state.elapsed = le;
+ emit stateChanged(state);
+}