diff options
Diffstat (limited to 'kipi-plugins/metadataedit/iptcsubjects.cpp')
-rw-r--r-- | kipi-plugins/metadataedit/iptcsubjects.cpp | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/kipi-plugins/metadataedit/iptcsubjects.cpp b/kipi-plugins/metadataedit/iptcsubjects.cpp index f1bb14c..11ad303 100644 --- a/kipi-plugins/metadataedit/iptcsubjects.cpp +++ b/kipi-plugins/metadataedit/iptcsubjects.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. @@ -63,44 +63,44 @@ public: subjectEdit = 0; } - QStringList oldSubjects; + TQStringList oldSubjects; - QPushButton *addSubjectButton; - QPushButton *delSubjectButton; + TQPushButton *addSubjectButton; + TQPushButton *delSubjectButton; - QCheckBox *subjectsCheck; + TQCheckBox *subjectsCheck; KLineEdit *subjectEdit; KListBox *subjectsBox; }; -IPTCSubjects::IPTCSubjects(QWidget* parent) - : QWidget(parent) +IPTCSubjects::IPTCSubjects(TQWidget* tqparent) + : TQWidget(tqparent) { d = new IPTCSubjectsPriv; - QGridLayout *grid = new QGridLayout(parent, 5, 2, 0, KDialog::spacingHint()); - grid->setAlignment( Qt::AlignTop ); + TQGridLayout *grid = new TQGridLayout(tqparent, 5, 2, 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->subjectsCheck = new QCheckBox(i18n("Use structured definition of the subject matter:"), parent); + d->subjectsCheck = new TQCheckBox(i18n("Use structured definition of the subject matter:"), tqparent); - d->subjectEdit = new KLineEdit(parent); + d->subjectEdit = new KLineEdit(tqparent); d->subjectEdit->setValidator(asciiValidator); d->subjectEdit->setMaxLength(236); - QWhatsThis::add(d->subjectEdit, i18n("<p>Enter here a new subject. " + TQWhatsThis::add(d->subjectEdit, i18n("<p>Enter here a new subject. " "This field is limited to 236 ASCII characters.")); - d->subjectsBox = new KListBox(parent); - d->subjectsBox->setVScrollBarMode(QScrollView::AlwaysOn); + d->subjectsBox = new KListBox(tqparent); + d->subjectsBox->setVScrollBarMode(TQScrollView::AlwaysOn); - d->addSubjectButton = new QPushButton( i18n("&Add"), parent); - d->delSubjectButton = new QPushButton( i18n("&Delete"), parent); + d->addSubjectButton = new TQPushButton( i18n("&Add"), tqparent); + d->delSubjectButton = new TQPushButton( i18n("&Delete"), tqparent); d->addSubjectButton->setIconSet(SmallIcon("add")); d->delSubjectButton->setIconSet(SmallIcon("remove")); d->delSubjectButton->setEnabled(false); @@ -118,7 +118,7 @@ IPTCSubjects::IPTCSubjects(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, 4, 4, 1, 1); @@ -127,39 +127,39 @@ IPTCSubjects::IPTCSubjects(QWidget* parent) // -------------------------------------------------------- - connect(d->subjectsBox, SIGNAL(selectionChanged()), - this, SLOT(slotSubjectSelectionChanged())); + connect(d->subjectsBox, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(slotSubjectSelectionChanged())); - connect(d->addSubjectButton, SIGNAL(clicked()), - this, SLOT(slotAddSubject())); + connect(d->addSubjectButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddSubject())); - connect(d->delSubjectButton, SIGNAL(clicked()), - this, SLOT(slotDelSubject())); + connect(d->delSubjectButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDelSubject())); // -------------------------------------------------------- - connect(d->subjectsCheck, SIGNAL(toggled(bool)), - d->subjectEdit, SLOT(setEnabled(bool))); + connect(d->subjectsCheck, TQT_SIGNAL(toggled(bool)), + d->subjectEdit, TQT_SLOT(setEnabled(bool))); - connect(d->subjectsCheck, SIGNAL(toggled(bool)), - d->subjectsBox, SLOT(setEnabled(bool))); + connect(d->subjectsCheck, TQT_SIGNAL(toggled(bool)), + d->subjectsBox, TQT_SLOT(setEnabled(bool))); - connect(d->subjectsCheck, SIGNAL(toggled(bool)), - d->addSubjectButton, SLOT(setEnabled(bool))); + connect(d->subjectsCheck, TQT_SIGNAL(toggled(bool)), + d->addSubjectButton, TQT_SLOT(setEnabled(bool))); - connect(d->subjectsCheck, SIGNAL(toggled(bool)), - d->delSubjectButton, SLOT(setEnabled(bool))); + connect(d->subjectsCheck, TQT_SIGNAL(toggled(bool)), + d->delSubjectButton, TQT_SLOT(setEnabled(bool))); // -------------------------------------------------------- - connect(d->subjectsCheck, SIGNAL(toggled(bool)), - this, SIGNAL(signalModified())); + connect(d->subjectsCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(signalModified())); - connect(d->addSubjectButton, SIGNAL(clicked()), - this, SIGNAL(signalModified())); + connect(d->addSubjectButton, TQT_SIGNAL(clicked()), + this, TQT_SIGNAL(signalModified())); - connect(d->delSubjectButton, SIGNAL(clicked()), - this, SIGNAL(signalModified())); + connect(d->delSubjectButton, TQT_SIGNAL(clicked()), + this, TQT_SIGNAL(signalModified())); } IPTCSubjects::~IPTCSubjects() @@ -173,7 +173,7 @@ void IPTCSubjects::slotDelSubject() if (index == -1) return; - QListBoxItem* item = d->subjectsBox->item(index); + TQListBoxItem* item = d->subjectsBox->item(index); if (!item) return; delete item; } @@ -188,11 +188,11 @@ void IPTCSubjects::slotSubjectSelectionChanged() void IPTCSubjects::slotAddSubject() { - QString newSubject = d->subjectEdit->text(); + TQString newSubject = d->subjectEdit->text(); if (newSubject.isEmpty()) return; bool found = false; - for (QListBoxItem *item = d->subjectsBox->firstItem(); + for (TQListBoxItem *item = d->subjectsBox->firstItem(); item; item = item->next()) { if (newSubject == item->text()) @@ -206,7 +206,7 @@ void IPTCSubjects::slotAddSubject() d->subjectsBox->insertItem(newSubject); } -void IPTCSubjects::readMetadata(QByteArray& iptcData) +void IPTCSubjects::readMetadata(TQByteArray& iptcData) { blockSignals(true); KExiv2Iface::KExiv2 exiv2Iface; @@ -228,20 +228,20 @@ void IPTCSubjects::readMetadata(QByteArray& iptcData) blockSignals(false); } -void IPTCSubjects::applyMetadata(QByteArray& iptcData) +void IPTCSubjects::applyMetadata(TQByteArray& iptcData) { KExiv2Iface::KExiv2 exiv2Iface; exiv2Iface.setIptc(iptcData); - QStringList newSubjects; + TQStringList newSubjects; - for (QListBoxItem *item = d->subjectsBox->firstItem(); + for (TQListBoxItem *item = d->subjectsBox->firstItem(); item; item = item->next()) newSubjects.append(item->text()); if (d->subjectsCheck->isChecked()) exiv2Iface.setImageSubjects(d->oldSubjects, newSubjects); else - exiv2Iface.setImageSubjects(d->oldSubjects, QStringList()); + exiv2Iface.setImageSubjects(d->oldSubjects, TQStringList()); iptcData = exiv2Iface.getIptc(); } |