pqFavoritesTreeWidget.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 pqFavoritesTreeWidget_h
6 #define pqFavoritesTreeWidget_h
7 
8 #include <QTreeWidget>
9 
10 #include <QSet>
11 
12 #include "pqComponentsModule.h"
13 
14 class QTreeWidgetItem;
15 
20 class PQCOMPONENTS_EXPORT pqFavoritesTreeWidget : public QTreeWidget
21 {
22  typedef QTreeWidget Superclass;
23  Q_OBJECT
24 
25 public:
26  pqFavoritesTreeWidget(QWidget* p = nullptr);
27 
28  bool isDropOnItem() { return this->dropIndicatorPosition() == QAbstractItemView::OnItem; }
29 
30 protected:
34  void dragEnterEvent(QDragEnterEvent* event) override;
35 
39  void dropEvent(QDropEvent* event) override;
40 
41  QSet<QTreeWidgetItem*> UnfoldedDraggedCategories;
42 };
43 
44 #endif // !pqFavoritesTreeWidget_h
QSet< QTreeWidgetItem * > UnfoldedDraggedCategories
#define PQCOMPONENTS_EXPORT
pqFavoritesTreeWidget is a custom widget used to display Favorites.