Diffstat (limited to 'noncore/multimedia/opieplayer3/audiowidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer3/audiowidget.cpp | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/noncore/multimedia/opieplayer3/audiowidget.cpp b/noncore/multimedia/opieplayer3/audiowidget.cpp index 7ba6274..b435c1b 100644 --- a/noncore/multimedia/opieplayer3/audiowidget.cpp +++ b/noncore/multimedia/opieplayer3/audiowidget.cpp | |||
@@ -19,2 +19,3 @@ AudioWidget::AudioWidget( QWidget * parent, const char * name, WFlags f) | |||
19 | m_InfoBox = new QTextView(this); | 19 | m_InfoBox = new QTextView(this); |
20 | #if 0 | ||
20 | m_PosSlider = new QSlider(QSlider::Horizontal,this); | 21 | m_PosSlider = new QSlider(QSlider::Horizontal,this); |
@@ -27,2 +28,3 @@ AudioWidget::AudioWidget( QWidget * parent, const char * name, WFlags f) | |||
27 | m_uppos=0; | 28 | m_uppos=0; |
29 | #endif | ||
28 | } | 30 | } |
@@ -33,7 +35,9 @@ AudioWidget::~AudioWidget() | |||
33 | 35 | ||
34 | void AudioWidget::slotNewPos(int pos) | 36 | void AudioWidget::slotNewPos(int /* pos*/) |
35 | { | 37 | { |
36 | if (!m_xineLib) return; | 38 | if (!m_xineLib) return; |
39 | #if 0 | ||
37 | if (m_uppos==pos) return; | 40 | if (m_uppos==pos) return; |
38 | m_xineLib->seekTo(pos); | 41 | m_xineLib->seekTo(pos); |
42 | #endif | ||
39 | } | 43 | } |
@@ -42,3 +46,5 @@ void AudioWidget::sliderPressed() | |||
42 | { | 46 | { |
47 | #if 0 | ||
43 | m_pressed = true; | 48 | m_pressed = true; |
49 | #endif | ||
44 | } | 50 | } |
@@ -47,3 +53,5 @@ void AudioWidget::sliderReleased() | |||
47 | { | 53 | { |
54 | #if 0 | ||
48 | m_pressed = false; | 55 | m_pressed = false; |
56 | #endif | ||
49 | } | 57 | } |
@@ -59,3 +67,3 @@ void AudioWidget::closeEvent(QCloseEvent*e) | |||
59 | 67 | ||
60 | void AudioWidget::playFile(const DocLnk&aLnk,XINE::Lib*aLib) | 68 | int AudioWidget::playFile(const DocLnk&aLnk,XINE::Lib*aLib) |
61 | { | 69 | { |
@@ -63,3 +71,3 @@ void AudioWidget::playFile(const DocLnk&aLnk,XINE::Lib*aLib) | |||
63 | if (m_xineLib != aLib) { | 71 | if (m_xineLib != aLib) { |
64 | disconnect(m_xineLib); | 72 | if (m_xineLib) disconnect(m_xineLib); |
65 | m_xineLib = aLib; | 73 | m_xineLib = aLib; |
@@ -67,8 +75,13 @@ void AudioWidget::playFile(const DocLnk&aLnk,XINE::Lib*aLib) | |||
67 | if (!m_xineLib) { | 75 | if (!m_xineLib) { |
68 | return; | 76 | return -1; |
69 | } | 77 | } |
78 | #if 0 | ||
70 | m_uppos=0; | 79 | m_uppos=0; |
71 | m_PosSlider->setValue(0); | 80 | m_PosSlider->setValue(0); |
81 | #endif | ||
72 | m_xineLib->setShowVideo(false); | 82 | m_xineLib->setShowVideo(false); |
73 | m_xineLib->play(m_current.file()); | 83 | int res = m_xineLib->play(m_current.file()); |
84 | if (res != 1) { | ||
85 | return -2; | ||
86 | } | ||
74 | // title | 87 | // title |
@@ -81,3 +94,6 @@ void AudioWidget::playFile(const DocLnk&aLnk,XINE::Lib*aLib) | |||
81 | int l = m_xineLib->length(); | 94 | int l = m_xineLib->length(); |
95 | int tmp = l; | ||
96 | #if 0 | ||
82 | m_PosSlider->setRange(0,l); | 97 | m_PosSlider->setRange(0,l); |
98 | #endif | ||
83 | QString laenge=""; | 99 | QString laenge=""; |
@@ -104,2 +120,4 @@ void AudioWidget::playFile(const DocLnk&aLnk,XINE::Lib*aLib) | |||
104 | text+="<H2><center>"+title+"</center></h2>"; | 120 | text+="<H2><center>"+title+"</center></h2>"; |
121 | } else { | ||
122 | text+="<H2><center>"+m_current.name()+"</center></h2>"; | ||
105 | } | 123 | } |
@@ -110,2 +128,3 @@ void AudioWidget::playFile(const DocLnk&aLnk,XINE::Lib*aLib) | |||
110 | m_InfoBox->setText(text); | 128 | m_InfoBox->setText(text); |
129 | return tmp; | ||
111 | } | 130 | } |
@@ -119,4 +138,5 @@ void AudioWidget::stopPlaying() | |||
119 | 138 | ||
120 | void AudioWidget::updatePos(int val) | 139 | void AudioWidget::updatePos(int /* val */) |
121 | { | 140 | { |
141 | #if 0 | ||
122 | if (m_pressed) return; | 142 | if (m_pressed) return; |
@@ -124,2 +144,3 @@ void AudioWidget::updatePos(int val) | |||
124 | m_PosSlider->setValue(val); | 144 | m_PosSlider->setValue(val); |
145 | #endif | ||
125 | } | 146 | } |