From e35f3fe53cd8df85d4fd04e49dfffbaeac971cdf Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 7 Nov 2011 21:50:31 -0600 Subject: Rename kwin to twin (Part 2 of 2) --- kwin-styles/glow/glowbutton.h | 129 ------------------------------------------ 1 file changed, 129 deletions(-) delete mode 100644 kwin-styles/glow/glowbutton.h (limited to 'kwin-styles/glow/glowbutton.h') diff --git a/kwin-styles/glow/glowbutton.h b/kwin-styles/glow/glowbutton.h deleted file mode 100644 index d2e83beb..00000000 --- a/kwin-styles/glow/glowbutton.h +++ /dev/null @@ -1,129 +0,0 @@ -/*************************************************************************** - glowbutton.h - description - ------------------- - begin : Thu Sep 14 2001 - copyright : (C) 2001 by Henning Burchardt - email : h_burchardt@gmx.net - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef GLOW_BUTTON_H -#define GLOW_BUTTON_H - -#include -#include -#include - -class TQPixmap; -class TQBitmap; -class TQTimer; -class TQString; - -namespace Glow -{ - -class PixmapCache -{ -public: - static const TQPixmap* find(const TQString& key); - static void insert(const TQString& key, const TQPixmap *pixmap); - static void erase(const TQString& key); - static void clear(); -private: - static TQMap m_pixmapMap; -}; - - -//----------------------------------------------------------------------------- - -class GlowButton : public TQButton -{ - Q_OBJECT - TQ_OBJECT - -public: - GlowButton(TQWidget *parent, const char* name, const TQString& tip, const int realizeBtns); - ~GlowButton(); - - void setTipText( const TQString& tip ); - - TQString getPixmapName() const; - ButtonState lastButton() const; - - /** Sets the name of the pixmap in the pixmap cache. - * If no background pixmap is wanted use TQString() as name. */ - void setPixmapName(const TQString& pixmapName); - -protected: - virtual void paintEvent( TQPaintEvent * ); - virtual void enterEvent( TQEvent * ); - virtual void leaveEvent( TQEvent * ); - virtual void mousePressEvent( TQMouseEvent * ); - virtual void mouseReleaseEvent( TQMouseEvent * ); - -protected slots: - void slotTimeout(); - -private: - enum TimertqStatus { Run, Stop }; - - int m_updateTime; - int _steps; - TQString m_pixmapName; - - TQTimer *m_timer; - int m_pos; - TimertqStatus m_timertqStatus; - - int m_realizeButtons; - ButtonState _last_button; -}; - -//----------------------------------------------------------------------------- - -class GlowButtonFactory -{ -public: - GlowButtonFactory(); - - int getSteps(); - - /** - * Sets the number of pixmaps used to create the glow effect of the - * glow buttons. - */ - void setSteps(int steps); - - /** - * Creates a background pixmap for a glow button. - * The pixmap will consist of sub pixmaps of the size of the button which - * are placed one below the other. Each sub pixmap is copied on the button - * in succession to create the glow effect. The last sub pixmap is used - * when the button is pressed. - */ - TQPixmap * createGlowButtonPixmap( - const TQImage & bg_image, -// const TQImage & bg_alpha_image, - const TQImage & fg_image, - const TQImage & glow_image, - const TQColor & color, - const TQColor & glow_color); - - GlowButton* createGlowButton( - TQWidget *parent, const char* name, const TQString& tip, const int realizeBtns = Qt::LeftButton); - -private: - int _steps; -}; - -} // namespace - -#endif -- cgit v1.2.1