summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/macros/kexipart/keximacrodesignview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/plugins/macros/kexipart/keximacrodesignview.cpp')
-rw-r--r--kexi/plugins/macros/kexipart/keximacrodesignview.cpp90
1 files changed, 45 insertions, 45 deletions
diff --git a/kexi/plugins/macros/kexipart/keximacrodesignview.cpp b/kexi/plugins/macros/kexipart/keximacrodesignview.cpp
index 030be0cb..4d480365 100644
--- a/kexi/plugins/macros/kexipart/keximacrodesignview.cpp
+++ b/kexi/plugins/macros/kexipart/keximacrodesignview.cpp
@@ -18,8 +18,8 @@
#include "keximacrodesignview.h"
#include "keximacroproperty.h"
-#include <qtimer.h>
-#include <qdom.h>
+#include <tqtimer.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kexidialogbase.h>
@@ -107,8 +107,8 @@ class KexiMacroDesignView::Private
};
-KexiMacroDesignView::KexiMacroDesignView(KexiMainWindow *mainwin, QWidget *parent, ::KoMacro::Macro* const macro)
- : KexiMacroView(mainwin, parent, macro, "KexiMacroDesignView")
+KexiMacroDesignView::KexiMacroDesignView(KexiMainWindow *mainwin, TQWidget *tqparent, ::KoMacro::Macro* const macro)
+ : KexiMacroView(mainwin, tqparent, macro, "KexiMacroDesignView")
, d( new Private() )
{
// The table's data-model.
@@ -123,19 +123,19 @@ KexiMacroDesignView::KexiMacroDesignView(KexiMainWindow *mainwin, QWidget *paren
KexiDB::Field::NoOptions, // options
0, // length
0, // precision
- QVariant(), // default value
+ TQVariant(), // default value
i18n("Action"), // caption
- QString::null, // description
+ TQString(), // description
0 // width
);
d->tabledata->addColumn(actioncol);
- QValueVector<QString> items;
+ TQValueVector<TQString> items;
items.append(""); // empty means no action
// Append the list of actions provided by Kexi.
- QStringList actionnames = KoMacro::Manager::self()->actionNames();
- QStringList::ConstIterator it, end( actionnames.constEnd() );
+ TQStringList actionnames = KoMacro::Manager::self()->actionNames();
+ TQStringList::ConstIterator it, end( actionnames.constEnd() );
for( it = actionnames.constBegin(); it != end; ++it) {
KSharedPtr<KoMacro::Action> action = KoMacro::Manager::self()->action(*it);
items.append( action->text() );
@@ -151,16 +151,16 @@ KexiMacroDesignView::KexiMacroDesignView(KexiMainWindow *mainwin, QWidget *paren
KexiDB::Field::NoOptions, // options
0, // length
0, // precision
- QVariant(), // default value
+ TQVariant(), // default value
i18n("Comment"), // caption
- QString::null, // description
+ TQString(), // description
0 // width
) );
// Create the tableview.
- QHBoxLayout* layout = new QHBoxLayout(this);
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(this);
d->datatable = new KexiDataTable(mainWin(), this, "Macro KexiDataTable", false /*not db aware*/);
- layout->addWidget(d->datatable);
+ tqlayout->addWidget(d->datatable);
d->tableview = d->datatable->tableView();
d->tableview->setSpreadSheetMode();
d->tableview->setColumnStretchEnabled( true, COLUMN_ID_COMMENT ); //last column occupies the rest of the area
@@ -173,14 +173,14 @@ KexiMacroDesignView::KexiMacroDesignView(KexiMainWindow *mainwin, QWidget *paren
d->propertyset = new KexiDataAwarePropertySet(this, d->tableview);
// Connect signals the KexiDataTable provides to local slots.
- connect(d->tabledata, SIGNAL(aboutToChangeCell(KexiTableItem*,int,QVariant&,KexiDB::ResultInfo*)),
- this, SLOT(beforeCellChanged(KexiTableItem*,int,QVariant&,KexiDB::ResultInfo*)));
- connect(d->tabledata, SIGNAL(rowUpdated(KexiTableItem*)),
- this, SLOT(rowUpdated(KexiTableItem*)));
- connect(d->tabledata, SIGNAL(rowInserted(KexiTableItem*,uint,bool)),
- this, SLOT(rowInserted(KexiTableItem*,uint,bool)));
- connect(d->tabledata, SIGNAL(rowDeleted()),
- this, SLOT(rowDeleted()));
+ connect(d->tabledata, TQT_SIGNAL(aboutToChangeCell(KexiTableItem*,int,TQVariant&,KexiDB::ResultInfo*)),
+ this, TQT_SLOT(beforeCellChanged(KexiTableItem*,int,TQVariant&,KexiDB::ResultInfo*)));
+ connect(d->tabledata, TQT_SIGNAL(rowUpdated(KexiTableItem*)),
+ this, TQT_SLOT(rowUpdated(KexiTableItem*)));
+ connect(d->tabledata, TQT_SIGNAL(rowInserted(KexiTableItem*,uint,bool)),
+ this, TQT_SLOT(rowInserted(KexiTableItem*,uint,bool)));
+ connect(d->tabledata, TQT_SIGNAL(rowDeleted()),
+ this, TQT_SLOT(rowDeleted()));
// Everything is ready. So, update the data now.
updateData();
@@ -207,7 +207,7 @@ void KexiMacroDesignView::updateData()
}
// Set the MacroItem's
- QStringList actionnames = KoMacro::Manager::self()->actionNames();
+ TQStringList actionnames = KoMacro::Manager::self()->actionNames();
KoMacro::MacroItem::List macroitems = macro()->items();
KoMacro::MacroItem::List::ConstIterator it(macroitems.constBegin()), end(macroitems.constEnd());
for(uint idx = 0; it != end; ++it, idx++) {
@@ -259,12 +259,12 @@ KoProperty::Set* KexiMacroDesignView::propertySet()
return d->propertyset->currentPropertySet();
}
-void KexiMacroDesignView::beforeCellChanged(KexiTableItem* item, int colnum, QVariant& newvalue, KexiDB::ResultInfo* result)
+void KexiMacroDesignView::beforeCellChanged(KexiTableItem* item, int colnum, TQVariant& newvalue, KexiDB::ResultInfo* result)
{
Q_UNUSED(result);
kdDebug() << "KexiMacroDesignView::beforeCellChanged() colnum=" << colnum << " newvalue=" << newvalue.toString() << endl;
- int rowindex = d->tabledata->findRef(item);
+ int rowindex = d->tabledata->tqfindRef(item);
if(rowindex < 0) {
kdWarning() << "KexiMacroDesignView::beforeCellChanged() No such item" << endl;
return;
@@ -286,11 +286,11 @@ void KexiMacroDesignView::beforeCellChanged(KexiTableItem* item, int colnum, QVa
// Handle the column that should be changed
switch(colnum) {
case COLUMN_ID_ACTION: { // The "Action" column
- QString actionname;
+ TQString actionname;
bool ok;
int selectedindex = newvalue.toInt(&ok);
if(ok && selectedindex > 0) {
- QStringList actionnames = KoMacro::Manager::self()->actionNames();
+ TQStringList actionnames = KoMacro::Manager::self()->actionNames();
actionname = actionnames[ selectedindex - 1 ]; // first item is empty
}
KSharedPtr<KoMacro::Action> action = KoMacro::Manager::self()->action(actionname);
@@ -311,7 +311,7 @@ void KexiMacroDesignView::beforeCellChanged(KexiTableItem* item, int colnum, QVa
void KexiMacroDesignView::rowUpdated(KexiTableItem* item)
{
- int rowindex = d->tabledata->findRef(item);
+ int rowindex = d->tabledata->tqfindRef(item);
kdDebug() << "KexiMacroDesignView::rowUpdated() rowindex=" << rowindex << endl;
//propertySetSwitched();
//propertySetReloaded(true);
@@ -347,7 +347,7 @@ void KexiMacroDesignView::rowDeleted()
macroitems.remove( macroitems.at(rowindex) );
}
-bool KexiMacroDesignView::updateSet(KoProperty::Set* set, KSharedPtr<KoMacro::MacroItem> macroitem, const QString& variablename)
+bool KexiMacroDesignView::updateSet(KoProperty::Set* set, KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& variablename)
{
kdDebug() << "KexiMacroDesignView::updateSet() variablename=" << variablename << endl;
KoProperty::Property* property = KexiMacroProperty::createProperty(macroitem, variablename);
@@ -382,8 +382,8 @@ void KexiMacroDesignView::updateProperties(int row, KoProperty::Set* set, KShare
// if there exists no such propertyset yet, create one.
set = new KoProperty::Set(d->propertyset, action->name());
d->propertyset->insert(row, set, true);
- connect(set, SIGNAL(propertyChanged(KoProperty::Set&, KoProperty::Property&)),
- this, SLOT(propertyChanged(KoProperty::Set&, KoProperty::Property&)));
+ connect(set, TQT_SIGNAL(propertyChanged(KoProperty::Set&, KoProperty::Property&)),
+ this, TQT_SLOT(propertyChanged(KoProperty::Set&, KoProperty::Property&)));
}
// The caption.
@@ -392,8 +392,8 @@ void KexiMacroDesignView::updateProperties(int row, KoProperty::Set* set, KShare
set->addProperty(prop);
// Display the list of variables.
- QStringList varnames = action->variableNames();
- for(QStringList::Iterator it = varnames.begin(); it != varnames.end(); ++it) {
+ TQStringList varnames = action->variableNames();
+ for(TQStringList::Iterator it = varnames.begin(); it != varnames.end(); ++it) {
if(updateSet(set, macroitem, *it)) {
KSharedPtr<KoMacro::Variable> variable = macroitem->variable(*it, true);
kdDebug()<<"KexiMacroDesignView::updateProperties() name=" << *it << " variable=" << variable->variant().toString() << endl;
@@ -418,7 +418,7 @@ void KexiMacroDesignView::propertyChanged(KoProperty::Set& set, KoProperty::Prop
d->reloadsProperties = true;
const int row = d->propertyset->currentRow();
- const QCString name = property.name();
+ const TQCString name = property.name();
kdDebug() << "KexiMacroDesignView::propertyChanged() name=" << name << " row=" << row << endl;
//TODO reload is only needed if something changed!
@@ -433,26 +433,26 @@ void KexiMacroDesignView::propertyChanged(KoProperty::Set& set, KoProperty::Prop
updateProperties(row, &set, macroitem);
}
// It's needed to call the reload delayed cause in KoProperty::Editor
- // QTimer::singleShot(10, this, SLOT(selectItemLater())); may lead
+ // TQTimer::singleShot(10, this, TQT_SLOT(selectItemLater())); may lead
// to crashes if we are to fast.
- QTimer::singleShot(50, this, SLOT(reloadPropertyLater()));
+ TQTimer::singleShot(50, this, TQT_SLOT(reloadPropertyLater()));
}
d->reloadsProperties = false;
*/
/*
- QStringList dirtyvarnames = macroitem->setVariable(name, KSharedPtr<KoMacro::Variable>(pv));
+ TQStringList dirtyvarnames = macroitem->setVariable(name, KSharedPtr<KoMacro::Variable>(pv));
bool dirty = false;
bool reload = false;
- for(QStringList::Iterator it = dirtyvarnames.begin(); it != dirtyvarnames.end(); ++it) {
+ for(TQStringList::Iterator it = dirtyvarnames.begin(); it != dirtyvarnames.end(); ++it) {
KSharedPtr<KoMacro::Variable> variable = macroitem->variable(*it);
if(! variable.data()) {
kdDebug() << "KexiMacroDesignView::propertyChanged() name=" << name << " it=" << *it << " skipped cause such a variable is not known." << endl;
continue;
}
- if(! set.contains( (*it).latin1() )) {
+ if(! set.tqcontains( (*it).latin1() )) {
// If there exist no such property yet, we need to add it.
if(updateSet(&set, macroitem, *it))
reload = true; // we like to reload the whole set
@@ -461,12 +461,12 @@ void KexiMacroDesignView::propertyChanged(KoProperty::Set& set, KoProperty::Prop
kdDebug() << "KexiMacroDesignView::propertyChanged() set existing property=" << *it << endl;
KoProperty::Property& p = set.property((*it).latin1());
- KoMacro::Variable::List children = variable->children();
- if(children.count() > 0) {
- QStringList keys, names;
- KoMacro::Variable::List::Iterator childit(children.begin()), childend(children.end());
+ KoMacro::Variable::List tqchildren = variable->tqchildren();
+ if(tqchildren.count() > 0) {
+ TQStringList keys, names;
+ KoMacro::Variable::List::Iterator childit(tqchildren.begin()), childend(tqchildren.end());
for(; childit != childend; ++childit) {
- const QString s = (*childit)->variant().toString();
+ const TQString s = (*childit)->variant().toString();
keys << s;
names << s;
}
@@ -480,8 +480,8 @@ void KexiMacroDesignView::propertyChanged(KoProperty::Set& set, KoProperty::Prop
// need to reload the whole set.
for(KoProperty::Set::Iterator setit = set; setit.current(); ++setit) {
if(setit.currentKey() == name) continue; // don't remove ourself
- if(setit.currentKey().left(5) == QCString("this:")) continue; // don't remove internal properties
- if(setit.currentKey() == QCString("newrow")) continue; // also an internal used property
+ if(setit.currentKey().left(5) == TQCString("this:")) continue; // don't remove internal properties
+ if(setit.currentKey() == TQCString("newrow")) continue; // also an internal used property
if(action.data() && action->hasVariable(setit.currentKey())) continue; // the property is still valid
reload = true; // we like to reload the whole set
}