From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: 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 --- .../modify_selection/dlg_border_selection.cc | 20 ++++++------ .../modify_selection/dlg_border_selection.h | 7 +++-- .../modify_selection/dlg_grow_selection.cc | 20 ++++++------ .../modify_selection/dlg_grow_selection.h | 7 +++-- .../modify_selection/dlg_shrink_selection.cc | 20 ++++++------ .../modify_selection/dlg_shrink_selection.h | 7 +++-- .../modify_selection/modify_selection.cc | 36 +++++++++++----------- .../modify_selection/modify_selection.h | 3 +- .../modify_selection/wdg_border_selection.ui | 10 +++--- .../modify_selection/wdg_grow_selection.ui | 10 +++--- .../modify_selection/wdg_shrink_selection.ui | 12 ++++---- 11 files changed, 78 insertions(+), 74 deletions(-) (limited to 'krita/plugins/viewplugins/modify_selection') diff --git a/krita/plugins/viewplugins/modify_selection/dlg_border_selection.cc b/krita/plugins/viewplugins/modify_selection/dlg_border_selection.cc index 748c5b9b..134610d6 100644 --- a/krita/plugins/viewplugins/modify_selection/dlg_border_selection.cc +++ b/krita/plugins/viewplugins/modify_selection/dlg_border_selection.cc @@ -26,11 +26,11 @@ using namespace std; -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -39,15 +39,15 @@ using namespace std; #include "dlg_border_selection.h" #include "wdg_border_selection.h" -DlgBorderSelection::DlgBorderSelection( QWidget * parent, const char * name) : super (parent, name, true, i18n("Border Selection"), Ok | Cancel, Ok) +DlgBorderSelection::DlgBorderSelection( TQWidget * tqparent, const char * name) : super (tqparent, name, true, i18n("Border Selection"), Ok | Cancel, Ok) { m_page = new WdgBorderSelection(this, "border_selection"); 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())); } DlgBorderSelection::~DlgBorderSelection() @@ -55,12 +55,12 @@ DlgBorderSelection::~DlgBorderSelection() delete m_page; } -Q_INT32 DlgBorderSelection::xradius() +TQ_INT32 DlgBorderSelection::xradius() { return m_page->radiusSpinBox->value(); } -Q_INT32 DlgBorderSelection::yradius() +TQ_INT32 DlgBorderSelection::yradius() { return m_page->radiusSpinBox->value(); } diff --git a/krita/plugins/viewplugins/modify_selection/dlg_border_selection.h b/krita/plugins/viewplugins/modify_selection/dlg_border_selection.h index baf716d4..b3d5a94d 100644 --- a/krita/plugins/viewplugins/modify_selection/dlg_border_selection.h +++ b/krita/plugins/viewplugins/modify_selection/dlg_border_selection.h @@ -27,14 +27,15 @@ class WdgBorderSelection; class DlgBorderSelection: public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - DlgBorderSelection(QWidget * parent = 0, const char* name = 0); + DlgBorderSelection(TQWidget * tqparent = 0, const char* name = 0); ~DlgBorderSelection(); - Q_INT32 xradius(); - Q_INT32 yradius(); + TQ_INT32 xradius(); + TQ_INT32 yradius(); private slots: diff --git a/krita/plugins/viewplugins/modify_selection/dlg_grow_selection.cc b/krita/plugins/viewplugins/modify_selection/dlg_grow_selection.cc index 82055aeb..b73acc69 100644 --- a/krita/plugins/viewplugins/modify_selection/dlg_grow_selection.cc +++ b/krita/plugins/viewplugins/modify_selection/dlg_grow_selection.cc @@ -26,11 +26,11 @@ using namespace std; -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -39,15 +39,15 @@ using namespace std; #include "dlg_grow_selection.h" #include "wdg_grow_selection.h" -DlgGrowSelection::DlgGrowSelection( QWidget * parent, const char * name) : super (parent, name, true, i18n("Grow Selection"), Ok | Cancel, Ok) +DlgGrowSelection::DlgGrowSelection( TQWidget * tqparent, const char * name) : super (tqparent, name, true, i18n("Grow Selection"), Ok | Cancel, Ok) { m_page = new WdgGrowSelection(this, "grow_selection"); 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())); } DlgGrowSelection::~DlgGrowSelection() @@ -55,12 +55,12 @@ DlgGrowSelection::~DlgGrowSelection() delete m_page; } -Q_INT32 DlgGrowSelection::xradius() +TQ_INT32 DlgGrowSelection::xradius() { return m_page->radiusSpinBox->value(); } -Q_INT32 DlgGrowSelection::yradius() +TQ_INT32 DlgGrowSelection::yradius() { return m_page->radiusSpinBox->value(); } diff --git a/krita/plugins/viewplugins/modify_selection/dlg_grow_selection.h b/krita/plugins/viewplugins/modify_selection/dlg_grow_selection.h index f5cd36ff..bb2a8ab0 100644 --- a/krita/plugins/viewplugins/modify_selection/dlg_grow_selection.h +++ b/krita/plugins/viewplugins/modify_selection/dlg_grow_selection.h @@ -27,14 +27,15 @@ class WdgGrowSelection; class DlgGrowSelection: public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - DlgGrowSelection(QWidget * parent = 0, const char* name = 0); + DlgGrowSelection(TQWidget * tqparent = 0, const char* name = 0); ~DlgGrowSelection(); - Q_INT32 xradius(); - Q_INT32 yradius(); + TQ_INT32 xradius(); + TQ_INT32 yradius(); private slots: diff --git a/krita/plugins/viewplugins/modify_selection/dlg_shrink_selection.cc b/krita/plugins/viewplugins/modify_selection/dlg_shrink_selection.cc index 69e31d1d..2a952816 100644 --- a/krita/plugins/viewplugins/modify_selection/dlg_shrink_selection.cc +++ b/krita/plugins/viewplugins/modify_selection/dlg_shrink_selection.cc @@ -26,11 +26,11 @@ using namespace std; -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -39,15 +39,15 @@ using namespace std; #include "dlg_shrink_selection.h" #include "wdg_shrink_selection.h" -DlgShrinkSelection::DlgShrinkSelection( QWidget * parent, const char * name) : super (parent, name, true, i18n("Shrink Selection"), Ok | Cancel, Ok) +DlgShrinkSelection::DlgShrinkSelection( TQWidget * tqparent, const char * name) : super (tqparent, name, true, i18n("Shrink Selection"), Ok | Cancel, Ok) { m_page = new WdgShrinkSelection(this, "shrink_selection"); 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())); } DlgShrinkSelection::~DlgShrinkSelection() @@ -55,12 +55,12 @@ DlgShrinkSelection::~DlgShrinkSelection() delete m_page; } -Q_INT32 DlgShrinkSelection::xradius() +TQ_INT32 DlgShrinkSelection::xradius() { return m_page->radiusSpinBox->value(); } -Q_INT32 DlgShrinkSelection::yradius() +TQ_INT32 DlgShrinkSelection::yradius() { return m_page->radiusSpinBox->value(); } diff --git a/krita/plugins/viewplugins/modify_selection/dlg_shrink_selection.h b/krita/plugins/viewplugins/modify_selection/dlg_shrink_selection.h index e8e32f43..385d623a 100644 --- a/krita/plugins/viewplugins/modify_selection/dlg_shrink_selection.h +++ b/krita/plugins/viewplugins/modify_selection/dlg_shrink_selection.h @@ -27,14 +27,15 @@ class WdgShrinkSelection; class DlgShrinkSelection: public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - DlgShrinkSelection(QWidget * parent = 0, const char* name = 0); + DlgShrinkSelection(TQWidget * tqparent = 0, const char* name = 0); ~DlgShrinkSelection(); - Q_INT32 xradius(); - Q_INT32 yradius(); + TQ_INT32 xradius(); + TQ_INT32 yradius(); bool shrinkFromImageBorder(); private slots: diff --git a/krita/plugins/viewplugins/modify_selection/modify_selection.cc b/krita/plugins/viewplugins/modify_selection/modify_selection.cc index 6f2d0511..9ed5ba18 100644 --- a/krita/plugins/viewplugins/modify_selection/modify_selection.cc +++ b/krita/plugins/viewplugins/modify_selection/modify_selection.cc @@ -23,8 +23,8 @@ #include -#include -#include +#include +#include #include #include @@ -55,20 +55,20 @@ typedef KGenericFactory ModifySelectionFactory; K_EXPORT_COMPONENT_FACTORY( kritamodifyselection, ModifySelectionFactory( "krita" ) ) -ModifySelection::ModifySelection(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ModifySelection::ModifySelection(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { - if ( parent->inherits("KisView") ) + if ( tqparent->inherits("KisView") ) { setInstance(ModifySelectionFactory::instance()); setXMLFile(locate("data","kritaplugins/modify_selection.rc"), true); - m_view = (KisView*) parent; + m_view = (KisView*) tqparent; // Selection manager takes ownership? - KAction* a = new KAction(i18n("Grow Selection..."), 0, 0, this, SLOT(slotGrowSelection()), actionCollection(), "growselection"); - KAction* b = new KAction(i18n("Shrink Selection..."), 0, 0, this, SLOT(slotShrinkSelection()), actionCollection(), "shrinkselection"); - KAction* c = new KAction(i18n("Border Selection..."), 0, 0, this, SLOT(slotBorderSelection()), actionCollection(), "borderselection"); + KAction* a = new KAction(i18n("Grow Selection..."), 0, 0, this, TQT_SLOT(slotGrowSelection()), actionCollection(), "growselection"); + KAction* b = new KAction(i18n("Shrink Selection..."), 0, 0, this, TQT_SLOT(slotShrinkSelection()), actionCollection(), "shrinkselection"); + KAction* c = new KAction(i18n("Border Selection..."), 0, 0, this, TQT_SLOT(slotBorderSelection()), actionCollection(), "borderselection"); Q_CHECK_PTR(a); Q_CHECK_PTR(b); @@ -98,9 +98,9 @@ void ModifySelection::slotGrowSelection() KisConfig cfg; - if (dlgGrowSelection->exec() == QDialog::Accepted) { - Q_INT32 xradius = dlgGrowSelection->xradius(); - Q_INT32 yradius = dlgGrowSelection->yradius(); + if (dlgGrowSelection->exec() == TQDialog::Accepted) { + TQ_INT32 xradius = dlgGrowSelection->xradius(); + TQ_INT32 yradius = dlgGrowSelection->yradius(); m_view ->canvasSubject()-> selectionManager()->grow(xradius, yradius); } @@ -121,9 +121,9 @@ void ModifySelection::slotShrinkSelection() KisConfig cfg; - if (dlgShrinkSelection->exec() == QDialog::Accepted) { - Q_INT32 xradius = dlgShrinkSelection->xradius(); - Q_INT32 yradius = dlgShrinkSelection->yradius(); + if (dlgShrinkSelection->exec() == TQDialog::Accepted) { + TQ_INT32 xradius = dlgShrinkSelection->xradius(); + TQ_INT32 yradius = dlgShrinkSelection->yradius(); bool shrinkFromImageBorder = dlgShrinkSelection->shrinkFromImageBorder(); m_view ->canvasSubject()-> selectionManager()->shrink(xradius, yradius, shrinkFromImageBorder); @@ -145,9 +145,9 @@ void ModifySelection::slotBorderSelection() KisConfig cfg; - if (dlgBorderSelection->exec() == QDialog::Accepted) { - Q_INT32 xradius = dlgBorderSelection->xradius(); - Q_INT32 yradius = dlgBorderSelection->yradius(); + if (dlgBorderSelection->exec() == TQDialog::Accepted) { + TQ_INT32 xradius = dlgBorderSelection->xradius(); + TQ_INT32 yradius = dlgBorderSelection->yradius(); m_view ->canvasSubject()-> selectionManager()->border(xradius, yradius); } diff --git a/krita/plugins/viewplugins/modify_selection/modify_selection.h b/krita/plugins/viewplugins/modify_selection/modify_selection.h index d3677088..173ca400 100644 --- a/krita/plugins/viewplugins/modify_selection/modify_selection.h +++ b/krita/plugins/viewplugins/modify_selection/modify_selection.h @@ -27,8 +27,9 @@ class KisView; class ModifySelection : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ModifySelection(QObject *parent, const char *name, const QStringList &); + ModifySelection(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ModifySelection(); private slots: diff --git a/krita/plugins/viewplugins/modify_selection/wdg_border_selection.ui b/krita/plugins/viewplugins/modify_selection/wdg_border_selection.ui index 621685da..06d01e9f 100644 --- a/krita/plugins/viewplugins/modify_selection/wdg_border_selection.ui +++ b/krita/plugins/viewplugins/modify_selection/wdg_border_selection.ui @@ -1,6 +1,6 @@ WdgBorderSelection - + WdgBorderSelection @@ -16,7 +16,7 @@ unnamed - + textLabel1 @@ -24,7 +24,7 @@ Border selection by - + radiusSpinBox @@ -38,7 +38,7 @@ 1 - + pixels @@ -53,5 +53,5 @@ radiusSpinBox - + diff --git a/krita/plugins/viewplugins/modify_selection/wdg_grow_selection.ui b/krita/plugins/viewplugins/modify_selection/wdg_grow_selection.ui index d2eb12aa..d1180803 100644 --- a/krita/plugins/viewplugins/modify_selection/wdg_grow_selection.ui +++ b/krita/plugins/viewplugins/modify_selection/wdg_grow_selection.ui @@ -1,6 +1,6 @@ WdgGrowSelection - + WdgGrowSelection @@ -16,7 +16,7 @@ unnamed - + textLabel1 @@ -24,7 +24,7 @@ Grow selection by - + radiusSpinBox @@ -38,7 +38,7 @@ 1 - + pixels @@ -53,5 +53,5 @@ radiusSpinBox - + diff --git a/krita/plugins/viewplugins/modify_selection/wdg_shrink_selection.ui b/krita/plugins/viewplugins/modify_selection/wdg_shrink_selection.ui index 2896325f..28429d72 100644 --- a/krita/plugins/viewplugins/modify_selection/wdg_shrink_selection.ui +++ b/krita/plugins/viewplugins/modify_selection/wdg_shrink_selection.ui @@ -1,6 +1,6 @@ WdgShrinkSelection - + WdgShrinkSelection @@ -16,7 +16,7 @@ unnamed - + textLabel1 @@ -24,7 +24,7 @@ Shrink selection by - + radiusSpinBox @@ -38,7 +38,7 @@ 1 - + pixels @@ -48,7 +48,7 @@ comboBox1 - + shrinkFromImageBorderCheckBox @@ -64,5 +64,5 @@ radiusSpinBox - + -- cgit v1.2.1