pqEditMacrosDialog.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 pqEditMacrosDialog_h
5 #define pqEditMacrosDialog_h
6 
7 #include "pqApplicationComponentsModule.h"
8 
9 #include <QDialog>
10 
11 #include <memory>
12 
13 class QString;
14 class QTreeWidgetItem;
15 
22 class PQAPPLICATIONCOMPONENTS_EXPORT pqEditMacrosDialog : public QDialog
23 {
24  Q_OBJECT
25  typedef QDialog Superclass;
26 
27 public:
28  pqEditMacrosDialog(QWidget* parent = nullptr);
29  ~pqEditMacrosDialog() override;
30 
31 private Q_SLOTS:
35  void onAddPressed();
36 
40  void onEditPressed();
41 
45  void onRemovePressed();
46 
50  void onRemoveAllPressed();
51 
55  void onSearchTextChanged(const QString& pattern);
56 
57 private: // NOLINT(readability-redundant-access-specifiers)
61  void populateTree();
62 
66  void createItem(QTreeWidgetItem* parent, const QString& fileName, const QString& displayName,
67  QTreeWidgetItem* preceding = nullptr);
68 
72  bool treeHasItems();
73 
77  bool treeHasSelectedItems();
78 
83  QTreeWidgetItem* getSelectedItem();
84 
91  QTreeWidgetItem* getNearestItem(QTreeWidgetItem* item);
92 
97  void deleteItem(QTreeWidgetItem* item);
98 
102  void deleteItems(const QList<QTreeWidgetItem*>& items);
103 
107  void updateUIState();
108 
109  struct pqInternals;
110  std::unique_ptr<pqInternals> Internals;
111 };
112 
113 #endif
pqEditMacrosDialog
pqEditMacrosDialog is the Edit Macros dialog used by ParaView.
Definition: pqEditMacrosDialog.h:22