diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-29 16:05:55 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-29 16:05:55 +0000 |
commit | 87a016680e3677da3993f333561e79eb0cead7d5 (patch) | |
tree | cbda2b4df8b8ee0d8d1617e6c75bec1e3ee0ccba /src/gui/colorcombo.h | |
parent | 6ce3d1ad09c1096b5ed3db334e02859e45d5c32b (diff) | |
download | ktechlab-87a016680e3677da3993f333561e79eb0cead7d5.tar.gz ktechlab-87a016680e3677da3993f333561e79eb0cead7d5.zip |
TQt4 port ktechlab
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1238801 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/colorcombo.h')
-rw-r--r-- | src/gui/colorcombo.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/gui/colorcombo.h b/src/gui/colorcombo.h index 65b2714..0fb6071 100644 --- a/src/gui/colorcombo.h +++ b/src/gui/colorcombo.h @@ -11,8 +11,8 @@ #ifndef COLORCOMBO_H #define COLORCOMBO_H -#include <qcolor.h> -#include <qcombobox.h> +#include <tqcolor.h> +#include <tqcombobox.h> /** Based on KColorCombo, Copyright (C) 1997 Martin Jones (mjones@kde.org). Allows @@ -20,15 +20,16 @@ which colours are displayed to be changed. @author David Saxton */ -class ColorCombo : public QComboBox +class ColorCombo : public TQComboBox { Q_OBJECT - Q_PROPERTY( QColor color READ color WRITE setColor ) + TQ_OBJECT + TQ_PROPERTY( TQColor color READ color WRITE setColor ) public: enum ColorScheme { - QtStandard = 0, + TQtStandard = 0, LED = 1, NumberOfSchemes = 2, ///< for internal usage; this should be one less than the number of items in the enum }; @@ -36,43 +37,43 @@ class ColorCombo : public QComboBox /** * Constructs a color combo box. */ - ColorCombo( ColorScheme colorScheme, QWidget *parent, const char *name = 0L ); + ColorCombo( ColorScheme colorScheme, TQWidget *tqparent, const char *name = 0L ); ~ColorCombo(); /** * Selects the color @p col. */ - void setColor( const QColor & col ); + void setColor( const TQColor & col ); /** * Returns the currently selected color. **/ - QColor color() const { return internalColor; } + TQColor color() const { return internalColor; } signals: /** * Emitted when a new color box has been selected. */ - void activated( const QColor &col ); + void activated( const TQColor &col ); /** * Emitted when a new item has been highlighted. */ - void highlighted( const QColor &col ); + void highlighted( const TQColor &col ); protected slots: void slotActivated( int index ); void slotHighlighted( int index ); protected: - virtual void resizeEvent( QResizeEvent *re ); + virtual void resizeEvent( TQResizeEvent *re ); void addColors(); void createPalettes(); - QColor customColor; - QColor internalColor; + TQColor customColor; + TQColor internalColor; ColorScheme m_colorScheme; static bool createdPalettes; - static QColor * palette[ NumberOfSchemes ]; + static TQColor * palette[ NumberOfSchemes ]; static int paletteSize[ NumberOfSchemes ]; }; |