47
51
class InputControlsWidget;
48
52
class FullscreenControllerWidget;
49
53
class SpeedControlWidget;
54
CONTROLS_VISIBLE = 0x1,
55
CONTROLS_HIDDEN = 0x2,
59
CONTROLS_VISIBLE = 0x1,
60
CONTROLS_HIDDEN = 0x2,
56
61
CONTROLS_ADVANCED = 0x4,
59
typedef enum pl_dock_e {
66
65
class MainInterface : public QVLCMW
70
69
friend class PlaylistWidget;
73
73
MainInterface( intf_thread_t *);
74
74
virtual ~MainInterface();
76
76
/* Video requests from core */
77
WId getVideo( vout_thread_t *p_nvout, int *pi_x, int *pi_y,
77
WId getVideo( int *pi_x, int *pi_y,
78
78
unsigned int *pi_width, unsigned int *pi_height );
79
void releaseVideo( void );
80
int controlVideo( int i_query, va_list args );
79
void releaseVideo( void );
80
int controlVideo( int i_query, va_list args );
83
QSystemTrayIcon *getSysTray() { return sysTray; };
84
QMenu *getSysTrayMenu() { return systrayMenu; };
84
QSystemTrayIcon *getSysTray() { return sysTray; }
85
QMenu *getSysTrayMenu() { return systrayMenu; }
85
87
int getControlsVisibilityStatus();
88
virtual QSize sizeHint() const;
88
bool isPlDocked() { return ( b_plDocked != false ); }
89
bool isInterfaceFullScreen() { return b_interfaceFullScreen; }
91
92
void dropEventPlay( QDropEvent *, bool);
94
virtual bool winEvent( MSG *, long * );
92
96
virtual void dropEvent( QDropEvent *);
93
97
virtual void dragEnterEvent( QDragEnterEvent * );
94
98
virtual void dragMoveEvent( QDragMoveEvent * );
95
99
virtual void dragLeaveEvent( QDragLeaveEvent * );
96
100
virtual void closeEvent( QCloseEvent *);
97
virtual void customEvent( QEvent *);
98
101
virtual void keyPressEvent( QKeyEvent *);
99
102
virtual void wheelEvent( QWheelEvent * );
100
virtual void resizeEvent( QResizeEvent * event );
105
/* Main Widgets Creation */
106
void createMainWidget( QSettings* );
107
void createStatusBar();
108
void createPlaylist();
111
void createSystray();
113
void handleSystray();
115
/* Central StackWidget Management */
116
void showTab( QWidget *);
118
void restoreStackOldWidget();
121
void setMinimalView( bool );
122
void setInterfaceFullScreen( bool );
103
125
QSettings *settings;
104
127
QSystemTrayIcon *sysTray;
105
128
QMenu *systrayMenu;
106
131
QString input_name;
107
132
QVBoxLayout *mainLayout;
108
133
ControlsWidget *controls;
109
134
InputControlsWidget *inputC;
110
135
FullscreenControllerWidget *fullscreenControls;
112
void createMainWidget( QSettings* );
113
void createStatusBar();
115
void askForPrivacy();
116
int privacyDialog( QList<ConfigControl *> *controls );
119
void handleSystray();
120
void createSystray();
138
QStackedWidget *stackCentralW;
125
140
VideoWidget *videoWidget;
127
141
BackgroundWidget *bgWidget;
128
VisualSelector *visualSelector;
129
142
PlaylistWidget *playlistWidget;
131
bool videoIsActive; ///< Having a video now / THEMIM->hasV
132
bool videoEmbeddedFlag; ///< Want an external Video Window
133
bool playlistVisible; ///< Is the playlist visible ?
134
bool visualSelectorEnabled;
135
bool notificationEnabled; /// Systray Notifications
137
bool b_keep_size; ///< persistent resizeable window
138
QSize mainBasedSize; ///< based Wnd (normal mode only)
139
QSize mainVideoSize; ///< Wnd with video (all modes)
140
int i_visualmode; ///< Visual Mode
142
bool isDocked() { return ( i_pl_dock != PL_UNDOCKED ); }
143
int i_bg_height; ///< Save height of bgWidget
143
//VisualSelector *visualSelector;
147
146
QLabel *nameLabel;
148
147
QLabel *cryptedLabel;
149
/* Status and flags */
150
QWidget *stackCentralOldWidget;
152
QMap<QWidget *, QSize> stackWidgetsSizes;
155
bool b_notificationEnabled; /// Systray Notifications
156
bool b_autoresize; ///< persistent resizeable window
157
bool b_videoEmbedded; ///< Want an external Video Window
158
bool b_videoFullScreen; ///< --fullscreen
159
bool b_videoOnTop; ///< --video-on-top
160
bool b_hideAfterCreation;
161
bool b_minimalView; ///< Minimal video
162
bool b_interfaceFullScreen;
165
bool playlistVisible; ///< Is the playlist visible ?
166
// bool videoIsActive; ///< Having a video now / THEMIM->hasV
167
// bool b_visualSelectorEnabled;
168
bool b_plDocked; ///< Is the playlist docked ?
173
LPTASKBARLIST3 p_taskbl;
175
void createTaskBarButtons();
151
void undockPlaylist();
152
void dockPlaylist( pl_dock_e i_pos = PL_BOTTOM );
179
void dockPlaylist( bool b_docked = true );
153
180
void toggleMinimalView( bool );
154
181
void togglePlaylist();
155
183
void toggleUpdateSystrayMenu();
156
void toggleAdvanced();
157
void toggleFullScreen();
185
void toggleAdvancedButtons();
186
void toggleInterfaceFullScreen();
158
187
void toggleFSC();
159
189
void popupMenu( const QPoint& );
190
void changeThumbbarButtons( int );
161
192
/* Manage the Video Functions from the vout threads */
162
void getVideoSlot( WId *p_id, vout_thread_t *, int *pi_x, int *pi_y,
193
void getVideoSlot( WId *p_id, int *pi_x, int *pi_y,
163
194
unsigned *pi_width, unsigned *pi_height );
164
195
void releaseVideoSlot( void );
168
199
void destroyPopupMenu();
169
200
void recreateToolbars();
170
void doComponentsUpdate();
171
void setName( QString );
172
void setVLCWindowsTitle( QString title = "" );
201
void setName( const QString& );
202
void setVLCWindowsTitle( const QString& title = "" );
176
207
void handleSystrayClick( QSystemTrayIcon::ActivationReason );
177
void updateSystrayTooltipName( QString );
208
void updateSystrayTooltipName( const QString& );
178
209
void updateSystrayTooltipStatus( int );
180
211
void showCryptedLabel( bool );
213
void handleKeyPress( QKeyEvent * );
215
void showBuffering( float );
217
void resizeStack( int w, int h ) {
218
if( !isFullScreen() && !isMaximized() )
219
if( b_minimalView ) resize( w, h ); /* Oh yes, it shouldn't
220
be possible that size() - stackCentralW->size() < 0
221
since stackCentralW is contained in the QMW... */
222
else resize( size() - stackCentralW->size() + QSize( w, h ) );
225
void setVideoSize( unsigned int, unsigned int );
226
void setVideoFullScreen( bool );
227
void setVideoOnTop( bool );
182
void askGetVideo( WId *p_id, vout_thread_t *, int *pi_x, int *pi_y,
230
void askGetVideo( WId *p_id, int *pi_x, int *pi_y,
183
231
unsigned *pi_width, unsigned *pi_height );
184
232
void askReleaseVideo( );
185
233
void askVideoToResize( unsigned int, unsigned int );
234
void askVideoSetFullScreen( bool );
235
void askVideoOnTop( bool );
187
236
void minimalViewToggled( bool );
188
237
void fullscreenInterfaceToggled( bool );