summaryrefslogtreecommitdiffstats
path: root/kexi/migration/keximigrate.h
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/migration/keximigrate.h
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/migration/keximigrate.h')
-rw-r--r--kexi/migration/keximigrate.h73
1 files changed, 37 insertions, 36 deletions
diff --git a/kexi/migration/keximigrate.h b/kexi/migration/keximigrate.h
index 3d5ed65f..e618ed72 100644
--- a/kexi/migration/keximigrate.h
+++ b/kexi/migration/keximigrate.h
@@ -28,13 +28,13 @@
#include "keximigratedata.h"
#include <kgenericfactory.h>
-#include <qstringlist.h>
-#include <qguardedptr.h>
+#include <tqstringlist.h>
+#include <tqguardedptr.h>
class KexiProject;
namespace Kexi
{
- class ObjectStatus;
+ class ObjecttqStatus;
}
/*! KexiMigration implementation version.
@@ -75,9 +75,10 @@ Basic idea is this:
See kexi/doc/dev/kexi_import.txt for more info.
*/
-class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
+class KEXIMIGR_EXPORT KexiMigrate : public TQObject, public KexiDB::Object
{
Q_OBJECT
+ TQ_OBJECT
public:
virtual ~KexiMigrate();
@@ -98,7 +99,7 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
\a acceptingNeeded is set to true if destination database exists.
In this case you should ask about accepting database overwriting.
Used in ImportWizard::import(). */
- bool checkIfDestinationDatabaseOverwritingNeedsAccepting(Kexi::ObjectStatus* result,
+ bool checkIfDestinationDatabaseOverwritingNeedsAccepting(Kexi::ObjecttqStatus* result,
bool& acceptingNeeded);
/*! Checks if the source- and the destination databases are identical.
@@ -106,10 +107,10 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
bool isSourceAndDestinationDataSourceTheSame() const;
//! Perform an import operation
- bool performImport(Kexi::ObjectStatus* result = 0);
+ bool performImport(Kexi::ObjecttqStatus* result = 0);
//! Perform an export operation
- bool performExport(Kexi::ObjectStatus* result = 0);
+ bool performExport(Kexi::ObjecttqStatus* result = 0);
//! Returns true if the migration driver supports progress updates.
inline bool progressSupported() { return drv_progressSupported(); }
@@ -119,20 +120,20 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
//! @todo This is copied from KexiDB::Driver. One day it will be merged with KexiDB.
//! \return property value for \a propeName available for this driver.
- //! If there's no such property defined for driver, Null QVariant value is returned.
- virtual QVariant propertyValue( const QCString& propName );
+ //! If there's no such property defined for driver, Null TQVariant value is returned.
+ virtual TQVariant propertyValue( const TQCString& propName );
//! @todo This is copied from KexiDB::Driver. One day it will be merged with KexiDB.
- void setPropertyValue( const QCString& propName, const QVariant& value );
+ void setPropertyValue( const TQCString& propName, const TQVariant& value );
//! @todo This is copied from KexiDB::Driver. One day it will be merged with KexiDB.
//! \return translated property caption for \a propeName.
//! If there's no such property defined for driver, empty string value is returned.
- QString propertyCaption( const QCString& propName ) const;
+ TQString propertyCaption( const TQCString& propName ) const;
//! @todo This is copied from KexiDB::Driver. One day it will be merged with KexiDB.
//! \return a list of property names available for this driver.
- QValueList<QCString> propertyNames() const;
+ TQValueList<TQCString> propertyNames() const;
/*! \return true is driver is valid. Checks if KexiMigrate::versionMajor()
and KexiMigrate::versionMinor() are matching.
@@ -144,7 +145,7 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
protected:
//! Used by MigrateManager.
- KexiMigrate(QObject *parent, const char *name, const QStringList &args = QStringList());
+ KexiMigrate(TQObject *tqparent, const char *name, const TQStringList &args = TQStringList());
//! Connect to source database (driver specific)
virtual bool drv_connect() = 0;
@@ -152,11 +153,11 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
virtual bool drv_disconnect() = 0;
//! Get table names in source database (driver specific)
- virtual bool drv_tableNames(QStringList& tablenames) = 0;
+ virtual bool drv_tableNames(TQStringList& tablenames) = 0;
//! Read schema for a given table (driver specific)
virtual bool drv_readTableSchema(
- const QString& originalName, KexiDB::TableSchema& tableSchema) = 0;
+ const TQString& originalName, KexiDB::TableSchema& tableSchema) = 0;
/*! Fetches maximum number from table \a tableName, column \a columnName
into \a result. On success true is returned. If there is no records in the table,
@@ -167,8 +168,8 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
with "SELECT MAX(columName) FROM tableName" statement, assuming SQL-compliant
backend.
*/
- virtual bool drv_queryMaxNumber(const QString& tableName,
- const QString& columnName, int& result);
+ virtual bool drv_queryMaxNumber(const TQString& tableName,
+ const TQString& columnName, int& result);
/*! Fetches single string at column \a columnNumber for each record from result obtained
by running \a sqlStatement. \a numRecords can be specified to limit number of records read.
@@ -179,7 +180,7 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
(so e.g. keximdb driver does not need this). */
//! @todo SQL-dependent!
virtual tristate drv_queryStringListFromSQL(
- const QString& sqlStatement, uint columnNumber, QStringList& stringList,
+ const TQString& sqlStatement, uint columnNumber, TQStringList& stringList,
int numRecords = -1)
{ Q_UNUSED(sqlStatement); Q_UNUSED(columnNumber); Q_UNUSED(stringList);
Q_UNUSED(numRecords);
@@ -191,8 +192,8 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
\return cancelled if there are no records available.
This implementation uses drv_queryStringListFromSQL() with numRecords == 1. */
//! @todo SQL-dependent!
- virtual tristate drv_querySingleStringFromSQL(const QString& sqlStatement,
- uint columnNumber, QString& string);
+ virtual tristate drv_querySingleStringFromSQL(const TQString& sqlStatement,
+ uint columnNumber, TQString& string);
/*! Fetches single record from result obtained
by running \a sqlStatement.
@@ -202,7 +203,7 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
On success the result is stored in \a data and true is returned,
\a data is resized to appropriate size. cancelled is returned on EOF. */
//! @todo SQL-dependent!
- virtual tristate drv_fetchRecordFromSQL(const QString& sqlStatement,
+ virtual tristate drv_fetchRecordFromSQL(const TQString& sqlStatement,
KexiDB::RowData& data, bool &firstRecord)
{ Q_UNUSED(sqlStatement); Q_UNUSED(data); Q_UNUSED(firstRecord);
return cancelled; }
@@ -210,7 +211,7 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
//! Copy a table from source DB to target DB (driver specific)
//! - create copies of KexiDB tables
//! - create copies of non-KexiDB tables
- virtual bool drv_copyTable(const QString& srcTable, KexiDB::Connection *destConn,
+ virtual bool drv_copyTable(const TQString& srcTable, KexiDB::Connection *destConn,
KexiDB::TableSchema* dstTable) = 0;
virtual bool drv_progressSupported() { return false; }
@@ -232,16 +233,16 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
\return size of the specified table
*/
- virtual bool drv_getTableSize(const QString&, Q_ULLONG&)
+ virtual bool drv_getTableSize(const TQString&, TQ_ULLONG&)
{ return false; }
- void updateProgress(Q_ULLONG step = 1ULL);
+ void updateProgress(TQ_ULLONG step = 1ULL);
//! @todo user should be asked ONCE using a convenient wizard's page, not a popup dialog
//! Prompt user to select a field type for unrecognized fields
- KexiDB::Field::Type userType(const QString& fname);
+ KexiDB::Field::Type userType(const TQString& fname);
- virtual QString drv_escapeIdentifier( const QString& str ) const {
+ virtual TQString drv_escapeIdentifier( const TQString& str ) const {
return m_kexiDBDriver ? m_kexiDBDriver->escapeIdentifier(str) : str; }
//! @todo Remove this! KexiMigrate should be usable for multiple concurrent migrations!
@@ -254,24 +255,24 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
/*! Driver properties dictionary (indexed by name),
useful for presenting properties to the user.
Set available properties here in driver implementation. */
- QMap<QCString,QVariant> m_properties;
+ TQMap<TQCString,TQVariant> m_properties;
/*! i18n'd captions for properties. You do not need
to set predefined properties' caption in driver implementation
-it's done automatically. */
- QMap<QCString,QString> m_propertyCaptions;
+ TQMap<TQCString,TQString> m_propertyCaptions;
//! KexiDB driver. For instance, it is used for escaping identifiers
- QGuardedPtr<KexiDB::Driver> m_kexiDBDriver;
+ TQGuardedPtr<KexiDB::Driver> m_kexiDBDriver;
private:
//! Get the list of tables
- bool tableNames(QStringList& tablenames);
+ bool tableNames(TQStringList& tablenames);
//! Table schemas from source DB
- QPtrList<KexiDB::TableSchema> m_tableSchemas;
+ TQPtrList<KexiDB::TableSchema> m_tableSchemas;
- QPtrList<KexiDB::TableSchema> m_kexiDBCompatibleTableSchemasToRemoveFromMemoryAfterImport;
+ TQPtrList<KexiDB::TableSchema> m_kexiDBCompatibleTableSchemasToRemoveFromMemoryAfterImport;
/*! Estimate size of migration job
Calls drv_getTableSize for each table to be copied.
@@ -282,13 +283,13 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
KexiProject *m_destPrj;
//! Size of migration job
- Q_ULLONG m_progressTotal;
+ TQ_ULLONG m_progressTotal;
//! Amount of migration job complete
- Q_ULLONG m_progressDone;
+ TQ_ULLONG m_progressDone;
//! Don't recalculate progress done until this value is reached.
- Q_ULLONG m_progressNextReport;
+ TQ_ULLONG m_progressNextReport;
friend class MigrateManager;
};
@@ -304,7 +305,7 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
KGenericFactory<KexiMigration::class_name>( "keximigrate_" #internal_name ))
/*! Driver's static version information, automatically implemented for KexiDB drivers.
- Put this into migration driver class declaration just like Q_OBJECT macro. */
+ Put this into migration driver class declaration just like TQ_OBJECT macro. */
#define KEXIMIGRATION_DRIVER \
public: \
virtual int versionMajor() const; \