diff options
Diffstat (limited to 'kipi-plugins/htmlexport/wizard.cpp')
-rw-r--r-- | kipi-plugins/htmlexport/wizard.cpp | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/kipi-plugins/htmlexport/wizard.cpp b/kipi-plugins/htmlexport/wizard.cpp index 3f8660b..6833f4c 100644 --- a/kipi-plugins/htmlexport/wizard.cpp +++ b/kipi-plugins/htmlexport/wizard.cpp @@ -21,16 +21,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA // Self #include "wizard.moc" -// Qt -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qdir.h> -#include <qfileinfo.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qobjectlist.h> -#include <qpainter.h> -#include <qspinbox.h> +// TQt +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqdir.h> +#include <tqfileinfo.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqobjectlist.h> +#include <tqpainter.h> +#include <tqspinbox.h> // KDE #include <kconfigdialogmanager.h> @@ -63,10 +63,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA namespace KIPIHTMLExport { -class ThemeListBoxItem : public QListBoxText { +class ThemeListBoxItem : public TQListBoxText { public: - ThemeListBoxItem(QListBox* list, Theme::Ptr theme) - : QListBoxText(list, theme->name()) + ThemeListBoxItem(TQListBox* list, Theme::Ptr theme) + : TQListBoxText(list, theme->name()) , mTheme(theme) {} @@ -84,7 +84,7 @@ struct Wizard::Private { ImageSettingsPage* mImageSettingsPage; OutputPage* mOutputPage; KIPIPlugins::KPAboutData* mAbout; - QMap<QCString, QWidget*> mThemeParameterWidgetFromName; + TQMap<TQCString, TQWidget*> mThemeParameterWidgetFromName; void initThemePage() { KListBox* listBox=mThemePage->mThemeList; @@ -101,72 +101,72 @@ struct Wizard::Private { void fillThemeParametersPage(Theme::Ptr theme) { // Delete any previous widgets - QFrame* content = mThemeParametersPage->content; - if (content->layout()) { + TQFrame* content = mThemeParametersPage->content; + if (content->tqlayout()) { // Setting recursiveSearch to false is very important, if we don't // we will end up deleting subwidgets of our child widgets - QObjectList* list = content->queryList("QWidget", 0 /*objName*/, + TQObjectList* list = content->queryList(TQWIDGET_OBJECT_NAME_STRING, 0 /*objName*/, false /*regexpMatch*/, false /*recursiveSearch*/); - QObjectListIterator it(*list); + TQObjectListIterator it(*list); for( ; it.current(); ++it) { delete it.current(); } - delete content->layout(); + delete content->tqlayout(); } mThemeParameterWidgetFromName.clear(); - // Create layout. We need to recreate it everytime, to get rid of + // Create tqlayout. We need to recreate it everytime, to get rid of // spacers - QGridLayout* layout = new QGridLayout(content, 0, 3); - layout->setSpacing(KDialog::spacingHint()); + TQGridLayout* tqlayout = new TQGridLayout(content, 0, 3); + tqlayout->setSpacing(KDialog::spacingHint()); // Create widgets Theme::ParameterList parameterList = theme->parameterList(); - QString themeInternalName = theme->internalName(); + TQString themeInternalName = theme->internalName(); Theme::ParameterList::ConstIterator it = parameterList.begin(), end = parameterList.end(); for (; it!=end; ++it) { AbstractThemeParameter* themeParameter = *it; - QCString internalName = themeParameter->internalName(); - QString value = mInfo->getThemeParameterValue( + TQCString internalName = themeParameter->internalName(); + TQString value = mInfo->getThemeParameterValue( themeInternalName, internalName, themeParameter->defaultValue()); - QString name = themeParameter->name(); - name = i18n("'%1' is a label for a theme parameter", "%1:").arg(name); + TQString name = themeParameter->name(); + name = i18n("'%1' is a label for a theme parameter", "%1:").tqarg(name); - QLabel* label = new QLabel(name, content); - QWidget* widget = themeParameter->createWidget(content, value); + TQLabel* label = new TQLabel(name, content); + TQWidget* widget = themeParameter->createWidget(content, value); label->setBuddy(widget); - int row = layout->numRows(); - layout->addWidget(label, row, 0); + int row = tqlayout->numRows(); + tqlayout->addWidget(label, row, 0); - if (widget->sizePolicy().expanding() & QSizePolicy::Horizontally) { + if (widget->tqsizePolicy().expanding() & TQSizePolicy::Horizontally) { // Widget wants full width - layout->addMultiCellWidget(widget, row, row, 1, 2); + tqlayout->addMultiCellWidget(widget, row, row, 1, 2); } else { // Widget doesn't like to be stretched, add a spacer next to it - layout->addWidget(widget, row, 1); - QSpacerItem* spacer = new QSpacerItem(1, 1, QSizePolicy::Expanding, QSizePolicy::Minimum); - layout->addItem(spacer, row, 2); + tqlayout->addWidget(widget, row, 1); + TQSpacerItem* spacer = new TQSpacerItem(1, 1, TQSizePolicy::Expanding, TQSizePolicy::Minimum); + tqlayout->addItem(spacer, row, 2); } mThemeParameterWidgetFromName[internalName] = widget; } // Add spacer at the end, so that widgets aren't spread on the whole - // parent height - QSpacerItem* spacer = new QSpacerItem(1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding); - layout->addItem(spacer, layout->numRows(), 0); + // tqparent height + TQSpacerItem* spacer = new TQSpacerItem(1, 1, TQSizePolicy::Minimum, TQSizePolicy::Expanding); + tqlayout->addItem(spacer, tqlayout->numRows(), 0); } }; -Wizard::Wizard(QWidget* parent, KIPI::Interface* interface, GalleryInfo* info) -: KWizard(parent) +Wizard::Wizard(TQWidget* tqparent, KIPI::Interface* interface, GalleryInfo* info) +: KWizard(tqparent) { d=new Private; d->mInfo=info; @@ -184,7 +184,7 @@ Wizard::Wizard(QWidget* parent, KIPI::Interface* interface, GalleryInfo* info) // Help button KHelpMenu* helpMenu = new KHelpMenu(this, d->mAbout, false); helpMenu->menu()->removeItemAt(0); - helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, SLOT(showHelp()), 0, -1, 0); + helpMenu->menu()->insertItem(i18n("Plugin Handbook"), this, TQT_SLOT(showHelp()), 0, -1, 0); helpButton()->setPopup( helpMenu->menu() ); d->mCollectionSelector=new KIPI::ImageCollectionSelector(this, interface); @@ -193,8 +193,8 @@ Wizard::Wizard(QWidget* parent, KIPI::Interface* interface, GalleryInfo* info) d->mThemePage=new ThemePage(this); d->initThemePage(); addPage(d->mThemePage, i18n("Theme")); - connect(d->mThemePage->mThemeList, SIGNAL(selectionChanged()), - this, SLOT(slotThemeSelectionChanged()) ); + connect(d->mThemePage->mThemeList, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(slotThemeSelectionChanged()) ); d->mThemeParametersPage = new ThemeParametersPage(this); addPage(d->mThemeParametersPage, i18n("Theme Parameters")); @@ -206,8 +206,8 @@ Wizard::Wizard(QWidget* parent, KIPI::Interface* interface, GalleryInfo* info) d->mOutputPage->kcfg_destURL->setMode(KFile::Directory); addPage(d->mOutputPage, i18n("Output")); - connect(d->mOutputPage->kcfg_destURL, SIGNAL(textChanged(const QString&)), - this, SLOT(updateFinishButton()) ); + connect(d->mOutputPage->kcfg_destURL, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(updateFinishButton()) ); d->mConfigManager=new KConfigDialogManager(this, d->mInfo); d->mConfigManager->updateWidgets(); @@ -239,15 +239,15 @@ void Wizard::slotThemeSelectionChanged() { if (listBox->selectedItem()) { Theme::Ptr theme=static_cast<ThemeListBoxItem*>(listBox->selectedItem())->mTheme; - QString url=theme->authorUrl(); - QString author=theme->authorName(); + TQString url=theme->authorUrl(); + TQString author=theme->authorName(); if (!url.isEmpty()) { - author=QString("<a href='%1'>%2</a>").arg(url).arg(author); + author=TQString("<a href='%1'>%2</a>").tqarg(url).tqarg(author); } - QString txt= - QString("<b>%1</b><br><br>%2<br><br>").arg(theme->name(), theme->comment()) - + i18n("Author: %1").arg(author); + TQString txt= + TQString("<b>%1</b><br><br>%2<br><br>").tqarg(theme->name(), theme->comment()) + + i18n("Author: %1").tqarg(author); browser->setText(txt); setNextEnabled(d->mThemePage, true); @@ -270,7 +270,7 @@ void Wizard::accept() { d->mInfo->mCollectionList=d->mCollectionSelector->selectedImageCollections(); Theme::Ptr theme=static_cast<ThemeListBoxItem*>(d->mThemePage->mThemeList->selectedItem())->mTheme; - QString themeInternalName = theme->internalName(); + TQString themeInternalName = theme->internalName(); d->mInfo->setTheme(themeInternalName); Theme::ParameterList parameterList = theme->parameterList(); @@ -279,9 +279,9 @@ void Wizard::accept() { end = parameterList.end(); for (; it!=end; ++it) { AbstractThemeParameter* themeParameter = *it; - QCString parameterInternalName = themeParameter->internalName(); - QWidget* widget = d->mThemeParameterWidgetFromName[parameterInternalName]; - QString value = themeParameter->valueFromWidget(widget); + TQCString parameterInternalName = themeParameter->internalName(); + TQWidget* widget = d->mThemeParameterWidgetFromName[parameterInternalName]; + TQString value = themeParameter->valueFromWidget(widget); d->mInfo->setThemeParameterValue( themeInternalName, |