Author: tgoettlicher
Date: Mon Dec 10 16:44:35 2007
New Revision: 8095
URL: http://svn.opensuse.org/viewcvs/zypp?rev=8095&view=rev
Log:
backup
Added:
branches/tmp/tgoettlicher/updater-kde_qt4porting/updater/opensuseupdater_settings.cpp
branches/tmp/tgoettlicher/updater-kde_qt4porting/updater/opensuseupdater_settings.h
Added: branches/tmp/tgoettlicher/updater-kde_qt4porting/updater/opensuseupdater_settings.cpp
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/tgoettlicher/updater-kde_qt4porting/updater/opensuseupdater_settings.cpp?rev=8095&view=auto
==============================================================================
--- branches/tmp/tgoettlicher/updater-kde_qt4porting/updater/opensuseupdater_settings.cpp (added)
+++ branches/tmp/tgoettlicher/updater-kde_qt4porting/updater/opensuseupdater_settings.cpp Mon Dec 10 16:44:35 2007
@@ -0,0 +1,61 @@
+// This file is generated by kconfig_compiler from opensuseupdater_settings.kcfg.
+// All changes you do to this file will be lost.
+
+#include "opensuseupdater_settings.h"
+
+#include
+
+UpdaterSettings *UpdaterSettings::mSelf = 0;
+static KStaticDeleter<UpdaterSettings> staticUpdaterSettingsDeleter;
+
+UpdaterSettings *UpdaterSettings::self()
+{
+ if ( !mSelf ) {
+ staticUpdaterSettingsDeleter.setObject( mSelf, new UpdaterSettings() );
+ mSelf->readConfig();
+ }
+
+ return mSelf;
+}
+
+UpdaterSettings::UpdaterSettings( )
+ : KConfigSkeleton( QString::fromLatin1( "opensuseupdaterrc" ) )
+{
+ mSelf = this;
+ setCurrentGroup( QString::fromLatin1( "General" ) );
+
+ KConfigSkeleton::ItemInt *itemInterval;
+ itemInterval = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "Interval" ), mInterval, 24 );
+ addItem( itemInterval, QString::fromLatin1( "Interval" ) );
+ KConfigSkeleton::ItemInt *itemWarnInterval;
+ itemWarnInterval = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "WarnInterval" ), mWarnInterval, 60 );
+ addItem( itemWarnInterval, QString::fromLatin1( "WarnInterval" ) );
+ KConfigSkeleton::ItemBool *itemAutostart;
+ itemAutostart = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "Autostart" ), mAutostart, true );
+ addItem( itemAutostart, QString::fromLatin1( "Autostart" ) );
+ KConfigSkeleton::ItemString *itemBackendPlugin;
+ itemBackendPlugin = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "BackendPlugin" ), mBackendPlugin );
+ addItem( itemBackendPlugin, QString::fromLatin1( "BackendPlugin" ) );
+ KConfigSkeleton::ItemBool *itemShowPackages;
+ itemShowPackages = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "ShowPackages" ), mShowPackages, false );
+ addItem( itemShowPackages, QString::fromLatin1( "ShowPackages" ) );
+ KConfigSkeleton::ItemBool *itemShowNotifications;
+ itemShowNotifications = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "ShowNotifications" ), mShowNotifications, true );
+ addItem( itemShowNotifications, QString::fromLatin1( "ShowNotifications" ) );
+ KConfigSkeleton::ItemBool *itemNoSimpleView;
+ itemNoSimpleView = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "NoSimpleView" ), mNoSimpleView, false );
+ addItem( itemNoSimpleView, QString::fromLatin1( "NoSimpleView" ) );
+ KConfigSkeleton::ItemBool *itemCheckingAnimation;
+ itemCheckingAnimation = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "CheckingAnimation" ), mCheckingAnimation, true );
+ addItem( itemCheckingAnimation, QString::fromLatin1( "CheckingAnimation" ) );
+ KConfigSkeleton::ItemDateTime *itemLastCheckTime;
+ itemLastCheckTime = new KConfigSkeleton::ItemDateTime( currentGroup(), QString::fromLatin1( "LastCheckTime" ), mLastCheckTime );
+ addItem( itemLastCheckTime, QString::fromLatin1( "LastCheckTime" ) );
+}
+
+UpdaterSettings::~UpdaterSettings()
+{
+ if ( mSelf == this )
+ staticUpdaterSettingsDeleter.setObject( mSelf, 0, false );
+}
+
Added: branches/tmp/tgoettlicher/updater-kde_qt4porting/updater/opensuseupdater_settings.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/tgoettlicher/updater-kde_qt4porting/updater/opensuseupdater_settings.h?rev=8095&view=auto
==============================================================================
--- branches/tmp/tgoettlicher/updater-kde_qt4porting/updater/opensuseupdater_settings.h (added)
+++ branches/tmp/tgoettlicher/updater-kde_qt4porting/updater/opensuseupdater_settings.h Mon Dec 10 16:44:35 2007
@@ -0,0 +1,212 @@
+// This file is generated by kconfig_compiler from opensuseupdater_settings.kcfg.
+// All changes you do to this file will be lost.
+#ifndef UPDATERSETTINGS_H
+#define UPDATERSETTINGS_H
+
+#include
+#include
+
+class UpdaterSettings : public KConfigSkeleton
+{
+ public:
+
+ static UpdaterSettings *self();
+ ~UpdaterSettings();
+
+ /**
+ Set How often to check for updates.
+ */
+ static
+ void setInterval( int v )
+ {
+ if (!self()->isImmutable( QString::fromLatin1( "Interval" ) ))
+ self()->mInterval = v;
+ }
+
+ /**
+ Get How often to check for updates.
+ */
+ static
+ int interval()
+ {
+ return self()->mInterval;
+ }
+
+ /**
+ Set How often show recurring warning when updates are available.
+ */
+ static
+ void setWarnInterval( int v )
+ {
+ if (!self()->isImmutable( QString::fromLatin1( "WarnInterval" ) ))
+ self()->mWarnInterval = v;
+ }
+
+ /**
+ Get How often show recurring warning when updates are available.
+ */
+ static
+ int warnInterval()
+ {
+ return self()->mWarnInterval;
+ }
+
+ /**
+ Set Automatically start the applet on login
+ */
+ static
+ void setAutostart( bool v )
+ {
+ if (!self()->isImmutable( QString::fromLatin1( "Autostart" ) ))
+ self()->mAutostart = v;
+ }
+
+ /**
+ Get Automatically start the applet on login
+ */
+ static
+ bool autostart()
+ {
+ return self()->mAutostart;
+ }
+
+ /**
+ Set The backend for connecting to package database.
+ */
+ static
+ void setBackendPlugin( const QString & v )
+ {
+ if (!self()->isImmutable( QString::fromLatin1( "BackendPlugin" ) ))
+ self()->mBackendPlugin = v;
+ }
+
+ /**
+ Get The backend for connecting to package database.
+ */
+ static
+ QString backendPlugin()
+ {
+ return self()->mBackendPlugin;
+ }
+
+ /**
+ Set Show available upgrades (for experts only).
+ */
+ static
+ void setShowPackages( bool v )
+ {
+ if (!self()->isImmutable( QString::fromLatin1( "ShowPackages" ) ))
+ self()->mShowPackages = v;
+ }
+
+ /**
+ Get Show available upgrades (for experts only).
+ */
+ static
+ bool showPackages()
+ {
+ return self()->mShowPackages;
+ }
+
+ /**
+ Set Show notifications.
+ */
+ static
+ void setShowNotifications( bool v )
+ {
+ if (!self()->isImmutable( QString::fromLatin1( "ShowNotifications" ) ))
+ self()->mShowNotifications = v;
+ }
+
+ /**
+ Get Show notifications.
+ */
+ static
+ bool showNotifications()
+ {
+ return self()->mShowNotifications;
+ }
+
+ /**
+ Set Always show detailed view.
+ */
+ static
+ void setNoSimpleView( bool v )
+ {
+ if (!self()->isImmutable( QString::fromLatin1( "NoSimpleView" ) ))
+ self()->mNoSimpleView = v;
+ }
+
+ /**
+ Get Always show detailed view.
+ */
+ static
+ bool noSimpleView()
+ {
+ return self()->mNoSimpleView;
+ }
+
+ /**
+ Set Show animated tray icon on check.
+ */
+ static
+ void setCheckingAnimation( bool v )
+ {
+ if (!self()->isImmutable( QString::fromLatin1( "CheckingAnimation" ) ))
+ self()->mCheckingAnimation = v;
+ }
+
+ /**
+ Get Show animated tray icon on check.
+ */
+ static
+ bool checkingAnimation()
+ {
+ return self()->mCheckingAnimation;
+ }
+
+ /**
+ Set Last check for updates.
+ */
+ static
+ void setLastCheckTime( const QDateTime & v )
+ {
+ if (!self()->isImmutable( QString::fromLatin1( "LastCheckTime" ) ))
+ self()->mLastCheckTime = v;
+ }
+
+ /**
+ Get Last check for updates.
+ */
+ static
+ QDateTime lastCheckTime()
+ {
+ return self()->mLastCheckTime;
+ }
+
+// port static
+// void writeConfig()
+// {
+// static_cast(self())->writeConfig();
+// }
+ protected:
+ UpdaterSettings();
+ static UpdaterSettings *mSelf;
+
+
+ // General
+ int mInterval;
+ int mWarnInterval;
+ bool mAutostart;
+ QString mBackendPlugin;
+ bool mShowPackages;
+ bool mShowNotifications;
+ bool mNoSimpleView;
+ bool mCheckingAnimation;
+ QDateTime mLastCheckTime;
+
+ private:
+};
+
+#endif
+
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org