summaryrefslogtreecommitdiffstats
path: root/src/kvilib/tal/kvi_tal_listview_qt3.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
commit0a80cfd57d271dd44221467efb426675fa470356 (patch)
tree6f503a31aa078eaf8fa015cf1749808529d49fc9 /src/kvilib/tal/kvi_tal_listview_qt3.h
parent3329e5a804e28ef3f5eb51d1e7affdd5a508e8f2 (diff)
downloadkvirc-0a80cfd57d271dd44221467efb426675fa470356.tar.gz
kvirc-0a80cfd57d271dd44221467efb426675fa470356.zip
TQt4 port kvirc
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1238719 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/kvilib/tal/kvi_tal_listview_qt3.h')
-rw-r--r--src/kvilib/tal/kvi_tal_listview_qt3.h141
1 files changed, 71 insertions, 70 deletions
diff --git a/src/kvilib/tal/kvi_tal_listview_qt3.h b/src/kvilib/tal/kvi_tal_listview_qt3.h
index 4fe4a766..75b062a4 100644
--- a/src/kvilib/tal/kvi_tal_listview_qt3.h
+++ b/src/kvilib/tal/kvi_tal_listview_qt3.h
@@ -29,93 +29,94 @@
#include "kvi_qstring.h"
-#include <qlistview.h>
+#include <tqlistview.h>
class KviTalListViewItem;
-class KVILIB_API KviTalListView : public QListView
+class KVILIB_API KviTalListView : public TQListView
{
friend class KviTalCheckListItem;
Q_OBJECT
+ TQ_OBJECT
public:
- KviTalListView(QWidget * pParent);
+ KviTalListView(TQWidget * pParent);
virtual ~KviTalListView() {};
public:
- // Shadow the internal Qt methods
- KviTalListViewItem * firstChild() const { return (KviTalListViewItem *)QListView::firstChild(); };
- KviTalListViewItem * lastItem() const { return (KviTalListViewItem *)QListView::lastItem(); };
- KviTalListViewItem * selectedItem() const { return (KviTalListViewItem *)QListView::selectedItem(); };
- KviTalListViewItem * currentItem() const { return (KviTalListViewItem *)QListView::currentItem(); };
- KviTalListViewItem * itemAt(const QPoint &pnt) const { return (KviTalListViewItem *)QListView::itemAt(pnt); };
+ // Shadow the internal TQt methods
+ KviTalListViewItem * firstChild() const { return (KviTalListViewItem *)TQListView::firstChild(); };
+ KviTalListViewItem * lastItem() const { return (KviTalListViewItem *)TQListView::lastItem(); };
+ KviTalListViewItem * selectedItem() const { return (KviTalListViewItem *)TQListView::selectedItem(); };
+ KviTalListViewItem * currentItem() const { return (KviTalListViewItem *)TQListView::currentItem(); };
+ KviTalListViewItem * itemAt(const TQPoint &pnt) const { return (KviTalListViewItem *)TQListView::itemAt(pnt); };
signals:
void selectionChanged(KviTalListViewItem * pItem);
void currentChanged(KviTalListViewItem * pItem);
void clicked(KviTalListViewItem * pItem);
- void clicked(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn);
+ void clicked(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn);
void pressed(KviTalListViewItem * pItem);
- void pressed(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn);
+ void pressed(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn);
void doubleClicked(KviTalListViewItem * pItem);
- void doubleClicked(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn);
+ void doubleClicked(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn);
void returnPressed(KviTalListViewItem * pItem);
void spacePressed(KviTalListViewItem * pItem);
- void rightButtonClicked(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn);
- void rightButtonPressed(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn);
- void mouseButtonClicked(int iButton,KviTalListViewItem * pItem,const QPoint &pnt,int uColumn);
- void mouseButtonPressed(int iButton,KviTalListViewItem * pItem,const QPoint &pnt,int uColumn);
- void contextMenuRequested(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn);
+ void rightButtonClicked(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn);
+ void rightButtonPressed(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn);
+ void mouseButtonClicked(int iButton,KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn);
+ void mouseButtonPressed(int iButton,KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn);
+ void contextMenuRequested(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn);
void onItem(KviTalListViewItem * pItem);
void expanded(KviTalListViewItem * pItem);
void collapsed(KviTalListViewItem * pItem);
protected slots:
- void redirect_selectionChanged(QListViewItem * pItem);
- void redirect_currentChanged(QListViewItem * pItem);
- void redirect_clicked(QListViewItem * pItem);
- void redirect_clicked(QListViewItem * pItem,const QPoint &pnt,int uColumn);
- void redirect_pressed(QListViewItem * pItem);
- void redirect_pressed(QListViewItem * pItem,const QPoint &pnt,int uColumn);
- void redirect_doubleClicked(QListViewItem * pItem);
- void redirect_doubleClicked(QListViewItem * pItem,const QPoint &pnt,int uColumn);
- void redirect_returnPressed(QListViewItem * pItem);
- void redirect_spacePressed(QListViewItem * pItem);
- void redirect_rightButtonClicked(QListViewItem * pItem,const QPoint &pnt,int uColumn);
- void redirect_rightButtonPressed(QListViewItem * pItem,const QPoint &pnt,int uColumn);
- void redirect_mouseButtonClicked(int iButton,QListViewItem * pItem,const QPoint &pnt,int uColumn);
- void redirect_mouseButtonPressed(int iButton,QListViewItem * pItem,const QPoint &pnt,int uColumn);
- void redirect_contextMenuRequested(QListViewItem * pItem,const QPoint &pnt,int uColumn);
- void redirect_onItem(QListViewItem * pItem);
- void redirect_expanded(QListViewItem * pItem);
- void redirect_collapsed(QListViewItem * pItem);
+ void redirect_selectionChanged(TQListViewItem * pItem);
+ void redirect_currentChanged(TQListViewItem * pItem);
+ void redirect_clicked(TQListViewItem * pItem);
+ void redirect_clicked(TQListViewItem * pItem,const TQPoint &pnt,int uColumn);
+ void redirect_pressed(TQListViewItem * pItem);
+ void redirect_pressed(TQListViewItem * pItem,const TQPoint &pnt,int uColumn);
+ void redirect_doubleClicked(TQListViewItem * pItem);
+ void redirect_doubleClicked(TQListViewItem * pItem,const TQPoint &pnt,int uColumn);
+ void redirect_returnPressed(TQListViewItem * pItem);
+ void redirect_spacePressed(TQListViewItem * pItem);
+ void redirect_rightButtonClicked(TQListViewItem * pItem,const TQPoint &pnt,int uColumn);
+ void redirect_rightButtonPressed(TQListViewItem * pItem,const TQPoint &pnt,int uColumn);
+ void redirect_mouseButtonClicked(int iButton,TQListViewItem * pItem,const TQPoint &pnt,int uColumn);
+ void redirect_mouseButtonPressed(int iButton,TQListViewItem * pItem,const TQPoint &pnt,int uColumn);
+ void redirect_contextMenuRequested(TQListViewItem * pItem,const TQPoint &pnt,int uColumn);
+ void redirect_onItem(TQListViewItem * pItem);
+ void redirect_expanded(TQListViewItem * pItem);
+ void redirect_collapsed(TQListViewItem * pItem);
};
-class KVILIB_API KviTalListViewItem : public QListViewItem
+class KVILIB_API KviTalListViewItem : public TQListViewItem
{
public:
KviTalListViewItem(KviTalListView * pParent)
- : QListViewItem(pParent) {};
+ : TQListViewItem(pParent) {};
KviTalListViewItem(KviTalListViewItem * pParent)
- : QListViewItem(pParent) {};
+ : TQListViewItem(pParent) {};
KviTalListViewItem(KviTalListView * pParent,KviTalListViewItem * pAfter)
- : QListViewItem(pParent,pAfter) {};
+ : TQListViewItem(pParent,pAfter) {};
KviTalListViewItem(KviTalListViewItem * pParent,KviTalListViewItem * pAfter)
- : QListViewItem(pParent,pAfter) {};
- KviTalListViewItem(KviTalListView * pParent,const QString &szLabel1,const QString &szLabel2 = KviQString::empty,const QString &szLabel3 = KviQString::empty,const QString &szLabel4 = KviQString::empty,const QString &szLabel5 = KviQString::empty)
- : QListViewItem(pParent,szLabel1,szLabel2,szLabel3,szLabel4,szLabel5) {};
- KviTalListViewItem(KviTalListView * pParent,KviTalListViewItem * pAfter,const QString &szLabel1,const QString &szLabel2 = KviQString::empty,const QString &szLabel3 = KviQString::empty,const QString &szLabel4 = KviQString::empty,const QString &szLabel5 = KviQString::empty)
- : QListViewItem(pParent,pAfter,szLabel1,szLabel2,szLabel3,szLabel4,szLabel5) {};
- KviTalListViewItem(KviTalListViewItem * pParent,const QString &szLabel1,const QString &szLabel2 = KviQString::empty,const QString &szLabel3 = KviQString::empty,const QString &szLabel4 = KviQString::empty)
- : QListViewItem(pParent,szLabel1,szLabel2,szLabel3,szLabel4) {};
- KviTalListViewItem(KviTalListViewItem * pParent,KviTalListViewItem * pAfter,const QString &szLabel1,const QString &szLabel2 = KviQString::empty,const QString &szLabel3 = KviQString::empty,const QString &szLabel4 = KviQString::empty)
- : QListViewItem(pParent,pAfter,szLabel1,szLabel2,szLabel3,szLabel4) {};
+ : TQListViewItem(pParent,pAfter) {};
+ KviTalListViewItem(KviTalListView * pParent,const TQString &szLabel1,const TQString &szLabel2 = KviTQString::empty,const TQString &szLabel3 = KviTQString::empty,const TQString &szLabel4 = KviTQString::empty,const TQString &szLabel5 = KviTQString::empty)
+ : TQListViewItem(pParent,szLabel1,szLabel2,szLabel3,szLabel4,szLabel5) {};
+ KviTalListViewItem(KviTalListView * pParent,KviTalListViewItem * pAfter,const TQString &szLabel1,const TQString &szLabel2 = KviTQString::empty,const TQString &szLabel3 = KviTQString::empty,const TQString &szLabel4 = KviTQString::empty,const TQString &szLabel5 = KviTQString::empty)
+ : TQListViewItem(pParent,pAfter,szLabel1,szLabel2,szLabel3,szLabel4,szLabel5) {};
+ KviTalListViewItem(KviTalListViewItem * pParent,const TQString &szLabel1,const TQString &szLabel2 = KviTQString::empty,const TQString &szLabel3 = KviTQString::empty,const TQString &szLabel4 = KviTQString::empty)
+ : TQListViewItem(pParent,szLabel1,szLabel2,szLabel3,szLabel4) {};
+ KviTalListViewItem(KviTalListViewItem * pParent,KviTalListViewItem * pAfter,const TQString &szLabel1,const TQString &szLabel2 = KviTQString::empty,const TQString &szLabel3 = KviTQString::empty,const TQString &szLabel4 = KviTQString::empty)
+ : TQListViewItem(pParent,pAfter,szLabel1,szLabel2,szLabel3,szLabel4) {};
virtual ~KviTalListViewItem() {};
public:
- // Shadow the internal Qt methods
- KviTalListViewItem * firstChild() const { return (KviTalListViewItem *)QListViewItem::firstChild(); };
- KviTalListViewItem * nextSibling() const { return (KviTalListViewItem *)QListViewItem::nextSibling(); };
- KviTalListViewItem * parent() const { return (KviTalListViewItem *)QListViewItem::parent(); };
- KviTalListView * listView() const { return (KviTalListView *)QListViewItem::listView(); };
- KviTalListViewItem * itemAbove() { return (KviTalListViewItem *)QListViewItem::itemAbove(); };
- KviTalListViewItem * itemBelow() { return (KviTalListViewItem *)QListViewItem::itemBelow(); };
+ // Shadow the internal TQt methods
+ KviTalListViewItem * firstChild() const { return (KviTalListViewItem *)TQListViewItem::firstChild(); };
+ KviTalListViewItem * nextSibling() const { return (KviTalListViewItem *)TQListViewItem::nextSibling(); };
+ KviTalListViewItem * tqparent() const { return (KviTalListViewItem *)TQListViewItem::tqparent(); };
+ KviTalListView * listView() const { return (KviTalListView *)TQListViewItem::listView(); };
+ KviTalListViewItem * itemAbove() { return (KviTalListViewItem *)TQListViewItem::itemAbove(); };
+ KviTalListViewItem * itemBelow() { return (KviTalListViewItem *)TQListViewItem::itemBelow(); };
};
struct KviTalCheckListItemPrivate;
@@ -132,27 +133,27 @@ public:
};
enum ToggleState { Off, NoChange, On };
- KviTalCheckListItem(KviTalCheckListItem *parent, const QString &text,Type = RadioButtonController);
- KviTalCheckListItem(KviTalCheckListItem *parent, KviTalListViewItem *after,const QString &text, Type = RadioButtonController);
- KviTalCheckListItem( KviTalListViewItem *parent, const QString &text,Type = RadioButtonController );
- KviTalCheckListItem( KviTalListViewItem *parent, KviTalListViewItem *after,const QString &text, Type = RadioButtonController );
- KviTalCheckListItem( KviTalListView *parent, const QString &text,Type = RadioButtonController );
- KviTalCheckListItem( KviTalListView *parent, KviTalListViewItem *after,const QString &text, Type = RadioButtonController );
- KviTalCheckListItem( KviTalListViewItem *parent, const QString &text,const QPixmap & );
- KviTalCheckListItem( KviTalListView *parent, const QString &text,const QPixmap & );
+ KviTalCheckListItem(KviTalCheckListItem *tqparent, const TQString &text,Type = RadioButtonController);
+ KviTalCheckListItem(KviTalCheckListItem *tqparent, KviTalListViewItem *after,const TQString &text, Type = RadioButtonController);
+ KviTalCheckListItem( KviTalListViewItem *tqparent, const TQString &text,Type = RadioButtonController );
+ KviTalCheckListItem( KviTalListViewItem *tqparent, KviTalListViewItem *after,const TQString &text, Type = RadioButtonController );
+ KviTalCheckListItem( KviTalListView *tqparent, const TQString &text,Type = RadioButtonController );
+ KviTalCheckListItem( KviTalListView *tqparent, KviTalListViewItem *after,const TQString &text, Type = RadioButtonController );
+ KviTalCheckListItem( KviTalListViewItem *tqparent, const TQString &text,const TQPixmap & );
+ KviTalCheckListItem( KviTalListView *tqparent, const TQString &text,const TQPixmap & );
~KviTalCheckListItem();
- void paintCell( QPainter *,const QColorGroup & cg,int column, int width, int alignment );
- virtual void paintFocus( QPainter *, const QColorGroup & cg,
- const QRect & r );
- int width( const QFontMetrics&, const KviTalListView*, int column) const;
+ void paintCell( TQPainter *,const TQColorGroup & cg,int column, int width, int tqalignment );
+ virtual void paintFocus( TQPainter *, const TQColorGroup & cg,
+ const TQRect & r );
+ int width( const TQFontMetrics&, const KviTalListView*, int column) const;
void setup();
virtual void setOn( bool ); // ### should be replaced by setChecked in ver4
bool isOn() const { return on; }
Type type() const { return myType; }
- QString text() const { return KviTalListViewItem::text( 0 ); }
- QString text( int n ) const { return KviTalListViewItem::text( n ); }
+ TQString text() const { return KviTalListViewItem::text( 0 ); }
+ TQString text( int n ) const { return KviTalListViewItem::text( n ); }
void setTristate( bool );
bool isTristate() const;
@@ -185,6 +186,6 @@ private:
};
-#define KviTalListViewItemIterator QListViewItemIterator
+#define KviTalListViewItemIterator TQListViewItemIterator
#endif // _KVI_TAL_LISTVIEW_QT3_H_