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

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

smplayer: update trunk to version 16.4

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