pqSpreadSheetViewWidget.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 pqSpreadSheetViewWidget_h
5 #define pqSpreadSheetViewWidget_h
6 
7 #include "pqCoreModule.h"
8 #include <QTableView>
9 
11 
23 class PQCORE_EXPORT pqSpreadSheetViewWidget : public QTableView
24 {
25  Q_OBJECT
26  typedef QTableView Superclass;
27 
28 public:
29  pqSpreadSheetViewWidget(QWidget* parent = nullptr);
30  ~pqSpreadSheetViewWidget() override;
31 
35  void setModel(QAbstractItemModel* model) override;
36 
40  pqSpreadSheetViewModel* spreadSheetViewModel() const;
41 
42 protected Q_SLOTS:
47  void onSortIndicatorChanged(int section, Qt::SortOrder order);
48 
53  void onHeaderDataChanged();
54 
55 protected: // NOLINT(readability-redundant-access-specifiers)
59  void paintEvent(QPaintEvent* event) override;
60 
65  void resizeColumnsToContentsRespectingComponents();
66 
67 private:
68  Q_DISABLE_COPY(pqSpreadSheetViewWidget)
69 
70  class pqDelegate;
71 
72  bool SingleColumnMode;
73  int OldColumnCount;
74 };
75 
76 #endif
order
pqSpreadSheetViewWidget is a QTableView subclass that is used by pqSpreadSheetView as the widget show...