From 6f617c4181afa90f3eba14139d4f92eb98834899 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Feb 2013 15:05:21 -0600 Subject: Rename a number of classes to enhance compatibility with KDE4 --- src/devices/gui/device_group_ui.h | 8 ++++---- src/devices/gui/memory_editor.cpp | 4 ++-- src/devices/gui/memory_editor.h | 6 +++--- src/devices/gui/register_view.cpp | 8 ++++---- src/devices/gui/register_view.h | 6 +++--- src/devices/mem24/gui/mem24_group_ui.h | 2 +- src/devices/pic/gui/pic_group_ui.cpp | 2 +- src/devices/pic/gui/pic_group_ui.h | 2 +- src/devices/pic/gui/pic_memory_editor.cpp | 14 +++++++------- src/devices/pic/gui/pic_memory_editor.h | 8 ++++---- src/devices/pic/gui/pic_register_view.cpp | 2 +- src/devices/pic/gui/pic_register_view.h | 2 +- 12 files changed, 32 insertions(+), 32 deletions(-) (limited to 'src/devices') diff --git a/src/devices/gui/device_group_ui.h b/src/devices/gui/device_group_ui.h index 7b76186..54272d8 100644 --- a/src/devices/gui/device_group_ui.h +++ b/src/devices/gui/device_group_ui.h @@ -11,9 +11,9 @@ #include class TQWidget; -class KPopupMenu; -class KListViewItem; -class KAction; +class TDEPopupMenu; +class TDEListViewItem; +class TDEAction; #include "devices/base/generic_device.h" #include "devices/base/device_group.h" @@ -35,7 +35,7 @@ public: virtual Register::View *createRegisterView(TQWidget *parent) const = 0; virtual MemoryEditor *createConfigEditor(Device::Memory &memory, TQWidget *parent) const = 0; virtual void fillWatchListContainer(ListContainer *container, TQValueVector &ids) const = 0; - virtual Register::ListViewItem *createWatchItem(const Register::TypeData &data, KListViewItem *parent) const = 0; + virtual Register::ListViewItem *createWatchItem(const Register::TypeData &data, TDEListViewItem *parent) const = 0; }; inline const Device::GroupUI &groupui(const Device::Data &data) { return static_cast(*data.group().gui()); } diff --git a/src/devices/gui/memory_editor.cpp b/src/devices/gui/memory_editor.cpp index bee291e..5e71ddb 100644 --- a/src/devices/gui/memory_editor.cpp +++ b/src/devices/gui/memory_editor.cpp @@ -299,7 +299,7 @@ void Device::MemoryTypeEditor::init(bool first) _title = new PopupButton(this); for (uint i=0; iappendAction(action); } diff --git a/src/devices/gui/memory_editor.h b/src/devices/gui/memory_editor.h index 78bb5a6..89f4fb2 100644 --- a/src/devices/gui/memory_editor.h +++ b/src/devices/gui/memory_editor.h @@ -17,7 +17,7 @@ class TQVBoxLayout; class TQHBoxLayout; class TQHBox; -class KAction; +class TDEAction; class PopupButton; namespace Device @@ -145,12 +145,12 @@ protected: const HexView *_hexview; virtual bool internalDoAction(Action action) = 0; // return true if memory modified virtual bool hasAction(Action) const { return true; } - void addAction(KAction *action); + void addAction(TDEAction *action); const Device::Memory *originalMemory() const; private: bool _readOnly; - KAction *_actions[Nb_Actions]; + TDEAction *_actions[Nb_Actions]; void doAction(Action action); }; diff --git a/src/devices/gui/register_view.cpp b/src/devices/gui/register_view.cpp index bd444c9..a290508 100644 --- a/src/devices/gui/register_view.cpp +++ b/src/devices/gui/register_view.cpp @@ -12,8 +12,8 @@ #include "libgui/gui_debug_manager.h" //---------------------------------------------------------------------------- -Register::PortBitListViewItem::PortBitListViewItem(uint index, uint bit, KListViewItem *parent) - : KListViewItem(parent), _index(index), _bit(bit) +Register::PortBitListViewItem::PortBitListViewItem(uint index, uint bit, TDEListViewItem *parent) + : TDEListViewItem(parent), _index(index), _bit(bit) { const Device::RegistersData *rdata = Main::deviceData()->registersData(); setText(1, rdata->portBitName(_index, _bit)); @@ -53,7 +53,7 @@ void Register::PortBitListViewItem::paintCell(TQPainter *p, const TQColorGroup & const TQMap &odata = Register::list().oldPortData(_index); bool changed = ( !data.isEmpty() && data[_bit]!=odata[_bit] ); if ( column==2 && changed ) ncg.setColor(TQColorGroup::Text, red); - KListViewItem::paintCell(p, ncg, column, width, align); + TDEListViewItem::paintCell(p, ncg, column, width, align); } TQString Register::PortBitListViewItem::tooltip(int col) const @@ -75,7 +75,7 @@ TQString Register::PortBitListViewItem::tooltip(int col) const } //----------------------------------------------------------------------------- -Register::ListViewItem::ListViewItem(const TypeData &data, KListViewItem *parent) +Register::ListViewItem::ListViewItem(const TypeData &data, TDEListViewItem *parent) : EditListViewItem(parent), _data(data), _base(NumberBase::Hex) { setSelectable(false); diff --git a/src/devices/gui/register_view.h b/src/devices/gui/register_view.h index c69eeac..f3cb11d 100644 --- a/src/devices/gui/register_view.h +++ b/src/devices/gui/register_view.h @@ -20,10 +20,10 @@ namespace Register enum { PortBitRtti = 1000, RegisterRtti = 1001 }; //----------------------------------------------------------------------------- -class PortBitListViewItem : public KListViewItem +class PortBitListViewItem : public TDEListViewItem { public: - PortBitListViewItem(uint address, uint bit, KListViewItem *parent); + PortBitListViewItem(uint address, uint bit, TDEListViewItem *parent); virtual int rtti() const { return PortBitRtti; } void updateView(); TQString tooltip(int column) const; @@ -38,7 +38,7 @@ private: class ListViewItem : public EditListViewItem { public: - ListViewItem(const TypeData &data, KListViewItem *item); + ListViewItem(const TypeData &data, TDEListViewItem *item); virtual int rtti() const { return RegisterRtti; } virtual void updateView(); const TypeData &data() const { return _data; } diff --git a/src/devices/mem24/gui/mem24_group_ui.h b/src/devices/mem24/gui/mem24_group_ui.h index 7f1f4c8..4f45ef6 100644 --- a/src/devices/mem24/gui/mem24_group_ui.h +++ b/src/devices/mem24/gui/mem24_group_ui.h @@ -20,7 +20,7 @@ public: virtual Register::View *createRegisterView(TQWidget *) const { return 0; } virtual Device::MemoryEditor *createConfigEditor(Device::Memory &, TQWidget *) const { return 0; } virtual void fillWatchListContainer(ListContainer *, TQValueVector &) const {} - virtual Register::ListViewItem *createWatchItem(const Register::TypeData &, KListViewItem *) const { return 0; } + virtual Register::ListViewItem *createWatchItem(const Register::TypeData &, TDEListViewItem *) const { return 0; } }; } // namespace diff --git a/src/devices/pic/gui/pic_group_ui.cpp b/src/devices/pic/gui/pic_group_ui.cpp index d2ff2f4..912423c 100644 --- a/src/devices/pic/gui/pic_group_ui.cpp +++ b/src/devices/pic/gui/pic_group_ui.cpp @@ -81,7 +81,7 @@ void Pic::GroupUI::fillWatchListContainer(ListContainer *container, TQValueVecto } } -Register::ListViewItem *Pic::GroupUI::createWatchItem(const Register::TypeData &data, KListViewItem *parent) const +Register::ListViewItem *Pic::GroupUI::createWatchItem(const Register::TypeData &data, TDEListViewItem *parent) const { return new Pic::RegisterListViewItem(data, parent); } diff --git a/src/devices/pic/gui/pic_group_ui.h b/src/devices/pic/gui/pic_group_ui.h index d5dba86..0bf20d8 100644 --- a/src/devices/pic/gui/pic_group_ui.h +++ b/src/devices/pic/gui/pic_group_ui.h @@ -21,7 +21,7 @@ public: virtual Register::View *createRegisterView(TQWidget *parent) const; virtual Device::MemoryEditor *createConfigEditor(Device::Memory &memory, TQWidget *parent) const; virtual void fillWatchListContainer(ListContainer *container, TQValueVector &ids) const; - virtual Register::ListViewItem *createWatchItem(const Register::TypeData &data, KListViewItem *parent) const; + virtual Register::ListViewItem *createWatchItem(const Register::TypeData &data, TDEListViewItem *parent) const; }; } // namespace diff --git a/src/devices/pic/gui/pic_memory_editor.cpp b/src/devices/pic/gui/pic_memory_editor.cpp index ced7e11..219519f 100644 --- a/src/devices/pic/gui/pic_memory_editor.cpp +++ b/src/devices/pic/gui/pic_memory_editor.cpp @@ -37,11 +37,11 @@ Pic::MemoryEditorLegend::Data::Data(const TQString &text, TQWidget *parent) { button = new PopupButton(text, parent); - KActionCollection *ac = 0; - KAction *a = new KAction(i18n("Go to start"), "top", 0, TQT_TQOBJECT(parent), TQT_SLOT(gotoStart()), ac); + TDEActionCollection *ac = 0; + TDEAction *a = new TDEAction(i18n("Go to start"), "top", 0, TQT_TQOBJECT(parent), TQT_SLOT(gotoStart()), ac); actions.append(a); button->appendAction(a); - a = new KAction(i18n("Go to end"), "bottom", 0, TQT_TQOBJECT(parent), TQT_SLOT(gotoEnd()), ac); + a = new TDEAction(i18n("Go to end"), "bottom", 0, TQT_TQOBJECT(parent), TQT_SLOT(gotoEnd()), ac); actions.append(a); button->appendAction(a); label = new TQLabel(parent); @@ -53,7 +53,7 @@ void Pic::MemoryEditorLegend::Data::setProtected(bool on) else label->unsetPalette(); } -bool Pic::MemoryEditorLegend::Data::hasAction(const KAction *action) const +bool Pic::MemoryEditorLegend::Data::hasAction(const TDEAction *action) const { for (uint i=0; i(sender()); + const TDEAction *action = static_cast(sender()); if ( _boot.hasAction(action) ) { AddressRange r = memory().bootRange(); emit setStartWord(r.start - start); @@ -147,7 +147,7 @@ void Pic::MemoryEditorLegend::gotoStart() void Pic::MemoryEditorLegend::gotoEnd() { Address start = device().range(type()).start; - const KAction *action = static_cast(sender()); + const TDEAction *action = static_cast(sender()); if ( _boot.hasAction(action) ) { AddressRange r = memory().bootRange(); emit setEndWord(r.end - start); @@ -316,7 +316,7 @@ Pic::MemoryUserIdEditor::MemoryUserIdEditor(const HexView *hexview, Memory &memo void Pic::MemoryUserIdEditor::init(bool first) { MemoryTypeRangeEditor::init(first); - _setToChecksum = new KToggleAction(i18n("Set to unprotected checksum"), 0, 0, + _setToChecksum = new TDEToggleAction(i18n("Set to unprotected checksum"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(toggleSetToChecksum()), Main::toplevel().actionCollection()); addAction(_setToChecksum); if ( readConfigEntry(BaseGlobalConfig::UserIdSetToChecksum).toBool() && memory().isClear(MemoryRangeType::UserId) ) { diff --git a/src/devices/pic/gui/pic_memory_editor.h b/src/devices/pic/gui/pic_memory_editor.h index 7d0f857..558cefb 100644 --- a/src/devices/pic/gui/pic_memory_editor.h +++ b/src/devices/pic/gui/pic_memory_editor.h @@ -12,7 +12,7 @@ #include #include -class KToggleAction; +class TDEToggleAction; #include "devices/gui/memory_editor.h" #include "devices/gui/hex_word_editor.h" @@ -78,10 +78,10 @@ private: Data() : button(0), label(0) {} Data(const TQString &text, TQWidget *parent); void setProtected(bool on); - bool hasAction(const KAction *action) const; + bool hasAction(const TDEAction *action) const; PopupButton *button; TQLabel *label; - TQValueVector actions; + TQValueVector actions; }; Data _boot; TQValueVector _blocks; @@ -175,7 +175,7 @@ private slots: private: bool _saveReadOnly; - KToggleAction *_setToChecksum; + TDEToggleAction *_setToChecksum; }; //----------------------------------------------------------------------------- diff --git a/src/devices/pic/gui/pic_register_view.cpp b/src/devices/pic/gui/pic_register_view.cpp index 820da6b..420a0fc 100644 --- a/src/devices/pic/gui/pic_register_view.cpp +++ b/src/devices/pic/gui/pic_register_view.cpp @@ -306,7 +306,7 @@ void Pic::RegisterView::stopWatchAllRegisters() } //---------------------------------------------------------------------------- -Pic::RegisterListViewItem::RegisterListViewItem(const Register::TypeData &data, KListViewItem *parent) +Pic::RegisterListViewItem::RegisterListViewItem(const Register::TypeData &data, TDEListViewItem *parent) : Register::ListViewItem(data, parent) {} diff --git a/src/devices/pic/gui/pic_register_view.h b/src/devices/pic/gui/pic_register_view.h index 9c2a654..11882c0 100644 --- a/src/devices/pic/gui/pic_register_view.h +++ b/src/devices/pic/gui/pic_register_view.h @@ -78,7 +78,7 @@ private: class RegisterListViewItem : public Register::ListViewItem { public: - RegisterListViewItem(const Register::TypeData &data, KListViewItem *parent); + RegisterListViewItem(const Register::TypeData &data, TDEListViewItem *parent); private: virtual uint nbCharsAddress() const; -- cgit v1.2.1