From 395a904bff7b4d6ead445c342f7ac0c5fbf29121 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 18 Jun 2011 17:00:31 +0000 Subject: TQt4 port kdeaddons This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1237404 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kicker-applets/math/mathapplet.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'kicker-applets/math/mathapplet.cpp') diff --git a/kicker-applets/math/mathapplet.cpp b/kicker-applets/math/mathapplet.cpp index 9d7ca38..8274bb6 100644 --- a/kicker-applets/math/mathapplet.cpp +++ b/kicker-applets/math/mathapplet.cpp @@ -49,16 +49,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. extern "C" { - KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) + KDE_EXPORT KPanelApplet* init(TQWidget *tqparent, const TQString& configFile) { KGlobal::locale()->insertCatalogue("kmathapplet"); - return new MathApplet(configFile, KPanelApplet::Stretch, 0, parent, "kmathapplet"); + return new MathApplet(configFile, KPanelApplet::Stretch, 0, tqparent, "kmathapplet"); } } MathApplet::MathApplet(const TQString& configFile, Type type, int actions, - TQWidget *parent, const char *name) - : KPanelApplet(configFile, type, actions, parent, name), + TQWidget *tqparent, const char *name) + : KPanelApplet(configFile, type, actions, tqparent, name), m_hasFocus(false) { // setBackgroundMode(X11ParentRelative); @@ -151,20 +151,20 @@ void MathApplet::useRadians() { void MathApplet::resizeEvent(TQResizeEvent*) { - if(orientation() == Horizontal) + if(orientation() ==Qt::Horizontal) { _btn->hide(); _input->reparent(this, TQPoint(0,0), true); _label->setGeometry(0,0, width(), _label->height()); - if(height() >= _input->sizeHint().height() + _label->height()) + if(height() >= _input->tqsizeHint().height() + _label->height()) { - int inputVOffset = height() - _input->sizeHint().height() - 2; - int labelHeight = _label->sizeHint().height(); + int inputVOffset = height() - _input->tqsizeHint().height() - 2; + int labelHeight = _label->tqsizeHint().height(); _label->setGeometry(0, inputVOffset - labelHeight, width(), labelHeight); _input->setGeometry(0, inputVOffset, - width(), _input->sizeHint().height()); + width(), _input->tqsizeHint().height()); _label->show(); } else @@ -174,7 +174,7 @@ void MathApplet::resizeEvent(TQResizeEvent*) // make it as high as the combobox naturally wants to be // but no taller than the panel is! // don't forget to center it vertically either. - int newHeight = _input->sizeHint().height(); + int newHeight = _input->tqsizeHint().height(); if (newHeight > height()) newHeight = height(); _input->setGeometry(0, (height() - newHeight) / 2, @@ -269,13 +269,13 @@ void MathApplet::evaluate(const TQString& command) } } - if (orientation() == Vertical) + if (orientation() ==Qt::Vertical) _hbox->hide(); } void MathApplet::mousePressEvent(TQMouseEvent *e) { - if ( e->button() != RightButton ) + if ( e->button() != Qt::RightButton ) { KPanelApplet::mousePressEvent( e ); return; -- cgit v1.2.1