42 #ifndef QTABLEWIDGET_H
43 #define QTABLEWIDGET_H
56 #ifndef QT_NO_TABLEWIDGET
66 inline int topRow()
const {
return top; }
70 inline int rowCount()
const {
return bottom - top + 1; }
79 class QWidgetItemData;
80 class QTableWidgetItemPrivate;
85 friend class QTableModel;
98 inline int row()
const;
101 inline void setSelected(
bool select);
102 inline bool isSelected()
const;
104 inline Qt::ItemFlags
flags()
const {
return itemFlags; }
105 void setFlags(Qt::ItemFlags flags);
109 inline void setText(
const QString &text);
113 inline void setIcon(
const QIcon &icon);
117 inline void setStatusTip(
const QString &statusTip);
119 #ifndef QT_NO_TOOLTIP
122 inline void setToolTip(
const QString &toolTip);
125 #ifndef QT_NO_WHATSTHIS
128 inline void setWhatsThis(
const QString &whatsThis);
133 inline void setFont(
const QFont &font);
175 #ifndef QT_NO_DATASTREAM
181 inline int type()
const {
return rtti; }
187 QTableWidgetItemPrivate *d;
188 Qt::ItemFlags itemFlags;
200 #ifndef QT_NO_TOOLTIP
205 #ifndef QT_NO_WHATSTHIS
213 #ifndef QT_NO_DATASTREAM
218 class QTableWidgetPrivate;
224 Q_PROPERTY(
int columnCount READ columnCount WRITE setColumnCount)
226 friend class QTableModel;
232 void setRowCount(
int rows);
233 int rowCount() const;
235 void setColumnCount(
int columns);
236 int columnCount() const;
252 void setVerticalHeaderLabels(const
QStringList &labels);
253 void setHorizontalHeaderLabels(const
QStringList &labels);
255 int currentRow() const;
256 int currentColumn() const;
260 void setCurrentCell(
int row,
int column);
264 void setSortingEnabled(
bool enable);
265 bool isSortingEnabled() const;
271 QWidget *cellWidget(
int row,
int column) const;
272 void setCellWidget(
int row,
int column,
QWidget *widget);
273 inline void removeCellWidget(
int row,
int column);
283 int visualRow(
int logicalRow) const;
284 int visualColumn(
int logicalColumn) const;
295 void insertRow(
int row);
296 void insertColumn(
int column);
297 void removeRow(
int row);
298 void removeColumn(
int column);
300 void clearContents();
312 void itemSelectionChanged();
314 void cellPressed(
int row,
int column);
315 void cellClicked(
int row,
int column);
316 void cellDoubleClicked(
int row,
int column);
318 void cellActivated(
int row,
int column);
319 void cellEntered(
int row,
int column);
320 void cellChanged(
int row,
int column);
322 void currentCellChanged(
int currentRow,
int currentColumn,
int previousRow,
int previousColumn);
329 virtual
Qt::DropActions supportedDropActions() const;
354 { setCellWidget(arow, acolumn, 0); }
357 {
return itemAt(
QPoint(ax, ay)); }
360 {
return (view ? view->row(
this) : -1); }
363 {
return (view ? view->column(
this) : -1); }
366 {
if (view) view->setItemSelected(
this, aselect); }
369 {
return (view ? view->isItemSelected(
this) :
false); }
371 #endif // QT_NO_TABLEWIDGET
377 #endif // QTABLEWIDGET_H
GLuint GLuint GLsizei GLenum type
#define Q_PRIVATE_SLOT(d, signature)
GLXDrawable GLXDrawable read
Q_CORE_EXPORT QTextStream & right(QTextStream &s)
GLenum GLenum GLvoid * row
#define QT_BEGIN_NAMESPACE
GLsizei GLsizei GLenum GLenum const GLvoid * data
GLsizei const GLfloat * value
GLenum GLenum GLvoid GLvoid * column
T qvariant_cast(const QVariant &)
bool operator<(const QByteArray &a1, const QByteArray &a2)
GLboolean GLenum GLenum GLvoid * values
Q_CORE_EXPORT QTextStream & left(QTextStream &s)