OSDN Git Service

Added option to disable the Avisynth/VapourSynth warning messages to the preferences.
[x264-launcher/x264-launcher.git] / src / model_preferences.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Simple x264 Launcher
3 // Copyright (C) 2004-2013 LoRd_MuldeR <MuldeR2@GMX.de>
4 //
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.
9 //
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.
14 //
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.
18 //
19 // http://www.gnu.org/licenses/gpl-2.0.txt
20 ///////////////////////////////////////////////////////////////////////////////
21
22 #pragma once
23
24 class PreferencesModel
25 {
26 public:
27         PreferencesModel(void);
28
29         enum
30         {
31                 X264_PRIORITY_ABOVENORMAL = 0,
32                 X264_PRIORITY_NORMAL = 1,
33                 X264_PRIORITY_BELOWNORMAL = 2,
34                 X264_PRIORITY_IDLE = 3,
35         }
36         x264_priority_t;
37
38         //Getter
39         bool autoRunNextJob(void) { return m_autoRunNextJob; }
40         unsigned int maxRunningJobCount(void) { return m_maxRunningJobCount; }
41         bool shutdownComputer(void) { return m_shutdownComputer; }
42         bool use10BitEncoding(void) { return m_use10BitEncoding; }
43         bool useAvisyth64Bit(void) { return m_useAvisyth64Bit; }
44         bool saveLogFiles(void) { return m_saveLogFiles; }
45         bool saveToSourcePath(void) { return m_saveToSourcePath; }
46         int processPriority(void) { return m_processPriority; }
47         bool enableSounds(void) { return m_enableSounds; }
48         bool disableWarnings(void) { return m_disableWarnings; }
49
50         //Setter
51         void setAutoRunNextJob(const bool autoRunNextJob) { m_autoRunNextJob = autoRunNextJob; }
52         void setMaxRunningJobCount(const unsigned int maxRunningJobCount) { m_maxRunningJobCount = maxRunningJobCount; }
53         void setShutdownComputer(const bool shutdownComputer) { m_shutdownComputer = shutdownComputer; }
54         void setUse10BitEncoding(const bool use10BitEncoding) { m_use10BitEncoding = use10BitEncoding; }
55         void setUseAvisyth64Bit(const bool useAvisyth64Bit) { m_useAvisyth64Bit = useAvisyth64Bit; }
56         void setSaveLogFiles(const bool saveLogFiles) { m_saveLogFiles = saveLogFiles; }
57         void setSaveToSourcePath(const bool saveToSourcePath) { m_saveToSourcePath = saveToSourcePath; }
58         void setProcessPriority(const int processPriority) { m_processPriority = processPriority; }
59         void setEnableSounds(const bool enableSounds) { m_enableSounds = enableSounds; }
60         void setDisableWarnings(const bool disableWarnings) { m_disableWarnings = disableWarnings; }
61
62         //Static
63         static void initPreferences(PreferencesModel *preferences);
64         static void loadPreferences(PreferencesModel *preferences);
65         static void savePreferences(PreferencesModel *preferences);
66
67 protected:
68         bool m_autoRunNextJob;
69         unsigned int m_maxRunningJobCount;
70         bool m_shutdownComputer;
71         bool m_use10BitEncoding;
72         bool m_useAvisyth64Bit;
73         bool m_saveLogFiles;
74         bool m_saveToSourcePath;
75         int m_processPriority;
76         bool m_enableSounds;
77         bool m_disableWarnings;
78 };