diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/kofficeui/Kolinewidthaction.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-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 'lib/kofficeui/Kolinewidthaction.cpp')
-rw-r--r-- | lib/kofficeui/Kolinewidthaction.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/lib/kofficeui/Kolinewidthaction.cpp b/lib/kofficeui/Kolinewidthaction.cpp index 611481cb..6b693d3c 100644 --- a/lib/kofficeui/Kolinewidthaction.cpp +++ b/lib/kofficeui/Kolinewidthaction.cpp @@ -19,13 +19,13 @@ #include "Kolinewidthaction.h" -#include <qpainter.h> -#include <qpixmap.h> -#include <qbitmap.h> -#include <qwhatsthis.h> -#include <qmenubar.h> -#include <qlayout.h> -#include <qlabel.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqbitmap.h> +#include <tqwhatsthis.h> +#include <tqmenubar.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <kpopupmenu.h> #include <kapplication.h> @@ -55,22 +55,22 @@ class KoLineWidthAction::KoLineWidthActionPrivate KoUnit::Unit m_unit; }; -KoLineWidthAction::KoLineWidthAction(const QString &text, const QString& icon, - QObject* parent, const char* name) : KoSelectAction(text, icon, parent, name) +KoLineWidthAction::KoLineWidthAction(const TQString &text, const TQString& icon, + TQObject* tqparent, const char* name) : KoSelectAction(text, icon, tqparent, name) { d = new KoLineWidthActionPrivate; createMenu(); } -KoLineWidthAction::KoLineWidthAction(const QString &text, const QString& icon, const QObject* receiver, - const char* slot, QObject* parent, const char* name) : KoSelectAction(text, icon, parent, name) +KoLineWidthAction::KoLineWidthAction(const TQString &text, const TQString& icon, const TQObject* receiver, + const char* slot, TQObject* tqparent, const char* name) : KoSelectAction(text, icon, tqparent, name) { d = new KoLineWidthActionPrivate; createMenu(); - connect(this, SIGNAL(lineWidthChanged(double)), receiver, slot); + connect(this, TQT_SIGNAL(lineWidthChanged(double)), receiver, slot); } KoLineWidthAction::~KoLineWidthAction() @@ -81,19 +81,19 @@ KoLineWidthAction::~KoLineWidthAction() void KoLineWidthAction::createMenu() { KPopupMenu* popup = popupMenu(); - QBitmap mask; - QPixmap pix(70, 21); - QPainter p(&pix, popup); + TQBitmap tqmask; + TQPixmap pix(70, 21); + TQPainter p(&pix, popup); int cindex = 0; - QPen pen; + TQPen pen; for(int i = 1; i <= 10; i++) { pix.fill(white); - pen.setWidth(qRound(i * POINT_TO_INCH(static_cast<double>(KoGlobal::dpiY())))); + pen.setWidth(tqRound(i * POINT_TO_INCH(static_cast<double>(KoGlobal::dpiY())))); p.setPen(pen); p.drawLine(0, 10, pix.width(), 10); - mask = pix; - pix.setMask(mask); + tqmask = pix; + pix.setMask(tqmask); popup->insertItem(pix,cindex++); } @@ -109,7 +109,7 @@ void KoLineWidthAction::execute(int index) d->m_currentWidth = (double) index + 1.0; ok = true; } if(index == 11) { // Custom width dialog... - KoLineWidthChooser dlg(qApp->activeWindow()); + KoLineWidthChooser dlg(TQT_TQWIDGET(tqApp->activeWindow())); dlg.setUnit(d->m_unit); dlg.setWidth(d->m_currentWidth); @@ -162,16 +162,16 @@ class KoLineWidthChooser::KoLineWidthChooserPrivate KoUnitDoubleSpinBox* m_lineWidthUSBox; }; -KoLineWidthChooser::KoLineWidthChooser(QWidget* parent, const char* name) - : KDialogBase(parent, name, true, i18n("Custom Line Width"), Ok|Cancel, Ok) +KoLineWidthChooser::KoLineWidthChooser(TQWidget* tqparent, const char* name) + : KDialogBase(tqparent, name, true, i18n("Custom Line Width"), Ok|Cancel, Ok) { d = new KoLineWidthChooserPrivate; // Create the ui - QWidget* mainWidget = new QWidget(this); + TQWidget* mainWidget = new TQWidget(this); setMainWidget(mainWidget); - QGridLayout* gl = new QGridLayout(mainWidget, 1, 2, KDialog::marginHint(), KDialog::spacingHint()); - QLabel* textLbl = new QLabel(i18n("Line width:"), mainWidget); + TQGridLayout* gl = new TQGridLayout(mainWidget, 1, 2, KDialog::marginHint(), KDialog::spacingHint()); + TQLabel* textLbl = new TQLabel(i18n("Line width:"), mainWidget); d->m_lineWidthUSBox = new KoUnitDoubleSpinBox(mainWidget, 0.0, 1000.0, 0.1, 1.0, KoUnit::U_PT, 2); gl->addWidget(textLbl, 0, 0); gl->addWidget(d->m_lineWidthUSBox, 0, 1); |