4#ifndef QSTANDARDITEMMODEL_H
5#define QSTANDARDITEMMODEL_H
7#include <QtGui/qtguiglobal.h>
8#include <QtCore/qabstractitemmodel.h>
9#include <QtGui/qbrush.h>
10#include <QtGui/qfont.h>
11#include <QtGui/qicon.h>
12#ifndef QT_NO_DATASTREAM
13#include <QtCore/qdatastream.h>
52#ifndef QT_NO_STATUSTIP
56 inline void setStatusTip(
const QString &statusTip);
59#if QT_CONFIG(whatsthis)
60 inline QString whatsThis()
const {
104 inline void setAccessibleDescription(
const QString &accessibleDescription);
106 Qt::ItemFlags
flags()
const;
107 void setFlags(Qt::ItemFlags
flags);
117 void setEditable(
bool editable);
122 void setSelectable(
bool selectable);
127 void setCheckable(
bool checkable);
132 void setAutoTristate(
bool tristate);
137 void setUserTristate(
bool tristate);
139#if QT_CONFIG(draganddrop)
140 inline bool isDragEnabled()
const {
143 void setDragEnabled(
bool dragEnabled);
145 inline bool isDropEnabled()
const {
148 void setDropEnabled(
bool dropEnabled);
157 int rowCount()
const;
158 void setRowCount(
int rows);
159 int columnCount()
const;
162 bool hasChildren()
const;
170 void insertRows(
int row,
int count);
174 void removeColumn(
int column);
175 void removeRows(
int row,
int count);
193 virtual int type()
const;
195#ifndef QT_NO_DATASTREAM
207 void emitDataChanged();
224#ifndef QT_NO_STATUSTIP
229#if QT_CONFIG(whatsthis)
230inline void QStandardItem::setWhatsThis(
const QString &awhatsThis)
259{ setChild(arow, 0, aitem); }
265{ insertRows(rowCount(), aitems); }
268{ insertColumn(columnCount(), aitems); }
281 Q_PROPERTY(
int sortRole READ sortRole WRITE setSortRole BINDABLE bindableSortRole)
314 Qt::DropActions supportedDropActions()
const override;
338 void setHorizontalHeaderLabels(
const QStringList &labels);
339 void setVerticalHeaderLabels(
const QStringList &labels);
341 void setRowCount(
int rows);
369 int sortRole()
const;
370 void setSortRole(
int role);
394{ setItem(arow, 0, aitem); }
403{
return QAbstractItemModel::insertRow(arow, aparent); }
405{
return QAbstractItemModel::insertColumn(acolumn, aparent); }
407#ifndef QT_NO_DATASTREAM
\inmodule QtCore\reentrant
The QIcon class provides scalable icons in different modes and states.
QObject * parent() const
Returns a pointer to the parent object.
The QStandardItemModel class provides a generic model for storing custom data.
void insertRow(int row, const QList< QStandardItem * > &items)
void itemChanged(QStandardItem *item)
void insertColumn(int column, const QList< QStandardItem * > &items)
void appendRow(const QList< QStandardItem * > &items)
void setItem(int row, int column, QStandardItem *item)
The QStandardItem class provides an item for use with the QStandardItemModel class.
void appendRows(const QList< QStandardItem * > &items)
Appends rows containing items.
void setAccessibleDescription(const QString &accessibleDescription)
Sets the item's accessible description to the string specified by accessibleDescription.
QString statusTip() const
Returns the item's status tip.
QString accessibleDescription() const
Returns the item's accessible description.
bool isCheckable() const
Returns whether the item is user-checkable.
void setBackground(const QBrush &brush)
Sets the item's background brush to the specified brush.
void setToolTip(const QString &toolTip)
Sets the item's tooltip to the string specified by toolTip.
ItemType
This enum describes the types that are used to describe standard items.
void setSizeHint(const QSize &sizeHint)
Sets the size hint for the item to be size.
void setIcon(const QIcon &icon)
Sets the item's icon to the icon specified.
bool isEditable() const
Returns whether the item can be edited by the user.
void setStatusTip(const QString &statusTip)
Sets the item's status tip to the string specified by statusTip.
bool isEnabled() const
Returns whether the item is enabled.
QIcon icon() const
Returns the item's icon.
void setFont(const QFont &font)
Sets the font used to display the item's text to the given font.
QBrush background() const
Returns the brush used to render the item's background.
bool isUserTristate() const
QSize sizeHint() const
Returns the size hint set for the item, or an invalid QSize if no size hint has been set.
void setForeground(const QBrush &brush)
Sets the brush used to display the item's foreground (e.g.
void setChild(int row, int column, QStandardItem *item)
Sets the child item at (row, column) to item.
bool isAutoTristate() const
Returns whether the item is tristate and is controlled by QTreeWidget.
void setCheckState(Qt::CheckState checkState)
Sets the check state of the item to be state.
bool isSelectable() const
Returns whether the item is selectable by the user.
QString text() const
Returns the item's text.
void setAccessibleText(const QString &accessibleText)
Sets the item's accessible text to the string specified by accessibleText.
QScopedPointer< QStandardItemPrivate > d_ptr
QFont font() const
Returns the font used to render the item's text.
Qt::CheckState checkState() const
Returns the checked state of the item.
QString accessibleText() const
Returns the item's accessible text.
Qt::Alignment textAlignment() const
Returns the text alignment for the item's text.
void appendColumn(const QList< QStandardItem * > &items)
Appends a column containing items.
QString toolTip() const
Returns the item's tooltip.
QBrush foreground() const
Returns the brush used to render the item's foreground (e.g.
void setTextAlignment(Qt::Alignment textAlignment)
Sets the text alignment for the item's text to the alignment specified.
void appendRow(const QList< QStandardItem * > &items)
Appends a row containing items.
void insertRow(int row, const QList< QStandardItem * > &items)
Inserts a row at row containing items.
\macro QT_RESTRICTED_CAST_FROM_ASCII
static auto fromValue(T &&value) noexcept(std::is_nothrow_copy_constructible_v< T > &&Private::CanUseInternalSpace< T >) -> std::enable_if_t< std::conjunction_v< std::is_copy_constructible< T >, std::is_destructible< T > >, QVariant >
Combined button and popup list for selecting options.
@ AccessibleDescriptionRole
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLenum GLenum GLsizei count
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLenum GLsizei void GLsizei void * column
GLenum GLenum GLsizei void * row
GLfixed GLfixed GLint GLint order
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName foregroundRoleName accessibleTextRoleName setSizeHint
decorationRoleName toolTipRoleName whatsThisRoleName setTextAlignment
decorationRoleName toolTipRoleName setWhatsThis
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName setForeground
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName foregroundRoleName setAccessibleText
decorationRoleName setToolTip
static bool operator<(const QSettingsIniKey &k1, const QSettingsIniKey &k2)
#define QT_REQUIRE_CONFIG(feature)
ReturnedValue read(const char *data)
model setHeaderData(0, Qt::Horizontal, tr("Name"))
QSqlQueryModel * model
[16]
gzip write("uncompressed data")
QTextStream out(stdout)
[7]
model multiData(index, span)
mimeData setData("text/csv", csvData)
myAction setIcon(SomeIcon)
insertRed setText("insert red text")
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent