source: smplayer/trunk/src/basegui.h@ 181

Last change on this file since 181 was 181, checked in by Silvan Scherrer, 9 years ago

smplayer: update trunk to version 16.8.0

  • Property svn:eol-style set to LF
File size: 21.3 KB
Line 
1/* smplayer, GUI front-end for mplayer.
2 Copyright (C) 2006-2016 Ricardo Villalba <rvm@users.sourceforge.net>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17*/
18
19#ifndef BASEGUI_H
20#define BASEGUI_H
21
22#include <QMainWindow>
23#include <QNetworkProxy>
24#include "mediadata.h"
25#include "mediasettings.h"
26#include "preferences.h"
27#include "core.h"
28#include "config.h"
29#include "guiconfig.h"
30
31#ifdef AVOID_SCREENSAVER
32#include <windows.h>
33#endif
34
35#ifdef MOUSE_GESTURES
36 #define MG_DELAYED_SEEK
37#endif
38
39//#define SHARE_MENU
40//#define DETECT_MINIMIZE_WORKAROUND
41
42#if !defined(Q_OS_WIN) && QT_VERSION >= 0x050000 && QT_VERSION < 0x050501
43#define NUMPAD_WORKAROUND
44#endif
45
46class QWidget;
47class QMenu;
48class LogWindow;
49class InfoWindow;
50class MplayerWindow;
51
52class QLabel;
53class FilePropertiesDialog;
54class VideoEqualizer;
55class AudioEqualizer;
56class Playlist;
57#ifdef FIND_SUBTITLES
58class FindSubtitlesWindow;
59#endif
60
61#ifdef VIDEOPREVIEW
62class VideoPreview;
63#endif
64
65class MyAction;
66class MyActionGroup;
67class PreferencesDialog;
68class Favorites;
69class TVList;
70class UpdateChecker;
71
72#ifdef SHARE_WIDGET
73class ShareWidget;
74#endif
75
76class BaseGui : public QMainWindow
77{
78 Q_OBJECT
79
80public:
81 BaseGui( QWidget* parent = 0, Qt::WindowFlags flags = 0 );
82 ~BaseGui();
83
84 /* Return true if the window shouldn't show on startup */
85 virtual bool startHidden() { return false; };
86
87 //! Execute all actions in \a actions. The actions should be
88 //! separated by spaces. Checkable actions could have a parameter:
89 //! true or false.
90 void runActions(QString actions);
91
92 //! Execute all the actions after the video has started to play
93 void runActionsLater(QString actions) { pending_actions_to_run = actions; };
94
95#ifdef LOG_SMPLAYER
96 //! Saves the line from the smplayer output
97 void recordSmplayerLog(QString line);
98#endif
99
100 Core * getCore() { return core; };
101 Playlist * getPlaylist() { return playlist; };
102
103public slots:
104 virtual void open(QString file); // Generic open, autodetect type.
105 virtual void openFile();
106 virtual void openFile(QString file);
107 virtual void openFiles(QStringList files);
108 virtual void openFavorite(QString file);
109 virtual void openURL();
110 virtual void openURL(QString url);
111 virtual void openVCD();
112 virtual void openAudioCD();
113 virtual void openDVD();
114 virtual void openDVDFromFolder();
115 virtual void openDVDFromFolder(QString directory);
116#ifdef BLURAY_SUPPORT
117 void openBluRay();
118 void openBluRayFromFolder();
119 void openBluRayFromFolder(QString directory);
120#endif
121 virtual void openDirectory();
122 virtual void openDirectory(QString directory);
123
124 virtual void helpFirstSteps();
125 virtual void helpFAQ();
126 virtual void helpCLOptions();
127 virtual void helpCheckUpdates();
128#ifdef SHARE_ACTIONS
129 virtual void helpDonate();
130#endif
131 virtual void helpShowConfig();
132 virtual void helpAbout();
133
134#ifdef SHARE_MENU
135 virtual void shareSMPlayer();
136#endif
137
138 virtual void loadSub();
139 virtual void loadAudioFile(); // Load external audio file
140
141 void setInitialSubtitle(const QString & subtitle_file);
142
143#ifdef FIND_SUBTITLES
144 virtual void showFindSubtitlesDialog();
145 virtual void openUploadSubtitlesPage(); //turbos
146#endif
147
148#ifdef VIDEOPREVIEW
149 virtual void showVideoPreviewDialog();
150#endif
151
152#ifdef YOUTUBE_SUPPORT
153 virtual void showTubeBrowser();
154#endif
155
156 virtual void showPlaylist();
157 virtual void showPlaylist(bool b);
158 virtual void showVideoEqualizer();
159 virtual void showVideoEqualizer(bool b);
160 virtual void showAudioEqualizer();
161 virtual void showAudioEqualizer(bool b);
162#ifdef LOG_MPLAYER
163 virtual void showMplayerLog();
164#endif
165#ifdef LOG_SMPLAYER
166 virtual void showLog();
167#endif
168 virtual void showPreferencesDialog();
169 virtual void showFilePropertiesDialog();
170
171 virtual void showGotoDialog();
172 virtual void showSubDelayDialog();
173 virtual void showAudioDelayDialog();
174 virtual void showStereo3dDialog();
175#ifdef BOOKMARKS
176 virtual void showAddBookmarkDialog();
177 virtual void showBookmarkDialog();
178#endif
179
180 virtual void exitFullscreen();
181 virtual void toggleFullscreen();
182 virtual void toggleFullscreen(bool);
183
184 virtual void toggleCompactMode();
185 virtual void toggleCompactMode(bool);
186
187 void setStayOnTop(bool b);
188 virtual void changeStayOnTop(int);
189 virtual void checkStayOnTop(Core::State);
190 void toggleStayOnTop();
191
192 void setForceCloseOnFinish(int n) { arg_close_on_finish = n; };
193 int forceCloseOnFinish() { return arg_close_on_finish; };
194
195 void setForceStartInFullscreen(int n) { arg_start_in_fullscreen = n; };
196 int forceStartInFullscreen() { return arg_start_in_fullscreen; };
197
198
199protected slots:
200 virtual void closeWindow();
201
202 virtual void setJumpTexts();
203
204 // Replace for setCaption (in Qt 4 it's not virtual)
205 virtual void setWindowCaption(const QString & title);
206
207 //virtual void openRecent(int item);
208 virtual void openRecent();
209 virtual void enterFullscreenOnPlay();
210 virtual void exitFullscreenOnStop();
211 virtual void exitFullscreenIfNeeded();
212 virtual void playlistHasFinished();
213 virtual void addToPlaylistCurrentFile();
214
215 virtual void displayState(Core::State state);
216 virtual void displayMessage(QString message, int time);
217 virtual void displayMessage(QString message);
218 virtual void gotCurrentTime(double);
219
220 virtual void initializeMenus();
221 virtual void updateWidgets();
222 virtual void updateVideoEqualizer();
223 virtual void updateAudioEqualizer();
224 virtual void setDefaultValuesFromVideoEqualizer();
225 virtual void changeVideoEqualizerBySoftware(bool b);
226
227 virtual void newMediaLoaded();
228 virtual void updateMediaInfo();
229
230 void gotNoFileToPlay();
231
232 void checkPendingActionsToRun();
233
234#if REPORT_OLD_MPLAYER
235 void checkMplayerVersion();
236 void displayWarningAboutOldMplayer();
237#endif
238
239#ifdef CHECK_UPGRADED
240 void checkIfUpgraded();
241#endif
242
243#if defined(SHARE_ACTIONS) && !defined(SHARE_WIDGET)
244 void checkReminder();
245#endif
246
247#ifdef YOUTUBE_SUPPORT
248 void YTNoSslSupport();
249 void YTNoSignature(const QString &);
250 #ifdef YT_USE_YTSIG
251 void YTUpdateScript();
252 #endif
253#endif
254 void gotForbidden();
255
256#if AUTODISABLE_ACTIONS
257 virtual void enableActionsOnPlaying();
258 virtual void disableActionsOnStop();
259#endif
260 virtual void togglePlayAction(Core::State);
261
262 void changeSizeFactor(int factor);
263 void toggleDoubleSize();
264 void resizeMainWindow(int w, int h);
265 void resizeWindow(int w, int h);
266 virtual void hidePanel();
267 void centerWindow();
268
269 /* virtual void playlistVisibilityChanged(); */
270
271 virtual void displayGotoTime(int);
272 //! You can call this slot to jump to the specified percentage in the video, while dragging the slider.
273 virtual void goToPosOnDragging(int);
274
275 virtual void showPopupMenu();
276 virtual void showPopupMenu( QPoint p );
277 /*
278 virtual void mouseReleaseEvent( QMouseEvent * e );
279 virtual void mouseDoubleClickEvent( QMouseEvent * e );
280 */
281
282 virtual void leftClickFunction();
283 virtual void rightClickFunction();
284 virtual void doubleClickFunction();
285 virtual void middleClickFunction();
286 virtual void xbutton1ClickFunction();
287 virtual void xbutton2ClickFunction();
288 virtual void processFunction(QString function);
289
290 virtual void dragEnterEvent( QDragEnterEvent * ) ;
291 virtual void dropEvent ( QDropEvent * );
292
293 virtual void applyNewPreferences();
294 virtual void applyFileProperties();
295
296 virtual void clearRecentsList();
297
298 virtual void loadActions();
299 virtual void saveActions();
300
301 virtual void processMouseMovedDiff(QPoint diff);
302 virtual void moveWindowDiff(QPoint diff);
303#ifdef MG_DELAYED_SEEK
304 virtual void delayedSeek();
305#endif
306
307 // Single instance stuff
308#ifdef SINGLE_INSTANCE
309 void handleMessageFromOtherInstances(const QString& message);
310#endif
311
312 //! Called when core can't parse the mplayer version and there's no
313 //! version supplied by the user
314 void askForMplayerVersion(QString);
315
316 void showExitCodeFromMplayer(int exit_code);
317 void showErrorFromMplayer(QProcess::ProcessError);
318
319 // stylesheet
320#if ALLOW_CHANGE_STYLESHEET
321 virtual QString loadQss(QString filename);
322 virtual void changeStyleSheet(QString style);
323#endif
324
325 void applyStyles();
326
327 virtual void setTabletMode(bool);
328
329#ifdef Q_OS_WIN
330 void checkSystemTabletMode();
331 void systemTabletModeChanged(bool);
332
333 #ifdef AVOID_SCREENSAVER
334 void clear_just_stopped();
335 #endif
336#endif
337
338#ifdef LOG_MPLAYER
339 //! Clears the mplayer log
340 void clearMplayerLog();
341
342 //! Saves the line from the mplayer output
343 void recordMplayerLog(QString line);
344
345 //! Saves the mplayer log to a file every time a file is loaded
346 void autosaveMplayerLog();
347#endif
348
349signals:
350 void frameChanged(int);
351 void ABMarkersChanged(int secs_a, int secs_b);
352 void videoInfoChanged(int width, int height, double fps);
353 void timeChanged(QString time_ready_to_print);
354 void timeChanged(double current_time);
355
356 /*
357 void wheelUp();
358 void wheelDown();
359 */
360 /*
361 void doubleClicked();
362 void leftClicked();
363 void middleClicked();
364 */
365
366 //! Sent when the user wants to close the main window
367 void quitSolicited();
368
369 //! Sent when another instance requested to play a file
370 void openFileRequested();
371
372#ifdef GUI_CHANGE_ON_RUNTIME
373 void guiChanged(QString gui);
374#endif
375
376 void preferencesChanged();
377 void tabletModeChanged(bool new_mode);
378
379protected:
380 virtual void retranslateStrings();
381 virtual void changeEvent(QEvent * event);
382#ifndef DETECT_MINIMIZE_WORKAROUND
383 virtual void hideEvent( QHideEvent * );
384 virtual void showEvent( QShowEvent * );
385#else
386 virtual bool event(QEvent * e);
387 bool was_minimized;
388#endif
389
390#ifdef Q_OS_WIN
391 virtual bool winEvent ( MSG * m, long * result );
392 #if QT_VERSION >= 0x050000
393 virtual bool nativeEvent(const QByteArray &eventType, void * message, long * result);
394 #endif
395#endif
396
397#ifdef NUMPAD_WORKAROUND
398 void keyPressEvent(QKeyEvent *event);
399#endif
400
401 virtual void aboutToEnterFullscreen();
402 virtual void aboutToExitFullscreen();
403 virtual void aboutToEnterCompactMode();
404 virtual void aboutToExitCompactMode();
405
406protected:
407 void createCore();
408 void createMplayerWindow();
409 void createVideoEqualizer();
410 void createAudioEqualizer();
411 void createPlaylist();
412 void createPanel();
413 void createPreferencesDialog();
414 void createFilePropertiesDialog();
415 void setDataToFileProperties();
416
417 void createActions();
418#if AUTODISABLE_ACTIONS
419 void setActionsEnabled(bool);
420#endif
421 void createMenus();
422 virtual void populateMainMenu();
423#ifdef BOOKMARKS
424 void updateBookmarks();
425#endif
426 void updateRecents();
427 void configureDiscDevices();
428 void setupNetworkProxy();
429 /* virtual void closeEvent( QCloseEvent * e ); */
430
431protected:
432 /* virtual void wheelEvent( QWheelEvent * e ) ; */
433
434protected:
435 QWidget * panel;
436
437 // Menu File
438 MyAction * openFileAct;
439 MyAction * openDirectoryAct;
440 MyAction * openPlaylistAct;
441 MyAction * openVCDAct;
442 MyAction * openAudioCDAct;
443 MyAction * openDVDAct;
444 MyAction * openDVDFolderAct;
445#ifdef BLURAY_SUPPORT
446 MyAction * openBluRayAct;
447 MyAction * openBluRayFolderAct;
448#endif
449 MyAction * openURLAct;
450 MyAction * exitAct;
451 MyAction * clearRecentsAct;
452
453 // Menu Play
454 MyAction * playAct;
455 MyAction * playOrPauseAct;
456 MyAction * pauseAct;
457 MyAction * pauseAndStepAct;
458 MyAction * stopAct;
459 MyAction * frameStepAct;
460 MyAction * frameBackStepAct;
461 MyAction * rewind1Act;
462 MyAction * rewind2Act;
463 MyAction * rewind3Act;
464 MyAction * forward1Act;
465 MyAction * forward2Act;
466 MyAction * forward3Act;
467 MyAction * repeatAct;
468 MyAction * setAMarkerAct;
469 MyAction * setBMarkerAct;
470 MyAction * clearABMarkersAct;
471 MyAction * gotoAct;
472
473 // Menu Speed
474 MyAction * normalSpeedAct;
475 MyAction * halveSpeedAct;
476 MyAction * doubleSpeedAct;
477 MyAction * decSpeed10Act;
478 MyAction * incSpeed10Act;
479 MyAction * decSpeed4Act;
480 MyAction * incSpeed4Act;
481 MyAction * decSpeed1Act;
482 MyAction * incSpeed1Act;
483
484 // Menu Video
485 MyAction * fullscreenAct;
486 MyAction * compactAct;
487 MyAction * videoEqualizerAct;
488 MyAction * screenshotAct;
489 MyAction * screenshotsAct;
490#ifdef CAPTURE_STREAM
491 MyAction * capturingAct;
492#endif
493#ifdef VIDEOPREVIEW
494 MyAction * videoPreviewAct;
495#endif
496 MyAction * flipAct;
497 MyAction * mirrorAct;
498 MyAction * stereo3dAct;
499 MyAction * postProcessingAct;
500 MyAction * phaseAct;
501 MyAction * deblockAct;
502 MyAction * deringAct;
503 MyAction * gradfunAct;
504 MyAction * addNoiseAct;
505 MyAction * addLetterboxAct;
506 MyAction * upscaleAct;
507
508 // Menu Audio
509 MyAction * audioEqualizerAct;
510 MyAction * muteAct;
511 MyAction * decVolumeAct;
512 MyAction * incVolumeAct;
513 MyAction * decAudioDelayAct;
514 MyAction * incAudioDelayAct;
515 MyAction * audioDelayAct; // Ask for delay
516 MyAction * extrastereoAct;
517#ifdef MPLAYER_SUPPORT
518 MyAction * karaokeAct;
519#endif
520 MyAction * volnormAct;
521 MyAction * loadAudioAct;
522 MyAction * unloadAudioAct;
523
524 // Menu Subtitles
525 MyAction * loadSubsAct;
526 MyAction * unloadSubsAct;
527 MyAction * decSubDelayAct;
528 MyAction * incSubDelayAct;
529 MyAction * subDelayAct; // Ask for delay
530 MyAction * decSubPosAct;
531 MyAction * incSubPosAct;
532 MyAction * incSubStepAct;
533 MyAction * decSubStepAct;
534 MyAction * incSubScaleAct;
535 MyAction * decSubScaleAct;
536#ifdef MPV_SUPPORT
537 MyAction * seekNextSubAct;
538 MyAction * seekPrevSubAct;
539#endif
540 MyAction * useCustomSubStyleAct;
541 MyAction * useForcedSubsOnlyAct;
542 MyAction * subVisibilityAct;
543#ifdef FIND_SUBTITLES
544 MyAction * showFindSubtitlesDialogAct;
545 MyAction * openUploadSubtitlesPageAct;//turbos
546#endif
547
548 // Menu Options
549 MyAction * showPlaylistAct;
550 MyAction * showPropertiesAct;
551 MyAction * showPreferencesAct;
552#ifdef YOUTUBE_SUPPORT
553 MyAction * showTubeBrowserAct;
554#endif
555#ifdef LOG_MPLAYER
556 MyAction * showLogMplayerAct;
557#endif
558#ifdef LOG_SMPLAYER
559 MyAction * showLogSmplayerAct;
560#endif
561 MyAction * tabletModeAct;
562
563 // Menu Help
564 MyAction * showFirstStepsAct;
565 MyAction * showFAQAct;
566 MyAction * showCLOptionsAct; // Command line options
567 MyAction * showCheckUpdatesAct;
568#if defined(YOUTUBE_SUPPORT) && defined(YT_USE_YTSIG)
569 MyAction * updateYTAct;
570#endif
571 MyAction * showConfigAct;
572#ifdef SHARE_ACTIONS
573 MyAction * donateAct;
574#endif
575 MyAction * aboutThisAct;
576
577#ifdef SHARE_MENU
578 MyAction * facebookAct;
579 MyAction * twitterAct;
580 MyAction * gmailAct;
581 MyAction * hotmailAct;
582 MyAction * yahooAct;
583#endif
584
585 // OSD
586 MyAction * incOSDScaleAct;
587 MyAction * decOSDScaleAct;
588
589 // Playlist
590 MyAction * playPrevAct;
591 MyAction * playNextAct;
592
593 // Actions not in menus
594#if !USE_MULTIPLE_SHORTCUTS
595 MyAction * decVolume2Act;
596 MyAction * incVolume2Act;
597#endif
598 MyAction * exitFullscreenAct;
599 MyAction * nextOSDAct;
600 MyAction * decContrastAct;
601 MyAction * incContrastAct;
602 MyAction * decBrightnessAct;
603 MyAction * incBrightnessAct;
604 MyAction * decHueAct;
605 MyAction * incHueAct;
606 MyAction * decSaturationAct;
607 MyAction * incSaturationAct;
608 MyAction * decGammaAct;
609 MyAction * incGammaAct;
610 MyAction * nextVideoAct;
611 MyAction * nextAudioAct;
612 MyAction * nextSubtitleAct;
613 MyAction * nextChapterAct;
614 MyAction * prevChapterAct;
615 MyAction * doubleSizeAct;
616 MyAction * resetVideoEqualizerAct;
617 MyAction * resetAudioEqualizerAct;
618 MyAction * showContextMenuAct;
619 MyAction * nextAspectAct;
620 MyAction * nextWheelFunctionAct;
621
622 MyAction * showFilenameAct;
623 MyAction * showTimeAct;
624 MyAction * toggleDeinterlaceAct;
625
626 // Moving and zoom
627 MyAction * moveUpAct;
628 MyAction * moveDownAct;
629 MyAction * moveLeftAct;
630 MyAction * moveRightAct;
631 MyAction * incZoomAct;
632 MyAction * decZoomAct;
633 MyAction * resetZoomAct;
634 MyAction * autoZoomAct;
635 MyAction * autoZoom169Act;
636 MyAction * autoZoom235Act;
637
638
639 // OSD Action Group
640 MyActionGroup * osdGroup;
641 MyAction * osdNoneAct;
642 MyAction * osdSeekAct;
643 MyAction * osdTimerAct;
644 MyAction * osdTotalAct;
645
646 // Denoise Action Group
647 MyActionGroup * denoiseGroup;
648 MyAction * denoiseNoneAct;
649 MyAction * denoiseNormalAct;
650 MyAction * denoiseSoftAct;
651
652 // Blur-sharpen group
653 MyActionGroup * unsharpGroup;
654 MyAction * unsharpNoneAct;
655 MyAction * blurAct;
656 MyAction * sharpenAct;
657
658 // Window Size Action Group
659 MyActionGroup * sizeGroup;
660 MyAction * size50;
661 MyAction * size75;
662 MyAction * size100;
663 MyAction * size125;
664 MyAction * size150;
665 MyAction * size175;
666 MyAction * size200;
667 MyAction * size300;
668 MyAction * size400;
669
670 // Deinterlace Action Group
671 MyActionGroup * deinterlaceGroup;
672 MyAction * deinterlaceNoneAct;
673 MyAction * deinterlaceL5Act;
674 MyAction * deinterlaceYadif0Act;
675 MyAction * deinterlaceYadif1Act;
676 MyAction * deinterlaceLBAct;
677 MyAction * deinterlaceKernAct;
678
679 // Aspect Action Group
680 MyActionGroup * aspectGroup;
681 MyAction * aspectDetectAct;
682 MyAction * aspectNoneAct;
683 MyAction * aspect11Act; // 1:1
684 MyAction * aspect32Act; // 3:2
685 MyAction * aspect43Act; // 4:3
686 MyAction * aspect118Act; // 11:8
687 MyAction * aspect54Act; // 5:4
688 MyAction * aspect149Act; // 14:9
689 MyAction * aspect1410Act; // 14:10
690 MyAction * aspect169Act; // 16:9
691 MyAction * aspect1610Act; // 16:10
692 MyAction * aspect235Act; // 2.35:1
693
694 // Rotate Group
695 MyActionGroup * rotateGroup;
696 MyAction * rotateNoneAct;
697 MyAction * rotateClockwiseFlipAct;
698 MyAction * rotateClockwiseAct;
699 MyAction * rotateCounterclockwiseAct;
700 MyAction * rotateCounterclockwiseFlipAct;
701
702 // Menu StayOnTop
703 MyActionGroup * onTopActionGroup;
704 MyAction * onTopAlwaysAct;
705 MyAction * onTopNeverAct;
706 MyAction * onTopWhilePlayingAct;
707 MyAction * toggleStayOnTopAct;
708
709#if USE_ADAPTER
710 // Screen Group
711 MyActionGroup * screenGroup;
712 MyAction * screenDefaultAct;
713#endif
714
715 // Closed Captions Group
716 MyActionGroup * ccGroup;
717 MyAction * ccNoneAct;
718 MyAction * ccChannel1Act;
719 MyAction * ccChannel2Act;
720 MyAction * ccChannel3Act;
721 MyAction * ccChannel4Act;
722
723 // External sub fps Group
724 MyActionGroup * subFPSGroup;
725 MyAction * subFPSNoneAct;
726 /* MyAction * subFPS23Act; */
727 MyAction * subFPS23976Act;
728 MyAction * subFPS24Act;
729 MyAction * subFPS25Act;
730 MyAction * subFPS29970Act;
731 MyAction * subFPS30Act;
732
733 // Audio Channels Action Group
734 MyActionGroup * channelsGroup;
735 /* MyAction * channelsDefaultAct; */
736 MyAction * channelsStereoAct;
737 MyAction * channelsSurroundAct;
738 MyAction * channelsFull51Act;
739 MyAction * channelsFull61Act;
740 MyAction * channelsFull71Act;
741
742 // Stereo Mode Action Group
743 MyActionGroup * stereoGroup;
744 MyAction * stereoAct;
745 MyAction * leftChannelAct;
746 MyAction * rightChannelAct;
747 MyAction * monoAct;
748 MyAction * reverseAct;
749
750 // Other groups
751#if PROGRAM_SWITCH
752 MyActionGroup * programTrackGroup;
753#endif
754 MyActionGroup * videoTrackGroup;
755 MyActionGroup * audioTrackGroup;
756 MyActionGroup * subtitleTrackGroup;
757#ifdef MPV_SUPPORT
758 MyActionGroup * secondarySubtitleTrackGroup;
759#endif
760 MyActionGroup * titleGroup;
761 MyActionGroup * chapterGroup;
762 MyActionGroup * angleGroup;
763#ifdef BOOKMARKS
764 MyActionGroup * bookmarkGroup;
765 MyAction * addBookmarkAct;
766 MyAction * editBookmarksAct;
767
768 MyAction * prevBookmarkAct;
769 MyAction * nextBookmarkAct;
770#endif
771
772#if DVDNAV_SUPPORT
773 MyAction * dvdnavUpAct;
774 MyAction * dvdnavDownAct;
775 MyAction * dvdnavLeftAct;
776 MyAction * dvdnavRightAct;
777 MyAction * dvdnavMenuAct;
778 MyAction * dvdnavSelectAct;
779 MyAction * dvdnavPrevAct;
780 MyAction * dvdnavMouseAct;
781#endif
782
783 // MENUS
784 QMenu *openMenu;
785 QMenu *playMenu;
786 QMenu *videoMenu;
787 QMenu *audioMenu;
788 QMenu *subtitlesMenu;
789 QMenu *browseMenu;
790 QMenu *viewMenu;
791 QMenu *optionsMenu;
792 QMenu *helpMenu;
793
794 QMenu * disc_menu;
795 QMenu * subtitles_track_menu;
796#ifdef MPV_SUPPORT
797 QMenu * secondary_subtitles_track_menu;
798#endif
799#if PROGRAM_SWITCH
800 QMenu * programtrack_menu;
801#endif
802 QMenu * videotrack_menu;
803 QMenu * audiotrack_menu;
804 QMenu * titles_menu;
805 QMenu * chapters_menu;
806 QMenu * angles_menu;
807#ifdef BOOKMARKS
808 QMenu * bookmark_menu;
809#endif
810 QMenu * aspect_menu;
811 QMenu * osd_menu;
812 QMenu * deinterlace_menu;
813 QMenu * denoise_menu;
814 QMenu * unsharp_menu;
815 QMenu * videosize_menu;
816 QMenu * audiochannels_menu;
817 QMenu * stereomode_menu;
818
819 QMenu * speed_menu;
820 QMenu * ab_menu; // A-B menu
821 QMenu * videofilter_menu;
822 QMenu * audiofilter_menu;
823#if defined(LOG_MPLAYER) || defined(LOG_SMPLAYER)
824 //QMenu * logs_menu;
825#endif
826 QMenu * zoom_menu;
827 QMenu * rotate_menu;
828 QMenu * ontop_menu;
829#if USE_ADAPTER
830 QMenu * screen_menu;
831#endif
832 QMenu * closed_captions_menu;
833 QMenu * subfps_menu;
834
835#ifdef SHARE_MENU
836 QMenu * share_menu;
837#endif
838
839 QMenu * popup;
840 QMenu * recentfiles_menu;
841 QMenu * access_menu;
842
843#ifdef LOG_MPLAYER
844 LogWindow * mplayer_log_window;
845#endif
846#ifdef LOG_SMPLAYER
847 LogWindow * smplayer_log_window;
848#endif
849 InfoWindow * clhelp_window;
850
851 PreferencesDialog *pref_dialog;
852 FilePropertiesDialog *file_dialog;
853 Playlist * playlist;
854 VideoEqualizer * video_equalizer;
855 AudioEqualizer * audio_equalizer;
856#ifdef FIND_SUBTITLES
857 FindSubtitlesWindow * find_subs_dialog;
858#endif
859#ifdef VIDEOPREVIEW
860 VideoPreview * video_preview;
861#endif
862
863 Core * core;
864 MplayerWindow *mplayerwindow;
865
866 Favorites * favorites;
867
868#ifdef TV_SUPPORT
869 TVList * tvlist;
870 TVList * radiolist;
871#endif
872
873#ifdef UPDATE_CHECKER
874 UpdateChecker * update_checker;
875#endif
876
877#ifdef SHARE_WIDGET
878 ShareWidget * sharewidget;
879#endif
880
881 QStringList actions_list;
882
883 QString pending_actions_to_run;
884
885 // Force settings from command line
886 int arg_close_on_finish; // -1 = not set, 1 = true, 0 = false
887 int arg_start_in_fullscreen; // -1 = not set, 1 = true, 0 = false
888
889#ifdef MG_DELAYED_SEEK
890 QTimer * delayed_seek_timer;
891 int delayed_seek_value;
892#endif
893
894private:
895 QString default_style;
896
897 // Variables to restore pos and size of the window
898 // when exiting from fullscreen mode.
899 QPoint win_pos;
900 QSize win_size;
901 bool was_maximized;
902
903#ifdef AVOID_SCREENSAVER
904 bool just_stopped;
905#endif
906
907#ifdef LOG_MPLAYER
908 QString mplayer_log;
909#endif
910#ifdef LOG_SMPLAYER
911 QString smplayer_log;
912#endif
913
914 bool ignore_show_hide_events;
915};
916
917#endif
918
Note: See TracBrowser for help on using the repository browser.