diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-27 23:37:00 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-27 23:37:00 +0000 |
commit | b0e912c8b3d02a518fedda28c3180eb4794a7520 (patch) | |
tree | 07d344862562fab58cbe2df39d13d16f2e4d2bea /k9author/k9menubutton.cpp | |
parent | 4d695ec81fe4d4335ee82c7a9346ad9c9e144ecc (diff) | |
download | k9copy-b0e912c8b3d02a518fedda28c3180eb4794a7520.tar.gz k9copy-b0e912c8b3d02a518fedda28c3180eb4794a7520.zip |
TQt4 convert k9copy
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k9copy@1233843 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'k9author/k9menubutton.cpp')
-rw-r--r-- | k9author/k9menubutton.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/k9author/k9menubutton.cpp b/k9author/k9menubutton.cpp index 73908e9..5256983 100644 --- a/k9author/k9menubutton.cpp +++ b/k9author/k9menubutton.cpp @@ -10,11 +10,11 @@ // // #include "k9menubutton.h" -#include <qpainter.h> -#include <qwmatrix.h> -#include <qbitmap.h> +#include <tqpainter.h> +#include <tqwmatrix.h> +#include <tqbitmap.h> -k9CanvasSprite::k9CanvasSprite (QCanvasPixmapArray *a,QCanvas *canvas,k9MenuButton *button) : QCanvasSprite(a,canvas) { +k9CanvasSprite::k9CanvasSprite (TQCanvasPixmapArray *a,TQCanvas *canvas,k9MenuButton *button) : TQCanvasSprite(a,canvas) { m_button=button; } @@ -99,14 +99,14 @@ void k9MenuButton::update() { emit sigsetHeight(getHeight()); } -k9MenuButton::k9MenuButton(QCanvas *parent, const char *name) - : QObject(parent, name),m_width(0),m_height(0) +k9MenuButton::k9MenuButton(TQCanvas *tqparent, const char *name) + : TQObject(tqparent, name),m_width(0),m_height(0) { - m_canvas=parent; + m_canvas=tqparent; m_sprite=NULL; m_pixmap=NULL; - m_text=new QCanvasText("",m_canvas); - m_text->setColor(Qt::yellow); + m_text=new TQCanvasText("",m_canvas); + m_text->setColor(TQt::yellow); } @@ -115,31 +115,31 @@ k9MenuButton::~k9MenuButton() { } -void k9MenuButton::setImage(const QImage &_image) { +void k9MenuButton::setImage(const TQImage &_image) { m_image=_image; emit sigsetImage(this,_image); loadImage(); } -void k9MenuButton::setImage(const QString &_fileName){ +void k9MenuButton::setImage(const TQString &_fileName){ m_image.load(_fileName); emit sigsetImage(this,m_image); loadImage(); } void k9MenuButton::loadImage() { - QImage tmp=m_image.smoothScale(m_width,m_height); + TQImage tmp=m_image.smoothScale(m_width,m_height); int x=0,y=0; if (m_sprite) { x=m_sprite->x(); y=m_sprite->y(); delete m_sprite; } - QPixmap pix; + TQPixmap pix; pix.convertFromImage(tmp); - m_pixmap=new QCanvasPixmap(pix,QPoint(0,0)); + m_pixmap=new TQCanvasPixmap(pix,TQPoint(0,0)); m_pixmapArray.setImage(0,m_pixmap); @@ -194,35 +194,35 @@ int k9MenuButton::getLeft() { return m_sprite->x(); } -void k9MenuButton::setFont(QFont _font) { +void k9MenuButton::setFont(TQFont _font) { m_text->setFont(_font); update(); m_canvas->update(); emit sigsetFont(_font); } -QFont k9MenuButton::getFont() { +TQFont k9MenuButton::getFont() { return m_text->font(); } -void k9MenuButton::setColor(QColor _color) { +void k9MenuButton::setColor(TQColor _color) { m_text->setColor(_color); m_canvas->update(); emit sigsetColor(_color); } -QColor k9MenuButton::getColor() { +TQColor k9MenuButton::getColor() { return m_text->color(); } -void k9MenuButton::setText(QString _text) { +void k9MenuButton::setText(TQString _text) { m_text->setText(_text); update(); m_canvas->update(); emit sigsetText(_text); } -QString k9MenuButton::getText() { +TQString k9MenuButton::getText() { return m_text->text(); } @@ -256,17 +256,17 @@ void k9MenuButton::setTextPosition(const eTextPosition& _value) { } -QImage k9MenuButton::getImage() const { +TQImage k9MenuButton::getImage() const { return m_image; } -QString k9MenuButton::getScript() const { +TQString k9MenuButton::getScript() const { return m_script; } -void k9MenuButton::setScript(const QString& _value) { +void k9MenuButton::setScript(const TQString& _value) { m_script = _value; } |