pqFavoritesDialog.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 pqFavoritesDialog_h
6 #define pqFavoritesDialog_h
7 
8 #include "pqComponentsModule.h"
9 #include <QDialog>
10 #include <QPointer>
11 
12 #include "vtkParaViewDeprecation.h" // for deprecation
13 
14 class QVariant;
15 class QString;
16 class QTreeWidgetItem;
17 
18 namespace Ui
19 {
20 class pqFavoritesDialog;
21 }
22 
28  "Favorites should be replaced by Categories configuration. See pqConfigureCategories instead.")
29  PQCOMPONENTS_EXPORT pqFavoritesDialog : public QDialog
30 {
31  Q_OBJECT
32  typedef QDialog Superclass;
33 
34 public:
35  pqFavoritesDialog(const QVariant& filtersList, QWidget* p = nullptr);
36  ~pqFavoritesDialog() override;
37 
38 protected Q_SLOTS:
42  void createCategory();
43 
48  void onAddFavoritePressed();
49 
54  void onRemoveFavoritePressed();
55 
59  void onAccepted();
60 
64  void onItemChanged(QTreeWidgetItem*, int);
65 
69  void onSearchTextChanged(QString pattern);
70 
71 protected: // NOLINT(readability-redundant-access-specifiers)
75  void populateFavoritesTree();
76 
80  void populateFiltersTree(const QVariant& filtersList);
81 
91  QString populateSettingsValue(const QString& value, QTreeWidgetItem* item);
92 
93  QTreeWidgetItem* getSelectedCategory();
94 
95  bool eventFilter(QObject* object, QEvent* event) override;
96 
97 private:
98  QScopedPointer<Ui::pqFavoritesDialog> Ui;
99 };
100 
101 #endif
#define PQCOMPONENTS_EXPORT
#define PARAVIEW_DEPRECATED_IN_5_13_0(reason)
value
pqFavoritesDialog is the Manage Favorites dialog used by ParaView.