summaryrefslogtreecommitdiffstats
path: root/kexi/widget/utils/kexiarrowtip.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/widget/utils/kexiarrowtip.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/widget/utils/kexiarrowtip.cpp')
-rw-r--r--kexi/widget/utils/kexiarrowtip.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/kexi/widget/utils/kexiarrowtip.cpp b/kexi/widget/utils/kexiarrowtip.cpp
index cdffcb02..a805f5e3 100644
--- a/kexi/widget/utils/kexiarrowtip.cpp
+++ b/kexi/widget/utils/kexiarrowtip.cpp
@@ -19,44 +19,44 @@
#include "kexiarrowtip.h"
-#include <qpixmap.h>
-#include <qbitmap.h>
-#include <qpainter.h>
-#include <qimage.h>
-#include <qtooltip.h>
-#include <qfont.h>
-#include <qfontmetrics.h>
-#include <qtimer.h>
+#include <tqpixmap.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqtooltip.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
+#include <tqtimer.h>
#include <kexiutils/utils.h>
-KexiArrowTip::KexiArrowTip(const QString& text, QWidget* parent)
- : KexiToolTip(text, parent)
+KexiArrowTip::KexiArrowTip(const TQString& text, TQWidget* tqparent)
+ : KexiToolTip(text, tqparent)
, m_opacity(0.0)
{
- QPalette pal( palette() );
- QColorGroup cg(pal.active());
- cg.setColor(QColorGroup::Foreground, Qt::red);
+ TQPalette pal( palette() );
+ TQColorGroup cg(pal.active());
+ cg.setColor(TQColorGroup::Foreground, TQt::red);
pal.setActive(cg);
setPalette(pal);
- QFontMetrics fm(font());
- QSize sz(fm.boundingRect(m_value.toString()).size());
- sz += QSize(14, 10); //+margins
+ TQFontMetrics fm(font());
+ TQSize sz(fm.boundingRect(m_value.toString()).size());
+ sz += TQSize(14, 10); //+margins
m_arrowHeight = sz.height()/2;
- sz += QSize(0, m_arrowHeight); //+arrow height
+ sz += TQSize(0, m_arrowHeight); //+arrow height
resize(sz);
setAutoMask( false );
- //generate mask
- QPixmap maskPm(size());
- maskPm.fill( black );
- QPainter maskPainter(&maskPm);
- drawFrame(maskPainter);
- QImage maskImg( maskPm.convertToImage() );
- QBitmap bm;
- bm = maskImg.createHeuristicMask();
+ //generate tqmask
+ TQPixmap tqmaskPm(size());
+ tqmaskPm.fill( black );
+ TQPainter tqmaskPainter(&tqmaskPm);
+ drawFrame(tqmaskPainter);
+ TQImage tqmaskImg( tqmaskPm.convertToImage() );
+ TQBitmap bm;
+ bm = tqmaskImg.createHeuristicMask();
setMask( bm );
}
@@ -88,7 +88,7 @@ void KexiArrowTip::increaseOpacity()
m_opacity += 0.10;
setWindowOpacity(m_opacity);
if (m_opacity < 1.0)
- QTimer::singleShot(25, this, SLOT(increaseOpacity()));
+ TQTimer::singleShot(25, this, TQT_SLOT(increaseOpacity()));
}
void KexiArrowTip::decreaseOpacity()
@@ -100,7 +100,7 @@ void KexiArrowTip::decreaseOpacity()
}
m_opacity -= 0.10;
setWindowOpacity(m_opacity);
- QTimer::singleShot(25, this, SLOT(decreaseOpacity()));
+ TQTimer::singleShot(25, this, TQT_SLOT(decreaseOpacity()));
}
bool KexiArrowTip::close ( bool alsoDelete )
@@ -115,16 +115,16 @@ bool KexiArrowTip::close ( bool alsoDelete )
return m_opacity<=0.0;
}
-void KexiArrowTip::drawContents(QPainter& p)
+void KexiArrowTip::drawContents(TQPainter& p)
{
- p.setPen( QPen(palette().active().foreground(), 1) );
- p.drawText(QRect(0,m_arrowHeight,width(),height()-m_arrowHeight),
- Qt::AlignCenter, m_value.toString());
+ p.setPen( TQPen(tqpalette().active().foreground(), 1) );
+ p.drawText(TQRect(0,m_arrowHeight,width(),height()-m_arrowHeight),
+ TQt::AlignCenter, m_value.toString());
}
-void KexiArrowTip::drawFrame(QPainter& p)
+void KexiArrowTip::drawFrame(TQPainter& p)
{
- QPen pen(palette().active().foreground(), 1, Qt::SolidLine, Qt::SquareCap, Qt::MiterJoin);
+ TQPen pen(tqpalette().active().foreground(), 1, Qt::SolidLine, Qt::SquareCap, Qt::MiterJoin);
p.setPen( pen );
/*
/\
@@ -134,7 +134,7 @@ void KexiArrowTip::drawFrame(QPainter& p)
*/
//1st line
const int arrowOffset = 5; //5 pixels to right
- QPointArray pa(8);
+ TQPointArray pa(8);
pa.setPoint(0, 0, m_arrowHeight-1);
pa.setPoint(1, 0, height()-1);
pa.setPoint(2, width()-1, height()-1);