summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/tables
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/plugins/tables')
-rw-r--r--kexi/plugins/tables/kexilookupcolumnpage.cpp14
-rw-r--r--kexi/plugins/tables/kexitabledesignercommands.cpp32
-rw-r--r--kexi/plugins/tables/kexitabledesignerview.cpp58
-rw-r--r--kexi/plugins/tables/kexitabledesignerview.h4
-rw-r--r--kexi/plugins/tables/kexitabledesignerview_p.cpp2
-rw-r--r--kexi/plugins/tables/kexitablepart.cpp4
6 files changed, 57 insertions, 57 deletions
diff --git a/kexi/plugins/tables/kexilookupcolumnpage.cpp b/kexi/plugins/tables/kexilookupcolumnpage.cpp
index d47f0226..443f26d4 100644
--- a/kexi/plugins/tables/kexilookupcolumnpage.cpp
+++ b/kexi/plugins/tables/kexilookupcolumnpage.cpp
@@ -20,7 +20,7 @@
#include "kexilookupcolumnpage.h"
#include <tqlabel.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqtooltip.h>
#include <tqheader.h>
@@ -142,10 +142,10 @@ KexiLookupColumnPage::KexiLookupColumnPage(TQWidget *parent)
TQHBoxLayout *hlyr = new TQHBoxLayout(contentsVlyr);
d->rowSourceLabel = new TQLabel(i18n("Row source:"), contents);
- d->rowSourceLabel->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
+ d->rowSourceLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
d->rowSourceLabel->setMargin(2);
d->rowSourceLabel->setMinimumHeight(IconSize(KIcon::Small)+4);
- d->rowSourceLabel->setAlignment(TQt::AlignLeft|TQt::AlignBottom);
+ d->rowSourceLabel->tqsetAlignment(TQt::AlignLeft|TQt::AlignBottom);
hlyr->addWidget(d->rowSourceLabel);
d->gotoRowSourceButton = new KexiSmallToolButton(contents, TQString(), "goto", "gotoRowSourceButton");
@@ -170,10 +170,10 @@ KexiLookupColumnPage::KexiLookupColumnPage(TQWidget *parent)
//- Bound Column
hlyr = new TQHBoxLayout(contentsVlyr);
d->boundColumnLabel = new TQLabel(i18n("Bound column:"), contents);
- d->boundColumnLabel->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
+ d->boundColumnLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
d->boundColumnLabel->setMargin(2);
d->boundColumnLabel->setMinimumHeight(IconSize(KIcon::Small)+4);
- d->boundColumnLabel->setAlignment(TQt::AlignLeft|TQt::AlignBottom);
+ d->boundColumnLabel->tqsetAlignment(TQt::AlignLeft|TQt::AlignBottom);
hlyr->addWidget(d->boundColumnLabel);
d->clearBoundColumnButton = new KexiSmallToolButton(contents, TQString(),
@@ -192,10 +192,10 @@ KexiLookupColumnPage::KexiLookupColumnPage(TQWidget *parent)
//- Visible Column
hlyr = new TQHBoxLayout(contentsVlyr);
d->visibleColumnLabel = new TQLabel(i18n("Visible column:"), contents);
- d->visibleColumnLabel->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
+ d->visibleColumnLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
d->visibleColumnLabel->setMargin(2);
d->visibleColumnLabel->setMinimumHeight(IconSize(KIcon::Small)+4);
- d->visibleColumnLabel->setAlignment(TQt::AlignLeft|TQt::AlignBottom);
+ d->visibleColumnLabel->tqsetAlignment(TQt::AlignLeft|TQt::AlignBottom);
hlyr->addWidget(d->visibleColumnLabel);
d->clearVisibleColumnButton = new KexiSmallToolButton(contents, TQString(),
diff --git a/kexi/plugins/tables/kexitabledesignercommands.cpp b/kexi/plugins/tables/kexitabledesignercommands.cpp
index a019eac2..298363c4 100644
--- a/kexi/plugins/tables/kexitabledesignercommands.cpp
+++ b/kexi/plugins/tables/kexitabledesignercommands.cpp
@@ -18,7 +18,7 @@
*/
#include <tqdom.h>
#include <tqwidget.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqlabel.h>
#include <tqsplitter.h>
#include <tqmetaobject.h>
@@ -72,8 +72,8 @@ ChangeFieldPropertyCommand::~ChangeFieldPropertyCommand()
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());
}
TQString ChangeFieldPropertyCommand::debugString()
@@ -81,15 +81,15 @@ TQString ChangeFieldPropertyCommand::debugString()
TQString s( name() );
if (m_oldListData || m_listData)
s += TQString("\nAnd list data from [%1]\n to [%2]")
- .arg( m_oldListData ?
+ .tqarg( m_oldListData ?
TQString("%1 -> %2")
- .arg(m_oldListData->keysAsStringList().join(",")).arg(m_oldListData->names.join(","))
+ .tqarg(m_oldListData->keysAsStringList().join(",")).tqarg(m_oldListData->names.join(","))
: TQString("<NONE>"))
- .arg( m_listData ?
+ .tqarg( m_listData ?
TQString("%1 -> %2")
- .arg(m_listData->keysAsStringList().join(",")).arg(m_listData->names.join(","))
+ .tqarg(m_listData->keysAsStringList().join(",")).tqarg(m_listData->names.join(","))
: TQString("<NONE>"));
- return s + TQString(" (UID=%1)").arg(m_alterTableAction.uid());
+ return s + TQString(" (UID=%1)").tqarg(m_alterTableAction.uid());
}
void ChangeFieldPropertyCommand::execute()
@@ -136,9 +136,9 @@ RemoveFieldCommand::~RemoveFieldCommand()
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 TQString("Remove empty row at position %1").arg(m_fieldIndex);
+ return TQString("Remove empty row at position %1").tqarg(m_fieldIndex);
}
void RemoveFieldCommand::execute()
@@ -161,7 +161,7 @@ TQString RemoveFieldCommand::debugString()
return name() + "\nAT ROW " + TQString::number(m_fieldIndex)
+ ", FIELD: " + (*m_set)["caption"].value().toString()
- + TQString(" (UID=%1)").arg(m_alterTableAction.uid());
+ + TQString(" (UID=%1)").tqarg(m_alterTableAction.uid());
}
KexiDB::AlterTableHandler::ActionBase* RemoveFieldCommand::createAction()
@@ -192,7 +192,7 @@ InsertFieldCommand::~InsertFieldCommand()
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()
@@ -229,9 +229,9 @@ ChangePropertyVisibilityCommand::~ChangePropertyVisibilityCommand()
TQString ChangePropertyVisibilityCommand::name() const
{
return TQString("[internal] Change \"%1\" visibility from \"%2\" to \"%3\"")
- .arg(m_alterTableAction.propertyName())
- .arg(m_oldVisibility ? "true" : "false")
- .arg(m_alterTableAction.newValue().toBool() ? "true" : "false");
+ .tqarg(m_alterTableAction.propertyName())
+ .tqarg(m_oldVisibility ? "true" : "false")
+ .tqarg(m_alterTableAction.newValue().toBool() ? "true" : "false");
}
void ChangePropertyVisibilityCommand::execute()
@@ -265,7 +265,7 @@ InsertEmptyRowCommand::~InsertEmptyRowCommand()
TQString InsertEmptyRowCommand::name() const
{
- return TQString("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/kexitabledesignerview.cpp b/kexi/plugins/tables/kexitabledesignerview.cpp
index 0563cde3..84ea686c 100644
--- a/kexi/plugins/tables/kexitabledesignerview.cpp
+++ b/kexi/plugins/tables/kexitabledesignerview.cpp
@@ -22,7 +22,7 @@
#include "kexilookupcolumnpage.h"
#include "kexitabledesignercommands.h"
-#include <layout.h>
+#include <tqlayout.h>
#include <tqlabel.h>
#include <tqsplitter.h>
@@ -168,7 +168,7 @@ KexiTableDesignerView::KexiTableDesignerView(KexiMainWindow *win, TQWidget *pare
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 );
@@ -495,11 +495,11 @@ void KexiTableDesignerView::slotTogglePrimaryKey()
/* 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 */ );
@@ -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)
@@ -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;
@@ -968,13 +968,13 @@ 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", 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( TQVariant(false,1), false/*don't save old*/);
// d->slotPropertyChanged_enabled = true;
@@ -995,7 +995,7 @@ 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, TQVariant(false,1), unsetIndexedOrUniquOrNotNullCommand );
if (pname=="notNull") {
@@ -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 );
@@ -1085,7 +1085,7 @@ 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
@@ -1111,7 +1111,7 @@ 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
@@ -1147,10 +1147,10 @@ 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;
@@ -1213,7 +1213,7 @@ 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()),
+ "to cancel saving table design.</p>").tqarg(schema.name()),
TQString(), KGuiItem(i18n("&Add Primary Key"), "key"), KStdGuiItem::no(),
"autogeneratePrimaryKeysOnTableDesignSaving");
if (questionRes==KMessageBox::Cancel) {
@@ -1229,9 +1229,9 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be
KoProperty::Set *set = d->sets->at(i);
if (set) {
if ((*set)["name"].value().toString()
- == pkFieldName.arg(idIndex==1?TQString() : TQString::number(idIndex))
+ == pkFieldName.tqarg(idIndex==1?TQString() : TQString::number(idIndex))
|| (*set)["caption"].value().toString()
- == pkFieldCaption.arg(idIndex==1?TQString() : TQString::number(idIndex)))
+ == pkFieldCaption.tqarg(idIndex==1?TQString() : TQString::number(idIndex)))
{
//try next id index
i = 0;
@@ -1241,8 +1241,8 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be
}
i++;
}
- pkFieldName = pkFieldName.arg(idIndex==1?TQString() : TQString::number(idIndex));
- pkFieldCaption = pkFieldCaption.arg(idIndex==1?TQString() : TQString::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);
@@ -1273,7 +1273,7 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be
if (beSilent) {
kexipluginswarn <<
TQString("KexiTableDesignerView::buildSchema(): no field caption entered at row %1...")
- .arg(i+1) << endl;
+ .tqarg(i+1) << endl;
}
else {
d->view->setCursorPosition(i, COLUMN_ID_CAPTION);
@@ -1304,7 +1304,7 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be
if (beSilent) {
kexipluginswarn <<
TQString("KexiTableDesignerView::buildSchema(): duplicated field name '%1'")
- .arg((*b)["name"].value().toString()) << endl;
+ .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;
}
@@ -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, "");
+ parentDialog()->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) {
@@ -1489,7 +1489,7 @@ tristate KexiTableDesignerView::storeData(bool dontAsk)
res = conn->alterTable(*tempData()->table, *newTable);
if (res != true)
- parentDialog()->setStatus(conn, "");
+ parentDialog()->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, "");
+ parentDialog()->settqStatus(alterTableHandler, "");
}
}
}
@@ -1659,7 +1659,7 @@ void KexiTableDesignerView::slotAboutToShowContextMenu()
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") );
diff --git a/kexi/plugins/tables/kexitabledesignerview.h b/kexi/plugins/tables/kexitabledesignerview.h
index 5b9d0215..13ce495d 100644
--- a/kexi/plugins/tables/kexitabledesignerview.h
+++ b/kexi/plugins/tables/kexitabledesignerview.h
@@ -146,10 +146,10 @@ class KexiTableDesignerView : public KexiDataTable, public KexiTableDesignerInte
//! 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) */
diff --git a/kexi/plugins/tables/kexitabledesignerview_p.cpp b/kexi/plugins/tables/kexitabledesignerview_p.cpp
index 30bdb557..c546327b 100644
--- a/kexi/plugins/tables/kexitabledesignerview_p.cpp
+++ b/kexi/plugins/tables/kexitabledesignerview_p.cpp
@@ -20,7 +20,7 @@
#include "kexitabledesignerview_p.h"
#include "kexitabledesignerview.h"
-#include <layout.h>
+#include <tqlayout.h>
#include <tqlabel.h>
#include <tqsplitter.h>
diff --git a/kexi/plugins/tables/kexitablepart.cpp b/kexi/plugins/tables/kexitablepart.cpp
index 55c8be5d..4efd237a 100644
--- a/kexi/plugins/tables/kexitablepart.cpp
+++ b/kexi/plugins/tables/kexitablepart.cpp
@@ -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
@@ -182,7 +182,7 @@ tristate KexiTablePart::askForClosingObjectsUsingTableSchema(TQWidget *parent, K
TQString openedObjectsStr = "<ul>";
for (TQPtrListIterator<KexiDB::Connection::TableSchemaChangeListenerInterface> it(*listeners);
it.current(); ++it) {
- openedObjectsStr += TQString("<li>%1</li>").arg(it.current()->listenerInfoString);
+ openedObjectsStr += TQString("<li>%1</li>").tqarg(it.current()->listenerInfoString);
}
openedObjectsStr += "</ul>";
int r = KMessageBox::questionYesNo(parent,