4#ifndef QSQLRELATIONALTABLEMODEL_H
5#define QSQLRELATIONALTABLEMODEL_H
7#include <QtSql/qtsqlglobal.h>
8#include <QtSql/qsqltablemodel.h>
10#include <QtCore/qtypeinfo.h>
23 : tName(aTableName), iColumn(indexCol), dColumn(displayCol) {}
27 tName.swap(
other.tName);
28 iColumn.swap(
other.iColumn);
29 dColumn.swap(
other.dColumn);
39 {
return !(tName.isEmpty() || iColumn.isEmpty() || dColumn.isEmpty()); }
41 QString tName, iColumn, dColumn;
65 void clear()
override;
68 void setTable(
const QString &tableName)
override;
75 void revertRow(
int row)
override;
78 QString selectStatement()
const override;
81 QString orderByClause()
const override;
The QSqlDatabase class handles a connection to a database.
The QSqlRecord class encapsulates a database record.
void swap(QSqlRelation &other) noexcept
Swaps this with other.
QString tableName() const
Returns the name of the table to which a foreign key refers.
bool isValid() const noexcept
Returns true if the QSqlRelation object is valid; otherwise returns false.
QString indexColumn() const
Returns the index column from table tableName() to which a foreign key refers.
QSqlRelation()
Constructs an invalid QSqlRelation object.
QString displayColumn() const
Returns the column from table tableName() that should be presented to the user instead of a foreign k...
QSqlRelation(const QString &aTableName, const QString &indexCol, const QString &displayCol)
Constructs a QSqlRelation object, where tableName is the SQL table name to which a foreign key refers...
The QSqlRelationalTableModel class provides an editable data model for a single database table,...
JoinMode
\value InnerJoin - Inner join mode, return rows when there is at least one match in both tables.
The QSqlTableModel class provides an editable data model for a single database table.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLenum GLsizei GLsizei GLint * values
[15]
GLenum GLenum GLsizei count
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLenum GLsizei void GLsizei void * column
GLenum GLenum GLsizei void * row
#define QT_REQUIRE_CONFIG(feature)
mimeData setData("text/csv", csvData)
selection select(topLeft, bottomRight)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent