diff options
Diffstat (limited to 'kexi/kexidb/alter.h')
-rw-r--r-- | kexi/kexidb/alter.h | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/kexi/kexidb/alter.h b/kexi/kexidb/alter.h index 1e6d8e87..807c28eb 100644 --- a/kexi/kexidb/alter.h +++ b/kexi/kexidb/alter.h @@ -22,8 +22,8 @@ #include "connection.h" -#include <qvaluelist.h> -#include <qasciidict.h> +#include <tqvaluelist.h> +#include <tqasciidict.h> #include <kdebug.h> @@ -141,17 +141,17 @@ class KEXI_DB_EXPORT AlterTableHandler : public Object }; class ActionBase; - typedef QAsciiDict<ActionBase> ActionDict; //!< for collecting actions related to a single field - typedef QIntDict<ActionDict> ActionDictDict; //!< for collecting groups of actions by field UID - typedef QAsciiDictIterator<ActionBase> ActionDictIterator; - typedef QIntDictIterator<ActionDict> ActionDictDictIterator; - typedef QPtrVector<ActionBase> ActionVector; //!< for collecting actions related to a single field + typedef TQAsciiDict<ActionBase> ActionDict; //!< for collecting actions related to a single field + typedef TQIntDict<ActionDict> ActionDictDict; //!< for collecting groups of actions by field UID + typedef TQAsciiDictIterator<ActionBase> ActionDictIterator; + typedef TQIntDictIterator<ActionDict> ActionDictDictIterator; + typedef TQPtrVector<ActionBase> ActionVector; //!< for collecting actions related to a single field //! Defines a type for action list. - typedef QPtrList<ActionBase> ActionList; + typedef TQPtrList<ActionBase> ActionList; //! Defines a type for action list's iterator. - typedef QPtrListIterator<ActionBase> ActionListIterator; + typedef TQPtrListIterator<ActionBase> ActionListIterator; //! Abstract base class used for implementing all the AlterTable actions. class KEXI_DB_EXPORT ActionBase { @@ -182,7 +182,7 @@ class KEXI_DB_EXPORT AlterTableHandler : public Object bool showFieldDebug : 1; }; - virtual QString debugString(const DebugOptions& debugOptions = DebugOptions()) { + virtual TQString debugString(const DebugOptions& debugOptions = DebugOptions()) { Q_UNUSED(debugOptions); return "ActionBase"; } void debug(const DebugOptions& debugOptions = DebugOptions()) { KexiDBDbg << debugString(debugOptions) @@ -210,7 +210,7 @@ class KEXI_DB_EXPORT AlterTableHandler : public Object Q_UNUSED(fieldActions); return false; } virtual tristate updateTableSchema(TableSchema &table, Field* field, - QMap<QString, QString>& fieldMap) + TQMap<TQString, TQString>& fieldMap) { Q_UNUSED(table); Q_UNUSED(field); Q_UNUSED(fieldMap); return true; } private: @@ -231,12 +231,12 @@ class KEXI_DB_EXPORT AlterTableHandler : public Object //! Abstract base class used for implementing table field-related actions. class KEXI_DB_EXPORT FieldActionBase : public ActionBase { public: - FieldActionBase(const QString& fieldName, int uid); + FieldActionBase(const TQString& fieldName, int uid); FieldActionBase(bool); virtual ~FieldActionBase(); //! \return field name for this action - QString fieldName() const { return m_fieldName; } + TQString fieldName() const { return m_fieldName; } /*! \return field's unique identifier This id is needed because in the meantime there can be more than one @@ -250,14 +250,14 @@ class KEXI_DB_EXPORT AlterTableHandler : public Object int uid() const { return m_fieldUID; } //! Sets field name for this action - void setFieldName(const QString& fieldName) { m_fieldName = fieldName; } + void setFieldName(const TQString& fieldName) { m_fieldName = fieldName; } protected: //! field's unique identifier, @see uid() int m_fieldUID; private: - QString m_fieldName; + TQString m_fieldName; }; /*! Defines an action for changing a single property value of a table field. @@ -270,22 +270,22 @@ class KEXI_DB_EXPORT AlterTableHandler : public Object */ class KEXI_DB_EXPORT ChangeFieldPropertyAction : public FieldActionBase { public: - ChangeFieldPropertyAction(const QString& fieldName, - const QString& propertyName, const QVariant& newValue, int uid); + ChangeFieldPropertyAction(const TQString& fieldName, + const TQString& propertyName, const TQVariant& newValue, int uid); //! @internal, used for constructing null action ChangeFieldPropertyAction(bool null); virtual ~ChangeFieldPropertyAction(); - QString propertyName() const { return m_propertyName; } - QVariant newValue() const { return m_newValue; } - virtual QString debugString(const DebugOptions& debugOptions = DebugOptions()); + TQString propertyName() const { return m_propertyName; } + TQVariant newValue() const { return m_newValue; } + virtual TQString debugString(const DebugOptions& debugOptions = DebugOptions()); virtual void simplifyActions(ActionDictDict &fieldActions); virtual bool shouldBeRemoved(ActionDictDict &fieldActions); virtual tristate updateTableSchema(TableSchema &table, Field* field, - QMap<QString, QString>& fieldMap); + TQMap<TQString, TQString>& fieldMap); protected: virtual void updateAlteringRequirements(); @@ -293,23 +293,23 @@ class KEXI_DB_EXPORT AlterTableHandler : public Object //! Performs physical execution of this action. virtual tristate execute(Connection &conn, TableSchema &table); - QString m_propertyName; - QVariant m_newValue; + TQString m_propertyName; + TQVariant m_newValue; }; //! Defines an action for removing a single table field. class KEXI_DB_EXPORT RemoveFieldAction : public FieldActionBase { public: - RemoveFieldAction(const QString& fieldName, int uid); + RemoveFieldAction(const TQString& fieldName, int uid); RemoveFieldAction(bool); virtual ~RemoveFieldAction(); - virtual QString debugString(const DebugOptions& debugOptions = DebugOptions()); + virtual TQString debugString(const DebugOptions& debugOptions = DebugOptions()); virtual void simplifyActions(ActionDictDict &fieldActions); virtual tristate updateTableSchema(TableSchema &table, Field* field, - QMap<QString, QString>& fieldMap); + TQMap<TQString, TQString>& fieldMap); protected: virtual void updateAlteringRequirements(); @@ -331,12 +331,12 @@ class KEXI_DB_EXPORT AlterTableHandler : public Object void setIndex( int index ) { m_index = index; } KexiDB::Field& field() const { return *m_field; } void setField(KexiDB::Field* field); - virtual QString debugString(const DebugOptions& debugOptions = DebugOptions()); + virtual TQString debugString(const DebugOptions& debugOptions = DebugOptions()); virtual void simplifyActions(ActionDictDict &fieldActions); virtual tristate updateTableSchema(TableSchema &table, Field* field, - QMap<QString, QString>& fieldMap); + TQMap<TQString, TQString>& fieldMap); protected: virtual void updateAlteringRequirements(); @@ -354,12 +354,12 @@ class KEXI_DB_EXPORT AlterTableHandler : public Object position within table schema. */ class KEXI_DB_EXPORT MoveFieldPositionAction : public FieldActionBase { public: - MoveFieldPositionAction(int fieldIndex, const QString& fieldName, int uid); + MoveFieldPositionAction(int fieldIndex, const TQString& fieldName, int uid); MoveFieldPositionAction(bool); virtual ~MoveFieldPositionAction(); int index() const { return m_index; } - virtual QString debugString(const DebugOptions& debugOptions = DebugOptions()); + virtual TQString debugString(const DebugOptions& debugOptions = DebugOptions()); virtual void simplifyActions(ActionDictDict &fieldActions); @@ -408,7 +408,7 @@ class KEXI_DB_EXPORT AlterTableHandler : public Object { } /*! If not 0, debug is directed here. Used only in the alter table test suite. */ - QString* debugString; + TQString* debugString; /*! Requrements computed, a combination of AlteringRequirements values. */ int requirements; /*! Set to true on success, to false on failure. */ @@ -439,14 +439,14 @@ class KEXI_DB_EXPORT AlterTableHandler : public Object \return the new table schema object created as a result of schema altering. The old table is returned if recreating table schema was not necessary or args.simulate is true. 0 is returned if args.result is not true. */ - TableSchema* execute(const QString& tableName, ExecutionArguments & args); + TableSchema* execute(const TQString& tableName, ExecutionArguments & args); //! Displays debug information about all actions collected by the handler. void debug(); /*! Like execute() with simulate set to true, but debug is directed to debugString. This function is used only in the alter table test suite. */ -// tristate simulateExecution(const QString& tableName, QString& debugString); +// tristate simulateExecution(const TQString& tableName, TQString& debugString); /*! Helper. \return a combination of AlteringRequirements values decribing altering type required when a given property field's \a propertyName is altered. @@ -454,11 +454,11 @@ class KEXI_DB_EXPORT AlterTableHandler : public Object as a temporary replacement before AlterTableHandler is fully implemented. Thus, it is possible to identify properties that have no PhysicalAlteringRequired flag set (e.g. caption or extended properties like visibleDecimalPlaces. */ - static int alteringTypeForProperty(const QCString& propertyName); + static int alteringTypeForProperty(const TQCString& propertyName); protected: -// TableSchema* executeInternal(const QString& tableName, tristate& result, bool simulate = false, -// QString* debugString = 0); +// TableSchema* executeInternal(const TQString& tableName, tristate& result, bool simulate = false, +// TQString* debugString = 0); class Private; Private *d; |