summaryrefslogtreecommitdiffstats
path: root/kdelirc/kdelirc/mode.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit2bda8f7717adf28da4af0d34fb82f63d2868c31d (patch)
tree8d927b7b47a90c4adb646482a52613f58acd6f8c /kdelirc/kdelirc/mode.h
downloadtdeutils-2bda8f7717adf28da4af0d34fb82f63d2868c31d.tar.gz
tdeutils-2bda8f7717adf28da4af0d34fb82f63d2868c31d.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdelirc/kdelirc/mode.h')
-rw-r--r--kdelirc/kdelirc/mode.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/kdelirc/kdelirc/mode.h b/kdelirc/kdelirc/mode.h
new file mode 100644
index 0000000..e52c042
--- /dev/null
+++ b/kdelirc/kdelirc/mode.h
@@ -0,0 +1,50 @@
+//
+//
+// C++ Interface: $MODULE$
+//
+// Description:
+//
+//
+// Author: Gav Wood <gav@kde.org>, (C) 2003
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#ifndef MODE_H
+#define MODE_H
+
+#include <qstring.h>
+
+#include "remoteserver.h"
+
+/**
+@author Gav Wood
+*/
+
+class KConfig;
+
+class Mode
+{
+ QString theName, theRemote, theIconFile;
+
+public:
+ void setName(const QString &a) { theName = a; }
+ void setRemote(const QString &a) { theRemote = a; }
+ void setIconFile(const QString &a) { theIconFile = a; }
+
+ const QString &name() const { return theName; }
+ const QString &remote() const { return theRemote; }
+ const QString &iconFile() const { return theIconFile; }
+ const QString &remoteName() const { return RemoteServer::remoteServer()->getRemoteName(theRemote); }
+
+ const Mode &loadFromConfig(KConfig &theConfig, int index);
+ void saveToConfig(KConfig &theConfig, int index);
+
+ bool operator==(const Mode &mode) const { return mode.theName == theName && mode.theRemote == theRemote; }
+
+ Mode();
+ Mode(const QString &remote, const QString &name, const QString &iconFile = QString::null);
+ ~Mode();
+};
+
+#endif