source: smplayer/trunk/src/basegui.h

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

SMPlayer: update trunk to version 17.1.0

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