Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TabPointsWidget.h
Go to the documentation of this file.
1 #ifndef __TABPOINTSWIDGET_H__
2 #define __TABPOINTSWIDGET_H__
3 
4 #include <qtablewidget.h>
5 #include <QStyledItemDelegate>
7 
8 // itemdelegate.h
9 class ItemDelegate : public QStyledItemDelegate
10 {
11  Q_OBJECT
12 public:
13  explicit ItemDelegate(QObject* parent = nullptr) : QStyledItemDelegate(parent) {}
14 
15  bool eventFilter(QObject* object, QEvent* event) override;
16 };
17 
18 class TabPointsWidget : public QTableWidget
19 {
20  Q_OBJECT
21 
22 public:
23  TabPointsWidget(TYTabPoint& listPoints, QWidget* parent = nullptr);
24 
25  virtual void update();
26  virtual void apply();
27 
28 public slots:
29  void tabValueChanged(int, int);
30  virtual void contextMenuEvent(QContextMenuEvent* e);
31 
32 private:
33  void setAttributes(int row);
34  void initRow(int row);
35 
36 private:
38 };
39 
40 #endif //__TABPOINTSWIDGET_H__
std::vector< TYPoint > TYTabPoint
Collection de TYPoint.
Definition: TYDefines.h:340
bool eventFilter(QObject *object, QEvent *event) override
ItemDelegate(QObject *parent=nullptr)
void tabValueChanged(int, int)
virtual void apply()
void setAttributes(int row)
virtual void update()
virtual void contextMenuEvent(QContextMenuEvent *e)
void initRow(int row)
TYTabPoint & _listPoints
TabPointsWidget(TYTabPoint &listPoints, QWidget *parent=nullptr)