summaryrefslogtreecommitdiffstats
path: root/koshell/iconsidepane.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /koshell/iconsidepane.h
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'koshell/iconsidepane.h')
-rw-r--r--koshell/iconsidepane.h102
1 files changed, 52 insertions, 50 deletions
diff --git a/koshell/iconsidepane.h b/koshell/iconsidepane.h
index 2382547a..3838967a 100644
--- a/koshell/iconsidepane.h
+++ b/koshell/iconsidepane.h
@@ -25,11 +25,11 @@
#include <kactioncollection.h>
#include <klistbox.h>
-#include <qbuttongroup.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qvbox.h>
-#include <qwidgetstack.h>
+#include <tqbuttongroup.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
+#include <tqwidgetstack.h>
#include "koshellsettings.h"
@@ -40,21 +40,21 @@ class IconSidePane;
enum IconViewMode { LargeIcons = 48, NormalIcons = 32, SmallIcons = 22, ShowText = 3, ShowIcons = 5 };
/**
- A @see QListBoxPixmap Square Box with an optional icon and a text
+ A @see TQListBoxPixmap Square Box with an optional icon and a text
underneath.
*/
-class EntryItem : public QListBoxItem
+class EntryItem : public TQListBoxItem
{
public:
- EntryItem( Navigator *, int _id, const QString &_text, const QString & _pix );
+ EntryItem( Navigator *, int _id, const TQString &_text, const TQString & _pix );
~EntryItem();
- const QPixmap *pixmap() const { return &mPixmap; }
+ const TQPixmap *pixmap() const { return &mPixmap; }
int id() { return mId; }
- void setNewText( const QString &_text );
+ void setNewText( const TQString &_text );
void setHover( bool );
void setPaintActive( bool );
@@ -63,20 +63,20 @@ class EntryItem : public QListBoxItem
/**
returns the width of this item.
*/
- virtual int width( const QListBox * ) const;
+ virtual int width( const TQListBox * ) const;
/**
returns the height of this item.
*/
- virtual int height( const QListBox * ) const;
+ virtual int height( const TQListBox * ) const;
protected:
void reloadPixmap();
- virtual void paint( QPainter *p );
+ virtual void paint( TQPainter *p );
private:
- QPixmap mPixmap;
- QString mPixmapName;
+ TQPixmap mPixmap;
+ TQString mPixmapName;
int const mId;
Navigator* navigator() const;
bool mHasHover;
@@ -85,30 +85,30 @@ class EntryItem : public QListBoxItem
/**
* Tooltip that changes text depending on the item it is above.
- * Compliments of "Practical Qt" by Dalheimer, Petersen et al.
+ * Compliments of "Practical TQt" by Dalheimer, Petersen et al.
*/
-class EntryItemToolTip : public QToolTip
+class EntryItemToolTip : public TQToolTip
{
public:
- EntryItemToolTip( QListBox* parent )
- : QToolTip( parent->viewport() ), mListBox( parent )
+ EntryItemToolTip( TQListBox* tqparent )
+ : TQToolTip( tqparent->viewport() ), mListBox( tqparent )
{}
protected:
- void maybeTip( const QPoint& p ) {
+ void maybeTip( const TQPoint& p ) {
// We only show tooltips when there are no texts shown
if ( KoShellSettings::sidePaneShowText() ) return;
if ( !mListBox ) return;
- QListBoxItem* item = mListBox->itemAt( p );
+ TQListBoxItem* item = mListBox->itemAt( p );
if ( !item ) return;
- const QRect itemRect = mListBox->itemRect( item );
- if ( !itemRect.isValid() ) return;
+ const TQRect tqitemRect = mListBox->tqitemRect( item );
+ if ( !tqitemRect.isValid() ) return;
const EntryItem *entryItem = static_cast<EntryItem*>( item );
- QString tipStr = entryItem->text();
- tip( itemRect, tipStr );
+ TQString tipStr = entryItem->text();
+ tip( tqitemRect, tipStr );
}
private:
- QListBox* mListBox;
+ TQListBox* mListBox;
};
/**
@@ -117,12 +117,13 @@ class EntryItemToolTip : public QToolTip
class Navigator : public KListBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- Navigator(bool _selectable, KPopupMenu*, IconSidePane *, QWidget *parent = 0, const char *name = 0 );
+ Navigator(bool _selectable, KPopupMenu*, IconSidePane *, TQWidget *tqparent = 0, const char *name = 0 );
- int insertItem(const QString &_text, const QString &_pix);
+ int insertItem(const TQString &_text, const TQString &_pix);
- QSize sizeHint() const;
+ TQSize tqsizeHint() const;
IconViewMode viewMode();
bool showText();
bool showIcons();
@@ -136,44 +137,45 @@ class Navigator : public KListBox
void updateAllWidgets();
protected:
- void resizeEvent( QResizeEvent * );
- void enterEvent( QEvent* );
- void mouseReleaseEvent(QMouseEvent *e);
- void mousePressEvent(QMouseEvent *e);
+ void resizeEvent( TQResizeEvent * );
+ void enterEvent( TQEvent* );
+ void mouseReleaseEvent(TQMouseEvent *e);
+ void mousePressEvent(TQMouseEvent *e);
- void setHoverItem( QListBoxItem*, bool );
- void setPaintActiveItem( QListBoxItem*, bool );
+ void setHoverItem( TQListBoxItem*, bool );
+ void setPaintActiveItem( TQListBoxItem*, bool );
protected slots:
- void slotExecuted( QListBoxItem * );
- void slotMouseOn( QListBoxItem *item );
+ void slotExecuted( TQListBoxItem * );
+ void slotMouseOn( TQListBoxItem *item );
void slotMouseOff();
- void slotShowRMBMenu( QListBoxItem *, const QPoint& );
+ void slotShowRMBMenu( TQListBoxItem *, const TQPoint& );
private:
IconSidePane *mSidePane;
int mMinWidth;
- QListBoxItem *executedItem;
+ TQListBoxItem *executedItem;
bool mLeftMouseButtonPressed;
KPopupMenu *mPopupMenu;
bool mSelectable;
- QListBoxItem* mMouseOn;
+ TQListBoxItem* mMouseOn;
};
-class IconSidePane :public QVBox
+class IconSidePane :public TQVBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- IconSidePane( QWidget *parent, const char *name = 0 );
+ IconSidePane( TQWidget *tqparent, const char *name = 0 );
~IconSidePane();
void setActionCollection( KActionCollection *actionCollection );
KActionCollection *actionCollection() const;
- int insertItem(const QString & _pix, const QString &_text);
- int insertItem(int _grp, const QString & _pix, const QString &_text);
- int insertGroup(const QString &_text, bool _selectable, QObject *_obj = 0L, const char *_slot = 0L);
- void renameItem( int _grp, int _id, const QString & _text );
+ int insertItem(const TQString & _pix, const TQString &_text);
+ int insertItem(int _grp, const TQString & _pix, const TQString &_text);
+ int insertGroup(const TQString &_text, bool _selectable, TQObject *_obj = 0L, const char *_slot = 0L);
+ void renameItem( int _grp, int _id, const TQString & _text );
void removeItem( int _grp, int _id );
void selectGroup(int);
Navigator *group(int);
@@ -185,7 +187,7 @@ class IconSidePane :public QVBox
void toogleText(){mShowText=!mShowText;}
bool showIcons() { return mShowIcons; }
void toogleIcons(){mShowIcons=!mShowIcons;}
- QButtonGroup *buttonGroup() { return m_buttongroup; }
+ TQButtonGroup *buttonGroup() { return m_buttongroup; }
int minWidth();
void resetWidth();
@@ -197,10 +199,10 @@ class IconSidePane :public QVBox
void buttonClicked();
private:
- QWidgetStack *mWidgetstack;
- QValueList<int> mWidgetStackIds;
+ TQWidgetStack *mWidgetstack;
+ TQValueList<int> mWidgetStackIds;
Navigator *mCurrentNavigator;
- QButtonGroup *m_buttongroup;
+ TQButtonGroup *m_buttongroup;
KActionCollection *mActionCollection;
KPopupMenu *mPopupMenu;