source: smplayer/trunk/src/smplayer.h@ 156

Last change on this file since 156 was 156, checked in by Silvan Scherrer, 11 years ago

SMPlayer: update trunk to 0.8.6

  • Property svn:eol-style set to LF
File size: 2.2 KB
Line 
1/* smplayer, GUI front-end for mplayer.
2 Copyright (C) 2006-2013 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 _SMPLAYER_H_
20#define _SMPLAYER_H_
21
22#include <QObject>
23#include <QString>
24#include <QStringList>
25#include "basegui.h"
26
27class SMPlayer : public QObject
28{
29 Q_OBJECT
30
31public:
32 enum ExitCode { ErrorArgument = -3, NoAction = -2, NoRunningInstance = -1, NoError = 0, NoExit = 1 };
33
34 SMPlayer(const QString & config_path = QString::null, QObject * parent = 0);
35 ~SMPlayer();
36
37 //! Process arguments. If ExitCode != NoExit the application must be exited.
38 ExitCode processArgs(QStringList args);
39
40 BaseGui * gui();
41
42 void start();
43
44#ifdef GUI_CHANGE_ON_RUNTIME
45private slots:
46 void changeGUI(QString new_gui);
47#endif
48
49private:
50 BaseGui * createGUI(QString gui_name);
51 void deleteGUI();
52#ifndef PORTABLE_APP
53 void createConfigDirectory();
54#endif
55 void showInfo();
56 void deleteConfig();
57
58 static BaseGui * main_window;
59
60 QStringList files_to_play;
61 QString subtitle_file;
62 QString actions_list; //!< Actions to be run on startup
63 QString gui_to_use;
64
65 // Change position and size
66 bool move_gui;
67 QPoint gui_position;
68
69 bool resize_gui;
70 QSize gui_size;
71
72 // Options to pass to gui
73 int close_at_end; // -1 = not set, 1 = true, 0 false
74 int start_in_fullscreen; // -1 = not set, 1 = true, 0 false
75
76#ifdef LOG_SMPLAYER
77 // Output log
78 static QFile output_log;
79 static void myMessageOutput( QtMsgType type, const char *msg );
80 static bool allow_to_send_log_to_gui;
81#endif
82};
83
84#endif
Note: See TracBrowser for help on using the repository browser.