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/shearimage | |
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/shearimage')
5 files changed, 44 insertions, 42 deletions
diff --git a/krita/plugins/viewplugins/shearimage/dlg_shearimage.cc b/krita/plugins/viewplugins/shearimage/dlg_shearimage.cc index 9a6a2f66..896a947a 100644 --- a/krita/plugins/viewplugins/shearimage/dlg_shearimage.cc +++ b/krita/plugins/viewplugins/shearimage/dlg_shearimage.cc @@ -26,10 +26,10 @@ using namespace std; -#include <qradiobutton.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqradiobutton.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <klocale.h> #include <knuminput.h> @@ -39,21 +39,21 @@ using namespace std; #include "wdg_shearimage.h" -DlgShearImage::DlgShearImage( QWidget * parent, +DlgShearImage::DlgShearImage( TQWidget * tqparent, const char * name) - : super (parent, name, true, i18n("Shear Image"), Ok | Cancel, Ok) + : super (tqparent, name, true, i18n("Shear Image"), Ok | Cancel, Ok) { m_lock = false; m_page = new WdgShearImage(this, "shear_image"); - m_page->layout()->setMargin(0); + m_page->tqlayout()->setMargin(0); Q_CHECK_PTR(m_page); setMainWidget(m_page); - resize(m_page->sizeHint()); + resize(m_page->tqsizeHint()); - connect(this, SIGNAL(okClicked()), - this, SLOT(okClicked())); + connect(this, TQT_SIGNAL(okClicked()), + this, TQT_SLOT(okClicked())); } @@ -62,28 +62,28 @@ DlgShearImage::~DlgShearImage() delete m_page; } -void DlgShearImage::setAngleX(Q_UINT32 angle) +void DlgShearImage::setAngleX(TQ_UINT32 angle) { m_page->shearAngleX->setValue(angle); m_oldAngle = angle; } -void DlgShearImage::setAngleY(Q_UINT32 angle) +void DlgShearImage::setAngleY(TQ_UINT32 angle) { m_page->shearAngleY->setValue(angle); m_oldAngle = angle; } -Q_INT32 DlgShearImage::angleX() +TQ_INT32 DlgShearImage::angleX() { - return (Q_INT32)qRound(m_page->shearAngleX->value()); + return (TQ_INT32)tqRound(m_page->shearAngleX->value()); } -Q_INT32 DlgShearImage::angleY() +TQ_INT32 DlgShearImage::angleY() { - return (Q_INT32)qRound(m_page->shearAngleY->value()); + return (TQ_INT32)tqRound(m_page->shearAngleY->value()); } // SLOTS diff --git a/krita/plugins/viewplugins/shearimage/dlg_shearimage.h b/krita/plugins/viewplugins/shearimage/dlg_shearimage.h index 183f166a..b5ed0e7f 100644 --- a/krita/plugins/viewplugins/shearimage/dlg_shearimage.h +++ b/krita/plugins/viewplugins/shearimage/dlg_shearimage.h @@ -27,17 +27,18 @@ class WdgShearImage; class DlgShearImage: public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - DlgShearImage(QWidget * parent = 0, + DlgShearImage(TQWidget * tqparent = 0, const char* name = 0); ~DlgShearImage(); - void setAngleX(Q_UINT32 w); - void setAngleY(Q_UINT32 w); - Q_INT32 angleX(); - Q_INT32 angleY(); + void setAngleX(TQ_UINT32 w); + void setAngleY(TQ_UINT32 w); + TQ_INT32 angleX(); + TQ_INT32 angleY(); private slots: diff --git a/krita/plugins/viewplugins/shearimage/shearimage.cc b/krita/plugins/viewplugins/shearimage/shearimage.cc index d8c839ce..83792762 100644 --- a/krita/plugins/viewplugins/shearimage/shearimage.cc +++ b/krita/plugins/viewplugins/shearimage/shearimage.cc @@ -23,8 +23,8 @@ #include <stdlib.h> -#include <qslider.h> -#include <qpoint.h> +#include <tqslider.h> +#include <tqpoint.h> #include <klocale.h> #include <kiconloader.h> @@ -51,18 +51,18 @@ typedef KGenericFactory<ShearImage> ShearImageFactory; K_EXPORT_COMPONENT_FACTORY( kritashearimage, ShearImageFactory( "krita" ) ) // XXX: this plugin could also provide layer scaling/resizing -ShearImage::ShearImage(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ShearImage::ShearImage(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { - if ( parent->inherits("KisView") ) + if ( tqparent->inherits("KisView") ) { setInstance(ShearImageFactory::instance()); setXMLFile(locate("data","kritaplugins/shearimage.rc"), true); - (void) new KAction(i18n("&Shear Image..."), 0, 0, this, SLOT(slotShearImage()), actionCollection(), "shearimage"); - (void) new KAction(i18n("&Shear Layer..."), 0, 0, this, SLOT(slotShearLayer()), actionCollection(), "shearlayer"); + (void) new KAction(i18n("&Shear Image..."), 0, 0, this, TQT_SLOT(slotShearImage()), actionCollection(), "shearimage"); + (void) new KAction(i18n("&Shear Layer..."), 0, 0, this, TQT_SLOT(slotShearLayer()), actionCollection(), "shearlayer"); - m_view = (KisView*) parent; + m_view = (KisView*) tqparent; } } @@ -82,9 +82,9 @@ void ShearImage::slotShearImage() dlgShearImage->setCaption(i18n("Shear Image")); - if (dlgShearImage->exec() == QDialog::Accepted) { - Q_INT32 angleX = dlgShearImage->angleX(); - Q_INT32 angleY = dlgShearImage->angleY(); + if (dlgShearImage->exec() == TQDialog::Accepted) { + TQ_INT32 angleX = dlgShearImage->angleX(); + TQ_INT32 angleY = dlgShearImage->angleY(); m_view->shearCurrentImage(angleX, angleY); } delete dlgShearImage; @@ -101,9 +101,9 @@ void ShearImage::slotShearLayer() dlgShearImage->setCaption(i18n("Shear Layer")); - if (dlgShearImage->exec() == QDialog::Accepted) { - Q_INT32 angleX = dlgShearImage->angleX(); - Q_INT32 angleY = dlgShearImage->angleY(); + if (dlgShearImage->exec() == TQDialog::Accepted) { + TQ_INT32 angleX = dlgShearImage->angleX(); + TQ_INT32 angleY = dlgShearImage->angleY(); m_view->shearLayer(angleX, angleY); } diff --git a/krita/plugins/viewplugins/shearimage/shearimage.h b/krita/plugins/viewplugins/shearimage/shearimage.h index bfff2ac2..73ee8908 100644 --- a/krita/plugins/viewplugins/shearimage/shearimage.h +++ b/krita/plugins/viewplugins/shearimage/shearimage.h @@ -27,8 +27,9 @@ class KisView; class ShearImage : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ShearImage(QObject *parent, const char *name, const QStringList &); + ShearImage(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ShearImage(); private slots: diff --git a/krita/plugins/viewplugins/shearimage/wdg_shearimage.ui b/krita/plugins/viewplugins/shearimage/wdg_shearimage.ui index 20de0b6b..d63b58f5 100644 --- a/krita/plugins/viewplugins/shearimage/wdg_shearimage.ui +++ b/krita/plugins/viewplugins/shearimage/wdg_shearimage.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WdgShearImage</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WdgShearImage</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>grpPixelDimensions</cstring> </property> @@ -44,7 +44,7 @@ <string>°</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>lblShearAngelY</cstring> </property> @@ -56,7 +56,7 @@ <property name="name"> <cstring>shearAngleY</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>100</height> @@ -72,7 +72,7 @@ <string>°</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>lblShearAngleX</cstring> </property> @@ -92,7 +92,7 @@ <tabstops> <tabstop>shearAngleX</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint> |