pqProxyActionListModel.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
3 
4 #ifndef pqProxiesActionListModel_h
5 #define pqProxiesActionListModel_h
6 
8 
9 #include <QAbstractListModel>
10 
11 class QAction;
12 class pqProxyAction;
13 
25 class PQAPPLICATIONCOMPONENTS_EXPORT pqProxyActionListModel : public QAbstractListModel
26 {
27  Q_OBJECT
28  typedef QAbstractListModel Superclass;
29 
30 public:
31  pqProxyActionListModel(const QList<QAction*>& proxyActions, QObject* parent = nullptr);
32  ~pqProxyActionListModel() override;
33 
34  enum Role
35  {
36  DocumentationRole = Qt::UserRole + 1,
41  NameRole
42  };
43 
45 
48  int rowCount(const QModelIndex& parent) const override;
49  QVariant data(const QModelIndex& index, int role) const override;
50  QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
52 
53 private:
54  QList<pqProxyAction*> ProxyActions;
55 };
56 
57 #endif
data
#define PQAPPLICATIONCOMPONENTS_EXPORT
: a wrapper around a QAction used for proxy creation.
Definition: pqProxyAction.h:26
A model to handle a list of proxy action.