• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdeutils
  • Sitemap
  • Contact Us
 

kdelirc

mode.cpp

Go to the documentation of this file.
00001 //
00002 //
00003 // C++ Implementation: $MODULE$
00004 //
00005 // Description:
00006 //
00007 //
00008 // Author: Gav Wood <gav@kde.org>, (C) 2003
00009 //
00010 // Copyright: See COPYING file that comes with this distribution
00011 //
00012 //
00013 
00014 #include <kconfig.h>
00015 
00016 #include "modes.h"
00017 #include "mode.h"
00018 
00019 Mode::Mode() : theName(QString::null)   //krazy:exclude=nullstrassign for old broken gcc
00020 {
00021 }
00022 
00023 Mode::Mode(const QString &remote, const QString &name, const QString &iconFile)
00024 {
00025     theRemote = remote;
00026     theName = name;
00027     theIconFile = iconFile;
00028 }
00029 
00030 Mode::~Mode()
00031 {
00032 }
00033 
00034 const Mode &Mode::loadFromConfig(KConfig &theConfig, int index)
00035 {
00036     QString Prefix = "Mode" + QString().setNum(index);
00037     theName = theConfig.readEntry(Prefix + "Name",QString());
00038     theRemote = theConfig.readEntry(Prefix + "Remote",QString());
00039     theIconFile = theConfig.readEntry(Prefix + "IconFile",QString());
00040     if(theIconFile.isEmpty()) theIconFile = QString();
00041     return *this;
00042 }
00043 
00044 void Mode::saveToConfig(KConfig &theConfig, int index)
00045 {
00046     QString Prefix = "Mode" + QString().setNum(index);
00047     theConfig.writeEntry(Prefix + "Name", theName);
00048     theConfig.writeEntry(Prefix + "Remote", theRemote);
00049     theConfig.writeEntry(Prefix + "IconFile", theIconFile);
00050 }
00051 

kdelirc

Skip menu "kdelirc"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

kdeutils

Skip menu "kdeutils"
  • ark
  • kcalc
  • kcharselect
  • kdelirc
  • kdessh
  • kdf
  • kfloppy
  • kgpg
  • kjots
  • klaptopdaemon
  • kmilo
  • ksim
  • ktimer
  • kwallet
  • superkaramba
Generated for kdeutils by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal