diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:06:16 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:06:16 -0600 |
commit | 7717bcec2ad7d94e3f38a2e831bafa60a525f7d2 (patch) | |
tree | 77ffa8fe14318bb3a285cae65dbe622bcbbcb3f9 /src/gui | |
parent | b5cff83092d97189b5a55e1a996995207bc3016c (diff) | |
download | tellico-7717bcec2ad7d94e3f38a2e831bafa60a525f7d2.tar.gz tellico-7717bcec2ad7d94e3f38a2e831bafa60a525f7d2.zip |
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/counteditem.cpp | 2 | ||||
-rw-r--r-- | src/gui/lineedit.cpp | 2 | ||||
-rw-r--r-- | src/gui/lineedit.h | 4 | ||||
-rw-r--r-- | src/gui/listview.cpp | 16 | ||||
-rw-r--r-- | src/gui/listview.h | 18 | ||||
-rw-r--r-- | src/gui/stringmapdialog.cpp | 6 | ||||
-rw-r--r-- | src/gui/stringmapdialog.h | 6 | ||||
-rw-r--r-- | src/gui/tablefieldwidget.cpp | 4 |
8 files changed, 29 insertions, 29 deletions
diff --git a/src/gui/counteditem.cpp b/src/gui/counteditem.cpp index 536d08e..56f4575 100644 --- a/src/gui/counteditem.cpp +++ b/src/gui/counteditem.cpp @@ -54,7 +54,7 @@ void CountedItem::paintCell(TQPainter* p_, const TQColorGroup& cg_, } // set a catchable text so that we can have our own implementation (see further down) - // but still benefit from KListView::paintCell + // but still benefit from TDEListView::paintCell TQString oldText = text(column_); // if(oldText.isEmpty()) { if(oldText == '\t') { diff --git a/src/gui/lineedit.cpp b/src/gui/lineedit.cpp index db77b29..b71667e 100644 --- a/src/gui/lineedit.cpp +++ b/src/gui/lineedit.cpp @@ -28,7 +28,7 @@ LineEdit::LineEdit(TQWidget* parent_, const char* name_) : KLineEdit(parent_, na , m_allowSpellCheck(false) , m_enableSpellCheck(true) , m_spell(0) { - m_spellAction = KStdAction::spelling(TQT_TQOBJECT(this), TQT_SLOT(slotCheckSpelling()), new KActionCollection(this)); + m_spellAction = KStdAction::spelling(TQT_TQOBJECT(this), TQT_SLOT(slotCheckSpelling()), new TDEActionCollection(this)); } void LineEdit::clear() { diff --git a/src/gui/lineedit.h b/src/gui/lineedit.h index a39d8a8..d2f9873 100644 --- a/src/gui/lineedit.h +++ b/src/gui/lineedit.h @@ -18,7 +18,7 @@ #include <tqstring.h> -class KAction; +class TDEAction; class KSpell; namespace Tellico { @@ -62,7 +62,7 @@ private slots: private: TQString m_hint; bool m_drawHint; - KAction* m_spellAction; + TDEAction* m_spellAction; bool m_allowSpellCheck; bool m_enableSpellCheck; KSpell* m_spell; diff --git a/src/gui/listview.cpp b/src/gui/listview.cpp index 4b8c250..5c1a38c 100644 --- a/src/gui/listview.cpp +++ b/src/gui/listview.cpp @@ -25,7 +25,7 @@ using Tellico::GUI::ListView; using Tellico::GUI::ListViewItem; -ListView::ListView(TQWidget* parent_, const char* name_) : KListView(parent_, name_/*=0*/), +ListView::ListView(TQWidget* parent_, const char* name_) : TDEListView(parent_, name_/*=0*/), m_sortStyle(SortByText), m_isClear(true) { setSelectionMode(TQListView::Extended); connect(this, TQT_SIGNAL(selectionChanged()), @@ -113,7 +113,7 @@ int ListView::lastVisibleColumn() const { void ListView::setColumnText(int column, const TQString& label) { ListViewComparison* comp = m_comparisons.take(columnText(column)); - KListView::setColumnText(column, label); + TDEListView::setColumnText(column, label); if(comp) { m_comparisons.insert(columnText(column), comp); } @@ -227,7 +227,7 @@ void ListView::slotDoubleClicked(TQListViewItem* item_) { void ListView::drawContentsOffset(TQPainter* p, int ox, int oy, int cx, int cy, int cw, int ch) { bool oldUpdatesEnabled = isUpdatesEnabled(); setUpdatesEnabled(false); - KListView::drawContentsOffset(p, ox, oy, cx, cy, cw, ch); + TDEListView::drawContentsOffset(p, ox, oy, cx, cy, cw, ch); setUpdatesEnabled(oldUpdatesEnabled); } @@ -259,7 +259,7 @@ int ListViewItem::compare(TQListViewItem* item_, int col_, bool asc_) const { return res; } res = listView()->compare(col_, this, static_cast<GUI::ListViewItem*>(item_), asc_); - return res == 0 ? KListViewItem::compare(item_, col_, asc_) : res; + return res == 0 ? TDEListViewItem::compare(item_, col_, asc_) : res; } int ListViewItem::compareWeight(TQListViewItem* item_, int col_, bool asc_) const { @@ -288,13 +288,13 @@ void ListViewItem::setSelected(bool s_) { } if(s_ != isSelected()) { lv->updateSelected(this, s_); - KListViewItem::setSelected(s_); + TDEListViewItem::setSelected(s_); } } TQColor ListViewItem::backgroundColor(int column_) { #if KDE_IS_VERSION(3,3,90) - return KListViewItem::backgroundColor(column_); + return TDEListViewItem::backgroundColor(column_); #else ListView* view = listView(); if(view->columns() > 1 && view->shadeSortColumn() && column_ == view->sortColumn()) { @@ -307,7 +307,7 @@ TQColor ListViewItem::backgroundColor(int column_) { void ListViewItem::paintCell(TQPainter* p_, const TQColorGroup& cg_, int column_, int width_, int align_) { // taken from klistview.cpp - // I can't call KListViewItem::paintCell since KListViewItem::backgroundCOlor(int) is + // I can't call TDEListViewItem::paintCell since TDEListViewItem::backgroundCOlor(int) is // not virtual. I need to be sure to call ListViewItem::backgroundColor(int); TQColorGroup cg = cg_; const TQPixmap* pm = listView()->viewport()->backgroundPixmap(); @@ -321,7 +321,7 @@ void ListViewItem::paintCell(TQPainter* p_, const TQColorGroup& cg_, backgroundColor(column_)); } - // don't call KListViewItem::paintCell() since that also does alternate painting, etc... + // don't call TDEListViewItem::paintCell() since that also does alternate painting, etc... TQListViewItem::paintCell(p_, cg, column_, width_, align_); // borrowed from amarok, draw line to left of cell diff --git a/src/gui/listview.h b/src/gui/listview.h index 47d3e8e..8e0be06 100644 --- a/src/gui/listview.h +++ b/src/gui/listview.h @@ -40,7 +40,7 @@ typedef TQPtrListIterator<ListViewItem> ListViewItemListIt; * * @author Robby Stephenson */ -class ListView : public KListView { +class ListView : public TDEListView { Q_OBJECT @@ -130,13 +130,13 @@ private: * * @author Robby Stephenson */ -class ListViewItem : public KListViewItem { +class ListViewItem : public TDEListViewItem { public: - ListViewItem(ListView* parent) : KListViewItem(parent), m_sortWeight(-1) {} - ListViewItem(ListView* parent, TQListViewItem* after) : KListViewItem(parent, after), m_sortWeight(-1) {} - ListViewItem(ListViewItem* parent) : KListViewItem(parent), m_sortWeight(-1) {} - ListViewItem(ListView* parent, const TQString& text) : KListViewItem(parent, text), m_sortWeight(-1) {} - ListViewItem(ListViewItem* parent, const TQString& text) : KListViewItem(parent, text), m_sortWeight(-1) {} + ListViewItem(ListView* parent) : TDEListViewItem(parent), m_sortWeight(-1) {} + ListViewItem(ListView* parent, TQListViewItem* after) : TDEListViewItem(parent, after), m_sortWeight(-1) {} + ListViewItem(ListViewItem* parent) : TDEListViewItem(parent), m_sortWeight(-1) {} + ListViewItem(ListView* parent, const TQString& text) : TDEListViewItem(parent, text), m_sortWeight(-1) {} + ListViewItem(ListViewItem* parent, const TQString& text) : TDEListViewItem(parent, text), m_sortWeight(-1) {} virtual ~ListViewItem(); virtual int realChildCount() const { return childCount(); } @@ -160,11 +160,11 @@ public: * @param column The column number * @param alternate The alternate row color can be forced */ - virtual TQColor backgroundColor(int column); // not virtual in KListViewItem!!! + virtual TQColor backgroundColor(int column); // not virtual in TDEListViewItem!!! virtual void paintCell(TQPainter* painter, const TQColorGroup& colorGroup, int column, int width, int alignment); - ListView* listView () const { return static_cast<ListView*>(KListViewItem::listView()); } + ListView* listView () const { return static_cast<ListView*>(TDEListViewItem::listView()); } virtual void doubleClicked() {} virtual Data::EntryVec entries() const; diff --git a/src/gui/stringmapdialog.cpp b/src/gui/stringmapdialog.cpp index bf03ae9..fb3878d 100644 --- a/src/gui/stringmapdialog.cpp +++ b/src/gui/stringmapdialog.cpp @@ -32,7 +32,7 @@ StringMapDialog::StringMapDialog(const TQMap<TQString, TQString>& map_, TQWidget TQWidget* page = new TQWidget(this); TQVBoxLayout* l = new TQVBoxLayout(page, 0, KDialog::spacingHint()); - m_listView = new KListView(page); + m_listView = new TDEListView(page); m_listView->setAllColumnsShowFocus(true); m_listView->setShowSortIndicator(true); m_listView->addColumn(TQString()); @@ -65,7 +65,7 @@ StringMapDialog::StringMapDialog(const TQMap<TQString, TQString>& map_, TQWidget for(TQMap<TQString, TQString>::ConstIterator it = map_.begin(); it != map_.end(); ++it) { if(!it.data().isEmpty()) { - (void) new KListViewItem(m_listView, it.key(), it.data()); + (void) new TDEListViewItem(m_listView, it.key(), it.data()); } } @@ -83,7 +83,7 @@ void StringMapDialog::slotAdd() { if(item && s1 == item->text(0)) { // only update values if same key item->setText(1, s2); } else { - item = new KListViewItem(m_listView, s1, s2); + item = new TDEListViewItem(m_listView, s1, s2); } m_listView->ensureItemVisible(item); m_listView->setSelected(item, true); diff --git a/src/gui/stringmapdialog.h b/src/gui/stringmapdialog.h index 974bcf4..ac9b10a 100644 --- a/src/gui/stringmapdialog.h +++ b/src/gui/stringmapdialog.h @@ -15,7 +15,7 @@ #define STRINGMAPDIALOG_H class KLineEdit; -class KListView; +class TDEListView; class TQListViewItem; #include <kdialogbase.h> @@ -28,7 +28,7 @@ namespace Tellico { /** * @short A simple dialog for editing a map between two strings. * - * A \ref KListView is used with the map keys in the first column and + * A \ref TDEListView is used with the map keys in the first column and * the map values in the second. Two edit boxes are below the list view. * When an item is selected, the key-value is pair is placed in the edit * boxes. Add and Delete buttons are used to add a new pair, or to remove @@ -63,7 +63,7 @@ private slots: void slotUpdate(TQListViewItem* item); protected: - KListView* m_listView; + TDEListView* m_listView; KLineEdit* m_edit1; KLineEdit* m_edit2; }; diff --git a/src/gui/tablefieldwidget.cpp b/src/gui/tablefieldwidget.cpp index 81c9dba..fb5afe5 100644 --- a/src/gui/tablefieldwidget.cpp +++ b/src/gui/tablefieldwidget.cpp @@ -237,7 +237,7 @@ bool TableFieldWidget::eventFilter(TQObject* obj_, TQEvent* ev_) { } m_row = -1; m_col = col; - KPopupMenu menu(this); + TDEPopupMenu menu(this); menu.insertItem(SmallIconSet(TQString::fromLatin1("edit")), i18n("Rename Column..."), this, TQT_SLOT(slotRenameColumn())); menu.exec(ev->globalPos()); @@ -270,7 +270,7 @@ void TableFieldWidget::contextMenu(int row_, int col_, const TQPoint& p_) { m_col = col_; int id; - KPopupMenu menu(this); + TDEPopupMenu menu(this); menu.insertItem(SmallIconSet(TQString::fromLatin1("insrow")), i18n("Insert Row"), this, TQT_SLOT(slotInsertRow())); menu.insertItem(SmallIconSet(TQString::fromLatin1("remrow")), i18n("Remove Row"), |