pqQuickLaunchDialogExtended.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 pqQuickLaunchDialogExtended_h
5 #define pqQuickLaunchDialogExtended_h
6 
7 #include "pqApplicationComponentsModule.h"
8 
9 #include <QDialog>
10 #include <QList> // for QList
11 
12 #include <memory> // for unique_ptr
13 
16 class QListView;
17 class QSortFilterProxyModel;
18 
19 namespace Ui
20 {
21 class QuickLaunchDialogExtended;
22 }
23 
44 class PQAPPLICATIONCOMPONENTS_EXPORT pqQuickLaunchDialogExtended : public QDialog
45 {
46  Q_OBJECT
47  typedef QDialog Superclass;
48 
49 public:
50  pqQuickLaunchDialogExtended(QWidget* parent, const QList<QAction*>& actions);
51  ~pqQuickLaunchDialogExtended() override;
52 
53 Q_SIGNALS:
58  void applyRequested();
59 
60 protected Q_SLOTS:
67  void requestChanged(const QString& request);
68 
73  void currentChanged(const QModelIndex& currentIndex, QSortFilterProxyModel* proxyModel);
74 
76 
80  void createCurrentProxy(bool autoApply);
81  void createCurrentProxyWithoutApply();
83 
87  void handleTextChanged(int key);
88 
92  void move(int key);
93 
97  void toggleFocus();
98 
102  void cancel();
103 
107  void showProxyHelp();
108 
109 private:
114  void makeCurrent(QListView* view, int row);
115 
119  QListView* currentList();
120 
121  std::unique_ptr<pqProxyActionListModel> Model;
122  std::unique_ptr<pqExtendedSortFilterProxyModel> AvailableSortFilterModel;
123  std::unique_ptr<pqExtendedSortFilterProxyModel> DisabledSortFilterModel;
124 
125  std::unique_ptr<Ui::QuickLaunchDialogExtended> Ui;
126 };
127 
128 #endif
: A custom QSortFilterProxyModel to do extended search.
A model to handle a list of proxy action.
: A pop-up dialog used to browse and create proxies.
key