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 --- .../viewplugins/separate_channels/dlg_separate.cc | 30 +++++++++---------- .../viewplugins/separate_channels/dlg_separate.h | 7 +++-- .../separate_channels/kis_channel_separator.cc | 34 +++++++++++----------- .../separate_channels/kis_channel_separator.h | 1 + .../kis_separate_channels_plugin.cc | 12 ++++---- .../kis_separate_channels_plugin.h | 3 +- .../separate_channels/wdg_separations.ui | 34 +++++++++++----------- 7 files changed, 62 insertions(+), 59 deletions(-) (limited to 'krita/plugins/viewplugins/separate_channels') diff --git a/krita/plugins/viewplugins/separate_channels/dlg_separate.cc b/krita/plugins/viewplugins/separate_channels/dlg_separate.cc index 760786ec..cb1d8322 100644 --- a/krita/plugins/viewplugins/separate_channels/dlg_separate.cc +++ b/krita/plugins/viewplugins/separate_channels/dlg_separate.cc @@ -18,12 +18,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -32,26 +32,26 @@ #include "dlg_separate.h" #include "wdg_separations.h" -DlgSeparate::DlgSeparate( const QString & imageCS, - const QString & layerCS, - QWidget * parent, +DlgSeparate::DlgSeparate( const TQString & imageCS, + const TQString & layerCS, + TQWidget * tqparent, const char * name) - : super (parent, name, true, i18n("Separate Image"), Ok | Cancel, Ok), + : super (tqparent, name, true, i18n("Separate Image"), Ok | Cancel, Ok), m_imageCS(imageCS), m_layerCS(layerCS) { m_page = new WdgSeparations(this, "separate_image"); Q_CHECK_PTR(m_page); setMainWidget(m_page); - resize(m_page->sizeHint()); + resize(m_page->tqsizeHint()); m_page->lblColormodel->setText(layerCS); m_page->grpOutput->hide(); - connect(m_page->grpSource, SIGNAL(clicked(int)), this, SLOT(slotSetColorSpaceLabel(int))); - connect(m_page->chkColors, SIGNAL(toggled(bool)), m_page->chkDownscale, SLOT(setDisabled(bool))); + connect(m_page->grpSource, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotSetColorSpaceLabel(int))); + connect(m_page->chkColors, TQT_SIGNAL(toggled(bool)), m_page->chkDownscale, TQT_SLOT(setDisabled(bool))); - connect(this, SIGNAL(okClicked()), - this, SLOT(okClicked())); + connect(this, TQT_SIGNAL(okClicked()), + this, TQT_SLOT(okClicked())); } DlgSeparate::~DlgSeparate() diff --git a/krita/plugins/viewplugins/separate_channels/dlg_separate.h b/krita/plugins/viewplugins/separate_channels/dlg_separate.h index 08432014..cf871566 100644 --- a/krita/plugins/viewplugins/separate_channels/dlg_separate.h +++ b/krita/plugins/viewplugins/separate_channels/dlg_separate.h @@ -32,10 +32,11 @@ class WdgSeparations; class DlgSeparate: public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - DlgSeparate(const QString & imageCS, const QString & layerCS, QWidget * parent = 0, + DlgSeparate(const TQString & imageCS, const TQString & layerCS, TQWidget * tqparent = 0, const char* name = 0); ~DlgSeparate(); @@ -59,8 +60,8 @@ private slots: private: WdgSeparations * m_page; - QString m_imageCS; - QString m_layerCS; + TQString m_imageCS; + TQString m_layerCS; }; diff --git a/krita/plugins/viewplugins/separate_channels/kis_channel_separator.cc b/krita/plugins/viewplugins/separate_channels/kis_channel_separator.cc index 75622312..3747f485 100644 --- a/krita/plugins/viewplugins/separate_channels/kis_channel_separator.cc +++ b/krita/plugins/viewplugins/separate_channels/kis_channel_separator.cc @@ -83,9 +83,9 @@ void KisChannelSeparator::separate(KisProgressDisplayInterface * progress, enumS KisColorSpace * dstCs = 0; - Q_UINT32 numberOfChannels = src->nChannels(); + TQ_UINT32 numberOfChannels = src->nChannels(); KisColorSpace * srcCs = src->colorSpace(); - QValueVector channels = srcCs->channels(); + TQValueVector channels = srcCs->channels(); // Use the flattened image, if required switch(sourceOps) { @@ -99,15 +99,15 @@ void KisChannelSeparator::separate(KisProgressDisplayInterface * progress, enumS vKisPaintDeviceSP layers; - QValueVector::const_iterator begin = channels.begin(); - QValueVector::const_iterator end = channels.end(); + TQValueVector::const_iterator begin = channels.begin(); + TQValueVector::const_iterator end = channels.end(); - QRect rect = src->exactBounds(); + TQRect rect = src->exactBounds(); int i = 0; - Q_UINT32 channelIndex = 0; - for (QValueVector::const_iterator it = begin; it != end; ++it, ++channelIndex) + TQ_UINT32 channelIndex = 0; + for (TQValueVector::const_iterator it = begin; it != end; ++it, ++channelIndex) { KisChannelInfo * ch = (*it); @@ -116,9 +116,9 @@ void KisChannelSeparator::separate(KisProgressDisplayInterface * progress, enumS continue; } - Q_INT32 channelSize = ch->size(); - Q_INT32 channelPos = ch->pos(); - Q_INT32 destSize = 1; + TQ_INT32 channelSize = ch->size(); + TQ_INT32 channelPos = ch->pos(); + TQ_INT32 destSize = 1; KisPaintDeviceSP dev; if (toColor) { @@ -139,7 +139,7 @@ void KisChannelSeparator::separate(KisProgressDisplayInterface * progress, enumS layers.push_back(dev); - for (Q_INT32 row = 0; row < rect.height(); ++row) { + for (TQ_INT32 row = 0; row < rect.height(); ++row) { KisHLineIteratorPixel srcIt = src->createHLineIterator(rect.x(), rect.y() + row, rect.width(), false); KisHLineIteratorPixel dstIt = dev->createHLineIterator(rect.x(), rect.y() + row, rect.width(), true); @@ -238,7 +238,7 @@ void KisChannelSeparator::separate(KisProgressDisplayInterface * progress, enumS break; } - for (QValueVector::const_iterator it = begin; it != end; ++it) + for (TQValueVector::const_iterator it = begin; it != end; ++it) { KisChannelInfo * ch = (*it); @@ -253,10 +253,10 @@ void KisChannelSeparator::separate(KisProgressDisplayInterface * progress, enumS image->addLayer( dynamic_cast(l.data()), image->rootLayer(), 0); } else { - QStringList listMimeFilter = KoFilterManager::mimeFilter("application/x-krita", KoFilterManager::Export); - QString mimelist = listMimeFilter.join(" "); + TQStringList listMimeFilter = KoFilterManager::mimeFilter("application/x-krita", KoFilterManager::Export); + TQString mimelist = listMimeFilter.join(" "); - KFileDialog fd (QString::null, mimelist, m_view, "Export Layer", true); + KFileDialog fd (TQString(), mimelist, m_view, "Export Layer", true); fd.setCaption(i18n("Export Layer") + "(" + ch->name() + ")"); fd.setMimeFilter(listMimeFilter); fd.setOperationMode(KFileDialog::Saving); @@ -264,13 +264,13 @@ void KisChannelSeparator::separate(KisProgressDisplayInterface * progress, enumS if (!fd.exec()) return; KURL url = fd.selectedURL(); - QString mimefilter = fd.currentMimeFilter(); + TQString mimefilter = fd.currentMimeFilter(); if (url.isEmpty()) return; KisPaintLayerSP l = new KisPaintLayer( image, ch->name(), OPACITY_OPAQUE, *deviceIt); - QRect r = l->exactBounds(); + TQRect r = l->exactBounds(); KisDoc d; d.prepareForImport(); diff --git a/krita/plugins/viewplugins/separate_channels/kis_channel_separator.h b/krita/plugins/viewplugins/separate_channels/kis_channel_separator.h index 0c0d80c9..d8bf777e 100644 --- a/krita/plugins/viewplugins/separate_channels/kis_channel_separator.h +++ b/krita/plugins/viewplugins/separate_channels/kis_channel_separator.h @@ -48,6 +48,7 @@ enum enumSepOutput { class KisChannelSeparator : public KisProgressSubject { Q_OBJECT + TQ_OBJECT public: diff --git a/krita/plugins/viewplugins/separate_channels/kis_separate_channels_plugin.cc b/krita/plugins/viewplugins/separate_channels/kis_separate_channels_plugin.cc index 4f7134f8..2edc9b36 100644 --- a/krita/plugins/viewplugins/separate_channels/kis_separate_channels_plugin.cc +++ b/krita/plugins/viewplugins/separate_channels/kis_separate_channels_plugin.cc @@ -39,15 +39,15 @@ K_EXPORT_COMPONENT_FACTORY( kritaseparatechannels, KGenericFactory( "krita" ) ) -KisSeparateChannelsPlugin::KisSeparateChannelsPlugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +KisSeparateChannelsPlugin::KisSeparateChannelsPlugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { - if ( parent->inherits("KisView") ) { + if ( tqparent->inherits("KisView") ) { setInstance(KGenericFactory::instance()); setXMLFile(locate("data","kritaplugins/imageseparate.rc"), true); - m_view = (KisView*) parent; - (void) new KAction(i18n("Separate Image..."), 0, 0, this, SLOT(slotSeparate()), actionCollection(), "separate"); + m_view = (KisView*) tqparent; + (void) new KAction(i18n("Separate Image..."), 0, 0, this, TQT_SLOT(slotSeparate()), actionCollection(), "separate"); } } @@ -77,7 +77,7 @@ void KisSeparateChannelsPlugin::slotSeparate() dlgSeparate->enableDownscale(false); } - if (dlgSeparate->exec() == QDialog::Accepted) { + if (dlgSeparate->exec() == TQDialog::Accepted) { KisChannelSeparator separator(m_view); separator.separate(m_view->canvasSubject()->progressDisplay(), diff --git a/krita/plugins/viewplugins/separate_channels/kis_separate_channels_plugin.h b/krita/plugins/viewplugins/separate_channels/kis_separate_channels_plugin.h index a4a4fd61..0c62dcaf 100644 --- a/krita/plugins/viewplugins/separate_channels/kis_separate_channels_plugin.h +++ b/krita/plugins/viewplugins/separate_channels/kis_separate_channels_plugin.h @@ -29,8 +29,9 @@ class KisView; class KisSeparateChannelsPlugin : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - KisSeparateChannelsPlugin(QObject *parent, const char *name, const QStringList &); + KisSeparateChannelsPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KisSeparateChannelsPlugin(); private slots: diff --git a/krita/plugins/viewplugins/separate_channels/wdg_separations.ui b/krita/plugins/viewplugins/separate_channels/wdg_separations.ui index 6c7a8cf7..0593258b 100644 --- a/krita/plugins/viewplugins/separate_channels/wdg_separations.ui +++ b/krita/plugins/viewplugins/separate_channels/wdg_separations.ui @@ -1,6 +1,6 @@ WdgSeparations - + WdgSeparations @@ -16,7 +16,7 @@ unnamed - + chkColors @@ -24,7 +24,7 @@ Output to color, not grayscale - + chkDownscale @@ -32,7 +32,7 @@ Downscale to 8-bit before separating - + grpAlpha @@ -43,7 +43,7 @@ unnamed - + radioCopyAlpha @@ -51,7 +51,7 @@ Copy alpha channel to each separated channel as an alpha channel - + radioDiscardAlpha @@ -62,7 +62,7 @@ true - + radioSeparateAlpha @@ -82,14 +82,14 @@ Expanding - + 20 16 - + grpSource @@ -100,7 +100,7 @@ unnamed - + radioCurrentLayer @@ -111,7 +111,7 @@ true - + radioAllLayers @@ -121,7 +121,7 @@ - + grpOutput @@ -132,7 +132,7 @@ unnamed - + radioLayers @@ -143,7 +143,7 @@ true - + radioImages @@ -153,7 +153,7 @@ - + lblColormodel @@ -161,7 +161,7 @@ - + textLabel1 @@ -178,5 +178,5 @@ chkDownscale chkColors - + -- cgit v1.2.1