pqListWidgetItemObject.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 pqListWidgetItemObject_h
6 #define pqListWidgetItemObject_h
7 
8 #include "pqWidgetsModule.h"
9 #include <QListWidgetItem>
10 #include <QObject>
11 
16  : public QObject
17  , public QListWidgetItem
18 {
19  Q_OBJECT
20  Q_PROPERTY(bool checked READ isChecked WRITE setChecked)
21 public:
25  pqListWidgetItemObject(const QString& t, QListWidget* p);
29  void setData(int role, const QVariant& v) override;
30 
31 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
35  bool isChecked() const;
39  void setChecked(bool v);
40 
41 Q_SIGNALS:
45  void checkedStateChanged(bool);
46 };
47 
48 #endif
QListWidgetItem subclass with additional signals, slots, and properties.
#define PQWIDGETS_EXPORT