1 | /*! |
---|
2 | * \file TrajWindow.hpp |
---|
3 | * \brief Traj class for visual_YAO. |
---|
4 | * \version 2009/12/20 (yyyy/mm/dd) |
---|
5 | * \author MAYAKI Abdouramane & MAYOMBO Alexis. |
---|
6 | */ |
---|
7 | |
---|
8 | #ifndef TRAJWINDOW_HPP |
---|
9 | #define TRAJWINDOW_HPP |
---|
10 | |
---|
11 | #include <QWidget> |
---|
12 | #include <QComboBox> |
---|
13 | #include <QPushButton> |
---|
14 | #include <QStandardItemModel> |
---|
15 | #include <QTableView> |
---|
16 | #include <QLineEdit> |
---|
17 | #include <QLabel> |
---|
18 | #include <QTextCodec> |
---|
19 | #include <QGridLayout> |
---|
20 | #include <QStringListModel> |
---|
21 | #include <QItemSelectionModel> |
---|
22 | #include <QMessageBox> |
---|
23 | #include <QCloseEvent> |
---|
24 | #include <QHBoxLayout> |
---|
25 | #include <QString> |
---|
26 | #include <QFileDialog> |
---|
27 | #include <QIODevice> |
---|
28 | |
---|
29 | #include <iostream> |
---|
30 | #include <string> |
---|
31 | #include "../../../YAOObjects/Table.hpp" |
---|
32 | #include "../YAOObjects/Trajectory.hpp" |
---|
33 | #include "../../../YAOObjects/Constant.hpp" |
---|
34 | #include "../../../help/Enforcer.hpp" |
---|
35 | |
---|
36 | |
---|
37 | class TrajectoryWindow : public QWidget { |
---|
38 | |
---|
39 | Q_OBJECT |
---|
40 | |
---|
41 | public : |
---|
42 | /*! |
---|
43 | * \brief Constructor |
---|
44 | * |
---|
45 | * Constructor of the class TrajWindow |
---|
46 | * |
---|
47 | * \param Table<Trajectoty> theTrajectoryTable |
---|
48 | */ |
---|
49 | TrajectoryWindow(yao::Table <yao::Trajectory> *aTrajectoryTable, yao::Table <yao::Constant> *aConstantTable, QWidget *parent=0); |
---|
50 | void initialiserChamps(); |
---|
51 | void addRow(); |
---|
52 | const int toInt(const std::string& s); |
---|
53 | const double toDouble(const std::string& s); |
---|
54 | //QStringList getTrajName(); |
---|
55 | //void ajouterNomDansTableau(int ligne, int colonne, QString nomTraj); |
---|
56 | //void ajouterValeurDansTableau1(int ligne, int colonne, QString valeurTraj); |
---|
57 | //void writefile(); |
---|
58 | //QStringList getDataTraj(); /*!< This function returns the Trajectory's data. */ |
---|
59 | |
---|
60 | |
---|
61 | private slots: /*!< Functions called after a click. */ |
---|
62 | |
---|
63 | void appelAjout(); /*!< This function is called to add row in the visual window model. */ |
---|
64 | void appelSupp(); /*!< This function is called to delete row from the Yao model. */ |
---|
65 | void callTrajHelp(); /*!< This function is called to an help window. */ |
---|
66 | //void ecrireFichierTraj(); |
---|
67 | //void enregistrerTraj(); |
---|
68 | //void ouvrirProjetExistantTraj(); |
---|
69 | //void ecrireFichier(); /*!< This function is called to add data in the Yao model. */ |
---|
70 | //void saveTrajData(); /*!< This function is called to add data in the Yao model. */ |
---|
71 | |
---|
72 | private : |
---|
73 | |
---|
74 | int compteur; |
---|
75 | QLabel *m_nameLabel; |
---|
76 | QLabel *m_typeLabel; |
---|
77 | QLabel *m_labelTrajNbuptime; |
---|
78 | QLabel *m_labelTrajOfftime; |
---|
79 | QLabel *m_labelTrajNDtime; |
---|
80 | QLabel *m_labelTrajNbsteptime; |
---|
81 | // |
---|
82 | QPushButton *m_quitTraj; |
---|
83 | QPushButton *m_addButton; |
---|
84 | QPushButton *m_helpButton; |
---|
85 | QPushButton *m_delButton; |
---|
86 | |
---|
87 | QLineEdit *m_ligneNomTraj; /*!< Name of the QLineEdit. */ |
---|
88 | QLineEdit *m_ligneTypeTraj; /*!< Type of the QLineEdit. */ |
---|
89 | QLineEdit *m_ligneNbsteptimeTraj; /*!< Nbsteptime of the Trajectory. */ |
---|
90 | QLineEdit *m_ligneValeurTraj; /*!< value of the Trajectory. */ |
---|
91 | |
---|
92 | //QLineEdit *m_ligneOfftimeTraj; /*!< Offtime of the QComboBox. */ |
---|
93 | //QLineEdit *m_ligneNbsteptimeTraj; /*!< Nbsteptime of the QComboBox. */ |
---|
94 | // |
---|
95 | |
---|
96 | QComboBox *m_ligneNbuptimeTraj; /*!< Nbuptime of the Trajectory. */ |
---|
97 | QComboBox *m_ligneDtimeTraj; /*!< Dtime of the Trajectory. */ |
---|
98 | QComboBox *m_ligneOfftimeTraj; /*!< m_ligneOffimetraj QComboBox. */ |
---|
99 | |
---|
100 | |
---|
101 | QGridLayout *m_layoutGTraj; /*!< The form Layout's name. */ |
---|
102 | QHBoxLayout *m_layoutHTraj; /*!< The horizontal Layout's name. */ |
---|
103 | |
---|
104 | QStandardItemModel *modeleTraj; |
---|
105 | QModelIndex index; |
---|
106 | QTableView *vueTraj; /*!< Name of the QTableWidget's object in whitch the objects are listed for the viewer. */ |
---|
107 | yao::Table <yao::Trajectory> *localTrajectoryTable; |
---|
108 | yao::Table <yao::Constant> *localConstantTable; |
---|
109 | //QFileDialog *projetTraj; |
---|
110 | //QString m_cheminProjetTraj; |
---|
111 | |
---|
112 | // QFileDialog *fd2; |
---|
113 | //QModelIndex index2; |
---|
114 | // QString lstF2; |
---|
115 | |
---|
116 | //int boot; |
---|
117 | //int size; |
---|
118 | //double step; |
---|
119 | //double offset; |
---|
120 | //char type; |
---|
121 | //int compteur; |
---|
122 | |
---|
123 | }; |
---|
124 | |
---|
125 | #endif // TRAJWINDOW_HPP |
---|