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