pqHierarchicalGridWidget.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 #ifndef pqHierarchicalGridWidget_h
5 #define pqHierarchicalGridWidget_h
6 
7 #include "pqWidgetsModule.h" // for export macros
8 #include <QScopedPointer> // for ivar
9 #include <QWidget>
10 
24 {
25  Q_OBJECT
26  typedef QWidget Superclass;
27 
28 public:
29  pqHierarchicalGridWidget(QWidget* parent = nullptr);
30  ~pqHierarchicalGridWidget() override;
31 
33 
37  void setUserResizability(bool);
38  bool userResizability() const;
40 
44  bool eventFilter(QObject* caller, QEvent* evt) override;
45 
46 Q_SIGNALS:
47  void splitterMoved(int location, double splitFraction);
48 
49 protected:
50  void mouseMoveEvent(QMouseEvent* evt) override;
51  void mousePressEvent(QMouseEvent* evt) override;
52  void mouseReleaseEvent(QMouseEvent* evt) override;
53 
54 private:
55  Q_DISABLE_COPY(pqHierarchicalGridWidget);
56 
57  class pqInternals;
58  QScopedPointer<pqInternals> Internals;
59  friend class pqInternals;
60  void setSplitFraction(int location, double fraction);
61 
63 
68  struct SplitterInfo
69  {
70  Qt::Orientation Direction;
71  QRect Bounds;
72  int Location;
73  int Position;
74  };
75 
76  void setSplitters(const QVector<SplitterInfo>& splitters);
77 };
78 
79 #endif
location
QLayout specialization that supports a hierarchical layout.
#define PQWIDGETS_EXPORT
Widget that supports resizing of a pqHierarchicalGridLayout.