diff options
Diffstat (limited to 'lib/kofficeui/tkcoloractions.h')
-rw-r--r-- | lib/kofficeui/tkcoloractions.h | 74 |
1 files changed, 39 insertions, 35 deletions
diff --git a/lib/kofficeui/tkcoloractions.h b/lib/kofficeui/tkcoloractions.h index 0d8179a1..0c5ccb1a 100644 --- a/lib/kofficeui/tkcoloractions.h +++ b/lib/kofficeui/tkcoloractions.h @@ -24,16 +24,17 @@ #include "tkaction.h" #include <koffice_export.h> #include <kpopupmenu.h> -#include <qdict.h> +#include <tqdict.h> -class QGridLayout; +class TQGridLayout; class TKColorPanel; class TKSelectColorActionPrivate; class TKColorPopupMenu : public KPopupMenu { Q_OBJECT + TQ_OBJECT public: - TKColorPopupMenu( QWidget* parent = 0, const char* name = 0 ); + TKColorPopupMenu( TQWidget* tqparent = 0, const char* name = 0 ); ~TKColorPopupMenu(); public slots: @@ -42,6 +43,7 @@ public slots: /****************************************************************************************/ class KOFFICEUI_EXPORT TKSelectColorAction : public TKAction { Q_OBJECT + TQ_OBJECT public: enum Type { TextColor, @@ -50,30 +52,30 @@ public: Color }; - TKSelectColorAction( const QString& text, Type type, QObject* parent, const char* name, bool menuDefaultColor=false); - TKSelectColorAction( const QString& text, Type type, - QObject* receiver, const char* slot, - QObject* parent, const char* name,bool menuDefaultColor=false ); + TKSelectColorAction( const TQString& text, Type type, TQObject* tqparent, const char* name, bool menuDefaultColor=false); + TKSelectColorAction( const TQString& text, Type type, + TQObject* receiver, const char* slot, + TQObject* tqparent, const char* name,bool menuDefaultColor=false ); virtual ~TKSelectColorAction(); - QColor color() const { return m_pCurrentColor; } + TQColor color() const { return m_pCurrentColor; } KPopupMenu* popupMenu() const { return m_pMenu; } - void setDefaultColor(const QColor &_col); + void setDefaultColor(const TQColor &_col); public slots: - void setCurrentColor( const QColor& ); - void setActiveColor( const QColor& ); + void setCurrentColor( const TQColor& ); + void setActiveColor( const TQColor& ); virtual void activate(); signals: - void colorSelected( const QColor& ); + void colorSelected( const TQColor& ); protected slots: void selectColorDialog(); - void panelColorSelected( const QColor& ); + void panelColorSelected( const TQColor& ); void panelReject(); virtual void slotActivated(); void defaultColor(); @@ -90,32 +92,33 @@ protected: TKColorPanel* m_pRecentColor; int m_type; - QColor m_pCurrentColor; + TQColor m_pCurrentColor; private: TKSelectColorActionPrivate *d; }; /****************************************************************************************/ -class TKColorPanelButton : public QFrame +class TKColorPanelButton : public TQFrame { Q_OBJECT + TQ_OBJECT public: - TKColorPanelButton( const QColor&, QWidget* parent, const char* name = 0 ); + TKColorPanelButton( const TQColor&, TQWidget* tqparent, const char* name = 0 ); ~TKColorPanelButton(); void setActive( bool ); - QColor panelColor() const { return m_Color; } + TQColor panelColor() const { return m_Color; } signals: - void selected( const QColor& ); + void selected( const TQColor& ); protected: - virtual void paintEvent( QPaintEvent* ); - virtual void enterEvent( QEvent* ); - virtual void leaveEvent( QEvent* ); - virtual void mouseReleaseEvent( QMouseEvent* ); + virtual void paintEvent( TQPaintEvent* ); + virtual void enterEvent( TQEvent* ); + virtual void leaveEvent( TQEvent* ); + virtual void mouseReleaseEvent( TQMouseEvent* ); - QColor m_Color; + TQColor m_Color; bool m_bActive; private: @@ -123,24 +126,25 @@ private: TKColorPanelButtonPrivate *d; }; /****************************************************************************************/ -class TKColorPanel : public QWidget +class TKColorPanel : public TQWidget { Q_OBJECT + TQ_OBJECT public: - TKColorPanel( QWidget* parent = 0L, const char* name = 0 ); + TKColorPanel( TQWidget* tqparent = 0L, const char* name = 0 ); ~TKColorPanel(); - void setActiveColor( const QColor& ); + void setActiveColor( const TQColor& ); void setNumCols( int col ); void clear(); public slots: - void insertColor( const QColor& ); - void insertColor( const QColor&, const QString& ); - void selected( const QColor& ); + void insertColor( const TQColor& ); + void insertColor( const TQColor&, const TQString& ); + void selected( const TQColor& ); signals: - void colorSelected( const QColor& ); + void colorSelected( const TQColor& ); void reject(); void sizeChanged(); @@ -148,16 +152,16 @@ protected: void addToGrid( TKColorPanelButton* ); void resetGrid(); - virtual void mouseReleaseEvent( QMouseEvent* ); - virtual void showEvent( QShowEvent *e ); + virtual void mouseReleaseEvent( TQMouseEvent* ); + virtual void showEvent( TQShowEvent *e ); - QGridLayout* m_pLayout; + TQGridLayout* m_pLayout; int m_iWidth; int m_iX; int m_iY; - QColor m_activeColor; - QDict<TKColorPanelButton> m_pColorDict; + TQColor m_activeColor; + TQDict<TKColorPanelButton> m_pColorDict; private: void fillPanel(); |