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

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

smplayer: restore some os/2 removals from vendor, fix branding

  • Property svn:eol-style set to LF
File size: 21.4 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#if defined(AVOID_SCREENSAVER) && !defined(Q_OS_OS2)
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#if defined(Q_OS_WIN) || defined(Q_OS_OS2)
330 #ifdef Q_OS_WIN
331 void checkSystemTabletMode();
332 void systemTabletModeChanged(bool);
333 #endif
334
335 #ifdef AVOID_SCREENSAVER
336 void clear_just_stopped();
337 #endif
338#endif
339
340#ifdef LOG_MPLAYER
341 //! Clears the mplayer log
342 void clearMplayerLog();
343
344 //! Saves the line from the mplayer output
345 void recordMplayerLog(QString line);
346
347 //! Saves the mplayer log to a file every time a file is loaded
348 void autosaveMplayerLog();
349#endif
350
351signals:
352 void frameChanged(int);
353 void ABMarkersChanged(int secs_a, int secs_b);
354 void videoInfoChanged(int width, int height, double fps);
355 void timeChanged(QString time_ready_to_print);
356 void timeChanged(double current_time);
357
358 /*
359 void wheelUp();
360 void wheelDown();
361 */
362 /*
363 void doubleClicked();
364 void leftClicked();
365 void middleClicked();
366 */
367
368 //! Sent when the user wants to close the main window
369 void quitSolicited();
370
371 //! Sent when another instance requested to play a file
372 void openFileRequested();
373
374#ifdef GUI_CHANGE_ON_RUNTIME
375 void guiChanged(QString gui);
376#endif
377
378 void preferencesChanged();
379 void tabletModeChanged(bool new_mode);
380
381protected:
382 virtual void retranslateStrings();
383 virtual void changeEvent(QEvent * event);
384#ifndef DETECT_MINIMIZE_WORKAROUND
385 virtual void hideEvent( QHideEvent * );
386 virtual void showEvent( QShowEvent * );
387#else
388 virtual bool event(QEvent * e);
389 bool was_minimized;
390#endif
391
392#ifdef Q_OS_WIN
393 virtual bool winEvent ( MSG * m, long * result );
394 #if QT_VERSION >= 0x050000
395 virtual bool nativeEvent(const QByteArray &eventType, void * message, long * result);
396 #endif
397#endif
398
399#ifdef NUMPAD_WORKAROUND
400 void keyPressEvent(QKeyEvent *event);
401#endif
402
403 virtual void aboutToEnterFullscreen();
404 virtual void aboutToExitFullscreen();
405 virtual void aboutToEnterCompactMode();
406 virtual void aboutToExitCompactMode();
407
408protected:
409 void createCore();
410 void createMplayerWindow();
411 void createVideoEqualizer();
412 void createAudioEqualizer();
413 void createPlaylist();
414 void createPanel();
415 void createPreferencesDialog();
416 void createFilePropertiesDialog();
417 void setDataToFileProperties();
418
419 void createActions();
420#if AUTODISABLE_ACTIONS
421 void setActionsEnabled(bool);
422#endif
423 void createMenus();
424 virtual void populateMainMenu();
425#ifdef BOOKMARKS
426 void updateBookmarks();
427#endif
428 void updateRecents();
429 void configureDiscDevices();
430 void setupNetworkProxy();
431 /* virtual void closeEvent( QCloseEvent * e ); */
432
433protected:
434 /* virtual void wheelEvent( QWheelEvent * e ) ; */
435
436protected:
437 QWidget * panel;
438
439 // Menu File
440 MyAction * openFileAct;
441 MyAction * openDirectoryAct;
442 MyAction * openPlaylistAct;
443 MyAction * openVCDAct;
444 MyAction * openAudioCDAct;
445 MyAction * openDVDAct;
446 MyAction * openDVDFolderAct;
447#ifdef BLURAY_SUPPORT
448 MyAction * openBluRayAct;
449 MyAction * openBluRayFolderAct;
450#endif
451 MyAction * openURLAct;
452 MyAction * exitAct;
453 MyAction * clearRecentsAct;
454
455 // Menu Play
456 MyAction * playAct;
457 MyAction * playOrPauseAct;
458 MyAction * pauseAct;
459 MyAction * pauseAndStepAct;
460 MyAction * stopAct;
461 MyAction * frameStepAct;
462 MyAction * frameBackStepAct;
463 MyAction * rewind1Act;
464 MyAction * rewind2Act;
465 MyAction * rewind3Act;
466 MyAction * forward1Act;
467 MyAction * forward2Act;
468 MyAction * forward3Act;
469 MyAction * repeatAct;
470 MyAction * setAMarkerAct;
471 MyAction * setBMarkerAct;
472 MyAction * clearABMarkersAct;
473 MyAction * gotoAct;
474
475 // Menu Speed
476 MyAction * normalSpeedAct;
477 MyAction * halveSpeedAct;
478 MyAction * doubleSpeedAct;
479 MyAction * decSpeed10Act;
480 MyAction * incSpeed10Act;
481 MyAction * decSpeed4Act;
482 MyAction * incSpeed4Act;
483 MyAction * decSpeed1Act;
484 MyAction * incSpeed1Act;
485
486 // Menu Video
487 MyAction * fullscreenAct;
488 MyAction * compactAct;
489 MyAction * videoEqualizerAct;
490 MyAction * screenshotAct;
491 MyAction * screenshotsAct;
492#ifdef CAPTURE_STREAM
493 MyAction * capturingAct;
494#endif
495#ifdef VIDEOPREVIEW
496 MyAction * videoPreviewAct;
497#endif
498 MyAction * flipAct;
499 MyAction * mirrorAct;
500 MyAction * stereo3dAct;
501 MyAction * postProcessingAct;
502 MyAction * phaseAct;
503 MyAction * deblockAct;
504 MyAction * deringAct;
505 MyAction * gradfunAct;
506 MyAction * addNoiseAct;
507 MyAction * addLetterboxAct;
508 MyAction * upscaleAct;
509
510 // Menu Audio
511 MyAction * audioEqualizerAct;
512 MyAction * muteAct;
513 MyAction * decVolumeAct;
514 MyAction * incVolumeAct;
515 MyAction * decAudioDelayAct;
516 MyAction * incAudioDelayAct;
517 MyAction * audioDelayAct; // Ask for delay
518 MyAction * extrastereoAct;
519#ifdef MPLAYER_SUPPORT
520 MyAction * karaokeAct;
521#endif
522 MyAction * volnormAct;
523 MyAction * loadAudioAct;
524 MyAction * unloadAudioAct;
525
526 // Menu Subtitles
527 MyAction * loadSubsAct;
528 MyAction * unloadSubsAct;
529 MyAction * decSubDelayAct;
530 MyAction * incSubDelayAct;
531 MyAction * subDelayAct; // Ask for delay
532 MyAction * decSubPosAct;
533 MyAction * incSubPosAct;
534 MyAction * incSubStepAct;
535 MyAction * decSubStepAct;
536 MyAction * incSubScaleAct;
537 MyAction * decSubScaleAct;
538#ifdef MPV_SUPPORT
539 MyAction * seekNextSubAct;
540 MyAction * seekPrevSubAct;
541#endif
542 MyAction * useCustomSubStyleAct;
543 MyAction * useForcedSubsOnlyAct;
544 MyAction * subVisibilityAct;
545#ifdef FIND_SUBTITLES
546 MyAction * showFindSubtitlesDialogAct;
547 MyAction * openUploadSubtitlesPageAct;//turbos
548#endif
549
550 // Menu Options
551 MyAction * showPlaylistAct;
552 MyAction * showPropertiesAct;
553 MyAction * showPreferencesAct;
554#ifdef YOUTUBE_SUPPORT
555 MyAction * showTubeBrowserAct;
556#endif
557#ifdef LOG_MPLAYER
558 MyAction * showLogMplayerAct;
559#endif
560#ifdef LOG_SMPLAYER
561 MyAction * showLogSmplayerAct;
562#endif
563 MyAction * tabletModeAct;
564
565 // Menu Help
566 MyAction * showFirstStepsAct;
567 MyAction * showFAQAct;
568 MyAction * showCLOptionsAct; // Command line options
569 MyAction * showCheckUpdatesAct;
570#if defined(YOUTUBE_SUPPORT) && defined(YT_USE_YTSIG)
571 MyAction * updateYTAct;
572#endif
573 MyAction * showConfigAct;
574#ifdef SHARE_ACTIONS
575 MyAction * donateAct;
576#endif
577 MyAction * aboutThisAct;
578
579#ifdef SHARE_MENU
580 MyAction * facebookAct;
581 MyAction * twitterAct;
582 MyAction * gmailAct;
583 MyAction * hotmailAct;
584 MyAction * yahooAct;
585#endif
586
587 // OSD
588 MyAction * incOSDScaleAct;
589 MyAction * decOSDScaleAct;
590
591 // Playlist
592 MyAction * playPrevAct;
593 MyAction * playNextAct;
594
595 // Actions not in menus
596#if !USE_MULTIPLE_SHORTCUTS
597 MyAction * decVolume2Act;
598 MyAction * incVolume2Act;
599#endif
600 MyAction * exitFullscreenAct;
601 MyAction * nextOSDAct;
602 MyAction * decContrastAct;
603 MyAction * incContrastAct;
604 MyAction * decBrightnessAct;
605 MyAction * incBrightnessAct;
606 MyAction * decHueAct;
607 MyAction * incHueAct;
608 MyAction * decSaturationAct;
609 MyAction * incSaturationAct;
610 MyAction * decGammaAct;
611 MyAction * incGammaAct;
612 MyAction * nextVideoAct;
613 MyAction * nextAudioAct;
614 MyAction * nextSubtitleAct;
615 MyAction * nextChapterAct;
616 MyAction * prevChapterAct;
617 MyAction * doubleSizeAct;
618 MyAction * resetVideoEqualizerAct;
619 MyAction * resetAudioEqualizerAct;
620 MyAction * showContextMenuAct;
621 MyAction * nextAspectAct;
622 MyAction * nextWheelFunctionAct;
623
624 MyAction * showFilenameAct;
625 MyAction * showTimeAct;
626 MyAction * toggleDeinterlaceAct;
627
628 // Moving and zoom
629 MyAction * moveUpAct;
630 MyAction * moveDownAct;
631 MyAction * moveLeftAct;
632 MyAction * moveRightAct;
633 MyAction * incZoomAct;
634 MyAction * decZoomAct;
635 MyAction * resetZoomAct;
636 MyAction * autoZoomAct;
637 MyAction * autoZoom169Act;
638 MyAction * autoZoom235Act;
639
640
641 // OSD Action Group
642 MyActionGroup * osdGroup;
643 MyAction * osdNoneAct;
644 MyAction * osdSeekAct;
645 MyAction * osdTimerAct;
646 MyAction * osdTotalAct;
647
648 // Denoise Action Group
649 MyActionGroup * denoiseGroup;
650 MyAction * denoiseNoneAct;
651 MyAction * denoiseNormalAct;
652 MyAction * denoiseSoftAct;
653
654 // Blur-sharpen group
655 MyActionGroup * unsharpGroup;
656 MyAction * unsharpNoneAct;
657 MyAction * blurAct;
658 MyAction * sharpenAct;
659
660 // Window Size Action Group
661 MyActionGroup * sizeGroup;
662 MyAction * size50;
663 MyAction * size75;
664 MyAction * size100;
665 MyAction * size125;
666 MyAction * size150;
667 MyAction * size175;
668 MyAction * size200;
669 MyAction * size300;
670 MyAction * size400;
671
672 // Deinterlace Action Group
673 MyActionGroup * deinterlaceGroup;
674 MyAction * deinterlaceNoneAct;
675 MyAction * deinterlaceL5Act;
676 MyAction * deinterlaceYadif0Act;
677 MyAction * deinterlaceYadif1Act;
678 MyAction * deinterlaceLBAct;
679 MyAction * deinterlaceKernAct;
680
681 // Aspect Action Group
682 MyActionGroup * aspectGroup;
683 MyAction * aspectDetectAct;
684 MyAction * aspectNoneAct;
685 MyAction * aspect11Act; // 1:1
686 MyAction * aspect32Act; // 3:2
687 MyAction * aspect43Act; // 4:3
688 MyAction * aspect118Act; // 11:8
689 MyAction * aspect54Act; // 5:4
690 MyAction * aspect149Act; // 14:9
691 MyAction * aspect1410Act; // 14:10
692 MyAction * aspect169Act; // 16:9
693 MyAction * aspect1610Act; // 16:10
694 MyAction * aspect235Act; // 2.35:1
695
696 // Rotate Group
697 MyActionGroup * rotateGroup;
698 MyAction * rotateNoneAct;
699 MyAction * rotateClockwiseFlipAct;
700 MyAction * rotateClockwiseAct;
701 MyAction * rotateCounterclockwiseAct;
702 MyAction * rotateCounterclockwiseFlipAct;
703
704 // Menu StayOnTop
705 MyActionGroup * onTopActionGroup;
706 MyAction * onTopAlwaysAct;
707 MyAction * onTopNeverAct;
708 MyAction * onTopWhilePlayingAct;
709 MyAction * toggleStayOnTopAct;
710
711#if USE_ADAPTER
712 // Screen Group
713 MyActionGroup * screenGroup;
714 MyAction * screenDefaultAct;
715#endif
716
717 // Closed Captions Group
718 MyActionGroup * ccGroup;
719 MyAction * ccNoneAct;
720 MyAction * ccChannel1Act;
721 MyAction * ccChannel2Act;
722 MyAction * ccChannel3Act;
723 MyAction * ccChannel4Act;
724
725 // External sub fps Group
726 MyActionGroup * subFPSGroup;
727 MyAction * subFPSNoneAct;
728 /* MyAction * subFPS23Act; */
729 MyAction * subFPS23976Act;
730 MyAction * subFPS24Act;
731 MyAction * subFPS25Act;
732 MyAction * subFPS29970Act;
733 MyAction * subFPS30Act;
734
735 // Audio Channels Action Group
736 MyActionGroup * channelsGroup;
737 /* MyAction * channelsDefaultAct; */
738 MyAction * channelsStereoAct;
739 MyAction * channelsSurroundAct;
740 MyAction * channelsFull51Act;
741 MyAction * channelsFull61Act;
742 MyAction * channelsFull71Act;
743
744 // Stereo Mode Action Group
745 MyActionGroup * stereoGroup;
746 MyAction * stereoAct;
747 MyAction * leftChannelAct;
748 MyAction * rightChannelAct;
749 MyAction * monoAct;
750 MyAction * reverseAct;
751
752 // Other groups
753#if PROGRAM_SWITCH
754 MyActionGroup * programTrackGroup;
755#endif
756 MyActionGroup * videoTrackGroup;
757 MyActionGroup * audioTrackGroup;
758 MyActionGroup * subtitleTrackGroup;
759#ifdef MPV_SUPPORT
760 MyActionGroup * secondarySubtitleTrackGroup;
761#endif
762 MyActionGroup * titleGroup;
763 MyActionGroup * chapterGroup;
764 MyActionGroup * angleGroup;
765#ifdef BOOKMARKS
766 MyActionGroup * bookmarkGroup;
767 MyAction * addBookmarkAct;
768 MyAction * editBookmarksAct;
769
770 MyAction * prevBookmarkAct;
771 MyAction * nextBookmarkAct;
772#endif
773
774#if DVDNAV_SUPPORT
775 MyAction * dvdnavUpAct;
776 MyAction * dvdnavDownAct;
777 MyAction * dvdnavLeftAct;
778 MyAction * dvdnavRightAct;
779 MyAction * dvdnavMenuAct;
780 MyAction * dvdnavSelectAct;
781 MyAction * dvdnavPrevAct;
782 MyAction * dvdnavMouseAct;
783#endif
784
785 // MENUS
786 QMenu *openMenu;
787 QMenu *playMenu;
788 QMenu *videoMenu;
789 QMenu *audioMenu;
790 QMenu *subtitlesMenu;
791 QMenu *browseMenu;
792 QMenu *viewMenu;
793 QMenu *optionsMenu;
794 QMenu *helpMenu;
795
796 QMenu * disc_menu;
797 QMenu * subtitles_track_menu;
798#ifdef MPV_SUPPORT
799 QMenu * secondary_subtitles_track_menu;
800#endif
801#if PROGRAM_SWITCH
802 QMenu * programtrack_menu;
803#endif
804 QMenu * videotrack_menu;
805 QMenu * audiotrack_menu;
806 QMenu * titles_menu;
807 QMenu * chapters_menu;
808 QMenu * angles_menu;
809#ifdef BOOKMARKS
810 QMenu * bookmark_menu;
811#endif
812 QMenu * aspect_menu;
813 QMenu * osd_menu;
814 QMenu * deinterlace_menu;
815 QMenu * denoise_menu;
816 QMenu * unsharp_menu;
817 QMenu * videosize_menu;
818 QMenu * audiochannels_menu;
819 QMenu * stereomode_menu;
820
821 QMenu * speed_menu;
822 QMenu * ab_menu; // A-B menu
823 QMenu * videofilter_menu;
824 QMenu * audiofilter_menu;
825#if defined(LOG_MPLAYER) || defined(LOG_SMPLAYER)
826 //QMenu * logs_menu;
827#endif
828 QMenu * zoom_menu;
829 QMenu * rotate_menu;
830 QMenu * ontop_menu;
831#if USE_ADAPTER
832 QMenu * screen_menu;
833#endif
834 QMenu * closed_captions_menu;
835 QMenu * subfps_menu;
836
837#ifdef SHARE_MENU
838 QMenu * share_menu;
839#endif
840
841 QMenu * popup;
842 QMenu * recentfiles_menu;
843 QMenu * access_menu;
844
845#ifdef LOG_MPLAYER
846 LogWindow * mplayer_log_window;
847#endif
848#ifdef LOG_SMPLAYER
849 LogWindow * smplayer_log_window;
850#endif
851 InfoWindow * clhelp_window;
852
853 PreferencesDialog *pref_dialog;
854 FilePropertiesDialog *file_dialog;
855 Playlist * playlist;
856 VideoEqualizer * video_equalizer;
857 AudioEqualizer * audio_equalizer;
858#ifdef FIND_SUBTITLES
859 FindSubtitlesWindow * find_subs_dialog;
860#endif
861#ifdef VIDEOPREVIEW
862 VideoPreview * video_preview;
863#endif
864
865 Core * core;
866 MplayerWindow *mplayerwindow;
867
868 Favorites * favorites;
869
870#ifdef TV_SUPPORT
871 TVList * tvlist;
872 TVList * radiolist;
873#endif
874
875#ifdef UPDATE_CHECKER
876 UpdateChecker * update_checker;
877#endif
878
879#ifdef SHARE_WIDGET
880 ShareWidget * sharewidget;
881#endif
882
883 QStringList actions_list;
884
885 QString pending_actions_to_run;
886
887 // Force settings from command line
888 int arg_close_on_finish; // -1 = not set, 1 = true, 0 = false
889 int arg_start_in_fullscreen; // -1 = not set, 1 = true, 0 = false
890
891#ifdef MG_DELAYED_SEEK
892 QTimer * delayed_seek_timer;
893 int delayed_seek_value;
894#endif
895
896private:
897 QString default_style;
898
899 // Variables to restore pos and size of the window
900 // when exiting from fullscreen mode.
901 QPoint win_pos;
902 QSize win_size;
903 bool was_maximized;
904
905#ifdef AVOID_SCREENSAVER
906 bool just_stopped;
907#endif
908
909#ifdef LOG_MPLAYER
910 QString mplayer_log;
911#endif
912#ifdef LOG_SMPLAYER
913 QString smplayer_log;
914#endif
915
916 bool ignore_show_hide_events;
917};
918
919#endif
920
Note: See TracBrowser for help on using the repository browser.