diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-02 06:40:27 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-02 06:40:27 +0000 |
commit | 2595a15ebeb6fc46b7cb241d01ec0c2460ec2111 (patch) | |
tree | 18a8f0f4ac5a86dacfa74c3537551ec39bc85e75 /src/gui/listview.h | |
parent | 1d90725a4001fab9d3922b2cbcceeee5e2d1686f (diff) | |
download | tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.tar.gz tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.zip |
TQt4 port tellico
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1239054 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/listview.h')
-rw-r--r-- | src/gui/listview.h | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/src/gui/listview.h b/src/gui/listview.h index 4c5ade7..8f31977 100644 --- a/src/gui/listview.h +++ b/src/gui/listview.h @@ -20,15 +20,15 @@ #include <klistview.h> #include <kdeversion.h> -#include <qdict.h> +#include <tqdict.h> namespace Tellico { class ListViewComparison; namespace GUI { class ListViewItem; -typedef QPtrList<ListViewItem> ListViewItemList; -typedef QPtrListIterator<ListViewItem> ListViewItemListIt; +typedef TQPtrList<ListViewItem> ListViewItemList; +typedef TQPtrListIterator<ListViewItem> ListViewItemListIt; /** * A ListView keeps track of the selected items and allows subclasses to determine @@ -42,6 +42,7 @@ typedef QPtrListIterator<ListViewItem> ListViewItemListIt; */ class ListView : public KListView { Q_OBJECT + TQ_OBJECT friend class ListViewItem; // needed so the ListViewItem d'tor can update selection list @@ -51,7 +52,7 @@ public: SortByCount = 1 }; - ListView(QWidget* parent, const char* name = 0); + ListView(TQWidget* tqparent, const char* name = 0); virtual ~ListView(); void clearSelection(); @@ -74,7 +75,7 @@ public: int firstVisibleColumn() const; int lastVisibleColumn() const; - virtual void setColumnText(int column, const QString& label); + virtual void setColumnText(int column, const TQString& label); void setComparison(int column, ListViewComparison* comp); void removeComparison(int column); @@ -85,8 +86,8 @@ public: // taken from KDE bug 59791 void setShadeSortColumn(bool shade_); bool shadeSortColumn() const { return m_shadeSortColumn; } - const QColor& background2() const { return m_backColor2; } - const QColor& alternateBackground2() const { return m_altColor2; } + const TQColor& background2() const { return m_backColor2; } + const TQColor& alternateBackground2() const { return m_altColor2; } #endif protected slots: @@ -97,11 +98,11 @@ protected slots: virtual void slotSelectionChanged(); protected: - virtual void drawContentsOffset(QPainter* p, int ox, int oy, int cx, int cy, int cw, int ch); + virtual void drawContentsOffset(TQPainter* p, int ox, int oy, int cx, int cy, int cw, int ch); private slots: void slotUpdateColors(); - void slotDoubleClicked(QListViewItem* item); + void slotDoubleClicked(TQListViewItem* item); private: /** @@ -115,11 +116,11 @@ private: SortStyle m_sortStyle; bool m_isClear; ListViewItemList m_selectedItems; - QDict<ListViewComparison> m_comparisons; + TQDict<ListViewComparison> m_comparisons; #if !KDE_IS_VERSION(3,3,90) bool m_shadeSortColumn; - QColor m_backColor2; - QColor m_altColor2; + TQColor m_backColor2; + TQColor m_altColor2; #endif }; @@ -131,11 +132,11 @@ private: */ class ListViewItem : public KListViewItem { public: - ListViewItem(ListView* parent) : KListViewItem(parent), m_sortWeight(-1) {} - ListViewItem(ListView* parent, QListViewItem* after) : KListViewItem(parent, after), m_sortWeight(-1) {} - ListViewItem(ListViewItem* parent) : KListViewItem(parent), m_sortWeight(-1) {} - ListViewItem(ListView* parent, const QString& text) : KListViewItem(parent, text), m_sortWeight(-1) {} - ListViewItem(ListViewItem* parent, const QString& text) : KListViewItem(parent, text), m_sortWeight(-1) {} + ListViewItem(ListView* tqparent) : KListViewItem(tqparent), m_sortWeight(-1) {} + ListViewItem(ListView* tqparent, TQListViewItem* after) : KListViewItem(tqparent, after), m_sortWeight(-1) {} + ListViewItem(ListViewItem* tqparent) : KListViewItem(tqparent), m_sortWeight(-1) {} + ListViewItem(ListView* tqparent, const TQString& text) : KListViewItem(tqparent, text), m_sortWeight(-1) {} + ListViewItem(ListViewItem* tqparent, const TQString& text) : KListViewItem(tqparent, text), m_sortWeight(-1) {} virtual ~ListViewItem(); virtual int realChildCount() const { return childCount(); } @@ -149,7 +150,7 @@ public: int sortWeight() const { return m_sortWeight; } void setSortWeight(int w) { m_sortWeight = w; } - virtual int compare(QListViewItem* item, int col, bool ascending) const; + virtual int compare(TQListViewItem* item, int col, bool ascending) const; virtual void setSelected(bool selected); /** @@ -159,9 +160,9 @@ public: * @param column The column number * @param alternate The alternate row color can be forced */ - virtual QColor backgroundColor(int column); // not virtual in KListViewItem!!! - virtual void paintCell(QPainter* painter, const QColorGroup& colorGroup, - int column, int width, int alignment); + virtual TQColor backgroundColor(int column); // not virtual in KListViewItem!!! + virtual void paintCell(TQPainter* painter, const TQColorGroup& tqcolorGroup, + int column, int width, int tqalignment); ListView* listView () const { return static_cast<ListView*>(KListViewItem::listView()); } @@ -169,7 +170,7 @@ public: virtual Data::EntryVec entries() const; private: - int compareWeight(QListViewItem* item, int col, bool ascending) const; + int compareWeight(TQListViewItem* item, int col, bool ascending) const; int m_sortWeight; }; |