aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktableview_p.h
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2018-07-10 11:14:42 +0200
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2018-07-10 12:39:52 +0000
commit58c988e090bac094e8c2e8b77975c1c720725a6e (patch)
tree6100f317fc1a8a8c15e20154506f39411724a78e /src/quick/items/qquicktableview_p.h
parent04e7882fc2044020f98c9f6507429a47981f222b (diff)
TableView: remove row and column from attached object
TableView.row and TableView.column is no different from the row and column properties that are injected into the context from the model classes. So just remove them to not bloat the API. This attached properties where added at an early stage where we thought that it should be possible to set a different row and column count on the view than compared to the model (to e.g to "fake" a table layout when just assigning an integer as a model). Also, we consider supporting right-to-left etc, where we might end up with cells that have a different row/column in the view compared to where the cell is in the model. If we decide to do this later (not for the first release), we can consider adding the attached properties back again at that point. Change-Id: I588a45913b968db789978339bc9a63cd2ccfad49 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quick/items/qquicktableview_p.h')
-rw-r--r--src/quick/items/qquicktableview_p.h22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/quick/items/qquicktableview_p.h b/src/quick/items/qquicktableview_p.h
index f3a589b9e4..d2c3f17bc4 100644
--- a/src/quick/items/qquicktableview_p.h
+++ b/src/quick/items/qquicktableview_p.h
@@ -144,8 +144,6 @@ class Q_QUICK_PRIVATE_EXPORT QQuickTableViewAttached : public QObject
Q_PROPERTY(QQuickTableView *tableView READ tableView NOTIFY tableViewChanged)
Q_PROPERTY(qreal cellWidth READ cellWidth WRITE setCellWidth NOTIFY cellWidthChanged)
Q_PROPERTY(qreal cellHeight READ cellHeight WRITE setCellHeight NOTIFY cellHeightChanged)
- Q_PROPERTY(int row READ row NOTIFY rowChanged)
- Q_PROPERTY(int column READ column NOTIFY columnChanged)
public:
QQuickTableViewAttached(QObject *parent)
@@ -175,33 +173,13 @@ public:
Q_EMIT cellHeightChanged();
}
- int row() const { return m_row; }
- void setRow(int newRow) {
- if (newRow == m_row)
- return;
- m_row = newRow;
- Q_EMIT rowChanged();
- }
-
- int column() const { return m_column; }
- void setColumn(int newColumn) {
- if (newColumn == m_column)
- return;
- m_column = newColumn;
- Q_EMIT columnChanged();
- }
-
Q_SIGNALS:
void tableViewChanged();
void cellWidthChanged();
void cellHeightChanged();
- void rowChanged();
- void columnChanged();
private:
QPointer<QQuickTableView> m_tableview;
- int m_row = -1;
- int m_column = -1;
QQmlNullableValue<qreal> m_cellWidth;
QQmlNullableValue<qreal> m_cellHeight;