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 
8 
9 #include <QDialog>
10 
11 #include <memory>
12 
13 class QString;
14 class QTreeWidgetItem;
15 
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 onSetIconPressed();
46 
50  void onRemovePressed();
51 
55  void onRemoveAllPressed();
56 
60  void onSearchTextChanged(const QString& pattern);
61 
62 private: // NOLINT(readability-redundant-access-specifiers)
66  bool treeHasItems();
67 
71  bool treeHasSelectedItems();
72 
77  QModelIndex getSelectedItem();
78 
85  QModelIndex getNearestItem(const QModelIndex& index);
86 
91  void deleteItem(const QModelIndex& item);
92 
96  void deleteItems(const QList<QModelIndex>& items);
97 
101  void updateUIState();
102 
103  struct pqInternals;
104  std::unique_ptr<pqInternals> Internals;
105 };
106 
107 #endif
#define PQAPPLICATIONCOMPONENTS_EXPORT
pqEditMacrosDialog is the Edit Macros dialog used by ParaView.
index