summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer3/videowidget.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer3/videowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer3/videowidget.cpp77
1 files changed, 16 insertions, 61 deletions
diff --git a/noncore/multimedia/opieplayer3/videowidget.cpp b/noncore/multimedia/opieplayer3/videowidget.cpp
index a28d47d..833ecb4 100644
--- a/noncore/multimedia/opieplayer3/videowidget.cpp
+++ b/noncore/multimedia/opieplayer3/videowidget.cpp
@@ -17,3 +17,3 @@ VideoWidget::VideoWidget( QWidget * parent, const char * name, WFlags f)
17 m_xineLib = 0; 17 m_xineLib = 0;
18 18 m_scaleUp = false;
19 m_MainLayout = new QVBoxLayout(this); 19 m_MainLayout = new QVBoxLayout(this);
@@ -21,16 +21,4 @@ VideoWidget::VideoWidget( QWidget * parent, const char * name, WFlags f)
21 m_Videodisplay = new XineVideoWidget(this,"videodisp"); 21 m_Videodisplay = new XineVideoWidget(this,"videodisp");
22#if 0
23 m_PosSlider = new QSlider(QSlider::Horizontal,this);
24 m_PosSlider->setTickInterval(60);
25 connect(m_PosSlider,SIGNAL(valueChanged(int)),this,SLOT(slotNewPos(int)));
26 connect(m_PosSlider,SIGNAL(sliderMoved(int)),this,SLOT(slotNewPos(int)));
27 connect(m_PosSlider,SIGNAL(sliderPressed()),this,SLOT(sliderPressed()));
28 connect(m_PosSlider,SIGNAL(sliderReleased()),this,SLOT(sliderReleased()));
29#endif
30 connect(m_Videodisplay,SIGNAL(videoResized ( const QSize & )),this,SLOT(slot_Videoresized(const QSize&))); 22 connect(m_Videodisplay,SIGNAL(videoResized ( const QSize & )),this,SLOT(slot_Videoresized(const QSize&)));
31 connect(m_Videodisplay,SIGNAL(clicked()),this,SLOT(slotClicked())); 23 connect(m_Videodisplay,SIGNAL(clicked()),this,SLOT(slotClicked()));
32#if 0
33 m_pressed = false;
34 m_uppos=0;
35#endif
36} 24}
@@ -43,3 +31,2 @@ void VideoWidget::slotClicked()
43{ 31{
44 odebug << "clicked " << oendl;
45 emit videoclicked(); 32 emit videoclicked();
@@ -51,34 +38,4 @@ void VideoWidget::closeEvent(QCloseEvent*e)
51 38
52void VideoWidget::slotNewPos(int /*pos*/)
53{
54#if 0
55 if (!m_xineLib) return;
56 if (m_uppos==pos) return;
57 m_xineLib->seekTo(pos);
58#endif
59}
60
61void VideoWidget::sliderPressed()
62{
63#if 0
64 m_pressed = true;
65#endif
66}
67
68void VideoWidget::sliderReleased()
69{
70#if 0
71 m_pressed = false;
72#endif
73}
74
75void VideoWidget::fullScreen(bool /* how */) 39void VideoWidget::fullScreen(bool /* how */)
76{ 40{
77#if 0
78 if (how) {
79 m_PosSlider->hide();
80 } else {
81 m_PosSlider->show();
82 }
83#endif
84} 41}
@@ -98,10 +55,7 @@ int VideoWidget::playFile(const DocLnk&aLnk,XINE::Lib*aLib)
98 connect(m_xineLib,SIGNAL(stopped()),this,SLOT(slotStopped())); 55 connect(m_xineLib,SIGNAL(stopped()),this,SLOT(slotStopped()));
99#if 0
100 m_uppos=0;
101 m_PosSlider->setValue(0);
102#endif
103 m_xineLib->setWidget(m_Videodisplay); 56 m_xineLib->setWidget(m_Videodisplay);
104 m_xineLib->setShowVideo(true); 57 m_xineLib->setShowVideo(true);
105 m_xineLib->resize(m_Videodisplay->size());
106 int res = m_xineLib->play(m_current.file()); 58 int res = m_xineLib->play(m_current.file());
59 vSize = m_xineLib->videoSize();
60 slot_Videoresized(m_Videodisplay->size());
107 odebug << "Xine play: " << res << oendl; 61 odebug << "Xine play: " << res << oendl;
@@ -111,6 +65,2 @@ int VideoWidget::playFile(const DocLnk&aLnk,XINE::Lib*aLib)
111 return m_xineLib->length(); 65 return m_xineLib->length();
112#if 0
113 m_PosSlider->setRange(0,l);
114 m_PosSlider->setPageStep(l/10);
115#endif
116} 66}
@@ -126,3 +76,2 @@ void VideoWidget::slotStopped()
126{ 76{
127// check fullscreen here!
128} 77}
@@ -131,5 +80,8 @@ void VideoWidget::slot_Videoresized(const QSize&s)
131{ 80{
132 odebug << "Videoresized: " << s << oendl;
133 if (m_xineLib) { 81 if (m_xineLib) {
134 m_xineLib->resize(s); 82 if (vSize.width()<s.width()&&vSize.height()<s.height()&&!m_scaleUp) {
83 m_xineLib->resize(vSize);
84 } else {
85 m_xineLib->resize(s);
86 }
135 } 87 }
@@ -137,9 +89,12 @@ void VideoWidget::slot_Videoresized(const QSize&s)
137 89
90void VideoWidget::scaleUp(bool how)
91{
92 if (how == m_scaleUp) return;
93 m_scaleUp = how;
94 slot_Videoresized(m_Videodisplay->size());
95 m_Videodisplay->repaint();
96}
97
138void VideoWidget::updatePos(int /*val*/) 98void VideoWidget::updatePos(int /*val*/)
139{ 99{
140#if 0
141 if (m_pressed) return;
142 m_uppos = val;
143 m_PosSlider->setValue(val);
144#endif
145} 100}