summaryrefslogtreecommitdiffstats
path: root/tdelirc/tdelirc/mode.h
diff options
context:
space:
mode:
Diffstat (limited to 'tdelirc/tdelirc/mode.h')
-rw-r--r--tdelirc/tdelirc/mode.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/tdelirc/tdelirc/mode.h b/tdelirc/tdelirc/mode.h
new file mode 100644
index 0000000..55b7b0a
--- /dev/null
+++ b/tdelirc/tdelirc/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 <tqstring.h>
+
+#include "remoteserver.h"
+
+/**
+@author Gav Wood
+*/
+
+class TDEConfig;
+
+class Mode
+{
+ TQString theName, theRemote, theIconFile;
+
+public:
+ void setName(const TQString &a) { theName = a; }
+ void setRemote(const TQString &a) { theRemote = a; }
+ void setIconFile(const TQString &a) { theIconFile = a; }
+
+ const TQString &name() const { return theName; }
+ const TQString &remote() const { return theRemote; }
+ const TQString &iconFile() const { return theIconFile; }
+ const TQString &remoteName() const { return RemoteServer::remoteServer()->getRemoteName(theRemote); }
+
+ const Mode &loadFromConfig(TDEConfig &theConfig, int index);
+ void saveToConfig(TDEConfig &theConfig, int index);
+
+ bool operator==(const Mode &mode) const { return mode.theName == theName && mode.theRemote == theRemote; }
+
+ Mode();
+ Mode(const TQString &remote, const TQString &name, const TQString &iconFile = TQString());
+ ~Mode();
+};
+
+#endif