summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/tables/kexitabledesignerview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/plugins/tables/kexitabledesignerview.cpp')
-rw-r--r--kexi/plugins/tables/kexitabledesignerview.cpp500
1 files changed, 250 insertions, 250 deletions
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());
}