Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TabPointsWidget.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012-2024> <EDF-DTG> <FRANCE>
3  * This file is part of Code_TYMPAN (R).
4  * Code_TYMPAN (R) is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  * Code_TYMPAN (R) is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11  * See the GNU General Public License for more details.
12  * You should have received a copy of the GNU General Public License along
13  * with Code_TYMPAN (R). If not, see <https://www.gnu.org/licenses/>.
14  */
15 
16 #ifndef __TABPOINTSWIDGET_H__
17 #define __TABPOINTSWIDGET_H__
18 
19 #include <qtablewidget.h>
20 #include <QStyledItemDelegate>
22 
23 // itemdelegate.h
24 class ItemDelegate : public QStyledItemDelegate
25 {
26  Q_OBJECT
27 public:
28  explicit ItemDelegate(QObject* parent = nullptr) : QStyledItemDelegate(parent) {}
29 
30  bool eventFilter(QObject* object, QEvent* event) override;
31 };
32 
33 class TabPointsWidget : public QTableWidget
34 {
35  Q_OBJECT
36 
37 public:
38  TabPointsWidget(TYTabPoint& listPoints, QWidget* parent = nullptr);
39 
40  virtual void update();
41  virtual void apply();
42 
43 public slots:
44  void tabValueChanged(int, int);
45  virtual void contextMenuEvent(QContextMenuEvent* e);
46 
47 private:
48  void setAttributes(int row);
49  void initRow(int row);
50 
51 private:
53 };
54 
55 #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)