summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/tables/kexitablepart.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/plugins/tables/kexitablepart.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/plugins/tables/kexitablepart.cpp')
-rw-r--r--kexi/plugins/tables/kexitablepart.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/kexi/plugins/tables/kexitablepart.cpp b/kexi/plugins/tables/kexitablepart.cpp
index 3d09a81e..1ee3d049 100644
--- a/kexi/plugins/tables/kexitablepart.cpp
+++ b/kexi/plugins/tables/kexitablepart.cpp
@@ -51,11 +51,11 @@ class KexiTablePart::Private
{
delete static_cast<KexiLookupColumnPage*>(lookupColumnPage);
}
- QGuardedPtr<KexiLookupColumnPage> lookupColumnPage;
+ TQGuardedPtr<KexiLookupColumnPage> lookupColumnPage;
};
-KexiTablePart::KexiTablePart(QObject *parent, const char *name, const QStringList &l)
- : KexiPart::Part(parent, name, l)
+KexiTablePart::KexiTablePart(TQObject *tqparent, const char *name, const TQStringList &l)
+ : KexiPart::Part(tqparent, name, l)
, d(new Private())
{
// REGISTERED ID:
@@ -93,11 +93,11 @@ void KexiTablePart::initInstanceActions()
KexiDialogTempData* KexiTablePart::createTempData(KexiDialogBase* dialog)
{
- return new KexiTablePart::TempData(dialog);
+ return new KexiTablePart::TempData(TQT_TQOBJECT(dialog));
}
-KexiViewBase* KexiTablePart::createView(QWidget *parent, KexiDialogBase* dialog,
- KexiPart::Item &item, int viewMode, QMap<QString,QString>*)
+KexiViewBase* KexiTablePart::createView(TQWidget *tqparent, KexiDialogBase* dialog,
+ KexiPart::Item &item, int viewMode, TQMap<TQString,TQString>*)
{
KexiMainWindow *win = dialog->mainWin();
if (!win || !win->project() || !win->project()->dbConnection())
@@ -111,7 +111,7 @@ KexiViewBase* KexiTablePart::createView(QWidget *parent, KexiDialogBase* dialog,
}
if (viewMode == Kexi::DesignViewMode) {
- KexiTableDesignerView *t = new KexiTableDesignerView(win, parent);
+ KexiTableDesignerView *t = new KexiTableDesignerView(win, tqparent);
return t;
}
else if (viewMode == Kexi::DataViewMode) {
@@ -119,7 +119,7 @@ KexiViewBase* KexiTablePart::createView(QWidget *parent, KexiDialogBase* dialog,
return 0; //todo: message
//we're not setting table schema here -it will be forced to set
// in KexiTableDesigner_DataView::afterSwitchFrom()
- KexiTableDesigner_DataView *t = new KexiTableDesigner_DataView(win, parent);
+ KexiTableDesigner_DataView *t = new KexiTableDesigner_DataView(win, tqparent);
return t;
}
return 0;
@@ -137,7 +137,7 @@ bool KexiTablePart::remove(KexiMainWindow *win, KexiPart::Item &item)
tristate res = KexiTablePart::askForClosingObjectsUsingTableSchema(
win, *conn, *sch,
i18n("You are about to remove table \"%1\" but following objects using this table are opened:")
- .arg(sch->name()));
+ .tqarg(sch->name()));
return true == conn->dropTable( sch );
}
//last chance: just remove item
@@ -145,7 +145,7 @@ bool KexiTablePart::remove(KexiMainWindow *win, KexiPart::Item &item)
}
tristate KexiTablePart::rename(KexiMainWindow *win, KexiPart::Item & item,
- const QString& newName)
+ const TQString& newName)
{
//TODO: what about objects (queries/forms) that use old name?
KexiDB::Connection *conn = win->project()->dbConnection();
@@ -171,24 +171,24 @@ KexiTablePart::dataSource()
}
#endif
-tristate KexiTablePart::askForClosingObjectsUsingTableSchema(QWidget *parent, KexiDB::Connection& conn,
- KexiDB::TableSchema& table, const QString& msg)
+tristate KexiTablePart::askForClosingObjectsUsingTableSchema(TQWidget *tqparent, KexiDB::Connection& conn,
+ KexiDB::TableSchema& table, const TQString& msg)
{
- QPtrList<KexiDB::Connection::TableSchemaChangeListenerInterface>* listeners
+ TQPtrList<KexiDB::Connection::TableSchemaChangeListenerInterface>* listeners
= conn.tableSchemaChangeListeners(table);
if (!listeners || listeners->isEmpty())
return true;
- QString openedObjectsStr = "<ul>";
- for (QPtrListIterator<KexiDB::Connection::TableSchemaChangeListenerInterface> it(*listeners);
+ TQString openedObjectsStr = "<ul>";
+ for (TQPtrListIterator<KexiDB::Connection::TableSchemaChangeListenerInterface> it(*listeners);
it.current(); ++it) {
- openedObjectsStr += QString("<li>%1</li>").arg(it.current()->listenerInfoString);
+ openedObjectsStr += TQString("<li>%1</li>").tqarg(it.current()->listenerInfoString);
}
openedObjectsStr += "</ul>";
- int r = KMessageBox::questionYesNo(parent,
+ int r = KMessageBox::questionYesNo(tqparent,
"<p>"+msg+"</p><p>"+openedObjectsStr+"</p><p>"
+i18n("Do you want to close all windows for these objects?"),
- QString::null, KGuiItem(i18n("Close windows"),"fileclose"), KStdGuiItem::cancel());
+ TQString(), KGuiItem(i18n("Close windows"),"fileclose"), KStdGuiItem::cancel());
tristate res;
if (r == KMessageBox::Yes) {
//try to close every window
@@ -202,8 +202,8 @@ tristate KexiTablePart::askForClosingObjectsUsingTableSchema(QWidget *parent, Ke
return res;
}
-QString
-KexiTablePart::i18nMessage(const QCString& englishMessage, KexiDialogBase* dlg) const
+TQString
+KexiTablePart::i18nMessage(const TQCString& englishMessage, KexiDialogBase* dlg) const
{
if (englishMessage=="Design of object \"%1\" has been modified.")
return i18n("Design of table \"%1\" has been modified.");
@@ -222,18 +222,18 @@ void KexiTablePart::setupCustomPropertyPanelTabs(KTabWidget *tab, KexiMainWindow
{
if (!d->lookupColumnPage) {
d->lookupColumnPage = new KexiLookupColumnPage(0);
- connect(d->lookupColumnPage, SIGNAL(jumpToObjectRequested(const QCString&, const QCString&)),
- mainWin, SLOT(highlightObject(const QCString&, const QCString&)));
+ connect(d->lookupColumnPage, TQT_SIGNAL(jumpToObjectRequested(const TQCString&, const TQCString&)),
+ mainWin, TQT_SLOT(highlightObject(const TQCString&, const TQCString&)));
//! @todo add "Table" tab
/*
- connect(d->dataSourcePage, SIGNAL(formDataSourceChanged(const QCString&, const QCString&)),
- KFormDesigner::FormManager::self(), SLOT(setFormDataSource(const QCString&, const QCString&)));
- connect(d->dataSourcePage, SIGNAL(dataSourceFieldOrExpressionChanged(const QString&, const QString&, KexiDB::Field::Type)),
- KFormDesigner::FormManager::self(), SLOT(setDataSourceFieldOrExpression(const QString&, const QString&, KexiDB::Field::Type)));
- connect(d->dataSourcePage, SIGNAL(insertAutoFields(const QString&, const QString&, const QStringList&)),
- KFormDesigner::FormManager::self(), SLOT(insertAutoFields(const QString&, const QString&, const QStringList&)));*/
+ connect(d->dataSourcePage, TQT_SIGNAL(formDataSourceChanged(const TQCString&, const TQCString&)),
+ KFormDesigner::FormManager::self(), TQT_SLOT(setFormDataSource(const TQCString&, const TQCString&)));
+ connect(d->dataSourcePage, TQT_SIGNAL(dataSourceFieldOrExpressionChanged(const TQString&, const TQString&, KexiDB::Field::Type)),
+ KFormDesigner::FormManager::self(), TQT_SLOT(setDataSourceFieldOrExpression(const TQString&, const TQString&, KexiDB::Field::Type)));
+ connect(d->dataSourcePage, TQT_SIGNAL(insertAutoFields(const TQString&, const TQString&, const TQStringList&)),
+ KFormDesigner::FormManager::self(), TQT_SLOT(insertAutoFields(const TQString&, const TQString&, const TQStringList&)));*/
}
KexiProject *prj = mainWin->project();
@@ -278,8 +278,8 @@ KexiTableDataSource::cursor(KexiProject * /*project*/,
//----------------
-KexiTablePart::TempData::TempData(QObject* parent)
- : KexiDialogTempData(parent)
+KexiTablePart::TempData::TempData(TQObject* tqparent)
+ : KexiDialogTempData(tqparent)
, table(0)
, tableSchemaChangedInPreviousView(true /*to force reloading on startup*/ )
{