32 |
32 |
33 // ------------------------------------------------------------------------------------------------- |
33 // ------------------------------------------------------------------------------------------------- |
34 // QMPXVideoPlaybackDetailsPlaybackWindow::QMPXVideoPlaybackDetailsPlaybackWindow |
34 // QMPXVideoPlaybackDetailsPlaybackWindow::QMPXVideoPlaybackDetailsPlaybackWindow |
35 // ------------------------------------------------------------------------------------------------- |
35 // ------------------------------------------------------------------------------------------------- |
36 // |
36 // |
37 QMPXVideoPlaybackDetailsPlaybackWindow::QMPXVideoPlaybackDetailsPlaybackWindow( |
37 QMPXVideoPlaybackDetailsPlaybackWindow::QMPXVideoPlaybackDetailsPlaybackWindow( |
38 QMPXVideoPlaybackControlsController* controller ) |
38 QMPXVideoPlaybackControlsController* controller ) |
39 : mController( controller ) |
39 : mController( controller ) |
40 , mInitialized( false ) |
40 , mInitialized( false ) |
41 { |
41 { |
42 MPX_ENTER_EXIT(_L("QMPXVideoPlaybackDetailsPlaybackWindow::QMPXVideoPlaybackDetailsPlaybackWindow()")); |
42 MPX_ENTER_EXIT(_L("QMPXVideoPlaybackDetailsPlaybackWindow::QMPXVideoPlaybackDetailsPlaybackWindow()")); |
105 // create 'share' button and connect corresponding signal/slot |
105 // create 'share' button and connect corresponding signal/slot |
106 // |
106 // |
107 QGraphicsWidget *detailsShareWidget = loader->findWidget( QString( "detailsShareButton" ) ); |
107 QGraphicsWidget *detailsShareWidget = loader->findWidget( QString( "detailsShareButton" ) ); |
108 HbPushButton *shareButton = qobject_cast<HbPushButton*>( detailsShareWidget ); |
108 HbPushButton *shareButton = qobject_cast<HbPushButton*>( detailsShareWidget ); |
109 connect( shareButton, SIGNAL( released() ), mController, SLOT( sendVideo() ) ); |
109 connect( shareButton, SIGNAL( released() ), mController, SLOT( sendVideo() ) ); |
110 |
110 |
111 // |
111 // |
112 // by default in xml layout, attachButton is not visible while shareButton is visible. |
112 // by default in xml layout, attachButton is not visible while shareButton is visible. |
113 // if it's an 'attach' operation, reverse the visibility order |
113 // if it's an 'attach' operation, reverse the visibility order |
114 // |
114 // |
115 if ( mController->isAttachOperation() ) |
115 if ( mController->isAttachOperation() ) |
116 { |
116 { |
117 attachButton->setVisible( true ); |
117 attachButton->setVisible( true ); |
118 shareButton->setVisible( false ); |
118 shareButton->setVisible( false ); |
119 } |
119 } |
120 else |
120 else |
121 { |
121 { |
122 // |
122 // |
123 // dim "share" button for streaming |
123 // dim "share" button for streaming |
124 // |
124 // |
125 if ( mController->fileDetails()->mPlaybackMode == EMPXVideoStreaming || |
125 if ( mController->fileDetails()->mPlaybackMode == EMPXVideoStreaming || |
126 mController->fileDetails()->mPlaybackMode == EMPXVideoLiveStreaming ) |
126 mController->fileDetails()->mPlaybackMode == EMPXVideoLiveStreaming ) |
165 MPX_DEBUG(_L("QMPXVideoPlaybackDetailsPlaybackWindow::playPause")); |
165 MPX_DEBUG(_L("QMPXVideoPlaybackDetailsPlaybackWindow::playPause")); |
166 |
166 |
167 mController->handleCommand( EMPXPbvCmdPlayPause ); |
167 mController->handleCommand( EMPXPbvCmdPlayPause ); |
168 } |
168 } |
169 |
169 |
170 // ------------------------------------------------------------------------------------------------- |
|
171 // QMPXVideoPlaybackDetailsPlaybackWindow::mousePressEvent |
|
172 // ------------------------------------------------------------------------------------------------- |
|
173 // |
|
174 void QMPXVideoPlaybackDetailsPlaybackWindow::mousePressEvent( QGraphicsSceneMouseEvent *event ) |
|
175 { |
|
176 MPX_DEBUG(_L("QMPXVideoPlaybackDetailsPlaybackWindow::mousePressEvent")); |
|
177 |
|
178 event->accept(); |
|
179 } |
|
180 |
|
181 // ------------------------------------------------------------------------------------------------- |
|
182 // QMPXVideoPlaybackDetailsPlaybackWindow::mouseReleaseEvent |
|
183 // ------------------------------------------------------------------------------------------------- |
|
184 // |
|
185 void QMPXVideoPlaybackDetailsPlaybackWindow::mouseReleaseEvent( QGraphicsSceneMouseEvent *event ) |
|
186 { |
|
187 MPX_ENTER_EXIT(_L("QMPXVideoPlaybackDetailsPlaybackWindow::mouseReleaseEvent")); |
|
188 |
|
189 playPause(); |
|
190 |
|
191 event->accept(); |
|
192 } |
|
193 |
|
194 //End of file |
170 //End of file |