pqSpreadSheetViewDecorator.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 pqSpreadSheetViewDecorator_h
5 #define pqSpreadSheetViewDecorator_h
6 
7 #include "pqApplicationComponentsModule.h"
8 #include <QObject>
9 #include <QScopedPointer> // for QScopedPointer
10 
11 class pqSpreadSheetView;
12 class pqOutputPort;
14 
21 class PQAPPLICATIONCOMPONENTS_EXPORT pqSpreadSheetViewDecorator : public QObject
22 {
23  Q_OBJECT
24  typedef QObject Superclass;
25  Q_PROPERTY(bool allowChangeOfSource READ allowChangeOfSource WRITE setAllowChangeOfSource);
26 
28 
32  Q_PROPERTY(
33  bool generateCellConnectivity READ generateCellConnectivity WRITE setGenerateCellConnectivity);
34  Q_PROPERTY(bool showFieldData READ showFieldData WRITE setShowFieldData);
35  Q_PROPERTY(
36  bool showSelectedElementsOnly READ showSelectedElementsOnly WRITE setShowSelectedElementsOnly);
37  Q_PROPERTY(int fieldAssociation READ fieldAssociation WRITE setFieldAssociation);
39 
40 public:
42  ~pqSpreadSheetViewDecorator() override;
43 
45 
49  bool generateCellConnectivity() const;
50  void setGenerateCellConnectivity(bool);
51  bool showFieldData() const;
52  void setShowFieldData(bool);
53  bool showSelectedElementsOnly() const;
54  void setShowSelectedElementsOnly(bool);
55  int fieldAssociation() const;
56  void setFieldAssociation(int);
58 
59  void setPrecision(int);
60  void setFixedRepresentation(bool);
61  void repopulateAttributes(pqDataRepresentation* repr);
62 
67  bool allowChangeOfSource() const;
68 
72  void setAllowChangeOfSource(bool val);
73 
77  bool eventFilter(QObject* object, QEvent* e) override;
78 
79 Q_SIGNALS:
80  void uiModified();
81 
82 protected Q_SLOTS:
87  void onCurrentAttributeChange(int);
88 
89  void currentIndexChanged(pqOutputPort*);
90  void showing(pqDataRepresentation*);
91  void displayPrecisionChanged(int);
92  void toggleFixedRepresentation(bool);
93  void copyToClipboard();
94 
95 protected: // NOLINT(readability-redundant-access-specifiers)
97 
98 private:
99  Q_DISABLE_COPY(pqSpreadSheetViewDecorator)
100 
101  class pqInternal;
102  QScopedPointer<pqInternal> Internal;
103 };
104 
105 #endif
pqDataRepresentation is the superclass for a display for a pqPipelineSource i.e.
pqOutputPort is a server manager model item for an output port of any pqPipelineSource item...
Definition: pqOutputPort.h:29
View for spread-sheet view.
pqSpreadSheetViewDecorator adds decoration to a spread-sheet view.