summaryrefslogtreecommitdiffstats
path: root/lib/kofficeui/KoKoolBar.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kofficeui/KoKoolBar.h')
-rw-r--r--lib/kofficeui/KoKoolBar.h72
1 files changed, 38 insertions, 34 deletions
diff --git a/lib/kofficeui/KoKoolBar.h b/lib/kofficeui/KoKoolBar.h
index 5e6f91fc5..445b5fee2 100644
--- a/lib/kofficeui/KoKoolBar.h
+++ b/lib/kofficeui/KoKoolBar.h
@@ -21,21 +21,22 @@
#ifndef __ko_koolbar_h__
#define __ko_koolbar_h__
-#include <qframe.h>
-#include <qpixmap.h>
-#include <qintdict.h>
+#include <tqframe.h>
+#include <tqpixmap.h>
+#include <tqintdict.h>
#include <koffice_export.h>
-class QPushButton;
-class QPixmap;
+class TQPushButton;
+class TQPixmap;
class KoKoolBar;
class KoKoolBarGroup;
-class KoKoolBarItem : public QObject
+class KoKoolBarItem : public TQObject
{
private:
Q_OBJECT
+ TQ_OBJECT
public:
- KoKoolBarItem( KoKoolBarGroup *_grp, const QPixmap& _pix, const QString& _text = QString::null );
+ KoKoolBarItem( KoKoolBarGroup *_grp, const TQPixmap& _pix, const TQString& _text = TQString() );
int id() const { return m_id; }
void press();
@@ -43,62 +44,64 @@ public:
void setEnabled( bool _e ) { m_bEnabled = _e; }
int height() const { return m_iHeight; }
- QPixmap pixmap() const { return m_pixmap; }
- void setText( const QString & text ) { m_strText = text; }
- QString text() const { return m_strText; }
+ TQPixmap pixmap() const { return m_pixmap; }
+ void setText( const TQString & text ) { m_strText = text; }
+ TQString text() const { return m_strText; }
signals:
void pressed( int _group, int _id );
void pressed();
protected:
- void calc( QWidget* );
+ void calc( TQWidget* );
int m_iHeight;
KoKoolBarGroup* m_pGroup;
- QString m_strText;
- QPixmap m_pixmap;
+ TQString m_strText;
+ TQPixmap m_pixmap;
int m_id;
bool m_bEnabled;
class KoKoolBarItemPrivate;
KoKoolBarItemPrivate *d;
};
-class KoKoolBarGroup : public QObject
+class KoKoolBarGroup : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoKoolBarGroup( KoKoolBar *_bar, const QString& _text );
+ KoKoolBarGroup( KoKoolBar *_bar, const TQString& _text );
~KoKoolBarGroup();
void append( KoKoolBarItem *_i ) { m_mapItems.insert( _i->id(), _i ); }
void remove( int _id );
KoKoolBar* bar() const { return m_pBar; }
- QPushButton* button() const { return m_pButton; }
+ TQPushButton* button() const { return m_pButton; }
int id() const { return m_id; }
bool isEnabled() const { return m_bEnabled; }
void setEnabled( bool _e ) { m_bEnabled = _e; }
KoKoolBarItem* item( int _id ) const { return m_mapItems[ _id ]; }
int items() const { return m_mapItems.size(); }
- QIntDictIterator<KoKoolBarItem> iterator() const { return QIntDictIterator<KoKoolBarItem>( m_mapItems ); }
+ TQIntDictIterator<KoKoolBarItem> iterator() const { return TQIntDictIterator<KoKoolBarItem>( m_mapItems ); }
public slots:
void pressed();
protected:
- QIntDict<KoKoolBarItem> m_mapItems;
+ TQIntDict<KoKoolBarItem> m_mapItems;
KoKoolBar* m_pBar;
- QString m_strText;
+ TQString m_strText;
int m_id;
- QPushButton* m_pButton;
+ TQPushButton* m_pButton;
bool m_bEnabled;
class KoKoolBarGroupPrivate;
KoKoolBarGroupPrivate *d;
};
-class KoKoolBarBox : public QFrame
+class KoKoolBarBox : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
KoKoolBarBox( KoKoolBar *_bar );
@@ -112,9 +115,9 @@ protected slots:
void scrollDown();
protected:
- virtual void resizeEvent( QResizeEvent *_ev );
- virtual void drawContents( QPainter * );
- virtual void mousePressEvent( QMouseEvent *_ev )
+ virtual void resizeEvent( TQResizeEvent *_ev );
+ virtual void drawContents( TQPainter * );
+ virtual void mousePressEvent( TQMouseEvent *_ev )
{ KoKoolBarItem *item = findByPos( _ev->pos().y() + m_iYOffset ); if ( !item ) return; item->press(); }
KoKoolBarItem* findByPos( int _abs_y ) const;
@@ -128,34 +131,35 @@ protected:
int m_iYOffset;
int m_iYIcon;
KoKoolBarGroup *m_pGroup;
- QPushButton* m_pButtonUp;
- QPushButton* m_pButtonDown;
+ TQPushButton* m_pButtonUp;
+ TQPushButton* m_pButtonDown;
class KoKoolBarBoxPrivate;
KoKoolBarBoxPrivate *d;
};
-class KOFFICEUI_EXPORT KoKoolBar : public QWidget
+class KOFFICEUI_EXPORT KoKoolBar : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoKoolBar( QWidget *_parent = 0L, const char *_name = 0L );
+ KoKoolBar( TQWidget *_parent = 0L, const char *_name = 0L );
virtual ~KoKoolBar() { };
- virtual int insertGroup( const QString& _text );
- virtual int insertItem( int _grp, const QPixmap& _pix, const QString& _text = QString::null,
- QObject *_obj = 0L, const char *_slot = 0L );
+ virtual int insertGroup( const TQString& _text );
+ virtual int insertItem( int _grp, const TQPixmap& _pix, const TQString& _text = TQString(),
+ TQObject *_obj = 0L, const char *_slot = 0L );
virtual void removeGroup( int _grp );
virtual void removeItem( int _grp, int _id );
- virtual void renameItem( int _grp, int _id, const QString & _text );
+ virtual void renameItem( int _grp, int _id, const TQString & _text );
virtual void setActiveGroup( int _grp );
virtual int activeGroup() const { return m_iActiveGroup; }
virtual void enableItem( int _grp, int _id, bool _enable );
virtual void enableGroup( int _grp, bool _enable );
protected:
- virtual void resizeEvent( QResizeEvent *_ev );
+ virtual void resizeEvent( TQResizeEvent *_ev );
- QIntDict<KoKoolBarGroup> m_mapGroups;
+ TQIntDict<KoKoolBarGroup> m_mapGroups;
int m_iActiveGroup;
KoKoolBarBox* m_pBox;