FactDev  0.1
searchwidget.h
1 #ifndef SEARCHWIDGET_H
2 #define SEARCHWIDGET_H
3 
4 #include <QWidget>
5 
6 #include "database/customerdatabase.h"
7 
8 #include "models/search.h"
9 
10 namespace Ui {
11 class searchWidget;
12 }
13 
14 namespace Gui {
15 namespace Widgets {
16 
21 class searchWidget : public QWidget
22 {
23  Q_OBJECT
24 
25 public:
30  explicit searchWidget(QWidget *parent = 0);
31 
32  ~searchWidget();
33 
40 
41 
47  bool isCustomerSelected() const;
48 
53  void selectCustomer(int id);
54 
60  int getIdCustomer() const;
61 
67  void setIdCustomer(int idCustomer);
68 
69 public slots:
74  void search(QString toSearch);
75 
80  void getCustomerData();
81 
82 signals:
87  void selectCustomer();
88 
89 private:
90  Ui::searchWidget *ui;
91 
97  void updateTable(QString text="");
98 
99  bool _isCustomerSelected;
100  int _idCustomer;
101 };
102 }
103 }
104 #endif // SEARCHWIDGET_H
void getCustomerData()
searchWidget::getCustomerData Return data on the customer selected in the QTableView and display this...
Definition: searchwidget.cpp:59
searchWidget(QWidget *parent=0)
searchWidget::searchWidget Construct a search widget
Definition: searchwidget.cpp:6
void selectCustomer()
searchWidget::selectCustomer Signal that the Customer selected has changed
bool isCustomerSelected() const
searchWidget::isCustomerSelected Return TRUE if a customer is selected, else FALSE ...
Definition: searchwidget.cpp:90
int getIdCustomer() const
searchWidget::getIdCustomer Return the Customer id of the Customer line selected
Definition: searchwidget.cpp:80
void search(QString toSearch)
searchWidget::launch a search
Definition: searchwidget.cpp:28
Class for search in database.
Definition: searchwidget.h:21
void setIdCustomer(int idCustomer)
searchWidget::setIdCustomer Change the customer id by the new idCustomer
Definition: searchwidget.cpp:85
int getCurrentCustomerId()
searchWidget::getCurrentCustomerId Return the id of the customer selected in the table ...
Definition: searchwidget.cpp:20