diff options
Diffstat (limited to 'kexi/kexidb/cursor.h')
-rw-r--r-- | kexi/kexidb/cursor.h | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/kexi/kexidb/cursor.h b/kexi/kexidb/cursor.h index 6ea64dd9..b19b0694 100644 --- a/kexi/kexidb/cursor.h +++ b/kexi/kexidb/cursor.h @@ -20,10 +20,10 @@ #ifndef KEXIDB_CURSOR_H #define KEXIDB_CURSOR_H -#include <qstring.h> -#include <qvariant.h> -#include <qptrvector.h> -#include <qvaluevector.h> +#include <tqstring.h> +#include <tqvariant.h> +#include <tqptrvector.h> +#include <tqvaluevector.h> #include <kexidb/connection.h> #include <kexidb/object.h> @@ -63,9 +63,10 @@ class RowEditBuffer; instead. - QuerySchema object is not owned by Cursor object that uses it. */ -class KEXI_DB_EXPORT Cursor: public QObject, public Object +class KEXI_DB_EXPORT Cursor: public TQObject, public Object { Q_OBJECT + TQ_OBJECT public: //! Cursor options that describes its behaviour @@ -92,7 +93,7 @@ class KEXI_DB_EXPORT Cursor: public QObject, public Object // Omit \a statement if cursor is already initialized with statement // at creation time. If \a statement is not empty, existing statement // (if any) is overwritten. */ -// bool open( const QString& statement = QString::null ); +// bool open( const TQString& statement = TQString() ); /*! Closes previously opened cursor. If the cursor is closed, nothing happens. */ @@ -103,14 +104,14 @@ class KEXI_DB_EXPORT Cursor: public QObject, public Object inline QuerySchema *query() const { return m_query; } //! \return query parameters assigned to this cursor - QValueList<QVariant> queryParameters() const; + TQValueList<TQVariant> queryParameters() const; //! Sets query parameters \a params for this cursor. - void setQueryParameters(const QValueList<QVariant>& params); + void setQueryParameters(const TQValueList<TQVariant>& params); /*! \return raw query statement used to define this cursor or null string if raw statement instead (but QuerySchema is defined instead). */ - inline QString rawStatement() const { return m_rawStatement; } + inline TQString rawStatement() const { return m_rawStatement; } /*! \return logically or'd cursor's options, selected from Cursor::Options enum. */ @@ -157,7 +158,7 @@ class KEXI_DB_EXPORT Cursor: public QObject, public Object Value -1 means that cursor does not point to any valid record (this happens eg. after open(), close(), and after moving after last record or before first one. */ - Q_LLONG at() const; + TQ_LLONG at() const; /*! \return number of fields available for this cursor. This never includes ROWID column or other internal coluns (e.g. lookup). */ @@ -174,10 +175,10 @@ class KEXI_DB_EXPORT Cursor: public QObject, public Object /*! \return a value stored in column number \a i (counting from 0). Is has unspecified behaviour if the cursor is not at valid record. Note for driver developers: - If \a i is >= than m_fieldCount, null QVariant value should be returned. + If \a i is >= than m_fieldCount, null TQVariant value should be returned. To return a value typically you can use a pointer to internal structure that contain current row data (buffered or unbuffered). */ - virtual QVariant value(uint i) = 0; + virtual TQVariant value(uint i) = 0; /*! [PROTOTYPE] \return current record data or NULL if there is no current records. */ virtual const char ** rowData() const = 0; @@ -196,15 +197,15 @@ class KEXI_DB_EXPORT Cursor: public QObject, public Object Use this method before calling open(). You can also call reopen() after calling this method to see effects of applying records order. */ - void setOrderByColumnList(const QStringList& columnNames); + void setOrderByColumnList(const TQStringList& columnNames); - /*! Convenience method, similar to setOrderByColumnList(const QStringList&). */ - void setOrderByColumnList(const QString& column1, const QString& column2 = QString::null, - const QString& column3 = QString::null, const QString& column4 = QString::null, - const QString& column5 = QString::null); + /*! Convenience method, similar to setOrderByColumnList(const TQStringList&). */ + void setOrderByColumnList(const TQString& column1, const TQString& column2 = TQString(), + const TQString& column3 = TQString(), const TQString& column4 = TQString(), + const TQString& column5 = TQString()); /*! \return a list of fields contained in ORDER BY section of the query. - @see setOrderBy(const QStringList&) */ + @see setOrderBy(const TQStringList&) */ QueryColumnInfo::Vector orderByColumnList() const; /*! Puts current record's data into \a data (makes a deep copy). @@ -236,17 +237,17 @@ class KEXI_DB_EXPORT Cursor: public QObject, public Object to refer a documentation. SQLite is one of such engines. Note for driver developers: Leave the default implementation (null string is returned ) if your engine has no such capability. */ - virtual QString serverResultName() { return QString::null; } + virtual TQString serverResultName() { return TQString(); } /*! \return (not i18n'd) description text (message) of last operation's error/result. In most cases engines do return such a messages, any user can then use this to refer a documentation. Note for driver developers: Leave the default implementation (null string is returned ) if your engine has no such capability. */ - virtual QString serverErrorMsg() { return QString::null; } + virtual TQString serverErrorMsg() { return TQString(); } /*! \return Debug information. */ - QString debugString() const; + TQString debugString() const; //! Outputs debug information. void debug() const; @@ -256,7 +257,7 @@ class KEXI_DB_EXPORT Cursor: public QObject, public Object typedef enum FetchResult { FetchError=0, FetchOK=1, FetchEnd=2 }; /*! Cursor will operate on \a conn, raw \a statement will be used to execute query. */ - Cursor(Connection* conn, const QString& statement, uint options = NoOptions ); + Cursor(Connection* conn, const TQString& statement, uint options = NoOptions ); /*! Cursor will operate on \a conn, \a query schema will be used to execute query. */ Cursor(Connection* conn, QuerySchema& query, uint options = NoOptions ); @@ -299,7 +300,7 @@ class KEXI_DB_EXPORT Cursor: public QObject, public Object virtual void drv_bufferMovePointerPrev() = 0; /*! Moves pointer (that points to the buffer) to a new place: \a at. */ - virtual void drv_bufferMovePointerTo(Q_LLONG at) = 0; + virtual void drv_bufferMovePointerTo(TQ_LLONG at) = 0; /*DISABLED: ! This is called only once in open(), after successful drv_open(). Reimplement this if you need (or not) to do get the first record after drv_open(), @@ -318,10 +319,10 @@ class KEXI_DB_EXPORT Cursor: public QObject, public Object the same that is returend by serverResult(). */ virtual void drv_clearServerResult() = 0; - QGuardedPtr<Connection> m_conn; + TQGuardedPtr<Connection> m_conn; QuerySchema *m_query; // CursorData *m_data; - QString m_rawStatement; + TQString m_rawStatement; bool m_opened : 1; //js (m_at==0 is enough) bool m_beforeFirst : 1; bool m_atLast : 1; @@ -329,7 +330,7 @@ class KEXI_DB_EXPORT Cursor: public QObject, public Object // bool m_atLast; bool m_validRecord : 1; //!< true if valid record is currently retrieved @ current position bool m_containsROWIDInfo : 1; - Q_LLONG m_at; + TQ_LLONG m_at; uint m_fieldCount; //!< cached field count information uint m_logicalFieldCount; //!< logical field count, i.e. without intrernal values like ROWID or lookup uint m_options; //!< cursor options that describes its behaviour @@ -346,7 +347,7 @@ class KEXI_DB_EXPORT Cursor: public QObject, public Object //! Used by setOrderByColumnList() QueryColumnInfo::Vector* m_orderByColumnList; - QValueList<QVariant>* m_queryParameters; + TQValueList<TQVariant>* m_queryParameters; private: bool m_readAhead : 1; |