1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- #ifndef QSQLINDEX_H
- #define QSQLINDEX_H
- #include <QtSql/qsqlrecord.h>
- #include <QtCore/qstring.h>
- #include <QtCore/qvector.h>
- #if QT_DEPRECATED_SINCE(5,6)
- #include <QtCore/qlist.h>
- #endif
- QT_BEGIN_NAMESPACE
- class Q_SQL_EXPORT QSqlIndex : public QSqlRecord
- {
- public:
- explicit QSqlIndex(const QString &cursorName = QString(), const QString &name = QString());
- QSqlIndex(const QSqlIndex &other);
- ~QSqlIndex();
- QSqlIndex &operator=(const QSqlIndex &other);
- void setCursorName(const QString &cursorName);
- inline QString cursorName() const { return cursor; }
- void setName(const QString& name);
- inline QString name() const { return nm; }
- void append(const QSqlField &field);
- void append(const QSqlField &field, bool desc);
- bool isDescending(int i) const;
- void setDescending(int i, bool desc);
- private:
- QString createField(int i, const QString& prefix, bool verbose) const;
- QString cursor;
- QString nm;
- QVector<bool> sorts;
- };
- QT_END_NAMESPACE
- #endif
|