summaryrefslogtreecommitdiffstats
path: root/kexi/widget/utils/kexigradientwidget.h
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/widget/utils/kexigradientwidget.h')
-rw-r--r--kexi/widget/utils/kexigradientwidget.h79
1 files changed, 40 insertions, 39 deletions
diff --git a/kexi/widget/utils/kexigradientwidget.h b/kexi/widget/utils/kexigradientwidget.h
index 0032e7b10..3a90add8e 100644
--- a/kexi/widget/utils/kexigradientwidget.h
+++ b/kexi/widget/utils/kexigradientwidget.h
@@ -20,8 +20,8 @@
#ifndef KEXIGRADIENTWIDGET_H
#define KEXIGRADIENTWIDGET_H
-#include <qtimer.h>
-#include <qwidget.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
#include <kimageeffect.h>
#include <kpixmap.h>
@@ -32,15 +32,16 @@
/*!
@author Christian Nitschkowski
*/
-class KEXIGUIUTILS_EXPORT KexiGradientWidget : public QWidget {
- typedef QPtrList<QWidget> WidgetList;
+class KEXIGUIUTILS_EXPORT KexiGradientWidget : public TQWidget {
+ typedef TQPtrList<TQWidget> WidgetList;
Q_OBJECT
- Q_PROPERTY(DisplayMode displayMode READ displayMode WRITE setDisplayMode DESIGNABLE true)
- Q_PROPERTY(GradientType gradientType READ gradientType WRITE setGradientType DESIGNABLE true)
- Q_PROPERTY(QColor gradientColor1 READ gradientColor1 WRITE setGradientColor1 DESIGNABLE true)
- Q_PROPERTY(QColor gradientColor2 READ gradientColor2 WRITE setGradientColor2 DESIGNABLE true)
- Q_PROPERTY(double blendOpacity READ blendOpacity WRITE setBlendOpacity DESIGNABLE true)
+ TQ_OBJECT
+ TQ_PROPERTY(DisplayMode displayMode READ displayMode WRITE setDisplayMode DESIGNABLE true)
+ TQ_PROPERTY(GradientType gradientType READ gradientType WRITE setGradientType DESIGNABLE true)
+ TQ_PROPERTY(TQColor gradientColor1 READ gradientColor1 WRITE setGradientColor1 DESIGNABLE true)
+ TQ_PROPERTY(TQColor gradientColor2 READ gradientColor2 WRITE setGradientColor2 DESIGNABLE true)
+ TQ_PROPERTY(double blendOpacity READ blendOpacity WRITE setBlendOpacity DESIGNABLE true)
Q_ENUMS( DisplayMode GradientType )
public:
@@ -48,7 +49,7 @@ class KEXIGUIUTILS_EXPORT KexiGradientWidget : public QWidget {
Modes for displaying the gradient.
*/
enum DisplayMode {
- NoGradient, //!< No gradient at all. Will behave just like a QWidget
+ NoGradient, //!< No gradient at all. Will behave just like a TQWidget
FadedGradient, //!< Gradient will be faded with the widgets background
SimpleGradient //!< Gradient will replace the usual widget background
};
@@ -68,16 +69,16 @@ class KEXIGUIUTILS_EXPORT KexiGradientWidget : public QWidget {
EllipticGradient = KImageEffect::EllipticGradient
};
- KexiGradientWidget( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+ KexiGradientWidget( TQWidget *tqparent = 0, const char *name = 0, WFlags f = 0 );
virtual ~KexiGradientWidget();
- virtual void setPaletteBackgroundPixmap( const QPixmap& pixmap ) {
+ virtual void setPaletteBackgroundPixmap( const TQPixmap& pixmap ) {
p_backgroundPixmap = pixmap;
p_rebuildDelayTimer.start( REBUILD_DELAY, true );
}
- virtual const QColor& paletteBackgroundColor() const;
+ virtual const TQColor& paletteBackgroundColor() const;
/*!
Set the displaymode \a mode.
@@ -114,14 +115,14 @@ class KEXIGUIUTILS_EXPORT KexiGradientWidget : public QWidget {
/*! Set color #1 for the gradient-effect.
\a color is the new color. */
- void setGradientColor1( const QColor& color ) {
+ void setGradientColor1( const TQColor& color ) {
p_color1 = color;
p_cacheDirty = true;
}
/*! Set color #2 for the gradient-effect.
\a color is the new color. */
- void setGradientColor2( const QColor& color ) {
+ void setGradientColor2( const TQColor& color ) {
p_color2 = color;
p_cacheDirty = true;
}
@@ -131,17 +132,17 @@ class KEXIGUIUTILS_EXPORT KexiGradientWidget : public QWidget {
\a color1 is the first color,
\a color2 the second.
*/
- void setGradientColors( const QColor& color1, const QColor& color2 ) {
+ void setGradientColors( const TQColor& color1, const TQColor& color2 ) {
p_color1 = color1;
p_color2 = color2;
p_cacheDirty = true;
}
/*! \return the color #1 used for the gradient. */
- QColor gradientColor1() const { return p_color1; }
+ TQColor gradientColor1() const { return p_color1; }
/*! \return the color #2 used for the gradient. */
- QColor gradientColor2() const { return p_color2; }
+ TQColor gradientColor2() const { return p_color2; }
/*!
Sets the opacity of the gradient when fading with background.
@@ -155,47 +156,47 @@ class KEXIGUIUTILS_EXPORT KexiGradientWidget : public QWidget {
double blendOpacity() const { return p_opacity; }
public slots:
- virtual void setPaletteBackgroundColor( const QColor& color );
+ virtual void setPaletteBackgroundColor( const TQColor& color );
protected:
- virtual bool eventFilter( QObject* object, QEvent* event );
+ virtual bool eventFilter( TQObject* object, TQEvent* event );
virtual void enabledChange( bool enabled ) {
p_cacheDirty = true;
- QWidget::enabledChange( enabled );
+ TQWidget::enabledChange( enabled );
}
- virtual void paletteChange( const QPalette& pal ) {
+ virtual void paletteChange( const TQPalette& pal ) {
p_cacheDirty = true;
- QWidget::paletteChange( pal );
+ TQWidget::paletteChange( pal );
}
- virtual void paintEvent( QPaintEvent* e );
+ virtual void paintEvent( TQPaintEvent* e );
- virtual void resizeEvent( QResizeEvent* e ) {
+ virtual void resizeEvent( TQResizeEvent* e ) {
p_rebuildDelayTimer.start( REBUILD_DELAY, true );
- QWidget::resizeEvent( e );
+ TQWidget::resizeEvent( e );
}
- virtual void styleChange( QStyle& style ) {
+ virtual void styleChange( TQStyle& style ) {
p_cacheDirty = true;
- QWidget::styleChange( style );
+ TQWidget::styleChange( style );
}
private:
/*!
- Builds a list of children of \a p.
+ Builds a list of tqchildren of \a p.
Only widgets that work correctly with KexiGradientWidget
will be in this list.
The results will be stored in \a list.
- The method recursively calls itself until all children of \a p
+ The method recursively calls itself until all tqchildren of \a p
have been found and stored in the list.
*/
- static void buildChildrenList( WidgetList& list, QWidget* p );
+ static void buildChildrenList( WidgetList& list, TQWidget* p );
/*!
\a return if the \a child is a widget that should
get a background set.
*/
- static bool isValidChildWidget( QObject* child );
+ static bool isValidChildWidget( TQObject* child );
/*!
Rebuilds the cache completely.
@@ -210,7 +211,7 @@ class KEXIGUIUTILS_EXPORT KexiGradientWidget : public QWidget {
The same code is used for PaletteChange-events, but in a
different location.
*/
- void updateChildBackground( QWidget* childWidget );
+ void updateChildBackground( TQWidget* childWidget );
private:
WidgetList p_knownWidgets;
@@ -218,14 +219,14 @@ class KEXIGUIUTILS_EXPORT KexiGradientWidget : public QWidget {
DisplayMode p_displayMode;
GradientType p_gradientType;
KPixmap p_backgroundPixmap;
- QColor p_color1;
- QColor p_color2;
- QTimer p_rebuildDelayTimer;
- QWidget* p_currentChild;
+ TQColor p_color1;
+ TQColor p_color2;
+ TQTimer p_rebuildDelayTimer;
+ TQWidget* p_currentChild;
double p_opacity;
bool p_cacheDirty;
- QColor p_backgroundColor;
+ TQColor p_backgroundColor;
public slots:
/*!
@@ -233,7 +234,7 @@ class KEXIGUIUTILS_EXPORT KexiGradientWidget : public QWidget {
is set up completely.
*/
virtual void polish() {
- QWidget::polish();
+ TQWidget::polish();
rebuildCache();
}