diff options
Diffstat (limited to 'krita/plugins/viewplugins/separate_channels')
7 files changed, 62 insertions, 59 deletions
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 <qradiobutton.h> -#include <qcheckbox.h> -#include <qbuttongroup.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qbutton.h> +#include <tqradiobutton.h> +#include <tqcheckbox.h> +#include <tqbuttongroup.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqbutton.h> #include <klocale.h> #include <knuminput.h> @@ -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<KisChannelInfo *> channels = srcCs->channels(); + TQValueVector<KisChannelInfo *> channels = srcCs->channels(); // Use the flattened image, if required switch(sourceOps) { @@ -99,15 +99,15 @@ void KisChannelSeparator::separate(KisProgressDisplayInterface * progress, enumS vKisPaintDeviceSP layers; - QValueVector<KisChannelInfo *>::const_iterator begin = channels.begin(); - QValueVector<KisChannelInfo *>::const_iterator end = channels.end(); + TQValueVector<KisChannelInfo *>::const_iterator begin = channels.begin(); + TQValueVector<KisChannelInfo *>::const_iterator end = channels.end(); - QRect rect = src->exactBounds(); + TQRect rect = src->exactBounds(); int i = 0; - Q_UINT32 channelIndex = 0; - for (QValueVector<KisChannelInfo *>::const_iterator it = begin; it != end; ++it, ++channelIndex) + TQ_UINT32 channelIndex = 0; + for (TQValueVector<KisChannelInfo *>::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<KisChannelInfo *>::const_iterator it = begin; it != end; ++it) + for (TQValueVector<KisChannelInfo *>::const_iterator it = begin; it != end; ++it) { KisChannelInfo * ch = (*it); @@ -253,10 +253,10 @@ void KisChannelSeparator::separate(KisProgressDisplayInterface * progress, enumS image->addLayer( dynamic_cast<KisLayer*>(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<KisSeparateChannelsPlugin>( "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<KisSeparateChannelsPlugin>::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 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WdgSeparations</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WdgSeparations</cstring> </property> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="4" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>chkColors</cstring> </property> @@ -24,7 +24,7 @@ <string>Output to color, not grayscale</string> </property> </widget> - <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>chkDownscale</cstring> </property> @@ -32,7 +32,7 @@ <string>Downscale to 8-bit before separating</string> </property> </widget> - <widget class="QButtonGroup" row="2" column="0" rowspan="1" colspan="3"> + <widget class="TQButtonGroup" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>grpAlpha</cstring> </property> @@ -43,7 +43,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioCopyAlpha</cstring> </property> @@ -51,7 +51,7 @@ <string>Copy alpha channel to each separated channel as an alpha channel</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioDiscardAlpha</cstring> </property> @@ -62,7 +62,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioSeparateAlpha</cstring> </property> @@ -82,14 +82,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> </size> </property> </spacer> - <widget class="QButtonGroup" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQButtonGroup" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>grpSource</cstring> </property> @@ -100,7 +100,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>radioCurrentLayer</cstring> </property> @@ -111,7 +111,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>radioAllLayers</cstring> </property> @@ -121,7 +121,7 @@ </widget> </grid> </widget> - <widget class="QButtonGroup" row="1" column="2"> + <widget class="TQButtonGroup" row="1" column="2"> <property name="name"> <cstring>grpOutput</cstring> </property> @@ -132,7 +132,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioLayers</cstring> </property> @@ -143,7 +143,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioImages</cstring> </property> @@ -153,7 +153,7 @@ </widget> </vbox> </widget> - <widget class="QLabel" row="0" column="1" rowspan="1" colspan="2"> + <widget class="TQLabel" row="0" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>lblColormodel</cstring> </property> @@ -161,7 +161,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -178,5 +178,5 @@ <tabstop>chkDownscale</tabstop> <tabstop>chkColors</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> |