summaryrefslogtreecommitdiffstats
path: root/src/devices/pic/gui/pic_config_word_editor.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-24 18:42:24 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-24 18:42:24 +0000
commitf508189682b6fba62e08feeb1596f682bad5fff9 (patch)
tree28aeb0e6c19386c385c1ce5edf8a92c1bca15281 /src/devices/pic/gui/pic_config_word_editor.h
downloadpiklab-f508189682b6fba62e08feeb1596f682bad5fff9.tar.gz
piklab-f508189682b6fba62e08feeb1596f682bad5fff9.zip
Added KDE3 version of PikLab
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1095639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/devices/pic/gui/pic_config_word_editor.h')
-rw-r--r--src/devices/pic/gui/pic_config_word_editor.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/devices/pic/gui/pic_config_word_editor.h b/src/devices/pic/gui/pic_config_word_editor.h
new file mode 100644
index 0000000..8f483c7
--- /dev/null
+++ b/src/devices/pic/gui/pic_config_word_editor.h
@@ -0,0 +1,70 @@
+/***************************************************************************
+ * Copyright (C) 2005 Nicolas Hadacek <hadacek@kde.org> *
+ * Copyright (C) 2003-2004 Alain Gibaud <alain.gibaud@free.fr> *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ ***************************************************************************/
+#ifndef PIC_CONFIG_WORD_EDITOR_H
+#define PIC_CONFIG_WORD_EDITOR_H
+
+#include <qcombobox.h>
+
+#include "common/gui/dialog.h"
+#include "common/gui/misc_gui.h"
+#include "pic_memory_editor.h"
+
+namespace Pic
+{
+//----------------------------------------------------------------------------
+class ConfigWordDialog : public Dialog
+{
+Q_OBJECT
+public:
+ ConfigWordDialog(const Memory &memory, uint index, QWidget *parent);
+};
+
+//----------------------------------------------------------------------------
+class ConfigWordComboBox : public ComboBox
+{
+Q_OBJECT
+public:
+ ConfigWordComboBox(QWidget *parent);
+ void appendItem(const QString &text, uint index) { insertItem(text); _map.append(index); }
+ uint index() const;
+ void setItem(uint index);
+ void setInvalidItem(uint index, const QString &label);
+
+private:
+ QValueVector<uint> _map; // item index -> value index
+ uint _invalidIndex; // if invalid -> value index
+
+ bool isValid() const { return uint(count())==_map.count(); }
+};
+
+//----------------------------------------------------------------------------
+class ConfigWordEditor : public MemoryEditor
+{
+Q_OBJECT
+public:
+ ConfigWordEditor(Memory &memory, uint index, bool withWordEditor, QWidget *parent);
+ virtual void setReadOnly(bool readOnly);
+
+public slots:
+ virtual void updateDisplay();
+
+private slots:
+ void slotModified();
+ void showDialog();
+
+private:
+ uint _configIndex;
+ MemoryRangeEditor *_mdb;
+ QValueVector<ConfigWordComboBox *> _combos;
+};
+
+} // namespace
+
+#endif