1 ///////////////////////////////////////////////////////////////////////////////
2 // Simple x264 Launcher
3 // Copyright (C) 2004-2012 LoRd_MuldeR <MuldeR2@GMX.de>
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License along
16 // with this program; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 // http://www.gnu.org/licenses/gpl-2.0.txt
20 ///////////////////////////////////////////////////////////////////////////////
24 #include "uic_win_main.h"
25 #include "thread_encode.h"
26 #include "win_preferences.h"
32 class MainWindow: public QMainWindow, private Ui::MainWindow
37 MainWindow(bool x64supported);
41 virtual void closeEvent(QCloseEvent *e);
42 virtual void showEvent(QShowEvent *e);
43 virtual void resizeEvent(QResizeEvent *e);
44 virtual bool eventFilter(QObject *o, QEvent *e);
45 virtual void dragEnterEvent(QDragEnterEvent *event);
46 virtual void dropEvent(QDropEvent *event);
52 JobListModel *m_jobList;
53 OptionsModel *m_options;
54 QList<QFile*> m_toolsList;
56 PreferencesDialog::Preferences m_preferences;
58 const bool m_x64supported;
59 const QString m_appDir;
61 void updateButtons(EncodeThread::JobStatus status);
62 unsigned int countPendingJobs(void);
63 unsigned int countRunningJobs(void);
66 void addButtonPressed(const QString &filePath = QString(), int fileNo = -1, int fileTotal = 0, bool *ok = NULL);
67 void abortButtonPressed(void);
68 void browseButtonPressed(void);
69 void deleteButtonPressed(void);
70 void copyLogToClipboard(bool checked);
72 void jobSelected(const QModelIndex & current, const QModelIndex & previous);
73 void jobChangedData(const QModelIndex &top, const QModelIndex &bottom);
74 void jobLogExtended(const QModelIndex & parent, int start, int end);
76 void pauseButtonPressed(bool checked);
78 void showPreferences(void);
79 void showWebLink(void);
80 void shutdownComputer(void);
81 void startButtonPressed(void);
82 void updateLabel(void);