diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-02 06:40:27 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-02 06:40:27 +0000 |
commit | 2595a15ebeb6fc46b7cb241d01ec0c2460ec2111 (patch) | |
tree | 18a8f0f4ac5a86dacfa74c3537551ec39bc85e75 /src/fetcherconfigdialog.cpp | |
parent | 1d90725a4001fab9d3922b2cbcceeee5e2d1686f (diff) | |
download | tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.tar.gz tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.zip |
TQt4 port tellico
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1239054 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/fetcherconfigdialog.cpp')
-rw-r--r-- | src/fetcherconfigdialog.cpp | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/src/fetcherconfigdialog.cpp b/src/fetcherconfigdialog.cpp index 99d4bbe..1e1a3e3 100644 --- a/src/fetcherconfigdialog.cpp +++ b/src/fetcherconfigdialog.cpp @@ -20,14 +20,14 @@ #include <kcombobox.h> #include <kiconloader.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qhgroupbox.h> -#include <qwidgetstack.h> -#include <qwhatsthis.h> -#include <qhbox.h> -#include <qvgroupbox.h> -#include <qcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqhgroupbox.h> +#include <tqwidgetstack.h> +#include <tqwhatsthis.h> +#include <tqhbox.h> +#include <tqvgroupbox.h> +#include <tqcheckbox.h> namespace { static const int FETCHER_CONFIG_MIN_WIDTH = 600; @@ -35,8 +35,8 @@ namespace { using Tellico::FetcherConfigDialog; -FetcherConfigDialog::FetcherConfigDialog(QWidget* parent_) - : KDialogBase(parent_, "fetcher dialog", true, i18n("Data Source Properties"), +FetcherConfigDialog::FetcherConfigDialog(TQWidget* tqparent_) + : KDialogBase(tqparent_, "fetcher dialog", true, i18n("Data Source Properties"), KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Help) , m_newSource(true) , m_useDefaultName(true) @@ -44,9 +44,9 @@ FetcherConfigDialog::FetcherConfigDialog(QWidget* parent_) init(Fetch::Unknown); } -FetcherConfigDialog::FetcherConfigDialog(const QString& sourceName_, Fetch::Type type_, bool updateOverwrite_, - Fetch::ConfigWidget* configWidget_, QWidget* parent_) - : KDialogBase(parent_, "fetcher dialog", true, i18n("Data Source Properties"), +FetcherConfigDialog::FetcherConfigDialog(const TQString& sourceName_, Fetch::Type type_, bool updateOverwrite_, + Fetch::ConfigWidget* configWidget_, TQWidget* tqparent_) + : KDialogBase(tqparent_, "fetcher dialog", true, i18n("Data Source Properties"), KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Help) , m_newSource(false) , m_useDefaultName(false) @@ -58,70 +58,70 @@ FetcherConfigDialog::FetcherConfigDialog(const QString& sourceName_, Fetch::Type void FetcherConfigDialog::init(Fetch::Type type_) { setMinimumWidth(FETCHER_CONFIG_MIN_WIDTH); - setHelp(QString::fromLatin1("data-sources-options")); + setHelp(TQString::tqfromLatin1("data-sources-options")); - QWidget* widget = new QWidget(this); - QBoxLayout* topLayout = new QHBoxLayout(widget, KDialog::spacingHint()); + TQWidget* widget = new TQWidget(this); + TQBoxLayout* topLayout = new TQHBoxLayout(widget, KDialog::spacingHint()); - QBoxLayout* vlay1 = new QVBoxLayout(topLayout, KDialog::spacingHint()); - m_iconLabel = new QLabel(widget); + TQBoxLayout* vlay1 = new TQVBoxLayout(topLayout, KDialog::spacingHint()); + m_iconLabel = new TQLabel(widget); if(type_ == Fetch::Unknown) { - m_iconLabel->setPixmap(KGlobal::iconLoader()->loadIcon(QString::fromLatin1("network"), KIcon::Panel, 64)); + m_iconLabel->setPixmap(KGlobal::iconLoader()->loadIcon(TQString::tqfromLatin1("network"), KIcon::Panel, 64)); } else { m_iconLabel->setPixmap(Fetch::Manager::self()->fetcherIcon(type_, KIcon::Panel, 64)); } vlay1->addWidget(m_iconLabel); vlay1->addStretch(1); - QBoxLayout* vlay2 = new QVBoxLayout(topLayout, KDialog::spacingHint()); + TQBoxLayout* vlay2 = new TQVBoxLayout(topLayout, KDialog::spacingHint()); - QGridLayout* gl = new QGridLayout(vlay2, 2, 2, KDialog::spacingHint()); + TQGridLayout* gl = new TQGridLayout(vlay2, 2, 2, KDialog::spacingHint()); int row = -1; - QLabel* label = new QLabel(i18n("&Source name: "), widget); + TQLabel* label = new TQLabel(i18n("&Source name: "), widget); gl->addWidget(label, ++row, 0); - QString w = i18n("The name identifies the data source and should be unique and informative."); - QWhatsThis::add(label, w); + TQString w = i18n("The name identifies the data source and should be unique and informative."); + TQWhatsThis::add(label, w); m_nameEdit = new KLineEdit(widget); gl->addWidget(m_nameEdit, row, 1); m_nameEdit->setFocus(); - QWhatsThis::add(m_nameEdit, w); + TQWhatsThis::add(m_nameEdit, w); label->setBuddy(m_nameEdit); - connect(m_nameEdit, SIGNAL(textChanged(const QString&)), SLOT(slotNameChanged(const QString&))); + connect(m_nameEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotNameChanged(const TQString&))); if(m_newSource) { - label = new QLabel(i18n("Source &type: "), widget); + label = new TQLabel(i18n("Source &type: "), widget); } else { // since the label doesn't have a buddy, we don't want an accel, // but also want to reuse string we already have - label = new QLabel(i18n("Source &type: ").remove('&'), widget); + label = new TQLabel(i18n("Source &type: ").remove('&'), widget); } gl->addWidget(label, ++row, 0); w = i18n("Tellico supports several different data sources."); - QWhatsThis::add(label, w); + TQWhatsThis::add(label, w); if(m_newSource) { m_typeCombo = new GUI::ComboBox(widget); gl->addWidget(m_typeCombo, row, 1); - QWhatsThis::add(m_typeCombo, w); + TQWhatsThis::add(m_typeCombo, w); label->setBuddy(m_typeCombo); } else { m_typeCombo = 0; - QLabel* lab = new QLabel(Fetch::Manager::typeName(type_), widget); + TQLabel* lab = new TQLabel(Fetch::Manager::typeName(type_), widget); gl->addWidget(lab, row, 1); - QWhatsThis::add(lab, w); + TQWhatsThis::add(lab, w); } - m_cbOverwrite = new QCheckBox(i18n("Updating from source should overwrite user data"), widget); + m_cbOverwrite = new TQCheckBox(i18n("Updating from source should overwrite user data"), widget); ++row; gl->addMultiCellWidget(m_cbOverwrite, row, row, 0, 1); w = i18n("If checked, updating entries will overwrite any existing information."); - QWhatsThis::add(m_cbOverwrite, w); + TQWhatsThis::add(m_cbOverwrite, w); if(m_newSource) { - m_stack = new QWidgetStack(widget); + m_stack = new TQWidgetStack(widget); vlay2->addWidget(m_stack); - connect(m_typeCombo, SIGNAL(activated(int)), SLOT(slotNewSourceSelected(int))); + connect(m_typeCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotNewSourceSelected(int))); int z3950_idx = 0; const Fetch::TypePairList typeList = Fetch::Manager::self()->typeList(); @@ -139,15 +139,15 @@ void FetcherConfigDialog::init(Fetch::Type type_) { } else { m_stack = 0; // just add config widget and reparent - m_configWidget->reparent(widget, QPoint()); + m_configWidget->reparent(widget, TQPoint()); vlay2->addWidget(m_configWidget); - connect(m_configWidget, SIGNAL(signalName(const QString&)), SLOT(slotPossibleNewName(const QString&))); + connect(m_configWidget, TQT_SIGNAL(signalName(const TQString&)), TQT_SLOT(slotPossibleNewName(const TQString&))); } setMainWidget(widget); } -QString FetcherConfigDialog::sourceName() const { +TQString FetcherConfigDialog::sourceName() const { return m_nameEdit->text(); } @@ -200,18 +200,18 @@ void FetcherConfigDialog::slotNewSourceSelected(int idx_) { slotNewSourceSelected(0); return; } - connect(cw, SIGNAL(signalName(const QString&)), SLOT(slotPossibleNewName(const QString&))); + connect(cw, TQT_SIGNAL(signalName(const TQString&)), TQT_SLOT(slotPossibleNewName(const TQString&))); m_configWidgets.insert(idx_, cw); m_stack->addWidget(cw); m_stack->raiseWidget(cw); slotPossibleNewName(cw->preferredName()); } -void FetcherConfigDialog::slotNameChanged(const QString&) { +void FetcherConfigDialog::slotNameChanged(const TQString&) { m_useDefaultName = false; } -void FetcherConfigDialog::slotPossibleNewName(const QString& name_) { +void FetcherConfigDialog::slotPossibleNewName(const TQString& name_) { if(name_.isEmpty()) { return; } |