File indexing completed on 2024-04-28 04:50:47
0001 /* 0002 * configuration.h 0003 * 0004 * Copyright (C) 2011 Christoph Pfister <christophpfister@gmail.com> 0005 * 0006 * This program is free software; you can redistribute it and/or modify 0007 * it under the terms of the GNU General Public License as published by 0008 * the Free Software Foundation; either version 2 of the License, or 0009 * (at your option) any later version. 0010 * 0011 * This program is distributed in the hope that it will be useful, 0012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0014 * GNU General Public License for more details. 0015 * 0016 * You should have received a copy of the GNU General Public License along 0017 * with this program; if not, write to the Free Software Foundation, Inc., 0018 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 0019 */ 0020 0021 #ifndef CONFIGURATION_H 0022 #define CONFIGURATION_H 0023 0024 #include <QObject> 0025 0026 class Configuration : public QObject 0027 { 0028 Q_OBJECT 0029 private: 0030 Configuration(); 0031 ~Configuration(); 0032 0033 public: 0034 static Configuration *instance(); 0035 static void detach(); 0036 0037 enum StartupDisplayMode { 0038 StartupNormalMode = 0, 0039 StartupMinimalMode = 1, 0040 StartupFullScreenMode = 2, 0041 StartupRememberLastSetting = 3, 0042 StartupLastValue = StartupRememberLastSetting 0043 }; 0044 0045 StartupDisplayMode getStartupDisplayMode() const 0046 { 0047 return startupDisplayMode; 0048 } 0049 0050 void setStartupDisplayMode(int newStartupDisplayMode); 0051 0052 int getShortSkipDuration() const 0053 { 0054 return shortSkipDuration; 0055 } 0056 0057 void setShortSkipDuration(int newShortSkipDuration); 0058 0059 int getLongSkipDuration() const 0060 { 0061 return longSkipDuration; 0062 } 0063 0064 void setLibVlcArguments(QString newArguments); 0065 0066 0067 QString getLibVlcArguments() const 0068 { 0069 return libVlcArguments; 0070 } 0071 0072 void setLongSkipDuration(int newLongSkipDuration); 0073 0074 signals: 0075 void shortSkipDurationChanged(int shortSkipDuration); 0076 void longSkipDurationChanged(int longSkipDuration); 0077 0078 private: 0079 static Configuration *globalInstance; 0080 0081 StartupDisplayMode startupDisplayMode; 0082 int shortSkipDuration; 0083 int longSkipDuration; 0084 QString libVlcArguments; 0085 }; 0086 0087 #endif /* CONFIGURATION_H */