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 /krita/plugins/viewplugins/imagesize/dlg_imagesize.cc | |
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 'krita/plugins/viewplugins/imagesize/dlg_imagesize.cc')
-rw-r--r-- | krita/plugins/viewplugins/imagesize/dlg_imagesize.cc | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/krita/plugins/viewplugins/imagesize/dlg_imagesize.cc b/krita/plugins/viewplugins/imagesize/dlg_imagesize.cc index 9a641b94..ac3a1b11 100644 --- a/krita/plugins/viewplugins/imagesize/dlg_imagesize.cc +++ b/krita/plugins/viewplugins/imagesize/dlg_imagesize.cc @@ -26,11 +26,11 @@ using namespace std; -#include <qradiobutton.h> -#include <qcheckbox.h> -#include <qbuttongroup.h> -#include <qlabel.h> -#include <qcombobox.h> +#include <tqradiobutton.h> +#include <tqcheckbox.h> +#include <tqbuttongroup.h> +#include <tqlabel.h> +#include <tqcombobox.h> #include <klocale.h> #include <knuminput.h> @@ -45,9 +45,9 @@ using namespace std; // XXX: I'm really real bad at arithmetic, let alone math. Here // be rounding errors. (Boudewijn) -DlgImageSize::DlgImageSize( QWidget * parent, +DlgImageSize::DlgImageSize( TQWidget * tqparent, const char * name) - : super (parent, name, true, i18n("Image Size"), Ok | Cancel, Ok) + : super (tqparent, name, true, i18n("Image Size"), Ok | Cancel, Ok) { m_lock = false; @@ -58,13 +58,13 @@ DlgImageSize::DlgImageSize( QWidget * parent, m_page->cmbFilterType->setCurrentText("Mitchell"); setMainWidget(m_page); - resize(m_page->sizeHint()); + resize(m_page->tqsizeHint()); unblockAll(); - connect(this, SIGNAL(okClicked()), - this, SLOT(okClicked())); + connect(this, TQT_SIGNAL(okClicked()), + this, TQT_SLOT(okClicked())); } @@ -78,7 +78,7 @@ void DlgImageSize::hideScaleBox() m_page->grpResizeScale->hide(); } -void DlgImageSize::setWidth(Q_UINT32 w) +void DlgImageSize::setWidth(TQ_UINT32 w) { blockAll(); @@ -90,7 +90,7 @@ void DlgImageSize::setWidth(Q_UINT32 w) unblockAll(); } -void DlgImageSize::setWidthPercent(Q_UINT32 w) +void DlgImageSize::setWidthPercent(TQ_UINT32 w) { blockAll(); @@ -101,19 +101,19 @@ void DlgImageSize::setWidthPercent(Q_UINT32 w) } -void DlgImageSize::setMaximumWidth(Q_UINT32 w) +void DlgImageSize::setMaximumWidth(TQ_UINT32 w) { m_page->intWidth->setMaxValue(w); m_maxW = w; } -Q_INT32 DlgImageSize::width() +TQ_INT32 DlgImageSize::width() { - //return (Q_INT32)qRound(m_oldW); - return (Q_INT32)qRound(m_page->intWidth->value()); + //return (TQ_INT32)tqRound(m_oldW); + return (TQ_INT32)tqRound(m_page->intWidth->value()); } -void DlgImageSize::setHeight(Q_UINT32 h) +void DlgImageSize::setHeight(TQ_UINT32 h) { blockAll(); @@ -126,7 +126,7 @@ void DlgImageSize::setHeight(Q_UINT32 h) } -void DlgImageSize::setHeightPercent(Q_UINT32 h) +void DlgImageSize::setHeightPercent(TQ_UINT32 h) { blockAll(); @@ -138,17 +138,17 @@ void DlgImageSize::setHeightPercent(Q_UINT32 h) -void DlgImageSize::setMaximumHeight(Q_UINT32 h) +void DlgImageSize::setMaximumHeight(TQ_UINT32 h) { m_page->intHeight->setMaxValue(h); m_maxH = h; } -Q_INT32 DlgImageSize::height() +TQ_INT32 DlgImageSize::height() { - //return (Q_INT32)qRound(m_oldH); - return (Q_INT32)qRound(m_page->intHeight->value()); + //return (TQ_INT32)tqRound(m_oldH); + return (TQ_INT32)tqRound(m_page->intHeight->value()); } bool DlgImageSize::scale() @@ -181,14 +181,14 @@ void DlgImageSize::slotWidthPixelsChanged(int w) double wPercent = double(w) * 100 / double(m_origW); - m_page->intWidthPercent->setValue(qRound(wPercent)); + m_page->intWidthPercent->setValue(tqRound(wPercent)); // Set height in pixels and percent of necessary if (m_page->chkConstrain->isChecked()) { - m_page->intHeightPercent->setValue(qRound(wPercent)); + m_page->intHeightPercent->setValue(tqRound(wPercent)); - m_oldH = qRound(m_origH * wPercent / 100); - m_page->intHeight->setValue(qRound(m_oldH)); + m_oldH = tqRound(m_origH * wPercent / 100); + m_page->intHeight->setValue(tqRound(m_oldH)); } m_oldW = w; @@ -202,14 +202,14 @@ void DlgImageSize::slotHeightPixelsChanged(int h) double hPercent = double(h) * 100 / double(m_origH); - m_page->intHeightPercent->setValue(qRound(hPercent)); + m_page->intHeightPercent->setValue(tqRound(hPercent)); // Set width in pixels and percent of necessary if (m_page->chkConstrain->isChecked()) { - m_page->intWidthPercent->setValue(qRound(hPercent)); + m_page->intWidthPercent->setValue(tqRound(hPercent)); - m_oldW = qRound(m_origW * hPercent / 100); - m_page->intWidth->setValue(qRound(m_oldW)); + m_oldW = tqRound(m_origW * hPercent / 100); + m_page->intWidth->setValue(tqRound(m_oldW)); } m_oldH = h; @@ -221,11 +221,11 @@ void DlgImageSize::slotWidthPercentChanged(int w) { blockAll(); - m_page->intWidth->setValue(qRound(w * m_origW / 100)); + m_page->intWidth->setValue(tqRound(w * m_origW / 100)); if (m_page->chkConstrain->isChecked()) { m_page->intHeightPercent->setValue(w); - m_page->intHeight->setValue(qRound( w * m_origH / 100)); + m_page->intHeight->setValue(tqRound( w * m_origH / 100)); } unblockAll(); @@ -235,10 +235,10 @@ void DlgImageSize::slotHeightPercentChanged(int h) { blockAll(); - m_page->intHeight->setValue(qRound(h * m_origH / 100)); + m_page->intHeight->setValue(tqRound(h * m_origH / 100)); if (m_page->chkConstrain->isChecked()) { m_page->intWidthPercent->setValue(h); - m_page->intWidth->setValue(qRound( h * m_origW / 100)); + m_page->intWidth->setValue(tqRound( h * m_origW / 100)); } unblockAll(); @@ -259,17 +259,17 @@ void DlgImageSize::blockAll() void DlgImageSize::unblockAll() { // XXX: more efficient to use blockSignals? - connect (m_page->intWidth, SIGNAL(valueChanged(int)), - this, SLOT(slotWidthPixelsChanged(int))); + connect (m_page->intWidth, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotWidthPixelsChanged(int))); - connect (m_page->intHeight, SIGNAL(valueChanged(int)), - this, SLOT(slotHeightPixelsChanged(int))); + connect (m_page->intHeight, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotHeightPixelsChanged(int))); - connect (m_page->intWidthPercent, SIGNAL(valueChanged(int)), - this, SLOT(slotWidthPercentChanged(int))); + connect (m_page->intWidthPercent, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotWidthPercentChanged(int))); - connect (m_page->intHeightPercent, SIGNAL(valueChanged(int)), - this, SLOT(slotHeightPercentChanged(int))); + connect (m_page->intHeightPercent, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotHeightPercentChanged(int))); } |