16 Q_PROPERTY( SelectionMode selectionMode READ selectionMode
17 WRITE setSelectionMode NOTIFY selectionModeChanged FINAL )
19 Q_PROPERTY(
int selectedRow READ selectedRow
20 WRITE setSelectedRow NOTIFY selectedRowChanged USER
true FINAL )
23 WRITE setTextOptions RESET resetTextOptions
24 NOTIFY textOptionsChanged FINAL )
26 Q_PROPERTY(
bool preferredWidthFromColumns READ preferredWidthFromColumns
27 WRITE setPreferredWidthFromColumns NOTIFY preferredWidthFromColumnsChanged() )
32 QSK_SUBCONTROLS( Cell, Text, Graphic )
33 QSK_STATES( Selected )
41 Q_ENUM( SelectionMode )
46 void setPreferredWidthFromColumns(
bool );
47 bool preferredWidthFromColumns()
const;
49 void setSelectionMode( SelectionMode );
50 SelectionMode selectionMode()
const;
53 void resetTextOptions();
56 Q_INVOKABLE
int selectedRow()
const;
57 QskAspect::States rowStates(
int )
const;
59 virtual int rowCount()
const = 0;
60 virtual int columnCount()
const = 0;
62 virtual qreal columnWidth(
int col )
const = 0;
63 virtual qreal rowHeight()
const = 0;
65 Q_INVOKABLE
virtual QVariant valueAt(
int row,
int col )
const = 0;
70 void setSelectedRow(
int row );
73 void selectedRowChanged(
int row );
75 void selectionModeChanged();
76 void preferredWidthFromColumnsChanged();
77 void textOptionsChanged();
82 void keyPressEvent( QKeyEvent* )
override;
83 void keyReleaseEvent( QKeyEvent* )
override;
85 void mousePressEvent( QMouseEvent* )
override;
86 void mouseReleaseEvent( QMouseEvent* )
override;
87 void mouseUngrabEvent()
override;
89 void hoverEnterEvent( QHoverEvent* )
override;
90 void hoverMoveEvent( QHoverEvent* )
override;
91 void hoverLeaveEvent( QHoverEvent* )
override;
93#ifndef QT_NO_WHEELEVENT
94 virtual QPointF scrollOffset(
const QWheelEvent* )
const override;
97 void updateScrollableSize();
103 std::unique_ptr< PrivateData > m_data;