BPS C++ API  2.24.4
bpstableview.h
Go to the documentation of this file.
1 
4 #ifndef BPSTABLEVIEW_H
5 #define BPSTABLEVIEW_H
6 
7 #include "bpsgui_global.h"
8 #include <QTableView>
9 
20 {
21  Q_OBJECT
23 
24 public:
25 
30  BpsTableView(QWidget * aParent = nullptr );
31 
32  virtual ~BpsTableView();
33 
37  virtual QSize sizeHint() const;
38 
43  void setSizeHint(const QSize& aSize);
44 
49 
55 
60 
61 signals:
62 
67  void focusInOutEvent(bool aFocusIn);
68 
74  void contextMenuRequested(const QPoint& aPosition, const QModelIndex& aIndex);
75 
83  void dataGotChanged(const QModelIndex& aTopLeft, const QModelIndex& aBottomRight);
84 
86 protected:
87  virtual void focusInEvent(QFocusEvent* aEvent);
88  virtual void focusOutEvent (QFocusEvent* aEvent);
89  virtual void contextMenuEvent(QContextMenuEvent* aEvent);
90  virtual void keyPressEvent(QKeyEvent* aEvent);
91 protected slots:
92  virtual void dataChanged(const QModelIndex& aTopLeft, const QModelIndex& aBottomRight);
93 private slots:
94  void headerContextMenu(const QPoint& aPoint);
95  void hideShowColumn(bool aShow);
97 
98 }; // BpsTableView
99 
100 #endif // BPSTABLEVIEW_H
#define BPS_PRIVATE(Class)
Declare pointer to private object in a public class.
Definition: bpsglobals.h:102
Public include file for BPS GUI library macros.
#define BPSGUI_EXPORT
Declare class an import from the shared library.
Definition: bpsgui_global.h:22
This class adds some convenience to QTableView:
Definition: bpstableview.h:20
BpsTableView(QWidget *aParent=nullptr)
Constructor for BpsTableView.
void focusInOutEvent(bool aFocusIn)
This signal is emitted when the widget gets or loses the focus.
QVariant saveHorizontalHeaderState()
void restoreHorizontalHeaderState(const QVariant &aData)
Restores the horizontal header state from settings.
QList< int > selectedRowNumbers() const
void setSizeHint(const QSize &aSize)
Define the size hint.
virtual QSize sizeHint() const
void dataGotChanged(const QModelIndex &aTopLeft, const QModelIndex &aBottomRight)
This signal is emitted when item data are changed in the model.
void contextMenuRequested(const QPoint &aPosition, const QModelIndex &aIndex)
This signal is emitted when a context menu is requested on a table cell.
virtual void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector< int > &roles)
virtual void focusInEvent(QFocusEvent *event) override
virtual void focusOutEvent(QFocusEvent *event) override
virtual void keyPressEvent(QKeyEvent *event) override
virtual void contextMenuEvent(QContextMenuEvent *e) override