X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fwin_preferences.h;h=1015d2ae3e0b739eeab89ca1e3c25dbabc4a34cd;hb=5f218915041e3798e37b2e3a2242b0866ee1eba8;hp=1d35ec6429ff359624cacdcea7cc32ac774bdf91;hpb=7effdd62d8e240b6c44ee143f2ee21e780dc7c3a;p=x264-launcher%2Fx264-launcher.git diff --git a/src/win_preferences.h b/src/win_preferences.h index 1d35ec6..1015d2a 100644 --- a/src/win_preferences.h +++ b/src/win_preferences.h @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////// // Simple x264 Launcher -// Copyright (C) 2004-2012 LoRd_MuldeR +// Copyright (C) 2004-2020 LoRd_MuldeR // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -21,44 +21,37 @@ #pragma once -#include "uic_win_preferences.h" +#include -class PreferencesDialog : public QDialog, private Ui::PreferencesDialog +class PreferencesModel; +class SysinfoModel; + +namespace Ui +{ + class PreferencesDialog; +} + +class PreferencesDialog : public QDialog { Q_OBJECT public: - typedef struct - { - bool autoRunNextJob; - unsigned int maxRunningJobCount; - bool shutdownComputer; - bool use10BitEncoding; - bool useAvisyth64Bit; - bool saveLogFiles; - } - Preferences; - - PreferencesDialog(QWidget *parent, Preferences *preferences, bool x64); + PreferencesDialog(QWidget *parent, PreferencesModel *preferences, const SysinfoModel *sysinfo); ~PreferencesDialog(void); - const bool m_x64; - - static void initPreferences(Preferences *preferences); - static void loadPreferences(Preferences *preferences); - static void savePreferences(Preferences *preferences); - protected: virtual void done(int n); virtual void showEvent(QShowEvent *event); virtual bool eventFilter(QObject *o, QEvent *e); - void emulateMouseEvent(QObject *object, QEvent *event, QWidget *source, QWidget *target); + inline static void emulateMouseEvent(QObject *object, QEvent *event, QWidget *source, QWidget *target); private: - Preferences *m_preferences; + Ui::PreferencesDialog *const ui; + const SysinfoModel *const m_sysinfo; + PreferencesModel *m_preferences; private slots: void resetButtonPressed(void); - void use10BitEncodingToggled(bool checked); + void disableWarningsToggled(bool checked); };