prefs.cpp
00001
00022 #include "prefs.h"
00023
00024 #include <kconfig.h>
00025 #include <kdebug.h>
00026 #include <kglobal.h>
00027 #include <klocale.h>
00028 #include <kstaticdeleter.h>
00029
00030 using namespace Komposer;
00031
00032 Prefs *Prefs::s_instance = 0;
00033
00034 static KStaticDeleter<Prefs> insd;
00035
00036
00037 Prefs::Prefs()
00038 : KPrefs( "komposerrc" )
00039 {
00040 KPrefs::setCurrentGroup( "View" );
00041
00042 addItemString( "ActiveEditor", m_activeEditor, "krichtext" );
00043
00044 QStringList defaultEditors;
00045 defaultEditors << "krichtext";
00046 addItemStringList( "ActiveEditors", m_activeEditors, defaultEditors );
00047 }
00048
00049 Prefs::~Prefs()
00050 {
00051 if ( s_instance == this )
00052 s_instance = insd.setObject( 0 );
00053 }
00054
00055 Prefs *Prefs::self()
00056 {
00057 if ( !s_instance ) {
00058 insd.setObject( s_instance, new Prefs() );
00059 s_instance->readConfig();
00060 }
00061
00062 return s_instance;
00063 }
This file is part of the documentation for libkdepim Library Version 3.2.2.