summaryrefslogtreecommitdiffstats
path: root/src/gui/itemmodels/qstandarditemmodel.h
diff options
context:
space:
mode:
authorDavid Faure <david.faure@kdab.com>2015-05-06 20:45:17 +0200
committerDavid Faure <david.faure@kdab.com>2015-05-07 09:50:59 +0000
commitcd90182e6761f4becec01f4baea4e2cf70a9982e (patch)
treeccb2bc63e3891eb557fb79a0f5d4172b405c52f1 /src/gui/itemmodels/qstandarditemmodel.h
parentae8406d82f541f6d9112bdac192e5e4e114d56aa (diff)
QStandardItem: add user-tristate and auto-tristate getters/setters
and deprecate isTristate()/setTristate() which isn't specific enough. This matches the changes to the flags themselves. Change-Id: I0ba592af340cb81fc9f4d483569844fe8d7510c3 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Diffstat (limited to 'src/gui/itemmodels/qstandarditemmodel.h')
-rw-r--r--src/gui/itemmodels/qstandarditemmodel.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/gui/itemmodels/qstandarditemmodel.h b/src/gui/itemmodels/qstandarditemmodel.h
index d9530ac0bf..44156d1907 100644
--- a/src/gui/itemmodels/qstandarditemmodel.h
+++ b/src/gui/itemmodels/qstandarditemmodel.h
@@ -158,10 +158,20 @@ public:
}
void setCheckable(bool checkable);
- inline bool isTristate() const {
+ inline bool isAutoTristate() const {
return (flags() & Qt::ItemIsAutoTristate) != 0;
}
- void setTristate(bool tristate);
+ void setAutoTristate(bool tristate);
+
+ inline bool isUserTristate() const {
+ return (flags() & Qt::ItemIsUserTristate) != 0;
+ }
+ void setUserTristate(bool tristate);
+
+#if QT_DEPRECATED_SINCE(5, 6)
+ QT_DEPRECATED bool isTristate() const { return isAutoTristate(); }
+ QT_DEPRECATED void setTristate(bool tristate);
+#endif
#ifndef QT_NO_DRAGANDDROP
inline bool isDragEnabled() const {