summaryrefslogtreecommitdiffstats
path: root/kftpgrabber/src/widgets/balloon.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-07-24 15:27:17 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-07-24 15:27:17 -0500
commit883a1fc629f00e9a41efad8514afd1ccf259d8c2 (patch)
tree53191c33748f9cd949a2eb86a64fbedc86c5ac75 /kftpgrabber/src/widgets/balloon.cpp
parent1385303ea163214e30825730ac0fbcc27f9634aa (diff)
downloadkftpgrabber-883a1fc629f00e9a41efad8514afd1ccf259d8c2.tar.gz
kftpgrabber-883a1fc629f00e9a41efad8514afd1ccf259d8c2.zip
Convert to TDE R14 API
Diffstat (limited to 'kftpgrabber/src/widgets/balloon.cpp')
-rw-r--r--kftpgrabber/src/widgets/balloon.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/kftpgrabber/src/widgets/balloon.cpp b/kftpgrabber/src/widgets/balloon.cpp
index eb10432..e2b135f 100644
--- a/kftpgrabber/src/widgets/balloon.cpp
+++ b/kftpgrabber/src/widgets/balloon.cpp
@@ -34,18 +34,18 @@
* files in the program, then also delete it here.
*/
-#include <qpointarray.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <ntqpointarray.h>
+#include <ntqpushbutton.h>
+#include <ntqtooltip.h>
+#include <ntqlayout.h>
+#include <ntqlabel.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <kdialog.h>
-#include <klocale.h>
+#include <tdelocale.h>
#include <kstandarddirs.h>
#include <kactivelabel.h>
-#include <kglobalsettings.h>
+#include <tdeglobalsettings.h>
#include "widgets/balloon.h"
#include "misc.h"
@@ -54,21 +54,21 @@ using namespace KFTPGrabberBase;
namespace KFTPWidgets {
-Balloon::Balloon(const QString &text, const QString &pix)
- : QWidget(0L, "KFTPBalloon", WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM)
+Balloon::Balloon(const TQString &text, const TQString &pix)
+ : TQWidget(0L, "KFTPBalloon", WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM)
{
setCaption("");
- QVBoxLayout *BalloonLayout = new QVBoxLayout(this, 22, KDialog::spacingHint(), "BalloonLayout");
+ TQVBoxLayout *BalloonLayout = new TQVBoxLayout(this, 22, KDialog::spacingHint(), "BalloonLayout");
// BEGIN Layout1
- QHBoxLayout *Layout1 = new QHBoxLayout(BalloonLayout, KDialog::spacingHint(), "Layout1");
+ TQHBoxLayout *Layout1 = new TQHBoxLayout(BalloonLayout, KDialog::spacingHint(), "Layout1");
KActiveLabel *caption = new KActiveLabel(text, this, "caption");
- caption->setPalette(QToolTip::palette());
- caption->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+ caption->setPalette(TQToolTip::palette());
+ caption->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
if (!pix.isEmpty()) {
- QLabel *image = new QLabel(this, "mImage");
+ TQLabel *image = new TQLabel(this, "mImage");
image->setScaledContents(FALSE);
image->setPixmap(loadSmallPixmap(pix));
@@ -78,21 +78,21 @@ Balloon::Balloon(const QString &text, const QString &pix)
Layout1->addWidget(caption);
// END Layout1
- setPalette(QToolTip::palette());
+ setPalette(TQToolTip::palette());
setAutoMask(true);
connect(caption, SIGNAL(clicked(int, int)), this, SIGNAL(signalBalloonClicked()));
- connect(caption, SIGNAL(linkClicked(const QString &)), this, SIGNAL(signalIgnoreButtonClicked()));
- connect(caption, SIGNAL(linkClicked(const QString &)), this, SLOT(deleteLater()));
+ connect(caption, SIGNAL(linkClicked(const TQString &)), this, SIGNAL(signalIgnoreButtonClicked()));
+ connect(caption, SIGNAL(linkClicked(const TQString &)), this, SLOT(deleteLater()));
}
-void Balloon::mousePressEvent(QMouseEvent *e)
+void Balloon::mousePressEvent(TQMouseEvent *e)
{
emit signalBalloonClicked();
e->accept();
}
-void Balloon::setAnchor(const QPoint &anchor)
+void Balloon::setAnchor(const TQPoint &anchor)
{
m_anchor = anchor;
updateMask();
@@ -100,21 +100,21 @@ void Balloon::setAnchor(const QPoint &anchor)
void Balloon::updateMask()
{
- QRegion mask(10, 10, width() - 20, height() - 20);
-
- QPoint corners[8] = {
- QPoint(width() - 50, 10),
- QPoint(10, 10),
- QPoint(10, height() - 50),
- QPoint(width() - 50, height() - 50),
- QPoint(width() - 10, 10),
- QPoint(10, 10),
- QPoint(10, height() - 10),
- QPoint(width() - 10, height() - 10)
+ TQRegion mask(10, 10, width() - 20, height() - 20);
+
+ TQPoint corners[8] = {
+ TQPoint(width() - 50, 10),
+ TQPoint(10, 10),
+ TQPoint(10, height() - 50),
+ TQPoint(width() - 50, height() - 50),
+ TQPoint(width() - 10, 10),
+ TQPoint(10, 10),
+ TQPoint(10, height() - 10),
+ TQPoint(width() - 10, height() - 10)
};
for (int i = 0; i < 4; ++i) {
- QPointArray corner;
+ TQPointArray corner;
corner.makeArc(corners[i].x(), corners[i].y(), 40, 40, i * 16 * 90, 16 * 90);
corner.resize(corner.size() + 1);
corner.setPoint(corner.size() - 1, corners[i + 4]);
@@ -123,15 +123,15 @@ void Balloon::updateMask()
// get screen-geometry for screen our anchor is on
// (geometry can differ from screen to screen!)
- QRect deskRect = KGlobalSettings::desktopGeometry(m_anchor);
+ TQRect deskRect = TDEGlobalSettings::desktopGeometry(m_anchor);
bool bottom = (m_anchor.y() + height()) > (deskRect.height() - 48);
bool right = (m_anchor.x() + width()) > (deskRect.width() - 48);
- QPointArray arrow(4);
- arrow.setPoint(0, QPoint(right ? width() : 0, bottom ? height() : 0));
- arrow.setPoint(1, QPoint(right ? width() - 10 : 10, bottom ? height() - 30 : 30));
- arrow.setPoint(2, QPoint(right ? width() - 30 : 30, bottom ? height() - 10 : 10));
+ TQPointArray arrow(4);
+ arrow.setPoint(0, TQPoint(right ? width() : 0, bottom ? height() : 0));
+ arrow.setPoint(1, TQPoint(right ? width() - 10 : 10, bottom ? height() - 30 : 30));
+ arrow.setPoint(2, TQPoint(right ? width() - 30 : 30, bottom ? height() - 10 : 10));
arrow.setPoint(3, arrow[0]);
mask += arrow;
setMask(mask);