#pragma once
#include "uic_win_main.h"
+#include "thread_ipc.h"
#include "thread_encode.h"
#include "win_preferences.h"
+#include "global.h"
class JobListModel;
class OptionsModel;
class QFile;
+class QLibrary;
class MainWindow: public QMainWindow, private Ui::MainWindow
{
Q_OBJECT
public:
- MainWindow(bool x64supported);
+ MainWindow(const x264_cpu_t *const cpuFeatures);
~MainWindow(void);
protected:
virtual bool eventFilter(QObject *o, QEvent *e);
virtual void dragEnterEvent(QDragEnterEvent *event);
virtual void dropEvent(QDropEvent *event);
+ virtual bool winEvent(MSG *message, long *result);
private:
bool m_firstShow;
QLabel *m_label;
+ IPCThread *m_ipcThread;
JobListModel *m_jobList;
OptionsModel *m_options;
+ QStringList *m_droppedFiles;
QList<QFile*> m_toolsList;
PreferencesDialog::Preferences m_preferences;
- const bool m_x64supported;
+ const x264_cpu_t *const m_cpuFeatures;
const QString m_appDir;
void updateButtons(EncodeThread::JobStatus status);
- bool havePendingJobs(void);
- bool haveRunningJobs(void);
+ void updateTaskbar(EncodeThread::JobStatus status, const QIcon &icon);
+ unsigned int countPendingJobs(void);
+ unsigned int countRunningJobs(void);
+ double detectAvisynthVersion(QLibrary *avsLib);
private slots:
- void addButtonPressed(const QString &filePath = QString(), bool *ok = NULL);
+ void addButtonPressed(const QString &filePathIn = QString(), const QString &filePathOut = QString(), OptionsModel *options = NULL, int fileNo = -1, int fileTotal = 0, bool *ok = NULL);
void abortButtonPressed(void);
void browseButtonPressed(void);
void deleteButtonPressed(void);
void copyLogToClipboard(bool checked);
+ void handleDroppedFiles(void);
void init(void);
+ void instanceCreated(DWORD pid);
void jobSelected(const QModelIndex & current, const QModelIndex & previous);
void jobChangedData(const QModelIndex &top, const QModelIndex &bottom);
void jobLogExtended(const QModelIndex & parent, int start, int end);
- void launchNextJob(void);
+ void launchNextJob();
void pauseButtonPressed(bool checked);
+ void restartButtonPressed(void);
void showAbout(void);
void showPreferences(void);
void showWebLink(void);
+ void shutdownComputer(void);
void startButtonPressed(void);
- void updateLabel(void);
+ void updateLabelPos(void);
};