diff options
Diffstat (limited to 'kexi/plugins/tables')
-rw-r--r-- | kexi/plugins/tables/kexilookupcolumnpage.cpp | 108 | ||||
-rw-r--r-- | kexi/plugins/tables/kexilookupcolumnpage.h | 21 | ||||
-rw-r--r-- | kexi/plugins/tables/kexitabledesigner_dataview.cpp | 6 | ||||
-rw-r--r-- | kexi/plugins/tables/kexitabledesigner_dataview.h | 3 | ||||
-rw-r--r-- | kexi/plugins/tables/kexitabledesignercommands.cpp | 78 | ||||
-rw-r--r-- | kexi/plugins/tables/kexitabledesignercommands.h | 52 | ||||
-rw-r--r-- | kexi/plugins/tables/kexitabledesignerview.cpp | 500 | ||||
-rw-r--r-- | kexi/plugins/tables/kexitabledesignerview.h | 29 | ||||
-rw-r--r-- | kexi/plugins/tables/kexitabledesignerview_p.cpp | 38 | ||||
-rw-r--r-- | kexi/plugins/tables/kexitabledesignerview_p.h | 25 | ||||
-rw-r--r-- | kexi/plugins/tables/kexitablepart.cpp | 60 | ||||
-rw-r--r-- | kexi/plugins/tables/kexitablepart.h | 17 |
12 files changed, 471 insertions, 466 deletions
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 <qlabel.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qheader.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqheader.h> #include <kiconloader.h> #include <klocale.h> @@ -41,7 +41,7 @@ #include <koproperty/property.h> #include <koproperty/utils.h> -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<KoProperty::Set> propertySet; + TQGuardedPtr<KoProperty::Set> 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()); diff --git a/kexi/plugins/tables/kexilookupcolumnpage.h b/kexi/plugins/tables/kexilookupcolumnpage.h index 457b2e3d..f7b79bb2 100644 --- a/kexi/plugins/tables/kexilookupcolumnpage.h +++ b/kexi/plugins/tables/kexilookupcolumnpage.h @@ -19,7 +19,7 @@ #ifndef KEXILOOKUPCOLUMNPAGE_H #define KEXILOOKUPCOLUMNPAGE_H -#include <qwidget.h> +#include <tqwidget.h> #include <kexidb/field.h> #include <kexidb/utils.h> #include <koproperty/set.h> @@ -31,9 +31,9 @@ class KexiFieldComboBox; class KexiFieldListView; class KexiProject; class KexiSmallToolButton; -class QToolButton; -class QLabel; -class QFrame; +class TQToolButton; +class TQLabel; +class TQFrame; //! @short A page within table designer's property pane, providing lookup column editor. /*! It's data model is basically KexiDB::LookupFieldSchema class, but the page does @@ -42,12 +42,13 @@ class QFrame; @todo not all features of KexiDB::LookupFieldSchema class are displayed on this page yet */ -class KexiLookupColumnPage : public QWidget +class KexiLookupColumnPage : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KexiLookupColumnPage(QWidget *parent); + KexiLookupColumnPage(TQWidget *tqparent); virtual ~KexiLookupColumnPage(); public slots: @@ -61,14 +62,14 @@ class KexiLookupColumnPage : public QWidget signals: //! Signal emitted when helper button 'Go to selected row sourcesource' is clicked. - void jumpToObjectRequested(const QCString& mime, const QCString& name); + void jumpToObjectRequested(const TQCString& mime, const TQCString& name); // /*! Signal emitted when current bound column has been changed. */ -// void boundColumnChanged(const QString& string, const QString& caption, +// void boundColumnChanged(const TQString& string, const TQString& caption, // KexiDB::Field::Type type); protected slots: - void slotRowSourceTextChanged(const QString & string); + void slotRowSourceTextChanged(const TQString & string); void slotRowSourceChanged(); void slotGotoSelectedRowSource(); void slotBoundColumnSelected(); @@ -78,7 +79,7 @@ class KexiLookupColumnPage : public QWidget void updateBoundColumnWidgetsAvailability(); //! Used instead of m_propertySet->changeProperty() to honor m_propertySetEnabled - void changeProperty(const QCString &property, const QVariant &value); + void changeProperty(const TQCString &property, const TQVariant &value); private: class Private; diff --git a/kexi/plugins/tables/kexitabledesigner_dataview.cpp b/kexi/plugins/tables/kexitabledesigner_dataview.cpp index bea2d9f5..2b0b3608 100644 --- a/kexi/plugins/tables/kexitabledesigner_dataview.cpp +++ b/kexi/plugins/tables/kexitabledesigner_dataview.cpp @@ -26,8 +26,8 @@ #include "kexidatatableview.h" #include "keximainwindow.h" -KexiTableDesigner_DataView::KexiTableDesigner_DataView(KexiMainWindow *win, QWidget *parent) - : KexiDataTable(win, parent, "KexiTableDesigner_DataView", true/*db-aware*/) +KexiTableDesigner_DataView::KexiTableDesigner_DataView(KexiMainWindow *win, TQWidget *tqparent) + : KexiDataTable(win, tqparent, "KexiTableDesigner_DataView", true/*db-aware*/) { } @@ -73,7 +73,7 @@ tristate KexiTableDesigner_DataView::afterSwitchFrom(int mode) KexiTablePart::TempData* KexiTableDesigner_DataView::tempData() const { - return static_cast<KexiTablePart::TempData*>(parentDialog()->tempData()); + return static_cast<KexiTablePart::TempData*>(tqparentDialog()->tempData()); } #include "kexitabledesigner_dataview.moc" diff --git a/kexi/plugins/tables/kexitabledesigner_dataview.h b/kexi/plugins/tables/kexitabledesigner_dataview.h index 59e84ab1..1a974fd8 100644 --- a/kexi/plugins/tables/kexitabledesigner_dataview.h +++ b/kexi/plugins/tables/kexitabledesigner_dataview.h @@ -26,9 +26,10 @@ class KexiTableDesigner_DataView : public KexiDataTable { Q_OBJECT + TQ_OBJECT public: - KexiTableDesigner_DataView(KexiMainWindow *win, QWidget *parent); + KexiTableDesigner_DataView(KexiMainWindow *win, TQWidget *tqparent); virtual ~KexiTableDesigner_DataView(); diff --git a/kexi/plugins/tables/kexitabledesignercommands.cpp b/kexi/plugins/tables/kexitabledesignercommands.cpp index ccbb181a..298363c4 100644 --- a/kexi/plugins/tables/kexitabledesignercommands.cpp +++ b/kexi/plugins/tables/kexitabledesignercommands.cpp @@ -16,12 +16,12 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ -#include <qdom.h> -#include <qwidget.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qsplitter.h> -#include <qmetaobject.h> +#include <tqdom.h> +#include <tqwidget.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqsplitter.h> +#include <tqmetaobject.h> #include <kdebug.h> #include <klocale.h> @@ -49,7 +49,7 @@ Command::~Command() //-------------------------------------------------------- ChangeFieldPropertyCommand::ChangeFieldPropertyCommand( KexiTableDesignerView* view, - const KoProperty::Set& set, const QCString& propertyName, const QVariant& oldValue, const QVariant& newValue, + const KoProperty::Set& set, const TQCString& propertyName, const TQVariant& oldValue, const TQVariant& newValue, KoProperty::Property::ListData* const oldListData, KoProperty::Property::ListData* const newListData) : Command(view) , m_alterTableAction( @@ -69,27 +69,27 @@ ChangeFieldPropertyCommand::~ChangeFieldPropertyCommand() delete m_listData; } -QString ChangeFieldPropertyCommand::name() const +TQString ChangeFieldPropertyCommand::name() const { return i18n("Change \"%1\" property for table field from \"%2\" to \"%3\"") - .arg(m_alterTableAction.propertyName()).arg(m_oldValue.toString()) - .arg(m_alterTableAction.newValue().toString()); + .tqarg(m_alterTableAction.propertyName()).tqarg(m_oldValue.toString()) + .tqarg(m_alterTableAction.newValue().toString()); } -QString ChangeFieldPropertyCommand::debugString() +TQString ChangeFieldPropertyCommand::debugString() { - QString s( name() ); + TQString s( name() ); if (m_oldListData || m_listData) - s += QString("\nAnd list data from [%1]\n to [%2]") - .arg( m_oldListData ? - QString("%1 -> %2") - .arg(m_oldListData->keysAsStringList().join(",")).arg(m_oldListData->names.join(",")) - : QString("<NONE>")) - .arg( m_listData ? - QString("%1 -> %2") - .arg(m_listData->keysAsStringList().join(",")).arg(m_listData->names.join(",")) - : QString("<NONE>")); - return s + QString(" (UID=%1)").arg(m_alterTableAction.uid()); + s += TQString("\nAnd list data from [%1]\n to [%2]") + .tqarg( m_oldListData ? + TQString("%1 -> %2") + .tqarg(m_oldListData->keysAsStringList().join(",")).tqarg(m_oldListData->names.join(",")) + : TQString("<NONE>")) + .tqarg( m_listData ? + TQString("%1 -> %2") + .tqarg(m_listData->keysAsStringList().join(",")).tqarg(m_listData->names.join(",")) + : TQString("<NONE>")); + return s + TQString(" (UID=%1)").tqarg(m_alterTableAction.uid()); } void ChangeFieldPropertyCommand::execute() @@ -121,7 +121,7 @@ KexiDB::AlterTableHandler::ActionBase* ChangeFieldPropertyCommand::createAction( RemoveFieldCommand::RemoveFieldCommand( KexiTableDesignerView* view, int fieldIndex, const KoProperty::Set* set) : Command(view) - , m_alterTableAction( set ? (*set)["name"].value().toString() : QString::null, + , m_alterTableAction( set ? (*set)["name"].value().toString() : TQString(), set ? (*set)["uid"].value().toInt() : -1 ) , m_set( set ? new KoProperty::Set(*set /*deep copy*/) : 0 ) , m_fieldIndex(fieldIndex) @@ -133,12 +133,12 @@ RemoveFieldCommand::~RemoveFieldCommand() delete m_set; } -QString RemoveFieldCommand::name() const +TQString RemoveFieldCommand::name() const { if (m_set) - return i18n("Remove table field \"%1\"").arg(m_alterTableAction.fieldName()); + return i18n("Remove table field \"%1\"").tqarg(m_alterTableAction.fieldName()); - return QString("Remove empty row at position %1").arg(m_fieldIndex); + return TQString("Remove empty row at position %1").tqarg(m_fieldIndex); } void RemoveFieldCommand::execute() @@ -154,14 +154,14 @@ void RemoveFieldCommand::unexecute() m_view->insertField( m_fieldIndex, *m_set ); } -QString RemoveFieldCommand::debugString() +TQString RemoveFieldCommand::debugString() { if (!m_set) return name(); - return name() + "\nAT ROW " + QString::number(m_fieldIndex) + return name() + "\nAT ROW " + TQString::number(m_fieldIndex) + ", FIELD: " + (*m_set)["caption"].value().toString() - + QString(" (UID=%1)").arg(m_alterTableAction.uid()); + + TQString(" (UID=%1)").tqarg(m_alterTableAction.uid()); } KexiDB::AlterTableHandler::ActionBase* RemoveFieldCommand::createAction() @@ -190,9 +190,9 @@ InsertFieldCommand::~InsertFieldCommand() delete m_alterTableAction; } -QString InsertFieldCommand::name() const +TQString InsertFieldCommand::name() const { - return i18n("Insert table field \"%1\"").arg(m_set["caption"].value().toString()); + return i18n("Insert table field \"%1\"").tqarg(m_set["caption"].value().toString()); } void InsertFieldCommand::execute() @@ -213,7 +213,7 @@ KexiDB::AlterTableHandler::ActionBase* InsertFieldCommand::createAction() //-------------------------------------------------------- ChangePropertyVisibilityCommand::ChangePropertyVisibilityCommand( KexiTableDesignerView* view, - const KoProperty::Set& set, const QCString& propertyName, bool visible) + const KoProperty::Set& set, const TQCString& propertyName, bool visible) : Command(view) , m_alterTableAction(set.property("name").value().toString(), propertyName, visible, set["uid"].value().toInt()) // , m_fieldUID(set["uid"].value().toInt()) @@ -226,12 +226,12 @@ ChangePropertyVisibilityCommand::~ChangePropertyVisibilityCommand() { } -QString ChangePropertyVisibilityCommand::name() const +TQString ChangePropertyVisibilityCommand::name() const { - return QString("[internal] Change \"%1\" visibility from \"%2\" to \"%3\"") - .arg(m_alterTableAction.propertyName()) - .arg(m_oldVisibility ? "true" : "false") - .arg(m_alterTableAction.newValue().toBool() ? "true" : "false"); + return TQString("[internal] Change \"%1\" visibility from \"%2\" to \"%3\"") + .tqarg(m_alterTableAction.propertyName()) + .tqarg(m_oldVisibility ? "true" : "false") + .tqarg(m_alterTableAction.newValue().toBool() ? "true" : "false"); } void ChangePropertyVisibilityCommand::execute() @@ -263,9 +263,9 @@ InsertEmptyRowCommand::~InsertEmptyRowCommand() { } -QString InsertEmptyRowCommand::name() const +TQString InsertEmptyRowCommand::name() const { - return QString("Insert empty row at position %1").arg(m_row); + return TQString("Insert empty row at position %1").tqarg(m_row); } void InsertEmptyRowCommand::execute() diff --git a/kexi/plugins/tables/kexitabledesignercommands.h b/kexi/plugins/tables/kexitabledesignercommands.h index 355aabe2..1e6225e3 100644 --- a/kexi/plugins/tables/kexitabledesignercommands.h +++ b/kexi/plugins/tables/kexitabledesignercommands.h @@ -20,12 +20,12 @@ #ifndef KEXITABLEDESIGNER_COMMANDS_H #define KEXITABLEDESIGNER_COMMANDS_H -#include <qmap.h> -#include <qdict.h> -#include <qptrlist.h> -#include <qptrdict.h> -#include <qvariant.h> -#include <qguardedptr.h> +#include <tqmap.h> +#include <tqdict.h> +#include <tqptrlist.h> +#include <tqptrdict.h> +#include <tqvariant.h> +#include <tqguardedptr.h> #include <kcommand.h> #include <kexidb/alter.h> @@ -33,11 +33,11 @@ #include "kexitabledesignerview.h" -class QWidget; -class QRect; -class QPoint; -class QStringList; -class QCString; +class TQWidget; +class TQRect; +class TQPoint; +class TQStringList; +class TQCString; namespace KexiTableDesignerCommands { @@ -52,10 +52,10 @@ class Command : public KCommand //! Can return 0 if the action should not be passed to AlterTableHandler virtual KexiDB::AlterTableHandler::ActionBase* createAction() { return 0; } - virtual QString debugString() { return name(); } + virtual TQString debugString() { return name(); } protected: - QGuardedPtr<KexiTableDesignerView> m_view; + TQGuardedPtr<KexiTableDesignerView> m_view; }; //! @short Undo/redo command used for when changing a property for a table field @@ -70,21 +70,21 @@ class ChangeFieldPropertyCommand : public Command on execute() and unexecute(). */ ChangeFieldPropertyCommand( KexiTableDesignerView* view, - const KoProperty::Set& set, const QCString& propertyName, - const QVariant& oldValue, const QVariant& newValue, + const KoProperty::Set& set, const TQCString& propertyName, + const TQVariant& oldValue, const TQVariant& newValue, KoProperty::Property::ListData* const oldListData = 0, KoProperty::Property::ListData* const newListData = 0); virtual ~ChangeFieldPropertyCommand(); - virtual QString name() const; + virtual TQString name() const; virtual void execute(); virtual void unexecute(); virtual KexiDB::AlterTableHandler::ActionBase* createAction(); - virtual QString debugString(); + virtual TQString debugString(); protected: KexiDB::AlterTableHandler::ChangeFieldPropertyAction m_alterTableAction; - QVariant m_oldValue; + TQVariant m_oldValue; // int m_fieldUID; KoProperty::Property::ListData* m_oldListData, *m_listData; }; @@ -100,12 +100,12 @@ class RemoveFieldCommand : public Command virtual ~RemoveFieldCommand(); - virtual QString name() const; + virtual TQString name() const; virtual void execute(); virtual void unexecute(); virtual KexiDB::AlterTableHandler::ActionBase* createAction(); - virtual QString debugString(); + virtual TQString debugString(); protected: KexiDB::AlterTableHandler::RemoveFieldAction m_alterTableAction; @@ -121,13 +121,13 @@ class InsertFieldCommand : public Command int fieldIndex/*, const KexiDB::Field& field*/, const KoProperty::Set& set ); virtual ~InsertFieldCommand(); - virtual QString name() const; + virtual TQString name() const; virtual void execute(); virtual void unexecute(); virtual KexiDB::AlterTableHandler::ActionBase* createAction(); - virtual QString debugString() { - return name() + "\nAT ROW " + QString::number(m_alterTableAction->index()) //m_alterTableAction.index()) + virtual TQString debugString() { + return name() + "\nAT ROW " + TQString::number(m_alterTableAction->index()) //m_alterTableAction.index()) + ", FIELD: " + m_set["caption"].value().toString(); //m_alterTableAction.field().debugString(); } @@ -150,12 +150,12 @@ class ChangePropertyVisibilityCommand : public Command (it's invalid but allowed in design time). */ ChangePropertyVisibilityCommand( KexiTableDesignerView* view, - const KoProperty::Set& set, const QCString& propertyName, + const KoProperty::Set& set, const TQCString& propertyName, bool visible); virtual ~ChangePropertyVisibilityCommand(); - virtual QString name() const; + virtual TQString name() const; virtual void execute(); virtual void unexecute(); @@ -174,7 +174,7 @@ class InsertEmptyRowCommand : public Command InsertEmptyRowCommand( KexiTableDesignerView* view, int row ); virtual ~InsertEmptyRowCommand(); - virtual QString name() const; + virtual TQString name() const; virtual void execute(); virtual void unexecute(); diff --git a/kexi/plugins/tables/kexitabledesignerview.cpp b/kexi/plugins/tables/kexitabledesignerview.cpp index 7e3478ed..a612453a 100644 --- a/kexi/plugins/tables/kexitabledesignerview.cpp +++ b/kexi/plugins/tables/kexitabledesignerview.cpp @@ -22,9 +22,9 @@ #include "kexilookupcolumnpage.h" #include "kexitabledesignercommands.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qsplitter.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqsplitter.h> #include <kiconloader.h> #include <kdebug.h> @@ -65,47 +65,47 @@ using namespace KexiTableDesignerCommands; -//! @internal Used in tryCastQVariant() anf canCastQVariant() -static bool isIntegerQVariant(QVariant::Type t) +//! @internal Used in tryCastTQVariant() anf canCastTQVariant() +static bool isIntegerTQVariant(TQVariant::Type t) { - return t==QVariant::LongLong - || t==QVariant::ULongLong - || t==QVariant::Int - || t==QVariant::UInt; + return t==TQVariant::LongLong + || t==TQVariant::ULongLong + || t==TQVariant::Int + || t==TQVariant::UInt; } -//! @internal Used in tryCastQVariant() -static bool canCastQVariant(QVariant::Type fromType, QVariant::Type toType) +//! @internal Used in tryCastTQVariant() +static bool canCastTQVariant(TQVariant::Type fromType, TQVariant::Type toType) { - return (fromType==QVariant::Int && toType==QVariant::UInt) - || (fromType==QVariant::CString && toType==QVariant::String) - || (fromType==QVariant::LongLong && toType==QVariant::ULongLong) - || ((fromType==QVariant::String || fromType==QVariant::CString) - && (isIntegerQVariant(toType) || toType==QVariant::Double)); + return (fromType==TQVariant::Int && toType==TQVariant::UInt) + || (fromType==TQVariant::CString && toType==TQVariant::String) + || (fromType==TQVariant::LongLong && toType==TQVariant::ULongLong) + || ((fromType==TQVariant::String || fromType==TQVariant::CString) + && (isIntegerTQVariant(toType) || toType==TQVariant::Double)); } /*! @internal \return a variant value converted from \a fromVal to \a toType type. - Null QVariant is returned if \a fromVal's type and \a toType type + Null TQVariant is returned if \a fromVal's type and \a toType type are incompatible. */ -static QVariant tryCastQVariant( const QVariant& fromVal, QVariant::Type toType ) +static TQVariant tryCastTQVariant( const TQVariant& fromVal, TQVariant::Type toType ) { - const QVariant::Type fromType = fromVal.type(); + const TQVariant::Type fromType = fromVal.type(); if (fromType == toType) return fromVal; - if (canCastQVariant(fromType, toType) || canCastQVariant(toType, fromType) - || (isIntegerQVariant(fromType) && toType==QVariant::Double)) + if (canCastTQVariant(fromType, toType) || canCastTQVariant(toType, fromType) + || (isIntegerTQVariant(fromType) && toType==TQVariant::Double)) { - QVariant res( fromVal ); + TQVariant res( fromVal ); if (res.cast(toType)) return res; } - return QVariant(); + return TQVariant(); } -KexiTableDesignerView::KexiTableDesignerView(KexiMainWindow *win, QWidget *parent) - : KexiDataTable(win, parent, "KexiTableDesignerView", false/*not db-aware*/) +KexiTableDesignerView::KexiTableDesignerView(KexiMainWindow *win, TQWidget *tqparent) + : KexiDataTable(win, tqparent, "KexiTableDesignerView", false/*not db-aware*/) , KexiTableDesignerInterface() , d( new KexiTableDesignerViewPrivate(this) ) { @@ -120,7 +120,7 @@ KexiTableDesignerView::KexiTableDesignerView(KexiMainWindow *win, QWidget *paren d->data->setReadOnly(true); d->data->setInsertingEnabled( false ); - KexiTableViewColumn *col = new KexiTableViewColumn("pk", KexiDB::Field::Text, QString::null, + KexiTableViewColumn *col = new KexiTableViewColumn("pk", KexiDB::Field::Text, TQString(), i18n("Additional information about the field")); col->setIcon( KexiUtils::colorizeIconToTextColor( SmallIcon("info"), d->view->palette() ) ); col->setHeaderTextVisible(false); @@ -142,15 +142,15 @@ KexiTableDesignerView::KexiTableDesignerView(KexiMainWindow *win, QWidget *paren #ifdef KEXI_NO_BLOB_FIELDS //! @todo remove this later - QValueVector<QString> types(KexiDB::Field::LastTypeGroup-1); //don't show last type (BLOB) + TQValueVector<TQString> types(KexiDB::Field::LastTypeGroup-1); //don't show last type (BLOB) #else - QValueVector<QString> types(KexiDB::Field::LastTypeGroup); + TQValueVector<TQString> types(KexiDB::Field::LastTypeGroup); #endif d->maxTypeNameTextWidth = 0; - QFontMetrics fm(font()); + TQFontMetrics fm(font()); for (uint i=1; i<=types.count(); i++) { types[i-1] = KexiDB::Field::typeGroupName(i); - d->maxTypeNameTextWidth = QMAX(d->maxTypeNameTextWidth, fm.width(types[i-1])); + d->maxTypeNameTextWidth = TQMAX(d->maxTypeNameTextWidth, fm.width(types[i-1])); } col->field()->setEnumHints(types); @@ -159,46 +159,46 @@ KexiTableDesignerView::KexiTableDesignerView(KexiMainWindow *win, QWidget *paren d->view->setSpreadSheetMode(); - connect(d->data, SIGNAL(aboutToChangeCell(KexiTableItem*,int,QVariant&,KexiDB::ResultInfo*)), - this, SLOT(slotBeforeCellChanged(KexiTableItem*,int,QVariant&,KexiDB::ResultInfo*))); - connect(d->data, SIGNAL(rowUpdated(KexiTableItem*)), - this, SLOT(slotRowUpdated(KexiTableItem*))); - //connect(d->data, SIGNAL(aboutToInsertRow(KexiTableItem*,KexiDB::ResultInfo*,bool)), - // this, SLOT(slotAboutToInsertRow(KexiTableItem*,KexiDB::ResultInfo*,bool))); - connect(d->data, SIGNAL(aboutToDeleteRow(KexiTableItem&,KexiDB::ResultInfo*,bool)), - this, SLOT(slotAboutToDeleteRow(KexiTableItem&,KexiDB::ResultInfo*,bool))); + connect(d->data, TQT_SIGNAL(aboutToChangeCell(KexiTableItem*,int,TQVariant&,KexiDB::ResultInfo*)), + TQT_TQOBJECT(this), TQT_SLOT(slotBeforeCellChanged(KexiTableItem*,int,TQVariant&,KexiDB::ResultInfo*))); + connect(d->data, TQT_SIGNAL(rowUpdated(KexiTableItem*)), + TQT_TQOBJECT(this), TQT_SLOT(slotRowUpdated(KexiTableItem*))); + //connect(d->data, TQT_SIGNAL(aboutToInsertRow(KexiTableItem*,KexiDB::ResultInfo*,bool)), + // TQT_TQOBJECT(this), TQT_SLOT(slotAboutToInsertRow(KexiTableItem*,KexiDB::ResultInfo*,bool))); + connect(d->data, TQT_SIGNAL(aboutToDeleteRow(KexiTableItem&,KexiDB::ResultInfo*,bool)), + TQT_TQOBJECT(this), TQT_SLOT(slotAboutToDeleteRow(KexiTableItem&,KexiDB::ResultInfo*,bool))); - setMinimumSize(d->view->minimumSizeHint().width(), d->view->minimumSizeHint().height()); + setMinimumSize(d->view->tqminimumSizeHint().width(), d->view->tqminimumSizeHint().height()); d->view->setFocus(); d->sets = new KexiDataAwarePropertySet( this, d->view ); - connect(d->sets, SIGNAL(rowDeleted()), this, SLOT(updateActions())); - connect(d->sets, SIGNAL(rowInserted()), this, SLOT(slotRowInserted())); + connect(d->sets, TQT_SIGNAL(rowDeleted()), TQT_TQOBJECT(this), TQT_SLOT(updateActions())); + connect(d->sets, TQT_SIGNAL(rowInserted()), TQT_TQOBJECT(this), TQT_SLOT(slotRowInserted())); d->contextMenuTitle = new KPopupTitle(d->view->contextMenu()); d->view->contextMenu()->insertItem(d->contextMenuTitle, -1, 0); - connect(d->view->contextMenu(), SIGNAL(aboutToShow()), this, SLOT(slotAboutToShowContextMenu())); + connect(d->view->contextMenu(), TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(slotAboutToShowContextMenu())); - plugSharedAction("tablepart_toggle_pkey", this, SLOT(slotTogglePrimaryKey())); + plugSharedAction("tablepart_toggle_pkey", TQT_TQOBJECT(this), TQT_SLOT(slotTogglePrimaryKey())); d->action_toggle_pkey = static_cast<KToggleAction*>( sharedAction("tablepart_toggle_pkey") ); d->action_toggle_pkey->plug(d->view->contextMenu(), 1); //add at the beginning d->view->contextMenu()->insertSeparator(2); setAvailable("tablepart_toggle_pkey", !conn->isReadOnly()); #ifndef KEXI_NO_UNDOREDO_ALTERTABLE - plugSharedAction("edit_undo", this, SLOT(slotUndo())); - plugSharedAction("edit_redo", this, SLOT(slotRedo())); + plugSharedAction("edit_undo", TQT_TQOBJECT(this), TQT_SLOT(slotUndo())); + plugSharedAction("edit_redo", TQT_TQOBJECT(this), TQT_SLOT(slotRedo())); setAvailable("edit_undo", false); setAvailable("edit_redo", false); - connect(d->history, SIGNAL(commandExecuted(KCommand*)), this, SLOT(slotCommandExecuted(KCommand*))); + connect(d->history, TQT_SIGNAL(commandExecuted(KCommand*)), TQT_TQOBJECT(this), TQT_SLOT(slotCommandExecuted(KCommand*))); #endif #ifdef KEXI_DEBUG_GUI - KexiUtils::addAlterTableActionDebug(QString::null); //to create the tab + KexiUtils::addAlterTableActionDebug(TQString()); //to create the tab KexiUtils::connectPushButtonActionForDebugWindow( - "simulateAlterTableExecution", this, SLOT(slotSimulateAlterTableExecution())); + "simulateAlterTableExecution", TQT_TQOBJECT(this), TQT_SLOT(slotSimulateAlterTableExecution())); KexiUtils::connectPushButtonActionForDebugWindow( - "executeRealAlterTable", this, SLOT(executeRealAlterTable())); + "executeRealAlterTable", TQT_TQOBJECT(this), TQT_SLOT(executeRealAlterTable())); #endif } @@ -284,7 +284,7 @@ void KexiTableDesignerView::initData() //! Gets subtype strings and names for type \a fieldType void KexiTableDesignerView::getSubTypeListData(KexiDB::Field::TypeGroup fieldTypeGroup, - QStringList& stringsList, QStringList& namesList) + TQStringList& stringsList, TQStringList& namesList) { /* disabled - "mime" is moved from subType to "objectType" custom property if (fieldTypeGroup==KexiDB::Field::BLOBGroup) { @@ -304,12 +304,12 @@ KexiTableDesignerView::getSubTypeListData(KexiDB::Field::TypeGroup fieldTypeGrou KoProperty::Set * KexiTableDesignerView::createPropertySet( int row, const KexiDB::Field& field, bool newOne ) { - QString typeName = "KexiDB::Field::" + field.typeGroupString(); + TQString typeName = "KexiDB::Field::" + field.typeGroupString(); KoProperty::Set *set = new KoProperty::Set(d->sets, typeName); if (mainWin()->project()->dbConnection()->isReadOnly()) set->setReadOnly( true ); -// connect(buff,SIGNAL(propertyChanged(KexiPropertyBuffer&,KexiProperty&)), -// this, SLOT(slotPropertyChanged(KexiPropertyBuffer&,KexiProperty&))); +// connect(buff,TQT_SIGNAL(propertyChanged(KexiPropertyBuffer&,KexiProperty&)), +// TQT_TQOBJECT(this), TQT_SLOT(slotPropertyChanged(KexiPropertyBuffer&,KexiProperty&))); KoProperty::Property *prop; @@ -325,58 +325,58 @@ KexiTableDesignerView::createPropertySet( int row, const KexiDB::Field& field, b )); prop->setVisible(false); set->addProperty(prop = new KoProperty::Property("this:useCaptionAsObjectName", - QVariant(true, 1), QString::null)); //we want "caption" to be displayed in the header, not name + TQVariant(true, 1), TQString())); //we want "caption" to be displayed in the header, not name prop->setVisible(false); //name set->addProperty(prop - = new KoProperty::Property("name", QVariant(field.name()), i18n("Name"), - QString::null, KexiCustomPropertyFactory::Identifier) ); + = new KoProperty::Property("name", TQVariant(field.name()), i18n("Name"), + TQString(), KexiCustomPropertyFactory::Identifier) ); //type set->addProperty( prop - = new KoProperty::Property("type", QVariant(field.type()), i18n("Type")) ); + = new KoProperty::Property("type", TQVariant(field.type()), i18n("Type")) ); #ifndef KexiTableDesignerView_DEBUG prop->setVisible(false);//always hidden #endif //subtype - QStringList typeStringList, typeNameList; + TQStringList typeStringList, typeNameList; getSubTypeListData(field.typeGroup(), typeStringList, typeNameList); /* disabled - "mime" is moved from subType to "objectType" custom property - QString subTypeValue; + TQString subTypeValue; if (field.typeGroup()==KexiDB::Field::BLOBGroup) { // special case: BLOB type uses "mime-based" subtypes //! @todo this should be retrieved from KexiDB::Field when BLOB supports many different mimetypes subTypeValue = slist.first(); } else {*/ - QString subTypeValue = field.typeString(); + TQString subTypeValue = field.typeString(); //} set->addProperty(prop = new KoProperty::Property("subType", typeStringList, typeNameList, subTypeValue, i18n("Subtype"))); // objectType - QStringList objectTypeStringList, objectTypeNameList; + TQStringList objectTypeStringList, objectTypeNameList; //! @todo this should be retrieved from KexiDB::Field when BLOB supports many different mimetypes objectTypeStringList << "image"; objectTypeNameList << i18n("Image object type", "Image"); - QString objectTypeValue( field.customProperty("objectType").toString() ); + TQString objectTypeValue( field.customProperty("objectType").toString() ); if (objectTypeValue.isEmpty()) objectTypeValue = DEFAULT_OBJECT_TYPE_VALUE; set->addProperty(prop = new KoProperty::Property("objectType", objectTypeStringList, objectTypeNameList, objectTypeValue, i18n("Subtype")/*todo other i18n string?*/)); set->addProperty( prop - = new KoProperty::Property("caption", QVariant(field.caption()), i18n("Caption") ) ); + = new KoProperty::Property("caption", TQVariant(field.caption()), i18n("Caption") ) ); prop->setVisible(false);//always hidden set->addProperty( prop - = new KoProperty::Property("description", QVariant(field.description())) ); + = new KoProperty::Property("description", TQVariant(field.description())) ); prop->setVisible(false);//always hidden set->addProperty(prop - = new KoProperty::Property("unsigned", QVariant(field.isUnsigned(), 4), i18n("Unsigned Number"))); + = new KoProperty::Property("unsigned", TQVariant(field.isUnsigned(), 4), i18n("Unsigned Number"))); set->addProperty( prop = new KoProperty::Property("length", (int)field.length()/*200?*/, i18n("Length"))); @@ -400,40 +400,40 @@ KexiTableDesignerView::createPropertySet( int row, const KexiDB::Field& field, b set->addProperty( prop = new KoProperty::Property("defaultValue", field.defaultValue(), i18n("Default Value"), - QString::null, + TQString(), //! @todo use "Variant" type here when supported by KoProperty (KoProperty::PropertyType)field.variantType()) ); prop->setOption("3rdState", i18n("None")); // prop->setVisible(false); set->addProperty( prop - = new KoProperty::Property("primaryKey", QVariant(field.isPrimaryKey(), 4), i18n("Primary Key"))); + = new KoProperty::Property("primaryKey", TQVariant(field.isPrimaryKey(), 4), i18n("Primary Key"))); prop->setIcon("key"); set->addProperty( prop - = new KoProperty::Property("unique", QVariant(field.isUniqueKey(), 4), i18n("Unique"))); + = new KoProperty::Property("unique", TQVariant(field.isUniqueKey(), 4), i18n("Unique"))); set->addProperty( prop - = new KoProperty::Property("notNull", QVariant(field.isNotNull(), 4), i18n("Required"))); + = new KoProperty::Property("notNull", TQVariant(field.isNotNull(), 4), i18n("Required"))); set->addProperty( prop - = new KoProperty::Property("allowEmpty", QVariant(!field.isNotEmpty(), 4), i18n("Allow Zero\nSize"))); + = new KoProperty::Property("allowEmpty", TQVariant(!field.isNotEmpty(), 4), i18n("Allow Zero\nSize"))); set->addProperty( prop - = new KoProperty::Property("autoIncrement", QVariant(field.isAutoIncrement(), 4), i18n("Autonumber"))); + = new KoProperty::Property("autoIncrement", TQVariant(field.isAutoIncrement(), 4), i18n("Autonumber"))); prop->setIcon("autonumber"); set->addProperty( prop - = new KoProperty::Property("indexed", QVariant(field.isIndexed(), 4), i18n("Indexed"))); + = new KoProperty::Property("indexed", TQVariant(field.isIndexed(), 4), i18n("Indexed"))); //- properties related to lookup columns (used and set by the "lookup column" tab in the property pane) KexiDB::LookupFieldSchema *lookupFieldSchema = field.table() ? field.table()->lookupFieldSchema(field) : 0; set->addProperty( prop = new KoProperty::Property("rowSource", - lookupFieldSchema ? lookupFieldSchema->rowSource().name() : QString::null, i18n("Row Source"))); + lookupFieldSchema ? lookupFieldSchema->rowSource().name() : TQString(), i18n("Row Source"))); prop->setVisible(false); set->addProperty( prop = new KoProperty::Property("rowSourceType", - lookupFieldSchema ? lookupFieldSchema->rowSource().typeName() : QString::null, i18n("Row Source\nType"))); + lookupFieldSchema ? lookupFieldSchema->rowSource().typeName() : TQString(), i18n("Row Source\nType"))); prop->setVisible(false); set->addProperty( prop @@ -456,8 +456,8 @@ KexiTableDesignerView::createPropertySet( int row, const KexiDB::Field& field, b //---- d->updatePropertiesVisibility(field.type(), *set); - connect(set, SIGNAL(propertyChanged(KoProperty::Set&, KoProperty::Property&)), - this, SLOT(slotPropertyChanged(KoProperty::Set&, KoProperty::Property&))); + connect(set, TQT_SIGNAL(propertyChanged(KoProperty::Set&, KoProperty::Property&)), + TQT_TQOBJECT(this), TQT_SLOT(slotPropertyChanged(KoProperty::Set&, KoProperty::Property&))); d->sets->insert(row, set, newOne); return set; @@ -491,15 +491,15 @@ void KexiTableDesignerView::slotTogglePrimaryKey() return; KoProperty::Set &set = *propertySet(); bool isSet = !set["primaryKey"].value().toBool(); - set.changeProperty("primaryKey", QVariant(isSet,1)); //this will update all related properties as well + set.changeProperty("primaryKey", TQVariant(isSet,1)); //this will update all related properties as well /* CommandGroup *setPrimaryKeyCommand; if (isSet) { setPrimaryKeyCommand = new CommandGroup(i18n("Set primary key for field \"%1\"") - .arg(set["name"].value().toString()) ); + .tqarg(set["name"].value().toString()) ); } else { setPrimaryKeyCommand = new CommandGroup(i18n("Unset primary key for field \"%1\"") - .arg(set["name"].value().toString()) ); + .tqarg(set["name"].value().toString()) ); } switchPrimaryKey(set, isSet, false, setPrimaryKeyCommand);*/ //addHistoryCommand( setPrimaryKeyCommand, false /* !execute */ ); @@ -510,17 +510,17 @@ void KexiTableDesignerView::switchPrimaryKey(KoProperty::Set &propertySet, bool set, bool aWasPKey, CommandGroup* commandGroup) { const bool was_pkey = aWasPKey || propertySet["primaryKey"].value().toBool(); -// propertySet["primaryKey"] = QVariant(set, 1); - d->setPropertyValueIfNeeded( propertySet, "primaryKey", QVariant(set,1), commandGroup ); +// propertySet["primaryKey"] = TQVariant(set, 1); + d->setPropertyValueIfNeeded( propertySet, "primaryKey", TQVariant(set,1), commandGroup ); if (&propertySet==this->propertySet()) { //update action and icon @ column 0 (only if we're changing current property set) d->action_toggle_pkey->setChecked(set); if (d->view->selectedItem()) { //show key in the table - d->view->data()->clearRowEditBuffer(); - d->view->data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_ICON, - QVariant(set ? "key" : "")); - d->view->data()->saveRowChanges(*d->view->selectedItem(), true); + d->view->KexiDataAwareObjectInterface::data()->clearRowEditBuffer(); + d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_ICON, + TQVariant(set ? "key" : "")); + d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*d->view->selectedItem(), true); } if (was_pkey || set) //change flag only if we're setting pk or really clearing it d->primaryKeyExists = set; @@ -537,31 +537,31 @@ void KexiTableDesignerView::switchPrimaryKey(KoProperty::Set &propertySet, break; } if (i<count) {//remove - //(*s)["autoIncrement"] = QVariant(false, 0); - d->setPropertyValueIfNeeded( *s, "autoIncrement", QVariant(false,0), commandGroup ); - //(*s)["primaryKey"] = QVariant(false, 0); - d->setPropertyValueIfNeeded( *s, "primaryKey", QVariant(false,0), commandGroup ); + //(*s)["autoIncrement"] = TQVariant(false, 0); + d->setPropertyValueIfNeeded( *s, "autoIncrement", TQVariant(false,0), commandGroup ); + //(*s)["primaryKey"] = TQVariant(false, 0); + d->setPropertyValueIfNeeded( *s, "primaryKey", TQVariant(false,0), commandGroup ); //remove key from table - d->view->data()->clearRowEditBuffer(); + d->view->KexiDataAwareObjectInterface::data()->clearRowEditBuffer(); KexiTableItem *item = d->view->itemAt(i); if (item) { - d->view->data()->updateRowEditBuffer(item, COLUMN_ID_ICON, QVariant()); - d->view->data()->saveRowChanges(*item, true); + d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_ICON, TQVariant()); + d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*item, true); } } //set unsigned big-integer type -// d->view->data()->saveRowChanges(*d->view->selectedItem()); +// d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*d->view->selectedItem()); d->slotBeforeCellChanged_enabled = false; - d->view->data()->clearRowEditBuffer(); - d->view->data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_TYPE, - QVariant(KexiDB::Field::IntegerGroup-1/*counting from 0*/)); -// QVariant(KexiDB::Field::typeGroupName(KexiDB::Field::IntegerGroup))); - d->view->data()->saveRowChanges(*d->view->selectedItem(), true); + d->view->KexiDataAwareObjectInterface::data()->clearRowEditBuffer(); + d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_TYPE, + TQVariant(KexiDB::Field::IntegerGroup-1/*counting from 0*/)); +// TQVariant(KexiDB::Field::typeGroupName(KexiDB::Field::IntegerGroup))); + d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*d->view->selectedItem(), true); //propertySet["subType"] = KexiDB::Field::typeString(KexiDB::Field::BigInteger); d->setPropertyValueIfNeeded( propertySet, "subType", KexiDB::Field::typeString(KexiDB::Field::BigInteger), commandGroup ); - //propertySet["unsigned"] = QVariant(true,4); - d->setPropertyValueIfNeeded( propertySet, "unsigned", QVariant(true,4), commandGroup ); + //propertySet["unsigned"] = TQVariant(true,4); + d->setPropertyValueIfNeeded( propertySet, "unsigned", TQVariant(true,4), commandGroup ); /*todo*/ d->slotBeforeCellChanged_enabled = true; } @@ -588,13 +588,13 @@ tristate KexiTableDesignerView::beforeSwitchTo(int mode, bool &dontStore) else */ tristate res = true; if (mode==Kexi::DataViewMode) { - if (!dirty() && parentDialog()->neverSaved()) { + if (!dirty() && tqparentDialog()->neverSaved()) { KMessageBox::sorry(this, i18n("Cannot switch to data view, because table design is empty.\n" "First, please create your design.") ); return cancelled; } //<temporary> - else if (dirty() && !parentDialog()->neverSaved()) { + else if (dirty() && !tqparentDialog()->neverSaved()) { // cancelled = (KMessageBox::No == KMessageBox::questionYesNo(this, i18n("Saving changes for existing table design is not yet supported.\nDo you want to discard your changes now?"))); // KexiDB::Connection *conn = mainWin()->project()->dbConnection(); @@ -602,8 +602,8 @@ tristate KexiTableDesignerView::beforeSwitchTo(int mode, bool &dontStore) int r = KMessageBox::warningYesNoCancel(this, i18n("Saving changes for existing table design is now required.") + "\n" + d->messageForSavingChanges(emptyTable, /* skip warning? */!isPhysicalAlteringNeeded()), - QString::null, - KStdGuiItem::save(), KStdGuiItem::discard(), QString::null, + TQString(), + KStdGuiItem::save(), KStdGuiItem::discard(), TQString(), KMessageBox::Notify|KMessageBox::Dangerous); if (r == KMessageBox::Cancel) res = cancelled; @@ -655,7 +655,7 @@ void KexiTableDesignerView::removeCurrentPropertySet() */ void KexiTableDesignerView::slotBeforeCellChanged( - KexiTableItem *item, int colnum, QVariant& newValue, KexiDB::ResultInfo* /*result*/) + KexiTableItem *item, int colnum, TQVariant& newValue, KexiDB::ResultInfo* /*result*/) { if (!d->slotBeforeCellChanged_enabled) return; @@ -666,14 +666,14 @@ void KexiTableDesignerView::slotBeforeCellChanged( //if 'type' is not filled yet if (item->at(COLUMN_ID_TYPE).isNull()) { //auto select 1st row of 'type' column - d->view->data()->updateRowEditBuffer(item, COLUMN_ID_TYPE, QVariant((int)0)); + d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_TYPE, TQVariant((int)0)); } KoProperty::Set *propertySetForItem = d->sets->findPropertySetForItem(*item); if (propertySetForItem) { d->addHistoryCommand_in_slotPropertyChanged_enabled = false; //because we'll add the two changes as one KMacroCommand - QString oldName( propertySetForItem->property("name").value().toString() ); - QString oldCaption( propertySetForItem->property("caption").value().toString() ); + TQString oldName( propertySetForItem->property("name").value().toString() ); + TQString oldCaption( propertySetForItem->property("caption").value().toString() ); //we need to create the action now as set["name"] will be changed soon.. ChangeFieldPropertyCommand *changeCaptionCommand @@ -687,8 +687,8 @@ void KexiTableDesignerView::slotBeforeCellChanged( //remember this action containing 2 subactions CommandGroup *changeCaptionAndNameCommand = new CommandGroup( i18n("Change \"%1\" field's name to \"%2\" and caption from \"%3\" to \"%4\"") - .arg(oldName).arg(propertySetForItem->property("name").value().toString()) - .arg(oldCaption).arg(newValue.toString() )); + .tqarg(oldName).tqarg(propertySetForItem->property("name").value().toString()) + .tqarg(oldCaption).tqarg(newValue.toString() )); changeCaptionAndNameCommand->addCommand( changeCaptionCommand ); // new ChangeFieldPropertyCommand( this, *propertySetForItem, // "caption", oldCaption, newValue) @@ -706,9 +706,9 @@ void KexiTableDesignerView::slotBeforeCellChanged( if (newValue.isNull()) { //'type' col will be cleared: clear all other columns as well d->slotBeforeCellChanged_enabled = false; - d->view->data()->updateRowEditBuffer(item, COLUMN_ID_ICON, QVariant()); - d->view->data()->updateRowEditBuffer(item, COLUMN_ID_CAPTION, QVariant(QString::null)); - d->view->data()->updateRowEditBuffer(item, COLUMN_ID_DESC, QVariant()); + d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_ICON, TQVariant()); + d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_CAPTION, TQVariant(TQString())); + d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_DESC, TQVariant()); d->slotBeforeCellChanged_enabled = true; return; } @@ -741,10 +741,10 @@ void KexiTableDesignerView::slotBeforeCellChanged( // set["subType"] = KexiDB::Field::typeName(fieldType); //-get subtypes for this type: keys (slist) and names (nlist) - QStringList slist, nlist; + TQStringList slist, nlist; getSubTypeListData(fieldTypeGroup, slist, nlist); - QString subTypeValue; + TQString subTypeValue; /* disabled - "mime" is moved from subType to "objectType" custom property if (fieldType==KexiDB::Field::BLOB) { // special case: BLOB type uses "mime-based" subtypes @@ -759,7 +759,7 @@ void KexiTableDesignerView::slotBeforeCellChanged( // *** this action contains subactions *** CommandGroup *changeDataTypeCommand = new CommandGroup( i18n("Change data type for field \"%1\" to \"%2\"") - .arg(set["name"].value().toString()).arg( KexiDB::Field::typeName( fieldType ) ) ); + .tqarg(set["name"].value().toString()).tqarg( KexiDB::Field::typeName( fieldType ) ) ); //kexipluginsdbg << "++++++++++" << slist << nlist << endl; @@ -780,9 +780,9 @@ void KexiTableDesignerView::slotBeforeCellChanged( // notNull and defaultValue=false is reasonable for boolean type if (fieldType == KexiDB::Field::Boolean) { //! @todo maybe this is good for other data types as well? - d->setPropertyValueIfNeeded( set, "notNull", QVariant(true, 1), changeDataTypeCommand, + d->setPropertyValueIfNeeded( set, "notNull", TQVariant(true, 1), changeDataTypeCommand, false /*!forceAddCommand*/, false /*!rememberOldValue*/); - d->setPropertyValueIfNeeded( set, "defaultValue", QVariant(false, 1), changeDataTypeCommand, + d->setPropertyValueIfNeeded( set, "defaultValue", TQVariant(false, 1), changeDataTypeCommand, false /*!forceAddCommand*/, false /*!rememberOldValue*/); } @@ -797,10 +797,10 @@ void KexiTableDesignerView::slotBeforeCellChanged( //primary keys require big int, so if selected type is not integer- remove PK if (fieldTypeGroup != KexiDB::Field::IntegerGroup) { /*not needed, line below will do the work - d->view->data()->updateRowEditBuffer(item, COLUMN_ID_ICON, QVariant()); - d->view->data()->saveRowChanges(*item); */ - //set["primaryKey"] = QVariant(false, 1); - d->setPropertyValueIfNeeded( set, "primaryKey", QVariant(false, 1), changeDataTypeCommand ); + d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_ICON, TQVariant()); + d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*item); */ + //set["primaryKey"] = TQVariant(false, 1); + d->setPropertyValueIfNeeded( set, "primaryKey", TQVariant(false, 1), changeDataTypeCommand ); //! @todo should we display (passive?) dialog informing about cleared pkey? } } @@ -822,7 +822,7 @@ void KexiTableDesignerView::slotBeforeCellChanged( if (!propertySetForItem) return; //update field desc. - QVariant oldValue((*propertySetForItem)["description"].value()); + TQVariant oldValue((*propertySetForItem)["description"].value()); kexipluginsdbg << oldValue << endl; propertySetForItem->changeProperty("description", newValue); /*moved addHistoryCommand( @@ -833,7 +833,7 @@ void KexiTableDesignerView::slotBeforeCellChanged( void KexiTableDesignerView::slotRowUpdated(KexiTableItem *item) { - const int row = d->view->data()->findRef(item); + const int row = d->view->KexiDataAwareObjectInterface::data()->tqfindRef(item); if (row < 0) return; @@ -841,7 +841,7 @@ void KexiTableDesignerView::slotRowUpdated(KexiTableItem *item) //-check if the row was empty before updating //if yes: we want to add a property set for this new row (field) - QString fieldCaption( item->at(COLUMN_ID_CAPTION).toString() ); + TQString fieldCaption( item->at(COLUMN_ID_CAPTION).toString() ); const bool prop_set_allowed = !item->at(COLUMN_ID_TYPE).isNull(); if (!prop_set_allowed && d->sets->at(row)/*propertySet()*/) { @@ -849,10 +849,10 @@ void KexiTableDesignerView::slotRowUpdated(KexiTableItem *item) d->sets->remove( row ); //d->sets->removeCurrentPropertySet(); //clear 'type' column: - d->view->data()->clearRowEditBuffer(); -// d->view->data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_TYPE, QVariant()); - d->view->data()->updateRowEditBuffer(item, COLUMN_ID_TYPE, QVariant()); - d->view->data()->saveRowChanges(*item); + d->view->KexiDataAwareObjectInterface::data()->clearRowEditBuffer(); +// d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_TYPE, TQVariant()); + d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_TYPE, TQVariant()); + d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*item); } else if (prop_set_allowed && !d->sets->at(row)/*propertySet()*/) { //-- create a new field: @@ -862,10 +862,10 @@ void KexiTableDesignerView::slotRowUpdated(KexiTableItem *item) if (intFieldType==0) return; - QString description( item->at(COLUMN_ID_DESC).toString() ); + TQString description( item->at(COLUMN_ID_DESC).toString() ); //todo: check uniqueness: - QString fieldName( KexiUtils::string2Identifier(fieldCaption) ); + TQString fieldName( KexiUtils::string2Identifier(fieldCaption) ); KexiDB::Field::Type fieldType = KexiDB::intToFieldType( intFieldType ); KexiDB::Field field( //tmp @@ -875,7 +875,7 @@ void KexiTableDesignerView::slotRowUpdated(KexiTableItem *item) KexiDB::Field::NoOptions, /*length*/0, /*precision*/0, - /*defaultValue*/QVariant(), + /*defaultValue*/TQVariant(), fieldCaption, description, /*width*/0); @@ -884,7 +884,7 @@ void KexiTableDesignerView::slotRowUpdated(KexiTableItem *item) // reasonable case for boolean type: set notNull flag and "false" as default value if (fieldType == KexiDB::Field::Boolean) { field.setNotNull( true ); - field.setDefaultValue( QVariant(false, 0) ); + field.setDefaultValue( TQVariant(false, 0) ); } kexipluginsdbg << "KexiTableDesignerView::slotRowUpdated(): " << field.debugString() << endl; @@ -894,7 +894,7 @@ void KexiTableDesignerView::slotRowUpdated(KexiTableItem *item) //moved //add a special property indicating that this is brand new buffer, //not just changed -// KoProperty::Property* prop = new KoProperty::Property("newrow", QVariant()); +// KoProperty::Property* prop = new KoProperty::Property("newrow", TQVariant()); // prop->setVisible(false); // newbuff->addProperty( prop ); @@ -922,7 +922,7 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty { // if (!d->slotPropertyChanged_enabled) // return; - const QCString pname = property.name(); + const TQCString pname = property.name(); kexipluginsdbg << "KexiTableDesignerView::slotPropertyChanged(): " << pname << " = " << property.value() << " (oldvalue = " << property.oldValue() << ")" << endl; @@ -951,11 +951,11 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty CommandGroup *toplevelCommand = 0; if (pname=="autoIncrement" && property.value().toBool()==true) { if (set["primaryKey"].value().toBool()==false) {//we need PKEY here! - QString msg = QString("<p>") + TQString msg = TQString("<p>") +i18n("Setting autonumber requires primary key to be set for current field.")+"</p>"; if (d->primaryKeyExists) - msg += (QString("<p>")+ i18n("Previous primary key will be removed.")+"</p>"); - msg += (QString("<p>") + msg += (TQString("<p>")+ i18n("Previous primary key will be removed.")+"</p>"); + msg += (TQString("<p>") +i18n("Do you want to create primary key for current field? " "Click \"Cancel\" to cancel setting autonumber.")+"</p>"); @@ -968,17 +968,17 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty //switchPrimaryKey(set, true); // this will be toplevel command setAutonumberCommand = new CommandGroup( - i18n("Assign autonumber for field \"%1\"").arg(set["name"].value().toString()) ); + i18n("Assign autonumber for field \"%1\"").tqarg(set["name"].value().toString()) ); toplevelCommand = setAutonumberCommand; - d->setPropertyValueIfNeeded( set, "autoIncrement", QVariant(true,1), setAutonumberCommand ); + d->setPropertyValueIfNeeded( set, "autoIncrement", TQVariant(true,1), setAutonumberCommand ); } else { setAutonumberCommand = new CommandGroup( - i18n("Remove autonumber from field \"%1\"").arg(set["name"].value().toString()) ); + i18n("Remove autonumber from field \"%1\"").tqarg(set["name"].value().toString()) ); //d->slotPropertyChanged_enabled = false; -// set["autoIncrement"].setValue( QVariant(false,1), false/*don't save old*/); +// set["autoIncrement"].setValue( TQVariant(false,1), false/*don't save old*/); // d->slotPropertyChanged_enabled = true; - d->setPropertyValueIfNeeded( set, "autoIncrement", QVariant(false,1), setAutonumberCommand, + d->setPropertyValueIfNeeded( set, "autoIncrement", TQVariant(false,1), setAutonumberCommand, true /*forceAddCommand*/, false/*rememberOldValue*/ ); addHistoryCommand( setAutonumberCommand, false /* !execute */ ); return; @@ -995,12 +995,12 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty setPrimaryKey = false; // this will be toplevel command CommandGroup *unsetIndexedOrUniquOrNotNullCommand = new CommandGroup( - i18n("Set \"%1\" property for field \"%2\"").arg(property.caption()).arg(set["name"].value().toString()) ); + i18n("Set \"%1\" property for field \"%2\"").tqarg(property.caption()).tqarg(set["name"].value().toString()) ); toplevelCommand = unsetIndexedOrUniquOrNotNullCommand; - d->setPropertyValueIfNeeded( set, pname, QVariant(false,1), unsetIndexedOrUniquOrNotNullCommand ); + d->setPropertyValueIfNeeded( set, pname, TQVariant(false,1), unsetIndexedOrUniquOrNotNullCommand ); if (pname=="notNull") { -//? d->setPropertyValueIfNeeded( set, "notNull", QVariant(true,1), unsetIndexedOrUniquOrNotNullCommand ); - d->setPropertyValueIfNeeded( set, "unique", QVariant(false,1), unsetIndexedOrUniquOrNotNullCommand ); +//? d->setPropertyValueIfNeeded( set, "notNull", TQVariant(true,1), unsetIndexedOrUniquOrNotNullCommand ); + d->setPropertyValueIfNeeded( set, "unique", TQVariant(false,1), unsetIndexedOrUniquOrNotNullCommand ); } } @@ -1021,11 +1021,11 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty } KexiDB::Field::Type type = KexiDB::intToFieldType( set["type"].value().toInt() ); - QString typeName; + TQString typeName; /* disabled - "mime" is moved from subType to "objectType" custom property if (type==KexiDB::Field::BLOB) { //special case //find i18n'd text - QStringList stringsList, namesList; + TQStringList stringsList, namesList; getSubTypeListData(KexiDB::Field::BLOBGroup, stringsList, namesList); const int stringIndex = stringsList.findIndex( property.value().toString() ); if (-1 == stringIndex || stringIndex>=(int)namesList.count()) @@ -1040,8 +1040,8 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty // kdDebug() << set["type"].value() << endl; // if (KexiDB::Field::typeGroup( set["type"].value().toInt() ) == (int)KexiDB::Field::TextGroup) { CommandGroup* changeFieldTypeCommand = new CommandGroup( - i18n("Change type for field \"%1\" to \"%2\"").arg(set["name"].value().toString()) - .arg(typeName) ); + i18n("Change type for field \"%1\" to \"%2\"").tqarg(set["name"].value().toString()) + .tqarg(typeName) ); d->setPropertyValueIfNeeded( set, "subType", property.value(), property.oldValue(), changeFieldTypeCommand ); @@ -1050,8 +1050,8 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty set["type"].setValue( newType ); // cast "defaultValue" property value to a new type - QVariant oldDefVal( set["defaultValue"].value() ); - QVariant newDefVal( tryCastQVariant(oldDefVal, KexiDB::Field::variantType(type)) ); + TQVariant oldDefVal( set["defaultValue"].value() ); + TQVariant newDefVal( tryCastTQVariant(oldDefVal, KexiDB::Field::variantType(type)) ); if (oldDefVal.type()!=newDefVal.type()) set["defaultValue"].setType( newDefVal.type() ); d->setPropertyValueIfNeeded( set, "defaultValue", newDefVal, newDefVal, @@ -1085,25 +1085,25 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty //this action contains subactions CommandGroup *setPrimaryKeyCommand = new CommandGroup( i18n("Set primary key for field \"%1\"") - .arg(set["name"].value().toString()) ); + .tqarg(set["name"].value().toString()) ); if (toplevelCommand) toplevelCommand->addCommand( setPrimaryKeyCommand ); else toplevelCommand = setPrimaryKeyCommand; - d->setPropertyValueIfNeeded( set, "primaryKey", QVariant(true,1), setPrimaryKeyCommand, true /*forceAddCommand*/ ); - d->setPropertyValueIfNeeded( set, "unique", QVariant(true,1), setPrimaryKeyCommand ); - d->setPropertyValueIfNeeded( set, "notNull", QVariant(true,1), setPrimaryKeyCommand ); - d->setPropertyValueIfNeeded( set, "allowEmpty", QVariant(false,1), setPrimaryKeyCommand ); - d->setPropertyValueIfNeeded( set, "indexed", QVariant(true,1), setPrimaryKeyCommand ); + d->setPropertyValueIfNeeded( set, "primaryKey", TQVariant(true,1), setPrimaryKeyCommand, true /*forceAddCommand*/ ); + d->setPropertyValueIfNeeded( set, "unique", TQVariant(true,1), setPrimaryKeyCommand ); + d->setPropertyValueIfNeeded( set, "notNull", TQVariant(true,1), setPrimaryKeyCommand ); + d->setPropertyValueIfNeeded( set, "allowEmpty", TQVariant(false,1), setPrimaryKeyCommand ); + d->setPropertyValueIfNeeded( set, "indexed", TQVariant(true,1), setPrimaryKeyCommand ); //! \todo: add setting for this: "Integer PKeys have autonumber set by default" - d->setPropertyValueIfNeeded( set, "autoIncrement", QVariant(true,1), setPrimaryKeyCommand ); + d->setPropertyValueIfNeeded( set, "autoIncrement", TQVariant(true,1), setPrimaryKeyCommand ); -/* set["unique"] = QVariant(true,1); - set["notNull"] = QVariant(true,1); - set["allowEmpty"] = QVariant(false,1); - set["indexed"] = QVariant(true,1); - set["autoIncrement"] = QVariant(true,1);*/ +/* set["unique"] = TQVariant(true,1); + set["notNull"] = TQVariant(true,1); + set["allowEmpty"] = TQVariant(false,1); + set["indexed"] = TQVariant(true,1); + set["autoIncrement"] = TQVariant(true,1);*/ // d->addHistoryCommand_in_slotPropertyChanged_enabled = prev_addHistoryCommand_in_slotPropertyChanged_enabled; //down addHistoryCommand( toplevelCommand, false /* !execute */ ); } @@ -1111,15 +1111,15 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty //remember this action containing 2 subactions CommandGroup *setPrimaryKeyCommand = new CommandGroup( i18n("Unset primary key for field \"%1\"") - .arg(set["name"].value().toString()) ); + .tqarg(set["name"].value().toString()) ); if (toplevelCommand) toplevelCommand->addCommand( setPrimaryKeyCommand ); else toplevelCommand = setPrimaryKeyCommand; - d->setPropertyValueIfNeeded( set, "primaryKey", QVariant(false,1), setPrimaryKeyCommand, true /*forceAddCommand*/ ); - d->setPropertyValueIfNeeded( set, "autoIncrement", QVariant(false,1), setPrimaryKeyCommand ); -// set["autoIncrement"] = QVariant(false,1); + d->setPropertyValueIfNeeded( set, "primaryKey", TQVariant(false,1), setPrimaryKeyCommand, true /*forceAddCommand*/ ); + d->setPropertyValueIfNeeded( set, "autoIncrement", TQVariant(false,1), setPrimaryKeyCommand ); +// set["autoIncrement"] = TQVariant(false,1); //down addHistoryCommand( toplevelCommand, false /* !execute */ ); } @@ -1147,15 +1147,15 @@ void KexiTableDesignerView::slotRowInserted() } void KexiTableDesignerView::slotAboutToDeleteRow( - KexiTableItem& item, KexiDB::ResultInfo* result, bool repaint) + KexiTableItem& item, KexiDB::ResultInfo* result, bool tqrepaint) { Q_UNUSED(result) - Q_UNUSED(repaint) + Q_UNUSED(tqrepaint) if (item[COLUMN_ID_ICON].toString()=="key") d->primaryKeyExists = false; if (d->addHistoryCommand_in_slotAboutToDeleteRow_enabled) { - const int row = d->view->data()->findRef(&item); + const int row = d->view->KexiDataAwareObjectInterface::data()->tqfindRef(&item); KoProperty::Set *set = row >=0 ? d->sets->at(row) : 0; //set can be 0 here, what means "removing empty row" addHistoryCommand( @@ -1169,17 +1169,17 @@ KexiDB::Field * KexiTableDesignerView::buildField( const KoProperty::Set &set ) { //create a map of property values kexipluginsdbg << set["type"].value() << endl; - QMap<QCString, QVariant> values = KoProperty::propertyValues(set); + TQMap<TQCString, TQVariant> values = KoProperty::propertyValues(set); //remove internal values, to avoid creating custom field's properties - QMap<QCString, QVariant>::Iterator it = values.begin(); + TQMap<TQCString, TQVariant>::Iterator it = values.begin(); KexiDB::Field *field = new KexiDB::Field(); while (it!=values.end()) { - const QString propName( it.key() ); - if (d->internalPropertyNames.find(propName.latin1()) || propName.startsWith("this:") + const TQString propName( it.key() ); + if (d->internalPropertyNames.tqfind(propName.latin1()) || propName.startsWith("this:") || (/*sanity*/propName=="objectType" && KexiDB::Field::BLOB != KexiDB::intToFieldType( set["type"].value().toInt() ))) { - QMap<QCString, QVariant>::Iterator it_tmp = it; + TQMap<TQCString, TQVariant>::Iterator it_tmp = it; ++it; values.remove(it_tmp); } @@ -1213,8 +1213,8 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be "for creating relations between database tables. " "Do you want to add primary key automatically now?</p>" "<p>If you want to add a primary key by hand, press \"Cancel\" " - "to cancel saving table design.</p>").arg(schema.name()), - QString::null, KGuiItem(i18n("&Add Primary Key"), "key"), KStdGuiItem::no(), + "to cancel saving table design.</p>").tqarg(schema.name()), + TQString(), KGuiItem(i18n("&Add Primary Key"), "key"), KStdGuiItem::no(), "autogeneratePrimaryKeysOnTableDesignSaving"); if (questionRes==KMessageBox::Cancel) { return cancelled; @@ -1223,15 +1223,15 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be //-find unique name, starting with, "id", "id2", .... int i=0; int idIndex = 1; //means "id" - QString pkFieldName("id%1"); - QString pkFieldCaption(i18n("Identifier%1", "Id%1")); + TQString pkFieldName("id%1"); + TQString pkFieldCaption(i18n("Identifier%1", "Id%1")); while (i<(int)d->sets->size()) { KoProperty::Set *set = d->sets->at(i); if (set) { if ((*set)["name"].value().toString() - == pkFieldName.arg(idIndex==1?QString::null : QString::number(idIndex)) + == pkFieldName.tqarg(idIndex==1?TQString() : TQString::number(idIndex)) || (*set)["caption"].value().toString() - == pkFieldCaption.arg(idIndex==1?QString::null : QString::number(idIndex))) + == pkFieldCaption.tqarg(idIndex==1?TQString() : TQString::number(idIndex))) { //try next id index i = 0; @@ -1241,16 +1241,16 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be } i++; } - pkFieldName = pkFieldName.arg(idIndex==1?QString::null : QString::number(idIndex)); - pkFieldCaption = pkFieldCaption.arg(idIndex==1?QString::null : QString::number(idIndex)); + pkFieldName = pkFieldName.tqarg(idIndex==1?TQString() : TQString::number(idIndex)); + pkFieldCaption = pkFieldCaption.tqarg(idIndex==1?TQString() : TQString::number(idIndex)); //ok, add PK with such unique name d->view->insertEmptyRow(0); d->view->setCursorPosition(0, COLUMN_ID_CAPTION); - d->view->data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_CAPTION, - QVariant(pkFieldCaption)); - d->view->data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_TYPE, - QVariant(KexiDB::Field::IntegerGroup-1/*counting from 0*/)); - if (!d->view->data()->saveRowChanges(*d->view->selectedItem(), true)) { + d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_CAPTION, + TQVariant(pkFieldCaption)); + d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_TYPE, + TQVariant(KexiDB::Field::IntegerGroup-1/*counting from 0*/)); + if (!d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*d->view->selectedItem(), true)) { return cancelled; } slotTogglePrimaryKey(); @@ -1262,18 +1262,18 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be KoProperty::Set *b = 0; bool no_fields = true; int i; - QDict<char> names(101, false); + TQDict<char> names(101, false); char dummy; for (i=0;i<(int)d->sets->size();i++) { b = d->sets->at(i); if (b) { no_fields = false; - const QString name = (*b)["name"].value().toString(); + const TQString name = (*b)["name"].value().toString(); if (name.isEmpty()) { if (beSilent) { kexipluginswarn << - QString("KexiTableDesignerView::buildSchema(): no field caption entered at row %1...") - .arg(i+1) << endl; + TQString("KexiTableDesignerView::buildSchema(): no field caption entered at row %1...") + .tqarg(i+1) << endl; } else { d->view->setCursorPosition(i, COLUMN_ID_CAPTION); @@ -1303,8 +1303,8 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be if (res == true && b && i<(int)d->sets->size()) {//found a duplicate if (beSilent) { kexipluginswarn << - QString("KexiTableDesignerView::buildSchema(): duplicated field name '%1'") - .arg((*b)["name"].value().toString()) << endl; + TQString("KexiTableDesignerView::buildSchema(): duplicated field name '%1'") + .tqarg((*b)["name"].value().toString()) << endl; } else { d->view->setCursorPosition(i, COLUMN_ID_CAPTION); @@ -1313,7 +1313,7 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be KMessageBox::sorry(this, i18n("You have added \"%1\" field name twice.\nField names cannot be repeated. " "Correct name of the field.") - .arg((*b)["name"].value().toString()) ); + .tqarg((*b)["name"].value().toString()) ); } res = cancelled; } @@ -1336,7 +1336,7 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be //! @todo this is backward-compatible code for "single visible column" implementation //! for multiple columns, only the first is displayed, so there is a data loss is GUI is used //! -- special koproperty editor needed - QValueList<uint> visibleColumns; + TQValueList<uint> visibleColumns; const int visibleColumn = (*s)["visibleColumn"].value().toInt(); if (visibleColumn >= 0) visibleColumns.append( (uint)visibleColumn ); @@ -1360,7 +1360,7 @@ static void copyAlterTableActions(KCommand* command, KexiDB::AlterTableHandler:: { CommandGroup* cmdGroup = dynamic_cast<CommandGroup*>( command ); if (cmdGroup) {//command group: flatten it - for (QPtrListIterator<KCommand> it(cmdGroup->commands()); it.current(); ++it) + for (TQPtrListIterator<KCommand> it(cmdGroup->commands()); it.current(); ++it) copyAlterTableActions(it.current(), actions); return; } @@ -1380,7 +1380,7 @@ tristate KexiTableDesignerView::buildAlterTableActions(KexiDB::AlterTableHandler actions.clear(); kexipluginsdbg << "KexiTableDesignerView::buildAlterTableActions(): " << d->history->commands().count() << " top-level command(s) to process..." << endl; - for (QPtrListIterator<KCommand> it(d->history->commands()); it.current(); ++it) { + for (TQPtrListIterator<KCommand> it(d->history->commands()); it.current(); ++it) { copyAlterTableActions(it.current(), actions); } return true; @@ -1406,7 +1406,7 @@ KexiDB::SchemaData* KexiTableDesignerView::storeNewData(const KexiDB::SchemaData KexiDB::Connection *conn = mainWin()->project()->dbConnection(); res = conn->createTable(tempData()->table); if (res!=true) - parentDialog()->setStatus(conn, ""); + tqparentDialog()->settqStatus(conn, ""); } if (res == true) { @@ -1457,7 +1457,7 @@ tristate KexiTableDesignerView::storeData(bool dontAsk) this, *conn, *tempData()->table, i18n("You are about to change the design of table \"%1\" " "but following objects using this table are opened:") - .arg(tempData()->table->name())); + .tqarg(tempData()->table->name())); } if (res == true) { @@ -1468,7 +1468,7 @@ tristate KexiTableDesignerView::storeData(bool dontAsk) // - inform about removing the current table and ask for confirmation if (!d->dontAskOnStoreData && !dontAsk) { bool emptyTable; - const QString msg = d->messageForSavingChanges(emptyTable); + const TQString msg = d->messageForSavingChanges(emptyTable); if (!emptyTable) { if (KMessageBox::No == KMessageBox::questionYesNo(this, msg)) res = cancelled; @@ -1489,7 +1489,7 @@ tristate KexiTableDesignerView::storeData(bool dontAsk) res = conn->alterTable(*tempData()->table, *newTable); if (res != true) - parentDialog()->setStatus(conn, ""); + tqparentDialog()->settqStatus(conn, ""); } else { KexiDB::AlterTableHandler::ExecutionArguments args; @@ -1499,7 +1499,7 @@ tristate KexiTableDesignerView::storeData(bool dontAsk) << res.toString() << endl; if (true != res) { alterTableHandler->debugError(); - parentDialog()->setStatus(alterTableHandler, ""); + tqparentDialog()->settqStatus(alterTableHandler, ""); } } } @@ -1517,11 +1517,11 @@ tristate KexiTableDesignerView::storeData(bool dontAsk) return res; } -tristate KexiTableDesignerView::simulateAlterTableExecution(QString *debugTarget) +tristate KexiTableDesignerView::simulateAlterTableExecution(TQString *debugTarget) { #ifndef KEXI_NO_UNDOREDO_ALTERTABLE # ifdef KEXI_DEBUG_GUI - if (mainWin()->activeWindow() != parentDialog()) //to avoid executing for multiple alter table views + if (mainWin()->activeWindow() != tqparentDialog()) //to avoid executing for multiple alter table views return false; if (!tempData()->table || !m_dialog->schemaData()) return false; @@ -1555,8 +1555,8 @@ void KexiTableDesignerView::slotSimulateAlterTableExecution() tristate KexiTableDesignerView::executeRealAlterTable() { - QSignal signal; - signal.connect( mainWin(), SLOT(slotProjectSave()) ); + TQSignal signal; + signal.connect( mainWin(), TQT_SLOT(slotProjectSave()) ); d->tempStoreDataUsingRealAlterTable = true; d->recentResultOfStoreData = false; signal.activate(); //will call KexiMainWindowImpl::slotProjectSaveAs() and thus storeData() @@ -1566,7 +1566,7 @@ tristate KexiTableDesignerView::executeRealAlterTable() KexiTablePart::TempData* KexiTableDesignerView::tempData() const { - return static_cast<KexiTablePart::TempData*>(parentDialog()->tempData()); + return static_cast<KexiTablePart::TempData*>(tqparentDialog()->tempData()); } /*void KexiTableDesignerView::slotAboutToUpdateRow( @@ -1575,8 +1575,8 @@ KexiTablePart::TempData* KexiTableDesignerView::tempData() const KexiDB::RowEditBuffer::SimpleMap map = buffer->simpleBuffer(); buffer->debug(); - QVariant old_type = item->at(1); - QVariant *buf_type = buffer->at( d->view->field(1)->name() ); + TQVariant old_type = item->at(1); + TQVariant *buf_type = buffer->at( d->view->field(1)->name() ); //check if there is a type specified // if ((old_type.isNull() && !buf_type) || (buf_type && buf_type->isNull())) { @@ -1595,7 +1595,7 @@ void KexiTableDesignerView::debugCommand( KCommand* command, int nestingLevel ) KexiUtils::addAlterTableActionDebug(command->name(), nestingLevel); //show subcommands if (dynamic_cast<CommandGroup*>(command)) { - for (QPtrListIterator<KCommand> it(dynamic_cast<CommandGroup*>(command)->commands()); it.current(); ++it) { + for (TQPtrListIterator<KCommand> it(dynamic_cast<CommandGroup*>(command)->commands()); it.current(); ++it) { debugCommand(it.current(), nestingLevel + 1); } } @@ -1625,7 +1625,7 @@ void KexiTableDesignerView::slotUndo() { #ifndef KEXI_NO_UNDOREDO_ALTERTABLE # ifdef KEXI_DEBUG_GUI - KexiUtils::addAlterTableActionDebug(QString("UNDO:")); + KexiUtils::addAlterTableActionDebug(TQString("UNDO:")); # endif d->history->undo(); updateUndoRedoActions(); @@ -1636,7 +1636,7 @@ void KexiTableDesignerView::slotRedo() { #ifndef KEXI_NO_UNDOREDO_ALTERTABLE # ifdef KEXI_DEBUG_GUI - KexiUtils::addAlterTableActionDebug(QString("REDO:")); + KexiUtils::addAlterTableActionDebug(TQString("REDO:")); # endif d->history->redo(); updateUndoRedoActions(); @@ -1655,25 +1655,25 @@ void KexiTableDesignerView::slotAboutToShowContextMenu() //update title if (propertySet()) { const KoProperty::Set &set = *propertySet(); - QString captionOrName(set["caption"].value().toString()); + TQString captionOrName(set["caption"].value().toString()); if (captionOrName.isEmpty()) captionOrName = set["name"].value().toString(); //! @todo show "field" icon - d->contextMenuTitle->setTitle( i18n("Table field \"%1\"").arg(captionOrName) ); + d->contextMenuTitle->setTitle( i18n("Table field \"%1\"").tqarg(captionOrName) ); } else { d->contextMenuTitle->setTitle( i18n("Empty table row", "Empty Row") ); } } -QString KexiTableDesignerView::debugStringForCurrentTableSchema(tristate& result) +TQString KexiTableDesignerView::debugStringForCurrentTableSchema(tristate& result) { KexiDB::TableSchema tempTable; //copy schema data static_cast<KexiDB::SchemaData&>(tempTable) = static_cast<KexiDB::SchemaData&>(*tempData()->table); result = buildSchema(tempTable, true /*beSilent*/); if (true!=result) - return QString::null; + return TQString(); return tempTable.debugString(false /*without name*/); } @@ -1689,35 +1689,35 @@ void KexiTableDesignerView::clearRow(int row, bool addCommand) //remove from prop. set d->sets->remove( row ); //clear row in table view (just clear value in COLUMN_ID_TYPE column) -// for (int i=0; i < (int)d->view->data()->columnsCount(); i++) { +// for (int i=0; i < (int)d->view->KexiDataAwareObjectInterface::data()->columnsCount(); i++) { if (!addCommand) { d->addHistoryCommand_in_slotRowUpdated_enabled = false; d->addHistoryCommand_in_slotPropertyChanged_enabled = false; d->slotBeforeCellChanged_enabled = false; } - d->view->data()->updateRowEditBuffer(item, COLUMN_ID_TYPE, QVariant()); + d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_TYPE, TQVariant()); if (!addCommand) { d->addHistoryCommand_in_slotRowUpdated_enabled = true; d->addHistoryCommand_in_slotPropertyChanged_enabled = true; d->slotBeforeCellChanged_enabled = true; } - d->view->data()->saveRowChanges(*item, true); + d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*item, true); } -void KexiTableDesignerView::insertField(int row, const QString& caption, bool addCommand) +void KexiTableDesignerView::insertField(int row, const TQString& caption, bool addCommand) { insertFieldInternal(row, 0, caption, addCommand); } void KexiTableDesignerView::insertField(int row, KoProperty::Set& set, bool addCommand) { - insertFieldInternal(row, &set, QString::null, addCommand); + insertFieldInternal(row, &set, TQString(), addCommand); } void KexiTableDesignerView::insertFieldInternal(int row, KoProperty::Set* set, //const KexiDB::Field& field, - const QString& caption, bool addCommand) + const TQString& caption, bool addCommand) { - if (set && (!set->contains("type") || !set->contains("caption"))) { + if (set && (!set->tqcontains("type") || !set->tqcontains("caption"))) { kexipluginswarn << "KexiTableDesignerView::insertField(): no 'type' or 'caption' property in set!" << endl; return; } @@ -1731,19 +1731,19 @@ void KexiTableDesignerView::insertFieldInternal(int row, KoProperty::Set* set, / d->addHistoryCommand_in_slotPropertyChanged_enabled = false; d->slotBeforeCellChanged_enabled = false; } - d->view->data()->updateRowEditBuffer(item, COLUMN_ID_CAPTION, - set ? (*set)["caption"].value() : QVariant(caption));//field.caption()); - d->view->data()->updateRowEditBuffer(item, COLUMN_ID_TYPE, + d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_CAPTION, + set ? (*set)["caption"].value() : TQVariant(caption));//field.caption()); + d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_TYPE, set ? (int)KexiDB::Field::typeGroup( (*set)["type"].value().toInt() )-1/*counting from 0*/ : (((int)KexiDB::Field::TextGroup)-1)/*default type, counting from 0*/ ); - d->view->data()->updateRowEditBuffer(item, COLUMN_ID_DESC, - set ? (*set)["description"].value() : QVariant());//field.description()); + d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_DESC, + set ? (*set)["description"].value() : TQVariant());//field.description()); if (!addCommand) { d->slotBeforeCellChanged_enabled = true; } //this will create a new property set: - d->view->data()->saveRowChanges(*item); + d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*item); if (set) { KoProperty::Set *newSet = d->sets->at(row); if (newSet) { @@ -1775,7 +1775,7 @@ void KexiTableDesignerView::insertEmptyRow( int row, bool addCommand ) /*void KexiTableDesignerView::deleteRow( int row ) { d->addHistoryCommand_in_slotAboutToDeleteRow_enabled = false; - d->view->deleteItem( d->view->data()->at(row) ); + d->view->deleteItem( d->view->KexiDataAwareObjectInterface::data()->at(row) ); d->addHistoryCommand_in_slotAboutToDeleteRow_enabled = true; }*/ @@ -1796,18 +1796,18 @@ void KexiTableDesignerView::deleteRow( int row, bool addCommand ) } void KexiTableDesignerView::changeFieldPropertyForRow( int row, - const QCString& propertyName, const QVariant& newValue, + const TQCString& propertyName, const TQVariant& newValue, KoProperty::Property::ListData* const listData, bool addCommand ) { #ifdef KEXI_DEBUG_GUI - KexiUtils::addAlterTableActionDebug(QString("** changeFieldProperty: \"") - + QString(propertyName) + "\" to \"" + newValue.toString() + "\"", 2/*nestingLevel*/); + KexiUtils::addAlterTableActionDebug(TQString("** changeFieldProperty: \"") + + TQString(propertyName) + "\" to \"" + newValue.toString() + "\"", 2/*nestingLevel*/); #endif if (!d->view->acceptRowEdit()) return; KoProperty::Set* set = d->sets->at( row ); - if (!set || !set->contains(propertyName)) + if (!set || !set->tqcontains(propertyName)) return; KoProperty::Property &property = set->property(propertyName); if (listData) { @@ -1825,9 +1825,9 @@ void KexiTableDesignerView::changeFieldPropertyForRow( int row, // d->addHistoryCommand_in_slotRowUpdated_enabled = false; // d->addHistoryCommand_in_slotPropertyChanged_enabled = false; d->slotPropertyChanged_subType_enabled = false; - d->view->data()->updateRowEditBuffer(item, COLUMN_ID_TYPE, + d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_TYPE, int( KexiDB::Field::typeGroup( newValue.toInt() ) )-1); - d->view->data()->saveRowChanges(*item); + d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*item); d->addHistoryCommand_in_slotRowUpdated_enabled = true; // d->addHistoryCommand_in_slotPropertyChanged_enabled = true; // d->slotPropertyChanged_subType_enabled = true; @@ -1844,8 +1844,8 @@ void KexiTableDesignerView::changeFieldPropertyForRow( int row, if (!addCommand) { d->slotBeforeCellChanged_enabled = false; } - d->view->data()->updateRowEditBuffer(item, COLUMN_ID_CAPTION, newValue); - d->view->data()->saveRowChanges(*item); + d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_CAPTION, newValue); + d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*item); if (!addCommand) { d->slotBeforeCellChanged_enabled = true; } @@ -1854,11 +1854,11 @@ void KexiTableDesignerView::changeFieldPropertyForRow( int row, if (!addCommand) { d->slotBeforeCellChanged_enabled = false; } - d->view->data()->updateRowEditBuffer(item, COLUMN_ID_DESC, newValue); + d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_DESC, newValue); if (!addCommand) { d->slotBeforeCellChanged_enabled = true; } - d->view->data()->saveRowChanges(*item); + d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*item); } if (!addCommand) { d->addHistoryCommand_in_slotPropertyChanged_enabled = true; @@ -1869,7 +1869,7 @@ void KexiTableDesignerView::changeFieldPropertyForRow( int row, } void KexiTableDesignerView::changeFieldProperty( int fieldUID, - const QCString& propertyName, const QVariant& newValue, + const TQCString& propertyName, const TQVariant& newValue, KoProperty::Property::ListData* const listData, bool addCommand ) { //find a property by UID @@ -1882,11 +1882,11 @@ void KexiTableDesignerView::changeFieldProperty( int fieldUID, } void KexiTableDesignerView::changePropertyVisibility( - int fieldUID, const QCString& propertyName, bool visible ) + int fieldUID, const TQCString& propertyName, bool visible ) { #ifdef KEXI_DEBUG_GUI - KexiUtils::addAlterTableActionDebug(QString("** changePropertyVisibility: \"") - + QString(propertyName) + "\" to \"" + (visible ? "true" : "false") + "\"", 2/*nestingLevel*/); + KexiUtils::addAlterTableActionDebug(TQString("** changePropertyVisibility: \"") + + TQString(propertyName) + "\" to \"" + (visible ? "true" : "false") + "\"", 2/*nestingLevel*/); #endif if (!d->view->acceptRowEdit()) return; @@ -1896,7 +1896,7 @@ void KexiTableDesignerView::changePropertyVisibility( if (row<0) return; KoProperty::Set* set = d->sets->at( row ); - if (!set || !set->contains(propertyName)) + if (!set || !set->tqcontains(propertyName)) return; KoProperty::Property &property = set->property(propertyName); @@ -1910,10 +1910,10 @@ void KexiTableDesignerView::propertySetSwitched() { KexiDataTable::propertySetSwitched(); - //if (parentDialog()!=parentDialog()->mainWin()->currentDialog()) + //if (tqparentDialog()!=tqparentDialog()->mainWin()->currentDialog()) // return; //this is not the current dialog's view - static_cast<KexiTablePart*>(parentDialog()->part())->lookupColumnPage() + static_cast<KexiTablePart*>(tqparentDialog()->part())->lookupColumnPage() ->assignPropertySet(propertySet()); } diff --git a/kexi/plugins/tables/kexitabledesignerview.h b/kexi/plugins/tables/kexitabledesignerview.h index 773163b6..b7ff7a23 100644 --- a/kexi/plugins/tables/kexitabledesignerview.h +++ b/kexi/plugins/tables/kexitabledesignerview.h @@ -56,10 +56,11 @@ namespace KoProperty { class KexiTableDesignerView : public KexiDataTable, public KexiTableDesignerInterface { Q_OBJECT + TQ_OBJECT public: /*! Creates a new alter table dialog. */ - KexiTableDesignerView(KexiMainWindow *win, QWidget *parent); + KexiTableDesignerView(KexiMainWindow *win, TQWidget *tqparent); virtual ~KexiTableDesignerView(); @@ -72,7 +73,7 @@ class KexiTableDesignerView : public KexiDataTable, public KexiTableDesignerInte /*! Inserts a new field with \a caption for \a row. Property set is also created. */ - virtual void insertField(int row, const QString& caption, bool addCommand = false); + virtual void insertField(int row, const TQString& caption, bool addCommand = false); /*! Inserts a new \a field for \a row. Property set is also created. \a set will be deeply-copied into the new set. @@ -97,29 +98,29 @@ class KexiTableDesignerView : public KexiDataTable, public KexiTableDesignerInte If \a listData is not NULL and not empty, a deep copy of it is passed to Property::setListData(). If \a listData \a nlist if not NULL but empty, Property::setListData(0) is called. */ virtual void changeFieldPropertyForRow( int row, - const QCString& propertyName, const QVariant& newValue, + const TQCString& propertyName, const TQVariant& newValue, KoProperty::Property::ListData* const listData, bool addCommand ); /*! Changes property \a propertyName to \a newValue. Works exactly like changeFieldPropertyForRow() except the field is pointed by \a fieldUID. Used by ChangeFieldPropertyCommand to change field's property. */ - void changeFieldProperty( int fieldUID, const QCString& propertyName, - const QVariant& newValue, KoProperty::Property::ListData* const listData = 0, + void changeFieldProperty( int fieldUID, const TQCString& propertyName, + const TQVariant& newValue, KoProperty::Property::ListData* const listData = 0, bool addCommand = false ); /*! Changes visibility of property \a propertyName to \a visible for a field pointed by \a fieldUID. Used by ChangePropertyVisibilityCommand. */ - void changePropertyVisibility( int fieldUID, const QCString& propertyName, bool visible ); + void changePropertyVisibility( int fieldUID, const TQCString& propertyName, bool visible ); /*! Builds table field's schema by looking at the \a set. */ KexiDB::Field * buildField( const KoProperty::Set &set ) const; /*! Creates temporary table for the current design and returns debug string for it. */ - virtual QString debugStringForCurrentTableSchema(tristate& result); + virtual TQString debugStringForCurrentTableSchema(tristate& result); /*! Simulates execution of alter table, and puts debug into \a debugTarget. A case when debugTarget is not 0 is true for the alter table test suite. */ - virtual tristate simulateAlterTableExecution(QString *debugTarget); + virtual tristate simulateAlterTableExecution(TQString *debugTarget); public slots: /*! Real execution of the Alter Table. For debugging of the real alter table. @@ -138,17 +139,17 @@ class KexiTableDesignerView : public KexiDataTable, public KexiTableDesignerInte //! Called before cell change in tableview. void slotBeforeCellChanged(KexiTableItem *item, int colnum, - QVariant& newValue, KexiDB::ResultInfo* result); + TQVariant& newValue, KexiDB::ResultInfo* result); //! Called on row change in a tableview. void slotRowUpdated(KexiTableItem *item); //! Called before row inserting in tableview. void slotRowInserted(); -// void slotAboutToInsertRow(KexiTableItem* item, KexiDB::ResultInfo* result, bool repaint); +// void slotAboutToInsertRow(KexiTableItem* item, KexiDB::ResultInfo* result, bool tqrepaint); //! Called before row deleting in tableview. - void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool repaint); + void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool tqrepaint); /*! Called after any property has been changed in the current property set, to perform some actions (like updating other dependent properties) */ @@ -218,13 +219,13 @@ class KexiTableDesignerView : public KexiDataTable, public KexiTableDesignerInte Assigns primary key icon and value for property set \a propertySet, and deselects it from previous pkey's row. \a aWasPKey is internal. - If \a commandGroup is not 0, it is used as parent group for storing actions' history. */ + If \a commandGroup is not 0, it is used as tqparent group for storing actions' history. */ void switchPrimaryKey(KoProperty::Set &propertySet, bool set, bool aWasPKey = false, CommandGroup* commandGroup = 0); //! Gets subtype strings and names for type \a fieldType. void getSubTypeListData(KexiDB::Field::TypeGroup fieldTypeGroup, - QStringList& stringsList, QStringList& namesList); + TQStringList& stringsList, TQStringList& namesList); /*! Adds history command \a command to the undo/redo buffer. If \a execute is true, the command is executed afterwards. */ @@ -240,7 +241,7 @@ class KexiTableDesignerView : public KexiDataTable, public KexiTableDesignerInte /*! Inserts a new \a field for \a row. Property set is also created. If \a set is not 0 (the default), it will be copied into the new set. Used by insertField(). */ - void insertFieldInternal(int row, KoProperty::Set* set, const QString& caption, bool addCommand); + void insertFieldInternal(int row, KoProperty::Set* set, const TQString& caption, bool addCommand); //! Reimplemented to pass the information also to the "Lookup" tab virtual void propertySetSwitched(); diff --git a/kexi/plugins/tables/kexitabledesignerview_p.cpp b/kexi/plugins/tables/kexitabledesignerview_p.cpp index 56ef997d..cf98b683 100644 --- a/kexi/plugins/tables/kexitabledesignerview_p.cpp +++ b/kexi/plugins/tables/kexitabledesignerview_p.cpp @@ -20,9 +20,9 @@ #include "kexitabledesignerview_p.h" #include "kexitabledesignerview.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qsplitter.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqsplitter.h> #include <kiconloader.h> #include <kdebug.h> @@ -109,7 +109,7 @@ KexiTableDesignerViewPrivate::KexiTableDesignerViewPrivate(KexiTableDesignerView , slotBeforeCellChanged_enabled(true) , tempStoreDataUsingRealAlterTable(false) { - historyActionCollection = new KActionCollection((QWidget*)0,""); + historyActionCollection = new KActionCollection((TQWidget*)0,""); history = new CommandHistory(historyActionCollection, true); internalPropertyNames.insert("subType",(char*)1); @@ -133,10 +133,10 @@ int KexiTableDesignerViewPrivate::generateUniqueId() } void KexiTableDesignerViewPrivate::setPropertyValueIfNeeded( - const KoProperty::Set& set, const QCString& propertyName, - const QVariant& newValue, const QVariant& oldValue, CommandGroup* commandGroup, + const KoProperty::Set& set, const TQCString& propertyName, + const TQVariant& newValue, const TQVariant& oldValue, CommandGroup* commandGroup, bool forceAddCommand, bool rememberOldValue, - QStringList* const slist, QStringList* const nlist) + TQStringList* const slist, TQStringList* const nlist) { KoProperty::Property& property = set[propertyName]; @@ -173,13 +173,13 @@ void KexiTableDesignerViewPrivate::setPropertyValueIfNeeded( } void KexiTableDesignerViewPrivate::setPropertyValueIfNeeded( - const KoProperty::Set& set, const QCString& propertyName, - const QVariant& newValue, CommandGroup* commandGroup, + const KoProperty::Set& set, const TQCString& propertyName, + const TQVariant& newValue, CommandGroup* commandGroup, bool forceAddCommand, bool rememberOldValue, - QStringList* const slist, QStringList* const nlist) + TQStringList* const slist, TQStringList* const nlist) { KoProperty::Property& property = set[propertyName]; - QVariant oldValue( property.value() ); + TQVariant oldValue( property.value() ); setPropertyValueIfNeeded( set, propertyName, newValue, property.value(), commandGroup, forceAddCommand, rememberOldValue, slist, nlist); } @@ -269,26 +269,26 @@ bool KexiTableDesignerViewPrivate::updatePropertiesVisibility(KexiDB::Field::Typ return changed; } -QString KexiTableDesignerViewPrivate::messageForSavingChanges(bool &emptyTable, bool skipWarning) +TQString KexiTableDesignerViewPrivate::messageForSavingChanges(bool &emptyTable, bool skipWarning) { KexiDB::Connection *conn = designerView->mainWin()->project()->dbConnection(); bool ok; emptyTable = conn->isEmpty( *designerView->tempData()->table, ok ) && ok; return i18n("Do you want to save the design now?") - + ( (emptyTable || skipWarning) ? QString::null : - (QString("\n\n") + designerView->part()->i18nMessage(":additional message before saving design", - designerView->parentDialog())) ); + + ( (emptyTable || skipWarning) ? TQString() : + (TQString("\n\n") + designerView->part()->i18nMessage(":additional message before saving design", + designerView->tqparentDialog())) ); } void KexiTableDesignerViewPrivate::updateIconForItem(KexiTableItem &item, KoProperty::Set& set) { - QVariant icon; + TQVariant icon; if (!set["rowSource"].value().toString().isEmpty() && !set["rowSourceType"].value().toString().isEmpty()) icon = "combo"; //show/hide icon in the table - view->data()->clearRowEditBuffer(); - view->data()->updateRowEditBuffer(&item, COLUMN_ID_ICON, icon); - view->data()->saveRowChanges(item, true); + view->KexiDataAwareObjectInterface::data()->clearRowEditBuffer(); + view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(&item, COLUMN_ID_ICON, icon); + view->KexiDataAwareObjectInterface::data()->saveRowChanges(item, true); } #include "kexitabledesignerview_p.moc" diff --git a/kexi/plugins/tables/kexitabledesignerview_p.h b/kexi/plugins/tables/kexitabledesignerview_p.h index f5650e74..8f647548 100644 --- a/kexi/plugins/tables/kexitabledesignerview_p.h +++ b/kexi/plugins/tables/kexitabledesignerview_p.h @@ -37,11 +37,11 @@ class KexiDataAwarePropertySet; class CommandGroup : public KMacroCommand { public: - CommandGroup( const QString & name ) + CommandGroup( const TQString & name ) : KMacroCommand(name) {} virtual ~CommandGroup() {} - const QPtrList<KCommand>& commands() const { return m_commands; } + const TQPtrList<KCommand>& commands() const { return m_commands; } }; /*! @internal @@ -50,10 +50,11 @@ class CommandGroup : public KMacroCommand class CommandHistory : public KCommandHistory { Q_OBJECT + TQ_OBJECT public: CommandHistory(KActionCollection *actionCollection, bool withMenus = true); - const QPtrList<KCommand>& commands() const { return m_commandsToUndo; } + const TQPtrList<KCommand>& commands() const { return m_commandsToUndo; } void addCommand(KCommand *command, bool execute = true); @@ -64,7 +65,7 @@ class CommandHistory : public KCommandHistory virtual void redo(); protected: - QPtrList<KCommand> m_commandsToUndo, m_commandsToRedo; + TQPtrList<KCommand> m_commandsToUndo, m_commandsToRedo; }; //---------------------------------------------- @@ -96,17 +97,17 @@ class KexiTableDesignerViewPrivate addHistoryCommand_in_slotPropertyChanged_enabled is then set back to the original state. */ - void setPropertyValueIfNeeded( const KoProperty::Set& set, const QCString& propertyName, - const QVariant& newValue, CommandGroup* commandGroup, + void setPropertyValueIfNeeded( const KoProperty::Set& set, const TQCString& propertyName, + const TQVariant& newValue, CommandGroup* commandGroup, bool forceAddCommand = false, bool rememberOldValue = true, - QStringList* const slist = 0, QStringList* const nlist = 0); + TQStringList* const slist = 0, TQStringList* const nlist = 0); /*! Like above but allows to specify \a oldValue. */ void setPropertyValueIfNeeded( - const KoProperty::Set& set, const QCString& propertyName, - const QVariant& newValue, const QVariant& oldValue, CommandGroup* commandGroup, + const KoProperty::Set& set, const TQCString& propertyName, + const TQVariant& newValue, const TQVariant& oldValue, CommandGroup* commandGroup, bool forceAddCommand = false, bool rememberOldValue = true, - QStringList* const slist = 0, QStringList* const nlist = 0); + TQStringList* const slist = 0, TQStringList* const nlist = 0); /*! @internal Used in updatePropertiesVisibility(). @@ -123,7 +124,7 @@ class KexiTableDesignerViewPrivate \a emptyTable is set to true if the table designed contains no rows. If \a skipWarning is true, no warning about data loss is appended (useful when only non-physical altering actions will be performed). */ - QString messageForSavingChanges(bool &emptyTable, bool skipWarning = false); + TQString messageForSavingChanges(bool &emptyTable, bool skipWarning = false); /*! Updates icon in the first column, depending on property set \a set. For example, when "rowSource" and "rowSourceType" propertiesa are not empty, @@ -185,7 +186,7 @@ class KexiTableDesignerViewPrivate //! A cache used in KexiTableDesignerView::buildField() to quickly identify //! properties internal to the designer - QAsciiDict<char> internalPropertyNames; + TQAsciiDict<char> internalPropertyNames; }; #endif diff --git a/kexi/plugins/tables/kexitablepart.cpp b/kexi/plugins/tables/kexitablepart.cpp index 3d09a81e..1ee3d049 100644 --- a/kexi/plugins/tables/kexitablepart.cpp +++ b/kexi/plugins/tables/kexitablepart.cpp @@ -51,11 +51,11 @@ class KexiTablePart::Private { delete static_cast<KexiLookupColumnPage*>(lookupColumnPage); } - QGuardedPtr<KexiLookupColumnPage> lookupColumnPage; + TQGuardedPtr<KexiLookupColumnPage> lookupColumnPage; }; -KexiTablePart::KexiTablePart(QObject *parent, const char *name, const QStringList &l) - : KexiPart::Part(parent, name, l) +KexiTablePart::KexiTablePart(TQObject *tqparent, const char *name, const TQStringList &l) + : KexiPart::Part(tqparent, name, l) , d(new Private()) { // REGISTERED ID: @@ -93,11 +93,11 @@ void KexiTablePart::initInstanceActions() KexiDialogTempData* KexiTablePart::createTempData(KexiDialogBase* dialog) { - return new KexiTablePart::TempData(dialog); + return new KexiTablePart::TempData(TQT_TQOBJECT(dialog)); } -KexiViewBase* KexiTablePart::createView(QWidget *parent, KexiDialogBase* dialog, - KexiPart::Item &item, int viewMode, QMap<QString,QString>*) +KexiViewBase* KexiTablePart::createView(TQWidget *tqparent, KexiDialogBase* dialog, + KexiPart::Item &item, int viewMode, TQMap<TQString,TQString>*) { KexiMainWindow *win = dialog->mainWin(); if (!win || !win->project() || !win->project()->dbConnection()) @@ -111,7 +111,7 @@ KexiViewBase* KexiTablePart::createView(QWidget *parent, KexiDialogBase* dialog, } if (viewMode == Kexi::DesignViewMode) { - KexiTableDesignerView *t = new KexiTableDesignerView(win, parent); + KexiTableDesignerView *t = new KexiTableDesignerView(win, tqparent); return t; } else if (viewMode == Kexi::DataViewMode) { @@ -119,7 +119,7 @@ KexiViewBase* KexiTablePart::createView(QWidget *parent, KexiDialogBase* dialog, return 0; //todo: message //we're not setting table schema here -it will be forced to set // in KexiTableDesigner_DataView::afterSwitchFrom() - KexiTableDesigner_DataView *t = new KexiTableDesigner_DataView(win, parent); + KexiTableDesigner_DataView *t = new KexiTableDesigner_DataView(win, tqparent); return t; } return 0; @@ -137,7 +137,7 @@ bool KexiTablePart::remove(KexiMainWindow *win, KexiPart::Item &item) tristate res = KexiTablePart::askForClosingObjectsUsingTableSchema( win, *conn, *sch, i18n("You are about to remove table \"%1\" but following objects using this table are opened:") - .arg(sch->name())); + .tqarg(sch->name())); return true == conn->dropTable( sch ); } //last chance: just remove item @@ -145,7 +145,7 @@ bool KexiTablePart::remove(KexiMainWindow *win, KexiPart::Item &item) } tristate KexiTablePart::rename(KexiMainWindow *win, KexiPart::Item & item, - const QString& newName) + const TQString& newName) { //TODO: what about objects (queries/forms) that use old name? KexiDB::Connection *conn = win->project()->dbConnection(); @@ -171,24 +171,24 @@ KexiTablePart::dataSource() } #endif -tristate KexiTablePart::askForClosingObjectsUsingTableSchema(QWidget *parent, KexiDB::Connection& conn, - KexiDB::TableSchema& table, const QString& msg) +tristate KexiTablePart::askForClosingObjectsUsingTableSchema(TQWidget *tqparent, KexiDB::Connection& conn, + KexiDB::TableSchema& table, const TQString& msg) { - QPtrList<KexiDB::Connection::TableSchemaChangeListenerInterface>* listeners + TQPtrList<KexiDB::Connection::TableSchemaChangeListenerInterface>* listeners = conn.tableSchemaChangeListeners(table); if (!listeners || listeners->isEmpty()) return true; - QString openedObjectsStr = "<ul>"; - for (QPtrListIterator<KexiDB::Connection::TableSchemaChangeListenerInterface> it(*listeners); + TQString openedObjectsStr = "<ul>"; + for (TQPtrListIterator<KexiDB::Connection::TableSchemaChangeListenerInterface> it(*listeners); it.current(); ++it) { - openedObjectsStr += QString("<li>%1</li>").arg(it.current()->listenerInfoString); + openedObjectsStr += TQString("<li>%1</li>").tqarg(it.current()->listenerInfoString); } openedObjectsStr += "</ul>"; - int r = KMessageBox::questionYesNo(parent, + int r = KMessageBox::questionYesNo(tqparent, "<p>"+msg+"</p><p>"+openedObjectsStr+"</p><p>" +i18n("Do you want to close all windows for these objects?"), - QString::null, KGuiItem(i18n("Close windows"),"fileclose"), KStdGuiItem::cancel()); + TQString(), KGuiItem(i18n("Close windows"),"fileclose"), KStdGuiItem::cancel()); tristate res; if (r == KMessageBox::Yes) { //try to close every window @@ -202,8 +202,8 @@ tristate KexiTablePart::askForClosingObjectsUsingTableSchema(QWidget *parent, Ke return res; } -QString -KexiTablePart::i18nMessage(const QCString& englishMessage, KexiDialogBase* dlg) const +TQString +KexiTablePart::i18nMessage(const TQCString& englishMessage, KexiDialogBase* dlg) const { if (englishMessage=="Design of object \"%1\" has been modified.") return i18n("Design of table \"%1\" has been modified."); @@ -222,18 +222,18 @@ void KexiTablePart::setupCustomPropertyPanelTabs(KTabWidget *tab, KexiMainWindow { if (!d->lookupColumnPage) { d->lookupColumnPage = new KexiLookupColumnPage(0); - connect(d->lookupColumnPage, SIGNAL(jumpToObjectRequested(const QCString&, const QCString&)), - mainWin, SLOT(highlightObject(const QCString&, const QCString&))); + connect(d->lookupColumnPage, TQT_SIGNAL(jumpToObjectRequested(const TQCString&, const TQCString&)), + mainWin, TQT_SLOT(highlightObject(const TQCString&, const TQCString&))); //! @todo add "Table" tab /* - connect(d->dataSourcePage, SIGNAL(formDataSourceChanged(const QCString&, const QCString&)), - KFormDesigner::FormManager::self(), SLOT(setFormDataSource(const QCString&, const QCString&))); - connect(d->dataSourcePage, SIGNAL(dataSourceFieldOrExpressionChanged(const QString&, const QString&, KexiDB::Field::Type)), - KFormDesigner::FormManager::self(), SLOT(setDataSourceFieldOrExpression(const QString&, const QString&, KexiDB::Field::Type))); - connect(d->dataSourcePage, SIGNAL(insertAutoFields(const QString&, const QString&, const QStringList&)), - KFormDesigner::FormManager::self(), SLOT(insertAutoFields(const QString&, const QString&, const QStringList&)));*/ + connect(d->dataSourcePage, TQT_SIGNAL(formDataSourceChanged(const TQCString&, const TQCString&)), + KFormDesigner::FormManager::self(), TQT_SLOT(setFormDataSource(const TQCString&, const TQCString&))); + connect(d->dataSourcePage, TQT_SIGNAL(dataSourceFieldOrExpressionChanged(const TQString&, const TQString&, KexiDB::Field::Type)), + KFormDesigner::FormManager::self(), TQT_SLOT(setDataSourceFieldOrExpression(const TQString&, const TQString&, KexiDB::Field::Type))); + connect(d->dataSourcePage, TQT_SIGNAL(insertAutoFields(const TQString&, const TQString&, const TQStringList&)), + KFormDesigner::FormManager::self(), TQT_SLOT(insertAutoFields(const TQString&, const TQString&, const TQStringList&)));*/ } KexiProject *prj = mainWin->project(); @@ -278,8 +278,8 @@ KexiTableDataSource::cursor(KexiProject * /*project*/, //---------------- -KexiTablePart::TempData::TempData(QObject* parent) - : KexiDialogTempData(parent) +KexiTablePart::TempData::TempData(TQObject* tqparent) + : KexiDialogTempData(tqparent) , table(0) , tableSchemaChangedInPreviousView(true /*to force reloading on startup*/ ) { diff --git a/kexi/plugins/tables/kexitablepart.h b/kexi/plugins/tables/kexitablepart.h index e4b060ad..68825138 100644 --- a/kexi/plugins/tables/kexitablepart.h +++ b/kexi/plugins/tables/kexitablepart.h @@ -35,22 +35,23 @@ class KexiLookupColumnPage; class KexiTablePart : public KexiPart::Part { Q_OBJECT + TQ_OBJECT public: - KexiTablePart(QObject *parent, const char *name, const QStringList &); + KexiTablePart(TQObject *tqparent, const char *name, const TQStringList &); virtual ~KexiTablePart(); virtual bool remove(KexiMainWindow *win, KexiPart::Item &item); virtual tristate rename(KexiMainWindow *win, KexiPart::Item &item, - const QString& newName); + const TQString& newName); // virtual KexiPart::DataSource *dataSource(); class TempData : public KexiDialogTempData { public: - TempData(QObject* parent); + TempData(TQObject* tqparent); KexiDB::TableSchema *table; /*! true, if \a table member has changed in previous view. Used on view switching. We're checking this flag to see if we should refresh data for DataViewMode. */ @@ -58,10 +59,10 @@ class KexiTablePart : public KexiPart::Part }; static tristate askForClosingObjectsUsingTableSchema( - QWidget *parent, KexiDB::Connection& conn, - KexiDB::TableSchema& table, const QString& msg); + TQWidget *tqparent, KexiDB::Connection& conn, + KexiDB::TableSchema& table, const TQString& msg); - virtual QString i18nMessage(const QCString& englishMessage, + virtual TQString i18nMessage(const TQCString& englishMessage, KexiDialogBase* dlg) const; KexiLookupColumnPage* lookupColumnPage() const; @@ -69,8 +70,8 @@ class KexiTablePart : public KexiPart::Part protected: virtual KexiDialogTempData* createTempData(KexiDialogBase* dialog); - virtual KexiViewBase* createView(QWidget *parent, KexiDialogBase* dialog, - KexiPart::Item &item, int viewMode = Kexi::DataViewMode, QMap<QString,QString>* staticObjectArgs = 0); + virtual KexiViewBase* createView(TQWidget *tqparent, KexiDialogBase* dialog, + KexiPart::Item &item, int viewMode = Kexi::DataViewMode, TQMap<TQString,TQString>* staticObjectArgs = 0); virtual void initPartActions(); virtual void initInstanceActions(); |