source: smplayer/vendor/current/src/basegui.h

Last change on this file was 186, checked in by Silvan Scherrer, 8 years ago

SMPlayer: update vendor to 17.1.0

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