28 #include <KGlobalSettings> 
   35     KOPrefsPrivate() : prefs( new 
KOPrefs ) {}
 
   36     ~KOPrefsPrivate() { 
delete prefs; }
 
   40 K_GLOBAL_STATIC( KOPrefsPrivate, sInstance )
 
   44   KGlobal::locale()->insertCatalog( QLatin1String(
"calendarsupport") );
 
   46   mEventViewsPrefs = EventViews::PrefsPtr( 
new EventViews::Prefs( 
this ) );
 
   48   mDefaultMonthViewFont = KGlobalSettings::generalFont();
 
   50   mDefaultMonthViewFont.setPointSize(
 
   51     qMax( mDefaultMonthViewFont.pointSize() - 2, 6 ) );
 
   53   KConfigSkeleton::setCurrentGroup( QLatin1String(
"General") );
 
   56   addItemPath( QLatin1String(
"Html Export File"), mHtmlExportFile,
 
   57                QDir::homePath() + QLatin1Char(
'/') + i18nc( 
"Default export file", 
"calendar.html" ) );
 
   59   monthViewFontItem()->setDefaultValue( mDefaultMonthViewFont );
 
   65   mEventViewsPrefs->writeConfig();
 
   70   if ( !sInstance.exists() ) {
 
   71     sInstance->prefs->readConfig();
 
   72     sInstance->prefs->mEventViewsPrefs->readConfig();
 
   75   return sInstance->prefs;
 
   82   KConfigSkeleton::usrSetDefaults();
 
   87   KConfigGroup generalConfig( config(), 
"General" );
 
   89   KConfigGroup timeScaleConfig( config(), 
"Timescale" );
 
   92   KConfigSkeleton::usrReadConfig();
 
   97   KConfigGroup generalConfig( config(), 
"General" );
 
   99   KConfigGroup timeScaleConfig( config(), 
"Timescale" );
 
  102   KConfigSkeleton::usrWriteConfig();
 
  107   return mEventViewsPrefs->setResourceColor( cal, color );
 
  112   return mEventViewsPrefs->resourceColor( cal );
 
  117   return mTimeScaleTimeZones;
 
  122   mTimeScaleTimeZones = list;
 
  127   mHtmlExportFile = fileName;
 
  132   return mHtmlExportFile;
 
  137   return mEventViewsPrefs;
 
void setTimeScaleTimezones(const QStringList &list)
void setResourceColor(const QString &, const QColor &)
EventViews::PrefsPtr eventViewsPreferences() const 
void usrSetDefaults()
Set preferences to default values. 
QString htmlExportFile() const 
QStringList timeScaleTimezones() const 
void setMonthViewFont(const QFont &v)
Set Month view. 
static KOPrefs * instance()
Get instance of KOPrefs. 
void setHtmlExportFile(const QString &fileName)
void usrWriteConfig()
Write preferences to config file. 
QColor resourceColor(const QString &)
void usrReadConfig()
Read preferences from config file.