blokkalbehavioursettings.h
00001
00002
00003 #ifndef BLOKKAL_BEHAVIOURSETTINGS_H
00004 #define BLOKKAL_BEHAVIOURSETTINGS_H
00005
00006 #include <blokkal_export.h>
00007
00008 #include <kconfigskeleton.h>
00009 #include <kdebug.h>
00010
00011 namespace Blokkal {
00012
00013 class BLOKKAL_EXPORT BehaviourSettings : public KConfigSkeleton
00014 {
00015 public:
00016 class EnumWebPageLoadingPolicy
00017 {
00018 public:
00019 enum type { LoadInDefaultBrowser, LoadDisabled, COUNT };
00020 };
00021
00022 static BehaviourSettings *self();
00023 ~BehaviourSettings();
00024
00028 static
00029 void setAutoConnect( bool v )
00030 {
00031 if (!self()->isImmutable( QString::fromLatin1 ( "autoConnect" ) ))
00032 self()->mAutoConnect = v;
00033 }
00034
00038 static
00039 bool autoConnect()
00040 {
00041 return self()->mAutoConnect;
00042 }
00043
00047 ItemBool *autoConnectItem()
00048 {
00049 return mAutoConnectItem;
00050 }
00051
00055 static
00056 void setWebPageLoadingPolicy( int v )
00057 {
00058 if (!self()->isImmutable( QString::fromLatin1 ( "webPageLoadingPolicy" ) ))
00059 self()->mWebPageLoadingPolicy = v;
00060 }
00061
00065 static
00066 int webPageLoadingPolicy()
00067 {
00068 return self()->mWebPageLoadingPolicy;
00069 }
00070
00074 ItemEnum *webPageLoadingPolicyItem()
00075 {
00076 return mWebPageLoadingPolicyItem;
00077 }
00078
00082 static
00083 void setShowSystemTray( bool v )
00084 {
00085 if (!self()->isImmutable( QString::fromLatin1 ( "showSystemTray" ) ))
00086 self()->mShowSystemTray = v;
00087 }
00088
00092 static
00093 bool showSystemTray()
00094 {
00095 return self()->mShowSystemTray;
00096 }
00097
00101 ItemBool *showSystemTrayItem()
00102 {
00103 return mShowSystemTrayItem;
00104 }
00105
00109 static
00110 void setStartHidden( bool v )
00111 {
00112 if (!self()->isImmutable( QString::fromLatin1 ( "startHidden" ) ))
00113 self()->mStartHidden = v;
00114 }
00115
00119 static
00120 bool startHidden()
00121 {
00122 return self()->mStartHidden;
00123 }
00124
00128 ItemBool *startHiddenItem()
00129 {
00130 return mStartHiddenItem;
00131 }
00132
00136 static
00137 void setAutoHide( bool v )
00138 {
00139 if (!self()->isImmutable( QString::fromLatin1 ( "autoHide" ) ))
00140 self()->mAutoHide = v;
00141 }
00142
00146 static
00147 bool autoHide()
00148 {
00149 return self()->mAutoHide;
00150 }
00151
00155 ItemBool *autoHideItem()
00156 {
00157 return mAutoHideItem;
00158 }
00159
00163 static
00164 void setAutoHideTimeout( uint v )
00165 {
00166 if (!self()->isImmutable( QString::fromLatin1 ( "autoHideTimeout" ) ))
00167 self()->mAutoHideTimeout = v;
00168 }
00169
00173 static
00174 uint autoHideTimeout()
00175 {
00176 return self()->mAutoHideTimeout;
00177 }
00178
00182 ItemUInt *autoHideTimeoutItem()
00183 {
00184 return mAutoHideTimeoutItem;
00185 }
00186
00187 protected:
00188 BehaviourSettings();
00189 friend class BehaviourSettingsHelper;
00190
00191
00192
00193 bool mAutoConnect;
00194 int mWebPageLoadingPolicy;
00195
00196
00197 bool mShowSystemTray;
00198 bool mStartHidden;
00199 bool mAutoHide;
00200 uint mAutoHideTimeout;
00201
00202 private:
00203 ItemBool *mAutoConnectItem;
00204 ItemEnum *mWebPageLoadingPolicyItem;
00205 ItemBool *mShowSystemTrayItem;
00206 ItemBool *mStartHiddenItem;
00207 ItemBool *mAutoHideItem;
00208 ItemUInt *mAutoHideTimeoutItem;
00209 };
00210
00211 }
00212
00213 #endif
00214