From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: TQt4 port koffice This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kexi/plugins/tables/kexilookupcolumnpage.cpp | 108 +++++++++++++-------------- 1 file changed, 54 insertions(+), 54 deletions(-) (limited to 'kexi/plugins/tables/kexilookupcolumnpage.cpp') diff --git a/kexi/plugins/tables/kexilookupcolumnpage.cpp b/kexi/plugins/tables/kexilookupcolumnpage.cpp index 9df92794..33e12d64 100644 --- a/kexi/plugins/tables/kexilookupcolumnpage.cpp +++ b/kexi/plugins/tables/kexilookupcolumnpage.cpp @@ -19,10 +19,10 @@ #include "kexilookupcolumnpage.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -41,7 +41,7 @@ #include #include -QString mimeTypeToType(const QString& mimeType) +TQString mimeTypeToType(const TQString& mimeType) { if (mimeType=="kexi/table") return "table"; @@ -51,7 +51,7 @@ QString mimeTypeToType(const QString& mimeType) return mimeType; } -QString typeToMimeType(const QString& type) +TQString typeToMimeType(const TQString& type) { if (type=="table") return "kexi/table"; @@ -85,18 +85,18 @@ class KexiLookupColumnPage::Private propertySet = aPropertySet; } - QVariant propertyValue(const QCString& propertyName) const { - return propertySet ? propertySet->property(propertyName).value() : QVariant(); + TQVariant propertyValue(const TQCString& propertyName) const { + return propertySet ? propertySet->property(propertyName).value() : TQVariant(); } - void changeProperty(const QCString &property, const QVariant &value) + void changeProperty(const TQCString &property, const TQVariant &value) { if (!propertySetEnabled) return; propertySet->changeProperty(property, value); } - void updateInfoLabelForPropertySet(const QString& textToDisplayForNullSet) { + void updateInfoLabelForPropertySet(const TQString& textToDisplayForNullSet) { KexiPropertyEditorView::updateInfoLabelForPropertySet( objectInfoLabel, propertySet, textToDisplayForNullSet); } @@ -104,8 +104,8 @@ class KexiLookupColumnPage::Private KexiDataSourceComboBox *rowSourceCombo; KexiFieldComboBox *boundColumnCombo, *visibleColumnCombo; KexiObjectInfoLabel *objectInfoLabel; - QLabel *rowSourceLabel, *boundColumnLabel, *visibleColumnLabel; - QToolButton *clearRowSourceButton, *gotoRowSourceButton, *clearBoundColumnButton, + TQLabel *rowSourceLabel, *boundColumnLabel, *visibleColumnLabel; + TQToolButton *clearRowSourceButton, *gotoRowSourceButton, *clearBoundColumnButton, *clearVisibleColumnButton; //! Used only in assignPropertySet() to check whether we already have the set assigned int currentFieldUid; @@ -117,18 +117,18 @@ class KexiLookupColumnPage::Private private: //! A property set that is displayed on the page. //! The set is also updated after any change in this page's data. - QGuardedPtr propertySet; + TQGuardedPtr propertySet; }; //---------------------------------------------- -KexiLookupColumnPage::KexiLookupColumnPage(QWidget *parent) - : QWidget(parent) +KexiLookupColumnPage::KexiLookupColumnPage(TQWidget *tqparent) + : TQWidget(tqparent) , d(new Private()) { setName("KexiLookupColumnPage"); - QVBoxLayout *vlyr = new QVBoxLayout(this); + TQVBoxLayout *vlyr = new TQVBoxLayout(this); d->objectInfoLabel = new KexiObjectInfoLabel(this, "KexiObjectInfoLabel"); vlyr->addWidget(d->objectInfoLabel); @@ -136,30 +136,30 @@ KexiLookupColumnPage::KexiLookupColumnPage(QWidget *parent) //todo d->noDataSourceAvailableMultiText = i18n("No data source could be assigned for multiple widgets."); //-Row Source - QWidget *contents = new QWidget(this); + TQWidget *contents = new TQWidget(this); vlyr->addWidget(contents); - QVBoxLayout *contentsVlyr = new QVBoxLayout(contents); + TQVBoxLayout *contentsVlyr = new TQVBoxLayout(contents); - QHBoxLayout *hlyr = new QHBoxLayout(contentsVlyr); - d->rowSourceLabel = new QLabel(i18n("Row source:"), contents); - d->rowSourceLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); + TQHBoxLayout *hlyr = new TQHBoxLayout(contentsVlyr); + d->rowSourceLabel = new TQLabel(i18n("Row source:"), contents); + d->rowSourceLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); d->rowSourceLabel->setMargin(2); d->rowSourceLabel->setMinimumHeight(IconSize(KIcon::Small)+4); - d->rowSourceLabel->setAlignment(Qt::AlignLeft|Qt::AlignBottom); + d->rowSourceLabel->tqsetAlignment(TQt::AlignLeft|TQt::AlignBottom); hlyr->addWidget(d->rowSourceLabel); - d->gotoRowSourceButton = new KexiSmallToolButton(contents, QString::null, "goto", "gotoRowSourceButton"); + d->gotoRowSourceButton = new KexiSmallToolButton(contents, TQString(), "goto", "gotoRowSourceButton"); d->gotoRowSourceButton->setMinimumHeight(d->rowSourceLabel->minimumHeight()); - QToolTip::add(d->gotoRowSourceButton, i18n("Go to selected row source")); + TQToolTip::add(d->gotoRowSourceButton, i18n("Go to selected row source")); hlyr->addWidget(d->gotoRowSourceButton); - connect(d->gotoRowSourceButton, SIGNAL(clicked()), this, SLOT(slotGotoSelectedRowSource())); + connect(d->gotoRowSourceButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotGotoSelectedRowSource())); - d->clearRowSourceButton = new KexiSmallToolButton(contents, QString::null, + d->clearRowSourceButton = new KexiSmallToolButton(contents, TQString(), "clear_left", "clearRowSourceButton"); d->clearRowSourceButton->setMinimumHeight(d->rowSourceLabel->minimumHeight()); - QToolTip::add(d->clearRowSourceButton, i18n("Clear row source")); + TQToolTip::add(d->clearRowSourceButton, i18n("Clear row source")); hlyr->addWidget(d->clearRowSourceButton); - connect(d->clearRowSourceButton, SIGNAL(clicked()), this, SLOT(clearRowSourceSelection())); + connect(d->clearRowSourceButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(clearRowSourceSelection())); d->rowSourceCombo = new KexiDataSourceComboBox(contents, "rowSourceCombo"); d->rowSourceLabel->setBuddy(d->rowSourceCombo); @@ -168,20 +168,20 @@ KexiLookupColumnPage::KexiLookupColumnPage(QWidget *parent) contentsVlyr->addSpacing(8); //- Bound Column - hlyr = new QHBoxLayout(contentsVlyr); - d->boundColumnLabel = new QLabel(i18n("Bound column:"), contents); - d->boundColumnLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); + hlyr = new TQHBoxLayout(contentsVlyr); + d->boundColumnLabel = new TQLabel(i18n("Bound column:"), contents); + d->boundColumnLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); d->boundColumnLabel->setMargin(2); d->boundColumnLabel->setMinimumHeight(IconSize(KIcon::Small)+4); - d->boundColumnLabel->setAlignment(Qt::AlignLeft|Qt::AlignBottom); + d->boundColumnLabel->tqsetAlignment(TQt::AlignLeft|TQt::AlignBottom); hlyr->addWidget(d->boundColumnLabel); - d->clearBoundColumnButton = new KexiSmallToolButton(contents, QString::null, + d->clearBoundColumnButton = new KexiSmallToolButton(contents, TQString(), "clear_left", "clearBoundColumnButton"); d->clearBoundColumnButton->setMinimumHeight(d->boundColumnLabel->minimumHeight()); - QToolTip::add(d->clearBoundColumnButton, i18n("Clear bound column")); + TQToolTip::add(d->clearBoundColumnButton, i18n("Clear bound column")); hlyr->addWidget(d->clearBoundColumnButton); - connect(d->clearBoundColumnButton, SIGNAL(clicked()), this, SLOT(clearBoundColumnSelection())); + connect(d->clearBoundColumnButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(clearBoundColumnSelection())); d->boundColumnCombo = new KexiFieldComboBox(contents, "boundColumnCombo"); d->boundColumnLabel->setBuddy(d->boundColumnCombo); @@ -190,20 +190,20 @@ KexiLookupColumnPage::KexiLookupColumnPage(QWidget *parent) contentsVlyr->addSpacing(8); //- Visible Column - hlyr = new QHBoxLayout(contentsVlyr); - d->visibleColumnLabel = new QLabel(i18n("Visible column:"), contents); - d->visibleColumnLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); + hlyr = new TQHBoxLayout(contentsVlyr); + d->visibleColumnLabel = new TQLabel(i18n("Visible column:"), contents); + d->visibleColumnLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); d->visibleColumnLabel->setMargin(2); d->visibleColumnLabel->setMinimumHeight(IconSize(KIcon::Small)+4); - d->visibleColumnLabel->setAlignment(Qt::AlignLeft|Qt::AlignBottom); + d->visibleColumnLabel->tqsetAlignment(TQt::AlignLeft|TQt::AlignBottom); hlyr->addWidget(d->visibleColumnLabel); - d->clearVisibleColumnButton = new KexiSmallToolButton(contents, QString::null, + d->clearVisibleColumnButton = new KexiSmallToolButton(contents, TQString(), "clear_left", "clearVisibleColumnButton"); d->clearVisibleColumnButton->setMinimumHeight(d->visibleColumnLabel->minimumHeight()); - QToolTip::add(d->clearVisibleColumnButton, i18n("Clear visible column")); + TQToolTip::add(d->clearVisibleColumnButton, i18n("Clear visible column")); hlyr->addWidget(d->clearVisibleColumnButton); - connect(d->clearVisibleColumnButton, SIGNAL(clicked()), this, SLOT(clearVisibleColumnSelection())); + connect(d->clearVisibleColumnButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(clearVisibleColumnSelection())); d->visibleColumnCombo = new KexiFieldComboBox(contents, "visibleColumnCombo"); d->visibleColumnLabel->setBuddy(d->visibleColumnCombo); @@ -211,11 +211,11 @@ KexiLookupColumnPage::KexiLookupColumnPage(QWidget *parent) vlyr->addStretch(1); - connect(d->rowSourceCombo, SIGNAL(textChanged(const QString &)), - this, SLOT(slotRowSourceTextChanged(const QString &))); - connect(d->rowSourceCombo, SIGNAL(dataSourceChanged()), this, SLOT(slotRowSourceChanged())); - connect(d->boundColumnCombo, SIGNAL(selected()), this, SLOT(slotBoundColumnSelected())); - connect(d->visibleColumnCombo, SIGNAL(selected()), this, SLOT(slotVisibleColumnSelected())); + connect(d->rowSourceCombo, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(slotRowSourceTextChanged(const TQString &))); + connect(d->rowSourceCombo, TQT_SIGNAL(dataSourceChanged()), this, TQT_SLOT(slotRowSourceChanged())); + connect(d->boundColumnCombo, TQT_SIGNAL(selected()), this, TQT_SLOT(slotBoundColumnSelected())); + connect(d->visibleColumnCombo, TQT_SIGNAL(selected()), this, TQT_SLOT(slotVisibleColumnSelected())); clearBoundColumnSelection(); clearVisibleColumnSelection(); @@ -249,7 +249,7 @@ void KexiLookupColumnPage::assignPropertySet(KoProperty::Set* propertySet) const bool hasRowSource = d->hasPropertySet() && !d->propertyValue("rowSourceType").isNull() && !d->propertyValue("rowSource").isNull(); - QString rowSource, rowSourceType; + TQString rowSource, rowSourceType; if (hasRowSource) { rowSourceType = typeToMimeType( d->propertyValue("rowSourceType").toString() ); rowSource = d->propertyValue("rowSource").toString(); @@ -274,7 +274,7 @@ void KexiLookupColumnPage::assignPropertySet(KoProperty::Set* propertySet) void KexiLookupColumnPage::clearBoundColumnSelection() { d->boundColumnCombo->setCurrentText(""); - d->boundColumnCombo->setFieldOrExpression(QString::null); + d->boundColumnCombo->setFieldOrExpression(TQString()); slotBoundColumnSelected(); d->clearBoundColumnButton->setEnabled(false); } @@ -307,7 +307,7 @@ void KexiLookupColumnPage::slotBoundColumnSelected() void KexiLookupColumnPage::clearVisibleColumnSelection() { d->visibleColumnCombo->setCurrentText(""); - d->visibleColumnCombo->setFieldOrExpression(QString::null); + d->visibleColumnCombo->setFieldOrExpression(TQString()); slotVisibleColumnSelected(); d->clearVisibleColumnButton->setEnabled(false); } @@ -329,9 +329,9 @@ void KexiLookupColumnPage::slotRowSourceChanged() { if (!d->rowSourceCombo->project()) return; - QString mime = d->rowSourceCombo->selectedMimeType(); + TQString mime = d->rowSourceCombo->selectedMimeType(); bool rowSourceFound = false; - QString name = d->rowSourceCombo->selectedName(); + TQString name = d->rowSourceCombo->selectedName(); if ((mime=="kexi/table" || mime=="kexi/query") && d->rowSourceCombo->isSelectionValid()) { KexiDB::TableOrQuerySchema *tableOrQuery = new KexiDB::TableOrQuerySchema( d->rowSourceCombo->project()->dbConnection(), name.latin1(), mime=="kexi/table"); @@ -372,7 +372,7 @@ void KexiLookupColumnPage::slotRowSourceChanged() //! @todo update d->propertySet ^^ } -void KexiLookupColumnPage::slotRowSourceTextChanged(const QString & string) +void KexiLookupColumnPage::slotRowSourceTextChanged(const TQString & string) { Q_UNUSED(string); const bool enable = d->rowSourceCombo->isSelectionValid(); @@ -398,7 +398,7 @@ void KexiLookupColumnPage::clearRowSourceSelection(bool alsoClearComboBox) void KexiLookupColumnPage::slotGotoSelectedRowSource() { - QString mime = d->rowSourceCombo->selectedMimeType(); + TQString mime = d->rowSourceCombo->selectedMimeType(); if (mime=="kexi/table" || mime=="kexi/query") { if (d->rowSourceCombo->isSelectionValid()) emit jumpToObjectRequested(mime.latin1(), d->rowSourceCombo->selectedName().latin1()); -- cgit v1.2.1