~ubuntu-branches/ubuntu/wily/smplayer/wily

« back to all changes in this revision

Viewing changes to src/basegui.h

  • Committer: Bazaar Package Importer
  • Author(s): Maia Kozheva
  • Date: 2009-03-31 23:05:43 UTC
  • mfrom: (1.2.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: james.westby@ubuntu.com-20090331230543-0h2hfwpwlu9opbv2
* New upstream release. (Closes: #523791)
  - Reworked subtitle font preferences. (Closes: #503295)
  - No longer installs qt_fr.qm. (Closes: #486314)
* debian/control:
  - Bumped Standards-Version to 3.8.1.
  - Changed maintainer name (still the same person and GPG key).
  - Changed section to video.
  - Build-depend on zlib1g-dev for findsubtitles.
  - Require Qt >= 4.3 per readme.
  - Added ${misc:Depends}.
  - Make smplayer-translations depend on smplayer and smplayer recommend
    smplayer-translations, not the other way round. (Closes: #489375)
* debian/copyright:
  - Significantly expanded per-file with new upstream authors.
* debian/rules:
  - Make make use correct uic in install.
  - Clean svn_revision.
  - Removed get-orig-source - not needed with uscan --repack.
* debian/patches/01_gl_translation.patch:
  - Added patch to fix lrelease error on smplayer_gl.ts.
* Added debian/README.source for simple-patchsys.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*  smplayer, GUI front-end for mplayer.
2
 
    Copyright (C) 2006-2008 Ricardo Villalba <rvm@escomposlinux.org>
 
2
    Copyright (C) 2006-2009 Ricardo Villalba <rvm@escomposlinux.org>
3
3
 
4
4
    This program is free software; you can redistribute it and/or modify
5
5
    it under the terms of the GNU General Public License as published by
20
20
#define _BASEGUI_H_
21
21
 
22
22
#include <QMainWindow>
 
23
#include <QNetworkProxy>
23
24
#include "mediadata.h"
24
25
#include "mediasettings.h"
25
26
#include "preferences.h"
40
41
class QLabel;
41
42
class FilePropertiesDialog;
42
43
class VideoEqualizer;
 
44
class AudioEqualizer;
 
45
class FindSubtitlesWindow;
 
46
class VideoPreview;
43
47
class Playlist;
44
48
 
45
 
class Recents;
46
49
class MyAction;
47
50
class MyActionGroup;
48
51
 
66
69
        //! true or false.
67
70
        void runActions(QString actions);
68
71
 
 
72
        //! Execute all the actions after the video has started to play
 
73
        void runActionsLater(QString actions) { pending_actions_to_run = actions; };
 
74
 
 
75
        //! Saves the line from the smplayer output
 
76
        void recordSmplayerLog(QString line);
 
77
 
69
78
public slots:
70
79
        virtual void open(QString file); // Generic open, autodetect type.
71
 
    virtual void openFile();
 
80
        virtual void openFile();
72
81
        virtual void openFile(QString file);
73
82
        virtual void openFiles(QStringList files);
74
83
        virtual void openURL();
83
92
 
84
93
        virtual void helpFAQ();
85
94
        virtual void helpCLOptions();
86
 
    virtual void helpAbout();
 
95
        virtual void helpTips();
 
96
        virtual void helpAbout();
87
97
        virtual void helpAboutQt();
88
98
 
89
 
    virtual void loadSub();
 
99
        virtual void loadSub();
90
100
        virtual void loadAudioFile(); // Load external audio file
91
101
 
 
102
        void setInitialSubtitle(const QString & subtitle_file);
 
103
 
 
104
        virtual void showFindSubtitlesDialog();
 
105
        virtual void openUploadSubtitlesPage(); //turbos
 
106
 
 
107
        virtual void showVideoPreviewDialog();
 
108
 
92
109
        virtual void showPlaylist();
93
110
        virtual void showPlaylist(bool b);
94
 
        virtual void showEqualizer();
95
 
        virtual void showEqualizer(bool b);
 
111
        virtual void showVideoEqualizer();
 
112
        virtual void showVideoEqualizer(bool b);
 
113
        virtual void showAudioEqualizer();
 
114
        virtual void showAudioEqualizer(bool b);
96
115
        virtual void showMplayerLog();
97
 
    virtual void showLog();
 
116
        virtual void showLog();
98
117
        virtual void showPreferencesDialog();
99
118
        virtual void showFilePropertiesDialog();
100
119
 
101
120
        virtual void showGotoDialog();
 
121
        virtual void showSubDelayDialog();
 
122
        virtual void showAudioDelayDialog();
102
123
 
103
124
        virtual void exitFullscreen();
104
125
        virtual void toggleFullscreen();
105
 
    virtual void toggleFullscreen(bool);
 
126
        virtual void toggleFullscreen(bool);
106
127
 
107
128
        virtual void toggleCompactMode();
108
129
        virtual void toggleCompactMode(bool);
109
130
 
110
 
        virtual void toggleStayOnTop();
111
 
        virtual void toggleStayOnTop(bool);
 
131
        void setStayOnTop(bool b);
 
132
        virtual void changeStayOnTop(int);
 
133
        virtual void checkStayOnTop(Core::State);
 
134
        void toggleStayOnTop();
112
135
 
113
136
        virtual void toggleFrameCounter();
114
137
        virtual void toggleFrameCounter(bool);
128
151
        virtual void exitFullscreenIfNeeded();
129
152
        virtual void playlistHasFinished();
130
153
 
131
 
    virtual void displayState(Core::State state);
 
154
        virtual void displayState(Core::State state);
132
155
        virtual void displayMessage(QString message);
133
156
        virtual void gotCurrentTime(double);
134
157
 
135
 
    virtual void initializeMenus();
 
158
        virtual void initializeMenus();
136
159
        virtual void updateWidgets();
137
 
        virtual void updateEqualizer();
 
160
        virtual void updateVideoEqualizer();
 
161
        virtual void updateAudioEqualizer();
138
162
 
139
163
        virtual void newMediaLoaded();
140
164
        virtual void updateMediaInfo();
141
165
 
 
166
        void checkPendingActionsToRun();
 
167
 
 
168
#if REPORT_OLD_MPLAYER
 
169
        void checkMplayerVersion();
 
170
        void displayWarningAboutOldMplayer();
 
171
#endif
 
172
 
142
173
#if AUTODISABLE_ACTIONS
143
174
        virtual void enableActionsOnPlaying();
144
175
        virtual void disableActionsOnStop();
203
234
        virtual void changeStyleSheet(QString style);
204
235
#endif
205
236
 
206
 
#if NEW_RESIZE_CODE
207
 
        void calculateDiff(); //!< Updates diff_size
208
 
#endif
209
 
 
210
237
#ifdef Q_OS_WIN
211
238
        /* Disable screensaver by event */
212
239
        void clear_just_stopped();
213
240
#endif
214
241
 
 
242
        //! Clears the mplayer log
 
243
        void clearMplayerLog();
 
244
 
 
245
        //! Saves the line from the mplayer output
 
246
        void recordMplayerLog(QString line);
 
247
 
 
248
        //! Saves the mplayer log to a file every time a file is loaded
 
249
        void autosaveMplayerLog();
 
250
 
215
251
signals:
216
252
        void frameChanged(int);
217
253
        void timeChanged(QString time_ready_to_print);
250
286
        void createCore();
251
287
        void createMplayerWindow();
252
288
        void createVideoEqualizer();
 
289
        void createAudioEqualizer();
253
290
        void createPlaylist();
254
291
        void createPanel();
255
292
        void createPreferencesDialog();
303
340
        MyAction * normalSpeedAct;
304
341
        MyAction * halveSpeedAct;
305
342
        MyAction * doubleSpeedAct;
306
 
        MyAction * decSpeedAct;
307
 
        MyAction * incSpeedAct;
 
343
        MyAction * decSpeed10Act;
 
344
        MyAction * incSpeed10Act;
 
345
        MyAction * decSpeed4Act;
 
346
        MyAction * incSpeed4Act;
 
347
        MyAction * decSpeed1Act;
 
348
        MyAction * incSpeed1Act;
308
349
 
309
350
        // Menu Video
310
351
        MyAction * fullscreenAct;
311
352
        MyAction * compactAct;
312
 
        MyAction * equalizerAct;
 
353
        MyAction * videoEqualizerAct;
313
354
        MyAction * screenshotAct;
314
 
        MyAction * onTopAct;
 
355
        MyAction * videoPreviewAct;
315
356
        MyAction * flipAct;
 
357
        MyAction * mirrorAct;
316
358
        MyAction * postProcessingAct;
317
359
        MyAction * phaseAct;
318
360
        MyAction * deblockAct;
324
366
        MyAction * upscaleAct;
325
367
 
326
368
        // Menu Audio
 
369
        MyAction * audioEqualizerAct;
327
370
        MyAction * muteAct;
328
371
        MyAction * decVolumeAct;
329
372
        MyAction * incVolumeAct;
330
373
        MyAction * decAudioDelayAct;
331
374
        MyAction * incAudioDelayAct;
 
375
        MyAction * audioDelayAct; // Ask for delay
332
376
        MyAction * extrastereoAct;
333
377
        MyAction * karaokeAct;
334
378
        MyAction * volnormAct;
340
384
        MyAction * unloadSubsAct;
341
385
        MyAction * decSubDelayAct;
342
386
        MyAction * incSubDelayAct;
 
387
        MyAction * subDelayAct; // Ask for delay
343
388
        MyAction * decSubPosAct;
344
389
        MyAction * incSubPosAct;
345
390
        MyAction * incSubStepAct;
349
394
        MyAction * useAssAct;
350
395
        MyAction * useClosedCaptionAct;
351
396
        MyAction * useForcedSubsOnlyAct;
 
397
        MyAction * showFindSubtitlesDialogAct;
 
398
        MyAction * openUploadSubtitlesPageAct;//turbos  
352
399
 
353
400
        // Menu Options
354
401
        MyAction * showPlaylistAct;
361
408
 
362
409
        // Menu Help
363
410
        MyAction * showFAQAct;
364
 
        MyAction * showCLOptions; // Command line options
 
411
        MyAction * showCLOptionsAct; // Command line options
 
412
        MyAction * showTipsAct;
365
413
        MyAction * aboutQtAct;
366
414
        MyAction * aboutThisAct;
367
415
 
386
434
        MyAction * incSaturationAct;
387
435
        MyAction * decGammaAct;
388
436
        MyAction * incGammaAct;
 
437
        MyAction * nextVideoAct;
389
438
        MyAction * nextAudioAct;
390
439
        MyAction * nextSubtitleAct;
391
440
        MyAction * nextChapterAct;
392
441
        MyAction * prevChapterAct;
393
442
        MyAction * doubleSizeAct;
394
443
        MyAction * resetVideoEqualizerAct;
 
444
        MyAction * resetAudioEqualizerAct;
395
445
        MyAction * showContextMenuAct;
 
446
#if NEW_ASPECT_CODE
 
447
        MyAction * nextAspectAct;
 
448
#endif
396
449
 
397
450
        // Moving and zoom
398
451
        MyAction * moveUpAct;
402
455
        MyAction * incZoomAct;
403
456
        MyAction * decZoomAct;
404
457
        MyAction * resetZoomAct;
 
458
        MyAction * autoZoomAct;
 
459
        MyAction * autoZoom169Act;
 
460
        MyAction * autoZoom235Act;
405
461
 
406
462
        // OSD Action Group 
407
463
        MyActionGroup * osdGroup;
440
496
        // Aspect Action Group
441
497
        MyActionGroup * aspectGroup;
442
498
        MyAction * aspectDetectAct;
 
499
#if NEW_ASPECT_CODE
 
500
        MyAction * aspectNoneAct;
 
501
        MyAction * aspect11Act; // 1:1
 
502
#endif
443
503
        MyAction * aspect43Act;
444
504
        MyAction * aspect54Act;
445
505
        MyAction * aspect149Act;
461
521
        MyAction * rotateCounterclockwiseAct;
462
522
        MyAction * rotateCounterclockwiseFlipAct;
463
523
 
 
524
        // Menu StayOnTop
 
525
        MyActionGroup * onTopActionGroup;
 
526
        MyAction * onTopAlwaysAct;
 
527
        MyAction * onTopNeverAct;
 
528
        MyAction * onTopWhilePlayingAct;
 
529
        MyAction * toggleStayOnTopAct;
 
530
 
 
531
#if USE_ADAPTER
 
532
        // Screen Group
 
533
        MyActionGroup * screenGroup;
 
534
        MyAction * screenDefaultAct;
 
535
#endif
 
536
 
464
537
        // Audio Channels Action Group
465
538
        MyActionGroup * channelsGroup;
466
539
        /* MyAction * channelsDefaultAct; */
475
548
        MyAction * rightChannelAct;
476
549
 
477
550
        // Other groups
 
551
        MyActionGroup * videoTrackGroup;
478
552
        MyActionGroup * audioTrackGroup;
479
553
        MyActionGroup * subtitleTrackGroup;
480
554
        MyActionGroup * titleGroup;
481
555
        MyActionGroup * angleGroup;
482
556
        MyActionGroup * chapterGroup;
483
557
 
 
558
#if DVDNAV_SUPPORT
 
559
        MyAction * dvdnavUpAct;
 
560
        MyAction * dvdnavDownAct;
 
561
        MyAction * dvdnavLeftAct;
 
562
        MyAction * dvdnavRightAct;
 
563
        MyAction * dvdnavMenuAct;
 
564
        MyAction * dvdnavSelectAct;
 
565
        MyAction * dvdnavPrevAct;
 
566
        MyAction * dvdnavMouseAct;
 
567
#endif
484
568
 
485
569
        // MENUS
486
570
        QMenu *openMenu;
487
 
    QMenu *playMenu;
488
 
    QMenu *videoMenu;
489
 
    QMenu *audioMenu;
490
 
    QMenu *subtitlesMenu;
491
 
    QMenu *browseMenu;
492
 
    QMenu *optionsMenu;
493
 
    QMenu *helpMenu;
 
571
        QMenu *playMenu;
 
572
        QMenu *videoMenu;
 
573
        QMenu *audioMenu;
 
574
        QMenu *subtitlesMenu;
 
575
        QMenu *browseMenu;
 
576
        QMenu *optionsMenu;
 
577
        QMenu *helpMenu;
494
578
 
495
579
        QMenu * subtitlestrack_menu;
 
580
        QMenu * videotrack_menu;
496
581
        QMenu * audiotrack_menu;
497
582
        QMenu * titles_menu;
498
583
        QMenu * chapters_menu;
511
596
        QMenu * logs_menu;
512
597
        QMenu * panscan_menu;
513
598
        QMenu * rotate_menu;
 
599
        QMenu * ontop_menu;
 
600
#if USE_ADAPTER
 
601
        QMenu * screen_menu;
 
602
#endif
514
603
 
515
604
        QMenu * popup;
516
605
        QMenu * recentfiles_menu;
517
 
    
518
 
    LogWindow * mplayer_log_window;
519
 
    LogWindow * smplayer_log_window;
 
606
 
 
607
        LogWindow * mplayer_log_window;
 
608
        LogWindow * smplayer_log_window;
520
609
        LogWindow * clhelp_window;
521
610
 
522
611
        PreferencesDialog *pref_dialog;
523
612
        FilePropertiesDialog *file_dialog;
524
613
        Playlist * playlist;
525
 
        VideoEqualizer * equalizer;
 
614
        VideoEqualizer * video_equalizer;
 
615
        AudioEqualizer * audio_equalizer;
 
616
        FindSubtitlesWindow * find_subs_dialog;
 
617
        VideoPreview * video_preview;
526
618
 
527
619
        Core * core;
528
 
    MplayerWindow *mplayerwindow;
529
 
 
530
 
        Recents * recents;
 
620
        MplayerWindow *mplayerwindow;
531
621
 
532
622
        MyServer * server;
533
623
 
534
624
        QStringList actions_list;
535
625
 
 
626
        QString pending_actions_to_run;
 
627
 
536
628
private:
537
629
        QString default_style;
538
630
 
545
637
        QSize win_size;
546
638
        bool was_maximized;
547
639
 
548
 
#if NEW_RESIZE_CODE
549
 
        QSize diff_size;        //!< Main window size - panel size
550
 
#endif
551
 
 
552
640
#ifdef Q_OS_WIN
553
641
        /* Disable screensaver by event */
554
642
        bool just_stopped;
555
643
#endif
556
644
 
 
645
        QString mplayer_log;
 
646
        QString smplayer_log;
 
647
 
 
648
        bool ignore_show_hide_events;
557
649
};
558
650
    
559
651
#endif