diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-18 06:46:40 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-18 06:46:40 +0000 |
commit | 7c19562ad065b6729bac8eb9b40dfe0452a72272 (patch) | |
tree | 33325d1e02ecc9ca614c7209296f8f796a1c3478 /kipi-plugins/metadataedit/iptccategories.cpp | |
parent | a65baa328fac0a1ce12971fef8d998ce7bfbe237 (diff) | |
download | kipi-plugins-7c19562ad065b6729bac8eb9b40dfe0452a72272.tar.gz kipi-plugins-7c19562ad065b6729bac8eb9b40dfe0452a72272.zip |
TQt4 port kipi-plugins
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/libraries/kipi-plugins@1232561 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kipi-plugins/metadataedit/iptccategories.cpp')
-rw-r--r-- | kipi-plugins/metadataedit/iptccategories.cpp | 150 |
1 files changed, 75 insertions, 75 deletions
diff --git a/kipi-plugins/metadataedit/iptccategories.cpp b/kipi-plugins/metadataedit/iptccategories.cpp index 1172663..48ef08d 100644 --- a/kipi-plugins/metadataedit/iptccategories.cpp +++ b/kipi-plugins/metadataedit/iptccategories.cpp @@ -22,12 +22,12 @@ // QT includes. -#include <qlayout.h> -#include <qlabel.h> -#include <qwhatsthis.h> -#include <qvalidator.h> -#include <qcheckbox.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqwhatsthis.h> +#include <tqvalidator.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> // KDE includes. @@ -65,13 +65,13 @@ public: subCategoryEdit = 0; } - QStringList oldSubCategories; + TQStringList oldSubCategories; - QPushButton *addSubCategoryButton; - QPushButton *delSubCategoryButton; + TQPushButton *addSubCategoryButton; + TQPushButton *delSubCategoryButton; - QCheckBox *subCategoriesCheck; - QCheckBox *categoryCheck; + TQCheckBox *subCategoriesCheck; + TQCheckBox *categoryCheck; KLineEdit *categoryEdit; KLineEdit *subCategoryEdit; @@ -79,39 +79,39 @@ public: KListBox *subCategoriesBox; }; -IPTCCategories::IPTCCategories(QWidget* parent) - : QWidget(parent) +IPTCCategories::IPTCCategories(TQWidget* tqparent) + : TQWidget(tqparent) { d = new IPTCCategoriesPriv; - QGridLayout *grid = new QGridLayout(parent, 6, 1, 0, KDialog::spacingHint()); - grid->setAlignment( Qt::AlignTop ); + TQGridLayout *grid = new TQGridLayout(tqparent, 6, 1, 0, KDialog::spacingHint()); + grid->tqsetAlignment( TQt::AlignTop ); // IPTC only accept printable Ascii char. - QRegExp asciiRx("[\x20-\x7F]+$"); - QValidator *asciiValidator = new QRegExpValidator(asciiRx, this); + TQRegExp asciiRx("[\x20-\x7F]+$"); + TQValidator *asciiValidator = new TQRegExpValidator(asciiRx, TQT_TQOBJECT(this)); // -------------------------------------------------------- - d->categoryCheck = new QCheckBox(i18n("Identify subject of content (3 chars max):"), parent); - d->categoryEdit = new KLineEdit(parent); + d->categoryCheck = new TQCheckBox(i18n("Identify subject of content (3 chars max):"), tqparent); + d->categoryEdit = new KLineEdit(tqparent); d->categoryEdit->setValidator(asciiValidator); d->categoryEdit->setMaxLength(3); - QWhatsThis::add(d->categoryEdit, i18n("<p>Set here the category of content. This field is limited " + TQWhatsThis::add(d->categoryEdit, i18n("<p>Set here the category of content. This field is limited " "to 3 ASCII characters.")); - d->subCategoriesCheck = new QCheckBox(i18n("Supplemental categories:"), parent); + d->subCategoriesCheck = new TQCheckBox(i18n("Supplemental categories:"), tqparent); - d->subCategoryEdit = new KLineEdit(parent); + d->subCategoryEdit = new KLineEdit(tqparent); d->subCategoryEdit->setValidator(asciiValidator); d->subCategoryEdit->setMaxLength(32); - QWhatsThis::add(d->subCategoryEdit, i18n("<p>Enter here a new supplemental category of content. " + TQWhatsThis::add(d->subCategoryEdit, i18n("<p>Enter here a new supplemental category of content. " "This field is limited to 32 ASCII characters.")); - d->subCategoriesBox = new KListBox(parent); - d->subCategoriesBox->setVScrollBarMode(QScrollView::AlwaysOn); + d->subCategoriesBox = new KListBox(tqparent); + d->subCategoriesBox->setVScrollBarMode(TQScrollView::AlwaysOn); - d->addSubCategoryButton = new QPushButton( i18n("&Add"), parent); - d->delSubCategoryButton = new QPushButton( i18n("&Delete"), parent); + d->addSubCategoryButton = new TQPushButton( i18n("&Add"), tqparent); + d->delSubCategoryButton = new TQPushButton( i18n("&Delete"), tqparent); d->addSubCategoryButton->setIconSet(SmallIcon("add")); d->delSubCategoryButton->setIconSet(SmallIcon("remove")); d->delSubCategoryButton->setEnabled(false); @@ -131,7 +131,7 @@ IPTCCategories::IPTCCategories(QWidget* parent) "text tags only support the printable " "<b><a href='http://en.wikipedia.org/wiki/Ascii'>ASCII</a></b> " "characters set and limit strings size. " - "Use contextual help for details.</b>"), parent); + "Use contextual help for details.</b>"), tqparent); note->setMaximumWidth(150); grid->addMultiCellWidget(note, 5, 5, 1, 1); @@ -140,68 +140,68 @@ IPTCCategories::IPTCCategories(QWidget* parent) // -------------------------------------------------------- - connect(d->categoryCheck, SIGNAL(toggled(bool)), - d->categoryEdit, SLOT(setEnabled(bool))); + connect(d->categoryCheck, TQT_SIGNAL(toggled(bool)), + d->categoryEdit, TQT_SLOT(setEnabled(bool))); - connect(d->categoryCheck, SIGNAL(toggled(bool)), - d->subCategoriesBox, SLOT(setEnabled(bool))); + connect(d->categoryCheck, TQT_SIGNAL(toggled(bool)), + d->subCategoriesBox, TQT_SLOT(setEnabled(bool))); - connect(d->categoryCheck, SIGNAL(toggled(bool)), - d->subCategoriesCheck, SLOT(setEnabled(bool))); + connect(d->categoryCheck, TQT_SIGNAL(toggled(bool)), + d->subCategoriesCheck, TQT_SLOT(setEnabled(bool))); - connect(d->categoryCheck, SIGNAL(toggled(bool)), - d->subCategoryEdit, SLOT(setEnabled(bool))); + connect(d->categoryCheck, TQT_SIGNAL(toggled(bool)), + d->subCategoryEdit, TQT_SLOT(setEnabled(bool))); - connect(d->categoryCheck, SIGNAL(toggled(bool)), - d->subCategoriesBox, SLOT(setEnabled(bool))); + connect(d->categoryCheck, TQT_SIGNAL(toggled(bool)), + d->subCategoriesBox, TQT_SLOT(setEnabled(bool))); - connect(d->categoryCheck, SIGNAL(toggled(bool)), - d->addSubCategoryButton, SLOT(setEnabled(bool))); + connect(d->categoryCheck, TQT_SIGNAL(toggled(bool)), + d->addSubCategoryButton, TQT_SLOT(setEnabled(bool))); - connect(d->categoryCheck, SIGNAL(toggled(bool)), - d->delSubCategoryButton, SLOT(setEnabled(bool))); + connect(d->categoryCheck, TQT_SIGNAL(toggled(bool)), + d->delSubCategoryButton, TQT_SLOT(setEnabled(bool))); // -------------------------------------------------------- - connect(d->subCategoriesCheck, SIGNAL(toggled(bool)), - d->subCategoryEdit, SLOT(setEnabled(bool))); + connect(d->subCategoriesCheck, TQT_SIGNAL(toggled(bool)), + d->subCategoryEdit, TQT_SLOT(setEnabled(bool))); - connect(d->subCategoriesCheck, SIGNAL(toggled(bool)), - d->subCategoriesBox, SLOT(setEnabled(bool))); + connect(d->subCategoriesCheck, TQT_SIGNAL(toggled(bool)), + d->subCategoriesBox, TQT_SLOT(setEnabled(bool))); - connect(d->subCategoriesCheck, SIGNAL(toggled(bool)), - d->addSubCategoryButton, SLOT(setEnabled(bool))); + connect(d->subCategoriesCheck, TQT_SIGNAL(toggled(bool)), + d->addSubCategoryButton, TQT_SLOT(setEnabled(bool))); - connect(d->subCategoriesCheck, SIGNAL(toggled(bool)), - d->delSubCategoryButton, SLOT(setEnabled(bool))); + connect(d->subCategoriesCheck, TQT_SIGNAL(toggled(bool)), + d->delSubCategoryButton, TQT_SLOT(setEnabled(bool))); // -------------------------------------------------------- - connect(d->subCategoriesBox, SIGNAL(selectionChanged()), - this, SLOT(slotCategorySelectionChanged())); + connect(d->subCategoriesBox, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(slotCategorySelectionChanged())); - connect(d->addSubCategoryButton, SIGNAL(clicked()), - this, SLOT(slotAddCategory())); + connect(d->addSubCategoryButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddCategory())); - connect(d->delSubCategoryButton, SIGNAL(clicked()), - this, SLOT(slotDelCategory())); + connect(d->delSubCategoryButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDelCategory())); // -------------------------------------------------------- - connect(d->categoryCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->categoryCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->subCategoriesCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->subCategoriesCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->addSubCategoryButton, SIGNAL(clicked()), - this, SIGNAL(signalModified())); + connect(d->addSubCategoryButton, TQT_SIGNAL(clicked()), + this, TQT_SIGNAL(signalModified())); - connect(d->delSubCategoryButton, SIGNAL(clicked()), - this, SIGNAL(signalModified())); + connect(d->delSubCategoryButton, TQT_SIGNAL(clicked()), + this, TQT_SIGNAL(signalModified())); - connect(d->categoryEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalModified())); + connect(d->categoryEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalModified())); } IPTCCategories::~IPTCCategories() @@ -215,7 +215,7 @@ void IPTCCategories::slotDelCategory() if (index == -1) return; - QListBoxItem* item = d->subCategoriesBox->item(index); + TQListBoxItem* item = d->subCategoriesBox->item(index); if (!item) return; delete item; } @@ -230,11 +230,11 @@ void IPTCCategories::slotCategorySelectionChanged() void IPTCCategories::slotAddCategory() { - QString newCategory = d->subCategoryEdit->text(); + TQString newCategory = d->subCategoryEdit->text(); if (newCategory.isEmpty()) return; bool found = false; - for (QListBoxItem *item = d->subCategoriesBox->firstItem(); + for (TQListBoxItem *item = d->subCategoriesBox->firstItem(); item; item = item->next()) { if (newCategory == item->text()) @@ -248,12 +248,12 @@ void IPTCCategories::slotAddCategory() d->subCategoriesBox->insertItem(newCategory); } -void IPTCCategories::readMetadata(QByteArray& iptcData) +void IPTCCategories::readMetadata(TQByteArray& iptcData) { blockSignals(true); KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setIptc(iptcData); - QString data; + TQString data; d->categoryEdit->clear(); d->categoryCheck->setChecked(false); @@ -282,9 +282,9 @@ void IPTCCategories::readMetadata(QByteArray& iptcData) blockSignals(false); } -void IPTCCategories::applyMetadata(QByteArray& iptcData) +void IPTCCategories::applyMetadata(TQByteArray& iptcData) { - QStringList newCategories; + TQStringList newCategories; KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setIptc(iptcData); @@ -293,14 +293,14 @@ void IPTCCategories::applyMetadata(QByteArray& iptcData) else exiv2Iface.removeIptcTag("Iptc.Application2.Category"); - for (QListBoxItem *item = d->subCategoriesBox->firstItem(); + for (TQListBoxItem *item = d->subCategoriesBox->firstItem(); item; item = item->next()) newCategories.append(item->text()); if (d->categoryCheck->isChecked() && d->subCategoriesCheck->isChecked()) exiv2Iface.setImageSubCategories(d->oldSubCategories, newCategories); else - exiv2Iface.setImageSubCategories(d->oldSubCategories, QStringList()); + exiv2Iface.setImageSubCategories(d->oldSubCategories, TQStringList()); iptcData = exiv2Iface.getIptc(); } |