pqTreeWidgetItemObject.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 
5 #ifndef pqTreeWidgetItemObject_h
6 #define pqTreeWidgetItemObject_h
7 
8 #include "pqWidgetsModule.h"
9 #include <QObject>
10 #include <QTreeWidgetItem>
11 
16  : public QObject
17  , public QTreeWidgetItem
18 {
19  Q_OBJECT
20  Q_PROPERTY(bool checked READ isChecked WRITE setChecked)
21 public:
25  pqTreeWidgetItemObject(const QStringList& t, int type = QTreeWidgetItem::UserType);
27  QTreeWidget* p, const QStringList& t, int type = QTreeWidgetItem::UserType);
29  QTreeWidgetItem* p, const QStringList& t, int type = QTreeWidgetItem::UserType);
30 
34  void setData(int column, int role, const QVariant& v) override;
35 
36 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
40  bool isChecked() const;
44  void setChecked(bool v);
45 
46 Q_SIGNALS:
50  void checkedStateChanged(bool);
51 
55  void modified();
56 };
57 
58 #endif
QTreeWidgetItem subclass with additional signals, slots, and properties.
#define PQWIDGETS_EXPORT