summaryrefslogtreecommitdiffstats
path: root/knotes/knotebutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'knotes/knotebutton.cpp')
-rw-r--r--knotes/knotebutton.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/knotes/knotebutton.cpp b/knotes/knotebutton.cpp
index 372510010..b6cf49bc4 100644
--- a/knotes/knotebutton.cpp
+++ b/knotes/knotebutton.cpp
@@ -18,10 +18,10 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*******************************************************************/
-#include <qstyle.h>
-#include <qpainter.h>
-#include <qiconset.h>
-#include <qsizepolicy.h>
+#include <tqstyle.h>
+#include <tqpainter.h>
+#include <tqiconset.h>
+#include <tqsizepolicy.h>
#include <kglobal.h>
#include <kicontheme.h>
@@ -30,11 +30,11 @@
#include "knotebutton.h"
-KNoteButton::KNoteButton( const QString& icon, QWidget *parent, const char *name )
- : QPushButton( parent, name )
+KNoteButton::KNoteButton( const TQString& icon, TQWidget *parent, const char *name )
+ : TQPushButton( parent, name )
{
setFocusPolicy( NoFocus );
- setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
m_flat = true;
@@ -46,55 +46,55 @@ KNoteButton::~KNoteButton()
{
}
-void KNoteButton::enterEvent( QEvent * )
+void KNoteButton::enterEvent( TQEvent * )
{
m_flat = false;
repaint( false );
}
-void KNoteButton::leaveEvent( QEvent * )
+void KNoteButton::leaveEvent( TQEvent * )
{
m_flat = true;
repaint();
}
-QSize KNoteButton::sizeHint() const
+TQSize KNoteButton::sizeHint() const
{
- return QSize( QPushButton::sizeHint().height(), QPushButton::sizeHint().height() );
+ return TQSize( TQPushButton::sizeHint().height(), TQPushButton::sizeHint().height() );
}
-void KNoteButton::drawButton( QPainter* p )
+void KNoteButton::drawButton( TQPainter* p )
{
- QStyle::SFlags flags = QStyle::Style_Default;
+ TQStyle::SFlags flags = TQStyle::Style_Default;
if ( isEnabled() )
- flags |= QStyle::Style_Enabled;
+ flags |= TQStyle::Style_Enabled;
if ( isDown() )
- flags |= QStyle::Style_Down;
+ flags |= TQStyle::Style_Down;
if ( isOn() )
- flags |= QStyle::Style_On;
+ flags |= TQStyle::Style_On;
if ( !isFlat() && !isDown() )
- flags |= QStyle::Style_Raised;
+ flags |= TQStyle::Style_Raised;
if ( !m_flat )
- flags |= QStyle::Style_MouseOver;
+ flags |= TQStyle::Style_MouseOver;
- style().drawPrimitive( QStyle::PE_ButtonTool, p, rect(), colorGroup(), flags );
+ style().drawPrimitive( TQStyle::PE_ButtonTool, p, rect(), colorGroup(), flags );
drawButtonLabel( p );
}
-void KNoteButton::drawButtonLabel( QPainter* p )
+void KNoteButton::drawButtonLabel( TQPainter* p )
{
if ( iconSet() && !iconSet()->isNull() )
{
- QIconSet::Mode mode = QIconSet::Disabled;
- QIconSet::State state = QIconSet::Off;
+ TQIconSet::Mode mode = TQIconSet::Disabled;
+ TQIconSet::State state = TQIconSet::Off;
if ( isEnabled() )
- mode = hasFocus() ? QIconSet::Active : QIconSet::Normal;
+ mode = hasFocus() ? TQIconSet::Active : TQIconSet::Normal;
if ( isToggleButton() && isOn() )
- state = QIconSet::On;
+ state = TQIconSet::On;
- QPixmap pix = iconSet()->pixmap( QIconSet::Small, mode, state );
+ TQPixmap pix = iconSet()->pixmap( TQIconSet::Small, mode, state );
int dx = ( width() - pix.width() ) / 2;
int dy = ( height() - pix.height() ) / 2;
@@ -102,8 +102,8 @@ void KNoteButton::drawButtonLabel( QPainter* p )
// Shift button contents if pushed.
if ( isOn() || isDown() )
{
- dx += style().pixelMetric( QStyle::PM_ButtonShiftHorizontal, this );
- dy += style().pixelMetric( QStyle::PM_ButtonShiftVertical, this );
+ dx += style().pixelMetric( TQStyle::PM_ButtonShiftHorizontal, this );
+ dy += style().pixelMetric( TQStyle::PM_ButtonShiftVertical, this );
}
p->drawPixmap( dx, dy, pix );