OSDN Git Service

Code refactoring: Now "Preferences" and "Recently" used models are in separate classe...
[x264-launcher/x264-launcher.git] / src / win_preferences.h
index b8cec96..6867398 100644 (file)
 
 #include "uic_win_preferences.h"
 
+class PreferencesModel;
+
 class PreferencesDialog : public QDialog, private Ui::PreferencesDialog
 {
        Q_OBJECT
 
 public:
-       enum
-       {
-               X264_PRIORITY_NORMAL = 0,
-               X264_PRIORITY_BELOWNORMAL = 1,
-               X264_PRIORITY_IDLE = 2,
-       }
-       x264_priority_t;
-       
-       typedef struct
-       {
-               bool autoRunNextJob;
-               unsigned int maxRunningJobCount;
-               bool shutdownComputer;
-               bool use10BitEncoding;
-               bool useAvisyth64Bit;
-               bool saveLogFiles;
-               bool saveToSourcePath;
-               unsigned int processPriority;
-               bool enableSounds;
-       }
-       Preferences;
-
-       PreferencesDialog(QWidget *parent, Preferences *preferences, bool x64);
+       PreferencesDialog(QWidget *parent, PreferencesModel *preferences, bool x64);
        ~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);
@@ -67,7 +43,7 @@ protected:
        void emulateMouseEvent(QObject *object, QEvent *event, QWidget *source, QWidget *target);
 
 private:
-       Preferences *m_preferences;
+       PreferencesModel *m_preferences;
 
 private slots:
        void resetButtonPressed(void);