diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 00:15:53 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 00:15:53 +0000 |
commit | 0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 (patch) | |
tree | b95c0ca86c4876dd139af376b9f4afd8917cf0cd /src/devices/gui/memory_editor.h | |
parent | b79a2c28534cf09987eeeba3077fff9236df182a (diff) | |
download | piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.tar.gz piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.zip |
TQt4 port piklab
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1238822 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/devices/gui/memory_editor.h')
-rw-r--r-- | src/devices/gui/memory_editor.h | 54 |
1 files changed, 29 insertions, 25 deletions
diff --git a/src/devices/gui/memory_editor.h b/src/devices/gui/memory_editor.h index 9836261..2ef60d8 100644 --- a/src/devices/gui/memory_editor.h +++ b/src/devices/gui/memory_editor.h @@ -9,14 +9,14 @@ #ifndef MEMORY_EDITOR_H #define MEMORY_EDITOR_H -#include <qframe.h> -#include <qscrollbar.h> -#include <qlabel.h> +#include <tqframe.h> +#include <tqscrollbar.h> +#include <tqlabel.h> #include "common/common/qflags.h" #include "common/common/bitvalue.h" -class QVBoxLayout; -class QHBoxLayout; -class QHBox; +class TQVBoxLayout; +class TQHBoxLayout; +class TQHBox; class KAction; class PopupButton; @@ -30,8 +30,8 @@ enum Action { Clear = 0, Zero, ChecksumCheck, Reload, Program, Verify, Read, Erase, BlankCheck, Nb_Actions }; enum ActionProperty { NoProperty = 0, SeparatorAfter = 1, NeedProgrammer = 2, NeedWrite = 4, NeedModified = 8 }; -Q_DECLARE_FLAGS(ActionProperties, ActionProperty) -Q_DECLARE_OPERATORS_FOR_FLAGS(ActionProperties) +TQ_DECLARE_FLAGS(ActionProperties, ActionProperty) +TQ_DECLARE_OPERATORS_FOR_FLAGS(ActionProperties) struct ActionData { const char *label, *icon; ActionProperties properties; @@ -39,11 +39,12 @@ struct ActionData { extern const ActionData ACTION_DATA[Nb_Actions]; //---------------------------------------------------------------------------- -class MemoryEditor : public QFrame +class MemoryEditor : public TQFrame { Q_OBJECT + TQ_OBJECT public: - MemoryEditor(Device::Memory *memory, QWidget *parent, const char *name); + MemoryEditor(Device::Memory *memory, TQWidget *tqparent, const char *name); virtual void setReadOnly(bool readOnly) = 0; public slots: @@ -54,19 +55,20 @@ signals: protected: Device::Memory *_memory; - QVBoxLayout *_top; + TQVBoxLayout *_top; }; //---------------------------------------------------------------------------- class MemoryRangeEditor : public MemoryEditor { Q_OBJECT + TQ_OBJECT public: MemoryRangeEditor(Device::Memory &memory, uint nbLines, uint nbCols, - uint offset, int nb, QWidget *parent, const char *name); + uint offset, int nb, TQWidget *tqparent, const char *name); virtual void init(); virtual void setReadOnly(bool readOnly); - void setComment(const QString &text); + void setComment(const TQString &text); public slots: virtual void updateDisplay(); @@ -87,30 +89,31 @@ protected slots: protected: uint _nbLines, _nbCols, _offset; int _nb; - QValueList<QLabel *> _addresses; - QValueList<QWidget *> _blocks; - QValueList<HexWordEditor *> _editors; - QScrollBar *_scrollbar; - QLabel *_comment; - QWidget *_spacer; + TQValueList<TQLabel *> _addresses; + TQValueList<TQWidget *> _blocks; + TQValueList<HexWordEditor *> _editors; + TQScrollBar *_scrollbar; + TQLabel *_comment; + TQWidget *_spacer; uint wordOffset() const { return _offset + current() * _nbCols; } uint current() const { return _scrollbar->value(); } virtual uint nbWords() const = 0; virtual uint addressIncrement() const = 0; virtual Address startAddress() const = 0; - virtual HexWordEditor *createHexWordEditor(QWidget *parent) = 0; + virtual HexWordEditor *createHexWordEditor(TQWidget *tqparent) = 0; virtual bool isRangeReadOnly() const = 0; virtual void updateAddressColor(uint i, Address address) { Q_UNUSED(i); Q_UNUSED(address); } - virtual void addLegend(QVBoxLayout *vbox) { Q_UNUSED(vbox); } + virtual void addLegend(TQVBoxLayout *vbox) { Q_UNUSED(vbox); } }; //---------------------------------------------------------------------------- class MemoryEditorGroup : public MemoryEditor { Q_OBJECT + TQ_OBJECT public: - MemoryEditorGroup(Device::Memory *memory, QWidget *parent, const char *name); + MemoryEditorGroup(Device::Memory *memory, TQWidget *tqparent, const char *name); void addEditor(MemoryEditor *editor); virtual void setReadOnly(bool readOnly); @@ -119,15 +122,16 @@ public slots: protected: bool _modified; - QValueList<MemoryEditor *> _editors; + TQValueList<MemoryEditor *> _editors; }; //---------------------------------------------------------------------------- class MemoryTypeEditor : public MemoryEditorGroup { Q_OBJECT + TQ_OBJECT public: - MemoryTypeEditor(const HexView *hexview, Device::Memory &memory, QWidget *parent, const char *name); + MemoryTypeEditor(const HexView *hexview, Device::Memory &memory, TQWidget *tqparent, const char *name); virtual void init(bool first); virtual void setReadOnly(bool readOnly); @@ -137,7 +141,7 @@ protected slots: protected: PopupButton *_title; - QLabel *_comment; + TQLabel *_comment; const HexView *_hexview; virtual bool internalDoAction(Action action) = 0; // return true if memory modified virtual bool hasAction(Action) const { return true; } |