FactDev  0.1
contributorieswidget.h
1 #ifndef CONTRIBUTORIESWIDGET_H
2 #define CONTRIBUTORIESWIDGET_H
3 
4 #include <QWidget>
5 #include <QStandardItem>
6 #include <QSpinBox>
7 #include <QTableView>
8 
9 #include "models/contributory.h"
10 #include "models/contributorieslist.h"
11 #include "models/contributory.h"
12 #include "models/contributorieslist.h"
13 
14 #include "gui/widgets/widgetsmodels/contributoriestablemodel.h"
15 #include "gui/widgets/widgetsmodels/projectcontributoriestablemodel.h"
16 
17 #include "gui/widgets/delegates/projectcombodelegate.h"
18 #include "gui/widgets/delegates/doublespinboxdelegate.h"
19 #include "gui/widgets/delegates/unitcombodelegate.h"
20 #include "gui/widgets/delegates/textareadelegate.h"
21 
22 namespace Ui {
23 class ContributoriesWidget;
24 }
25 
26 namespace Gui {
27 namespace Widgets {
31 class ContributoriesWidget : public QWidget
32 {
33  Q_OBJECT
34 
35 public:
42  explicit ContributoriesWidget(
43  QSharedPointer<Customer> c, QWidget *parent = 0);
45 
55  int count();
56 
62  void add(ContributoriesList &list);
63 
69 
75  void responsiveContributoriesTable(QTableView *view);
76 
77 public slots:
81  void add(void);
82 
86  void remove(void);
87 
92  void addProject(QPair<Project *, Rate> *p=0);
93 
97  void removeProject(void);
98 
102  void changeProject(void);
103 
108  void editing(void);
109 
113  void updateUi(void);
114 
118  void updatePrice(void);
119 
120 signals:
125  void contributoryChanged();
126 private:
127  Ui::ContributoriesWidget *ui;
128  QList<WdgModels::ContributoriesTableModel*> _modelsContributories;
130 
132  QList<WdgModels::ContributoriesTableModel*> _modelsContributoriesToRemoved;
133 
136 
138  QSharedPointer<Customer> _customer;
139 };
140 }
141 }
142 #endif // CONTRIBUTORIESWIDGET_H
void contributoryChanged()
ContributoriesWidget::contributoryChanged Signal that a contributory has changed. ...
void updateUi(void)
ContributoriesWidget::updateUi Update the User Interface.
Definition: contributorieswidget.cpp:173
void removeProject(void)
ContributoriesWidget::removeProject Remove the current Project.
Definition: contributorieswidget.cpp:147
void editing(void)
ContributoriesWidget::editing Remove the current Project in the combobox not used.
Definition: contributorieswidget.cpp:165
The ContributoriesWidget class Widget of Contributories.
Definition: contributorieswidget.h:31
int count()
ContributoriesWidget::count Numbers of contributories.
Definition: contributorieswidget.cpp:219
ContributoriesList * getContributories() const
ContributoriesWidget::getContributories Get contributories List.
Definition: contributorieswidget.cpp:37
ContributoriesWidget(QSharedPointer< Customer > c, QWidget *parent=0)
ContributoriesWidget::ContributoriesWidget Construct a ContributoriesWidget.
Definition: contributorieswidget.cpp:8
void add(void)
ContributoriesWidget::add Add a new empty contributory.
Definition: contributorieswidget.cpp:66
void changeProject(void)
ContributoriesWidget::changeProject Change the current Project.
Definition: contributorieswidget.cpp:159
The ContributoriesList class List of contributories.
Definition: contributorieslist.h:19
void addProject(QPair< Project *, Rate > *p=0)
ContributoriesWidget::addProject Add a Projet and it rate p
Definition: contributorieswidget.cpp:114
void responsiveContributoriesTable(QTableView *view)
ContributoriesList::responsiveContributoriesTable Update the contributories table view to do responsi...
Definition: contributorieswidget.cpp:93
void updatePrice(void)
ContributoriesWidget::updatePrice Update total price.
Definition: contributorieswidget.cpp:196
The ProjectContributoriesTableModel class Table model of contributories linked to projets...
Definition: projectcontributoriestablemodel.h:19
void responsiveProjectsTable()
ContributoriesList::responsiveProjectsTable Update UI to do responsive projects table.
Definition: contributorieswidget.cpp:83