kdelirc
mode.h
Go to the documentation of this file.00001 // 00002 // 00003 // C++ Interface: $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 #ifndef MODE_H 00014 #define MODE_H 00015 00016 00017 00018 #include "remoteserver.h" 00019 00024 class KConfig; 00025 00026 class Mode 00027 { 00028 QString theName, theRemote, theIconFile; 00029 00030 public: 00031 void setName(const QString &a) { theName = a; } 00032 void setRemote(const QString &a) { theRemote = a; } 00033 void setIconFile(const QString &a) { theIconFile = a; } 00034 00035 const QString &name() const { return theName; } 00036 const QString &remote() const { return theRemote; } 00037 const QString &iconFile() const { return theIconFile; } 00038 const QString &remoteName() const { return RemoteServer::remoteServer()->getRemoteName(theRemote); } 00039 00040 const Mode &loadFromConfig(KConfig &theConfig, int index); 00041 void saveToConfig(KConfig &theConfig, int index); 00042 00043 bool operator==(const Mode &mode) const { return mode.theName == theName && mode.theRemote == theRemote; } 00044 00045 Mode(); 00046 Mode(const QString &remote, const QString &name, const QString &iconFile = QString()); 00047 ~Mode(); 00048 }; 00049 00050 #endif
KDE 4.0 API Reference