kpilot/kpilot
kpilotSettings.h
00001 // This file is generated by kconfig_compiler from kpilot.kcfg. 00002 // All changes you do to this file will be lost. 00003 #ifndef KPILOTSETTINGS_H 00004 #define KPILOTSETTINGS_H 00005 00006 #include <kconfigskeleton.h> 00007 #include <kdebug.h> 00008 00009 #include <kstandarddirs.h> 00010 class KPilotSettings : public KConfigSkeleton 00011 { 00012 public: 00013 enum { eWorkaroundNone, eWorkaroundUSB }; 00014 00015 static KPilotSettings *self(); 00016 ~KPilotSettings(); 00017 00021 static 00022 void setDebug( uint v ) 00023 { 00024 if (!self()->isImmutable( QString::fromLatin1( "Debug" ) )) 00025 self()->mDebug = v; 00026 } 00027 00031 static 00032 uint debug() 00033 { 00034 return self()->mDebug; 00035 } 00036 00040 ItemUInt *debugItem() 00041 { 00042 return mDebugItem; 00043 } 00044 00048 static 00049 void setConfigVersion( uint v ) 00050 { 00051 if (!self()->isImmutable( QString::fromLatin1( "ConfigVersion" ) )) 00052 self()->mConfigVersion = v; 00053 } 00054 00058 static 00059 uint configVersion() 00060 { 00061 return self()->mConfigVersion; 00062 } 00063 00067 ItemUInt *configVersionItem() 00068 { 00069 return mConfigVersionItem; 00070 } 00071 00075 static 00076 void setLastSyncTime( const QDateTime & v ) 00077 { 00078 if (!self()->isImmutable( QString::fromLatin1( "LastSyncTime" ) )) 00079 self()->mLastSyncTime = v; 00080 } 00081 00085 static 00086 QDateTime lastSyncTime() 00087 { 00088 return self()->mLastSyncTime; 00089 } 00090 00094 ItemDateTime *lastSyncTimeItem() 00095 { 00096 return mLastSyncTimeItem; 00097 } 00098 00102 static 00103 void setPilotDevice( const QString & v ) 00104 { 00105 if (!self()->isImmutable( QString::fromLatin1( "PilotDevice" ) )) 00106 self()->mPilotDevice = v; 00107 } 00108 00112 static 00113 QString pilotDevice() 00114 { 00115 return self()->mPilotDevice; 00116 } 00117 00121 ItemString *pilotDeviceItem() 00122 { 00123 return mPilotDeviceItem; 00124 } 00125 00129 static 00130 void setPilotSpeed( uint v ) 00131 { 00132 if (!self()->isImmutable( QString::fromLatin1( "PilotSpeed" ) )) 00133 self()->mPilotSpeed = v; 00134 } 00135 00139 static 00140 uint pilotSpeed() 00141 { 00142 return self()->mPilotSpeed; 00143 } 00144 00148 ItemUInt *pilotSpeedItem() 00149 { 00150 return mPilotSpeedItem; 00151 } 00152 00156 static 00157 void setEncoding( const QString & v ) 00158 { 00159 if (!self()->isImmutable( QString::fromLatin1( "Encoding" ) )) 00160 self()->mEncoding = v; 00161 } 00162 00166 static 00167 QString encoding() 00168 { 00169 return self()->mEncoding; 00170 } 00171 00175 ItemString *encodingItem() 00176 { 00177 return mEncodingItem; 00178 } 00179 00183 static 00184 void setUserName( const QString & v ) 00185 { 00186 if (!self()->isImmutable( QString::fromLatin1( "UserName" ) )) 00187 self()->mUserName = v; 00188 } 00189 00193 static 00194 QString userName() 00195 { 00196 return self()->mUserName; 00197 } 00198 00202 ItemString *userNameItem() 00203 { 00204 return mUserNameItem; 00205 } 00206 00210 static 00211 void setWorkarounds( int v ) 00212 { 00213 if (!self()->isImmutable( QString::fromLatin1( "Workarounds" ) )) 00214 self()->mWorkarounds = v; 00215 } 00216 00220 static 00221 int workarounds() 00222 { 00223 return self()->mWorkarounds; 00224 } 00225 00229 ItemEnum *workaroundsItem() 00230 { 00231 return mWorkaroundsItem; 00232 } 00233 00237 static 00238 void setLogFileName( const QString & v ) 00239 { 00240 if (!self()->isImmutable( QString::fromLatin1( "LogFileName" ) )) 00241 self()->mLogFileName = v; 00242 } 00243 00247 static 00248 QString logFileName() 00249 { 00250 return self()->mLogFileName; 00251 } 00252 00256 ItemString *logFileNameItem() 00257 { 00258 return mLogFileNameItem; 00259 } 00260 00264 static 00265 void setStartDaemonAtLogin( bool v ) 00266 { 00267 if (!self()->isImmutable( QString::fromLatin1( "StartDaemonAtLogin" ) )) 00268 self()->mStartDaemonAtLogin = v; 00269 } 00270 00274 static 00275 bool startDaemonAtLogin() 00276 { 00277 return self()->mStartDaemonAtLogin; 00278 } 00279 00283 ItemBool *startDaemonAtLoginItem() 00284 { 00285 return mStartDaemonAtLoginItem; 00286 } 00287 00291 static 00292 void setKillDaemonAtExit( bool v ) 00293 { 00294 if (!self()->isImmutable( QString::fromLatin1( "KillDaemonAtExit" ) )) 00295 self()->mKillDaemonAtExit = v; 00296 } 00297 00301 static 00302 bool killDaemonAtExit() 00303 { 00304 return self()->mKillDaemonAtExit; 00305 } 00306 00310 ItemBool *killDaemonAtExitItem() 00311 { 00312 return mKillDaemonAtExitItem; 00313 } 00314 00318 static 00319 void setDockDaemon( bool v ) 00320 { 00321 if (!self()->isImmutable( QString::fromLatin1( "DockDaemon" ) )) 00322 self()->mDockDaemon = v; 00323 } 00324 00328 static 00329 bool dockDaemon() 00330 { 00331 return self()->mDockDaemon; 00332 } 00333 00337 ItemBool *dockDaemonItem() 00338 { 00339 return mDockDaemonItem; 00340 } 00341 00345 static 00346 void setQuitAfterSync( bool v ) 00347 { 00348 if (!self()->isImmutable( QString::fromLatin1( "QuitAfterSync" ) )) 00349 self()->mQuitAfterSync = v; 00350 } 00351 00355 static 00356 bool quitAfterSync() 00357 { 00358 return self()->mQuitAfterSync; 00359 } 00360 00364 ItemBool *quitAfterSyncItem() 00365 { 00366 return mQuitAfterSyncItem; 00367 } 00368 00372 static 00373 void setSyncType( uint v ) 00374 { 00375 if (!self()->isImmutable( QString::fromLatin1( "SyncType" ) )) 00376 self()->mSyncType = v; 00377 } 00378 00382 static 00383 uint syncType() 00384 { 00385 return self()->mSyncType; 00386 } 00387 00391 ItemUInt *syncTypeItem() 00392 { 00393 return mSyncTypeItem; 00394 } 00395 00399 static 00400 void setFullSyncOnPCChange( bool v ) 00401 { 00402 if (!self()->isImmutable( QString::fromLatin1( "FullSyncOnPCChange" ) )) 00403 self()->mFullSyncOnPCChange = v; 00404 } 00405 00409 static 00410 bool fullSyncOnPCChange() 00411 { 00412 return self()->mFullSyncOnPCChange; 00413 } 00414 00418 ItemBool *fullSyncOnPCChangeItem() 00419 { 00420 return mFullSyncOnPCChangeItem; 00421 } 00422 00426 static 00427 void setConflictResolution( uint v ) 00428 { 00429 if (!self()->isImmutable( QString::fromLatin1( "ConflictResolution" ) )) 00430 self()->mConflictResolution = v; 00431 } 00432 00436 static 00437 uint conflictResolution() 00438 { 00439 return self()->mConflictResolution; 00440 } 00441 00445 ItemUInt *conflictResolutionItem() 00446 { 00447 return mConflictResolutionItem; 00448 } 00449 00453 static 00454 void setInternalEditors( bool v ) 00455 { 00456 if (!self()->isImmutable( QString::fromLatin1( "InternalEditors" ) )) 00457 self()->mInternalEditors = v; 00458 } 00459 00463 static 00464 bool internalEditors() 00465 { 00466 return self()->mInternalEditors; 00467 } 00468 00472 ItemBool *internalEditorsItem() 00473 { 00474 return mInternalEditorsItem; 00475 } 00476 00480 static 00481 void setShowSecrets( bool v ) 00482 { 00483 if (!self()->isImmutable( QString::fromLatin1( "ShowSecrets" ) )) 00484 self()->mShowSecrets = v; 00485 } 00486 00490 static 00491 bool showSecrets() 00492 { 00493 return self()->mShowSecrets; 00494 } 00495 00499 ItemBool *showSecretsItem() 00500 { 00501 return mShowSecretsItem; 00502 } 00503 00507 static 00508 void setSkipBackupDB( const QStringList & v ) 00509 { 00510 if (!self()->isImmutable( QString::fromLatin1( "SkipBackupDB" ) )) 00511 self()->mSkipBackupDB = v; 00512 } 00513 00517 static 00518 QStringList skipBackupDB() 00519 { 00520 return self()->mSkipBackupDB; 00521 } 00522 00526 ItemStringList *skipBackupDBItem() 00527 { 00528 return mSkipBackupDBItem; 00529 } 00530 00534 static 00535 void setSkipRestoreDB( const QStringList & v ) 00536 { 00537 if (!self()->isImmutable( QString::fromLatin1( "SkipRestoreDB" ) )) 00538 self()->mSkipRestoreDB = v; 00539 } 00540 00544 static 00545 QStringList skipRestoreDB() 00546 { 00547 return self()->mSkipRestoreDB; 00548 } 00549 00553 ItemStringList *skipRestoreDBItem() 00554 { 00555 return mSkipRestoreDBItem; 00556 } 00557 00561 static 00562 void setRunConduitsWithBackup( bool v ) 00563 { 00564 if (!self()->isImmutable( QString::fromLatin1( "RunConduitsWithBackup" ) )) 00565 self()->mRunConduitsWithBackup = v; 00566 } 00567 00571 static 00572 bool runConduitsWithBackup() 00573 { 00574 return self()->mRunConduitsWithBackup; 00575 } 00576 00580 ItemBool *runConduitsWithBackupItem() 00581 { 00582 return mRunConduitsWithBackupItem; 00583 } 00584 00588 static 00589 void setDeviceDBs( const QStringList & v ) 00590 { 00591 if (!self()->isImmutable( QString::fromLatin1( "DeviceDBs" ) )) 00592 self()->mDeviceDBs = v; 00593 } 00594 00598 static 00599 QStringList deviceDBs() 00600 { 00601 return self()->mDeviceDBs; 00602 } 00603 00607 ItemStringList *deviceDBsItem() 00608 { 00609 return mDeviceDBsItem; 00610 } 00611 00615 static 00616 void setAddedDBs( const QStringList & v ) 00617 { 00618 if (!self()->isImmutable( QString::fromLatin1( "AddedDBs" ) )) 00619 self()->mAddedDBs = v; 00620 } 00621 00625 static 00626 QStringList addedDBs() 00627 { 00628 return self()->mAddedDBs; 00629 } 00630 00634 ItemStringList *addedDBsItem() 00635 { 00636 return mAddedDBsItem; 00637 } 00638 00642 static 00643 void setScreenlockSecure( bool v ) 00644 { 00645 if (!self()->isImmutable( QString::fromLatin1( "ScreenlockSecure" ) )) 00646 self()->mScreenlockSecure = v; 00647 } 00648 00652 static 00653 bool screenlockSecure() 00654 { 00655 return self()->mScreenlockSecure; 00656 } 00657 00661 ItemBool *screenlockSecureItem() 00662 { 00663 return mScreenlockSecureItem; 00664 } 00665 00669 static 00670 void setInstalledConduits( const QStringList & v ) 00671 { 00672 if (!self()->isImmutable( QString::fromLatin1( "InstalledConduits" ) )) 00673 self()->mInstalledConduits = v; 00674 } 00675 00679 static 00680 QStringList installedConduits() 00681 { 00682 return self()->mInstalledConduits; 00683 } 00684 00688 ItemStringList *installedConduitsItem() 00689 { 00690 return mInstalledConduitsItem; 00691 } 00692 00696 static 00697 void setAppBlockChangedDatabases( const QStringList & v ) 00698 { 00699 if (!self()->isImmutable( QString::fromLatin1( "AppBlockChangedDatabases" ) )) 00700 self()->mAppBlockChangedDatabases = v; 00701 } 00702 00706 static 00707 QStringList appBlockChangedDatabases() 00708 { 00709 return self()->mAppBlockChangedDatabases; 00710 } 00711 00715 ItemStringList *appBlockChangedDatabasesItem() 00716 { 00717 return mAppBlockChangedDatabasesItem; 00718 } 00719 00723 static 00724 void setDirtyDatabases( const QStringList & v ) 00725 { 00726 if (!self()->isImmutable( QString::fromLatin1( "DirtyDatabases" ) )) 00727 self()->mDirtyDatabases = v; 00728 } 00729 00733 static 00734 QStringList dirtyDatabases() 00735 { 00736 return self()->mDirtyDatabases; 00737 } 00738 00742 ItemStringList *dirtyDatabasesItem() 00743 { 00744 return mDirtyDatabasesItem; 00745 } 00746 00750 static 00751 void setFlagsChangedDatabases( const QStringList & v ) 00752 { 00753 if (!self()->isImmutable( QString::fromLatin1( "FlagsChangedDatabases" ) )) 00754 self()->mFlagsChangedDatabases = v; 00755 } 00756 00760 static 00761 QStringList flagsChangedDatabases() 00762 { 00763 return self()->mFlagsChangedDatabases; 00764 } 00765 00769 ItemStringList *flagsChangedDatabasesItem() 00770 { 00771 return mFlagsChangedDatabasesItem; 00772 } 00773 00777 static 00778 void setAddressDisplayMode( uint v ) 00779 { 00780 if (!self()->isImmutable( QString::fromLatin1( "AddressDisplayMode" ) )) 00781 self()->mAddressDisplayMode = v; 00782 } 00783 00787 static 00788 uint addressDisplayMode() 00789 { 00790 return self()->mAddressDisplayMode; 00791 } 00792 00796 ItemUInt *addressDisplayModeItem() 00797 { 00798 return mAddressDisplayModeItem; 00799 } 00800 00804 static 00805 void setUseKeyField( bool v ) 00806 { 00807 if (!self()->isImmutable( QString::fromLatin1( "UseKeyField" ) )) 00808 self()->mUseKeyField = v; 00809 } 00810 00814 static 00815 bool useKeyField() 00816 { 00817 return self()->mUseKeyField; 00818 } 00819 00823 ItemBool *useKeyFieldItem() 00824 { 00825 return mUseKeyFieldItem; 00826 } 00827 00828 static 00829 void writeConfig() 00830 { 00831 static_cast<KConfigSkeleton*>(self())->writeConfig(); 00832 } 00833 protected: 00834 KPilotSettings(); 00835 static KPilotSettings *mSelf; 00836 00837 00838 // General 00839 uint mDebug; 00840 uint mConfigVersion; 00841 QDateTime mLastSyncTime; 00842 QString mPilotDevice; 00843 uint mPilotSpeed; 00844 QString mEncoding; 00845 QString mUserName; 00846 int mWorkarounds; 00847 QString mLogFileName; 00848 bool mStartDaemonAtLogin; 00849 bool mKillDaemonAtExit; 00850 bool mDockDaemon; 00851 bool mQuitAfterSync; 00852 uint mSyncType; 00853 bool mFullSyncOnPCChange; 00854 uint mConflictResolution; 00855 bool mInternalEditors; 00856 bool mShowSecrets; 00857 QStringList mSkipBackupDB; 00858 QStringList mSkipRestoreDB; 00859 bool mRunConduitsWithBackup; 00860 QStringList mDeviceDBs; 00861 QStringList mAddedDBs; 00862 bool mScreenlockSecure; 00863 00864 // Conduit Names 00865 QStringList mInstalledConduits; 00866 00867 // Internal Editors 00868 QStringList mAppBlockChangedDatabases; 00869 QStringList mDirtyDatabases; 00870 QStringList mFlagsChangedDatabases; 00871 00872 // Address Widget 00873 uint mAddressDisplayMode; 00874 bool mUseKeyField; 00875 00876 private: 00877 ItemUInt *mDebugItem; 00878 ItemUInt *mConfigVersionItem; 00879 ItemDateTime *mLastSyncTimeItem; 00880 ItemString *mPilotDeviceItem; 00881 ItemUInt *mPilotSpeedItem; 00882 ItemString *mEncodingItem; 00883 ItemString *mUserNameItem; 00884 ItemEnum *mWorkaroundsItem; 00885 ItemString *mLogFileNameItem; 00886 ItemBool *mStartDaemonAtLoginItem; 00887 ItemBool *mKillDaemonAtExitItem; 00888 ItemBool *mDockDaemonItem; 00889 ItemBool *mQuitAfterSyncItem; 00890 ItemUInt *mSyncTypeItem; 00891 ItemBool *mFullSyncOnPCChangeItem; 00892 ItemUInt *mConflictResolutionItem; 00893 ItemBool *mInternalEditorsItem; 00894 ItemBool *mShowSecretsItem; 00895 ItemStringList *mSkipBackupDBItem; 00896 ItemStringList *mSkipRestoreDBItem; 00897 ItemBool *mRunConduitsWithBackupItem; 00898 ItemStringList *mDeviceDBsItem; 00899 ItemStringList *mAddedDBsItem; 00900 ItemBool *mScreenlockSecureItem; 00901 ItemStringList *mInstalledConduitsItem; 00902 ItemStringList *mAppBlockChangedDatabasesItem; 00903 ItemStringList *mDirtyDatabasesItem; 00904 ItemStringList *mFlagsChangedDatabasesItem; 00905 ItemUInt *mAddressDisplayModeItem; 00906 ItemBool *mUseKeyFieldItem; 00907 }; 00908 00909 #endif 00910