summaryrefslogtreecommitdiffstats
path: root/lib/kofficeui/KoTooluButton.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kofficeui/KoTooluButton.h')
-rw-r--r--lib/kofficeui/KoTooluButton.h105
1 files changed, 54 insertions, 51 deletions
diff --git a/lib/kofficeui/KoTooluButton.h b/lib/kofficeui/KoTooluButton.h
index b933eeee..d4c33944 100644
--- a/lib/kofficeui/KoTooluButton.h
+++ b/lib/kofficeui/KoTooluButton.h
@@ -21,44 +21,45 @@
#define _kotoolbutton_h_
#include <ktoolbarbutton.h>
-#include <qmap.h>
-#include <qpoint.h>
+#include <tqmap.h>
+#include <tqpoint.h>
-class QPopupMenu;
+class TQPopupMenu;
-class KoColorPanel : public QWidget
+class KoColorPanel : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoColorPanel( QWidget* parent = 0, const char* name = 0 );
+ KoColorPanel( TQWidget* tqparent = 0, const char* name = 0 );
virtual ~KoColorPanel();
- virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const;
+ virtual TQSize tqsizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
enum MenuStyle { Plain, CustomColors };
- static QPopupMenu* createColorPopup( MenuStyle style, const QColor& defaultColor,
- const QObject* receiver, const char* slot,
- QWidget* parent, const char* name );
+ static TQPopupMenu* createColorPopup( MenuStyle style, const TQColor& defaultColor,
+ const TQObject* receiver, const char* slot,
+ TQWidget* tqparent, const char* name );
public slots:
void clear();
- void insertColor( const QColor& color );
- void insertColor( const QColor& color, const QString& toolTip );
+ void insertColor( const TQColor& color );
+ void insertColor( const TQColor& color, const TQString& toolTip );
void insertDefaultColors();
signals:
- void colorSelected( const QColor& color );
+ void colorSelected( const TQColor& color );
protected:
- virtual void mousePressEvent( QMouseEvent* e );
- virtual void mouseReleaseEvent( QMouseEvent* e );
- virtual void mouseMoveEvent( QMouseEvent* e );
- virtual void paintEvent( QPaintEvent* e );
- virtual void keyPressEvent( QKeyEvent* e );
- virtual void focusInEvent( QFocusEvent* e );
- virtual void dragEnterEvent( QDragEnterEvent* e );
- virtual void dropEvent( QDropEvent* e );
+ virtual void mousePressEvent( TQMouseEvent* e );
+ virtual void mouseReleaseEvent( TQMouseEvent* e );
+ virtual void mouseMoveEvent( TQMouseEvent* e );
+ virtual void paintEvent( TQPaintEvent* e );
+ virtual void keyPressEvent( TQKeyEvent* e );
+ virtual void focusInEvent( TQFocusEvent* e );
+ virtual void dragEnterEvent( TQDragEnterEvent* e );
+ virtual void dropEvent( TQDropEvent* e );
private:
// The position of the 16x16 tiles in "tile steps"
@@ -72,29 +73,29 @@ private:
friend bool operator<( const KoColorPanel::Position& lhs, const KoColorPanel::Position& rhs );
void finalizeInsertion( const Position& pos );
- bool insertColor( const QColor& color, bool checking );
- bool insertColor( const QColor& color, const QString& toolTip, bool checking );
- bool isAvailable( const QColor& color );
-
- Position mapToPosition( const QPoint& point ) const;
- QColor mapToColor( const QPoint& point ) const;
- QColor mapToColor( const Position& position ) const;
- QRect mapFromPosition( const Position& position ) const;
+ bool insertColor( const TQColor& color, bool checking );
+ bool insertColor( const TQColor& color, const TQString& toolTip, bool checking );
+ bool isAvailable( const TQColor& color );
+
+ Position mapToPosition( const TQPoint& point ) const;
+ TQColor mapToColor( const TQPoint& point ) const;
+ TQColor mapToColor( const Position& position ) const;
+ TQRect mapFromPosition( const Position& position ) const;
Position validPosition( const Position& position );
int lines() const;
- void paintArea( const QRect& rect, int& startRow, int& endRow, int& startCol, int& endCol ) const;
+ void paintArea( const TQRect& rect, int& startRow, int& endRow, int& startCol, int& endCol ) const;
void updateFocusPosition( const Position& newPosition );
void paint( const Position& position );
void init();
Position m_nextPosition, m_focusPosition;
- QMap<Position, QColor> m_colorMap;
- QPoint m_pressedPos;
+ TQMap<Position, TQColor> m_colorMap;
+ TQPoint m_pressedPos;
bool m_defaultsAdded;
};
-// Needed for the use of KoColorPanel::Position in QMap
+// Needed for the use of KoColorPanel::Position in TQMap
bool operator<( const KoColorPanel::Position& lhs, const KoColorPanel::Position& rhs );
@@ -102,11 +103,12 @@ bool operator<( const KoColorPanel::Position& lhs, const KoColorPanel::Position&
// color item in the color-panel popup is activated. Additionally
// it's used to provide the color select dialog and manages the recent
// colors... hacky
-class KoColorPopupProxy : public QObject
+class KoColorPopupProxy : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoColorPopupProxy( const QColor& defaultColor, KoColorPanel* recentColors, QObject* parent, const char* name );
+ KoColorPopupProxy( const TQColor& defaultColor, KoColorPanel* recentColors, TQObject* tqparent, const char* name );
virtual ~KoColorPopupProxy() {}
void setRecentColorPanel( KoColorPanel* recentColors );
@@ -116,10 +118,10 @@ public slots:
void slotMoreColors();
signals:
- void colorSelected( const QColor& color );
+ void colorSelected( const TQColor& color );
private:
- QColor m_defaultColor;
+ TQColor m_defaultColor;
KoColorPanel* m_recentColors;
};
@@ -128,6 +130,7 @@ private:
class KoToolButton : public KToolBarButton
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Construct a button with an icon loaded by the button itself.
@@ -136,12 +139,12 @@ public:
*
* @param icon Name of icon to load (may be absolute or relative)
* @param id Id of this button
- * @param parent This button's parent
+ * @param tqparent This button's tqparent
* @param name This button's internal name
* @param txt This button's text (in a tooltip or otherwise)
*/
- KoToolButton( const QString& icon, int id, QWidget* parent,
- const char* name = 0L, const QString& txt = QString::null,
+ KoToolButton( const TQString& icon, int id, TQWidget* tqparent,
+ const char* name = 0L, const TQString& txt = TQString(),
KInstance* _instance = KGlobal::instance() );
/**
@@ -151,32 +154,32 @@ public:
*
* @param icon Name of icon to load (may be absolute or relative)
* @param id Id of this button
- * @param parent This button's parent
+ * @param tqparent This button's tqparent
* @param name This button's internal name
* @param txt This button's text (in a tooltip or otherwise)
*/
- KoToolButton( const QPixmap& pixmap, int id, QWidget* parent,
- const char* name = 0L, const QString& txt = QString::null );
+ KoToolButton( const TQPixmap& pixmap, int id, TQWidget* tqparent,
+ const char* name = 0L, const TQString& txt = TQString() );
virtual ~KoToolButton();
- virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const;
- virtual QSize minimumSize() const;
+ virtual TQSize tqsizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
+ virtual TQSize tqminimumSize() const;
public slots:
- void colorSelected( const QColor& color );
+ void colorSelected( const TQColor& color );
protected:
- virtual void drawButton(QPainter *p);
- virtual bool eventFilter( QObject* o, QEvent* e );
+ virtual void drawButton(TQPainter *p);
+ virtual bool eventFilter( TQObject* o, TQEvent* e );
private:
void init();
void buttonShift( int& dx, int& dy );
- bool hitArrow( const QPoint& pos );
+ bool hitArrow( const TQPoint& pos );
- QPopupMenu* m_popup;
+ TQPopupMenu* m_popup;
bool m_arrowPressed;
};