FactDev  0.1
search.h
1 #ifndef SEARCH_H
2 #define SEARCH_H
3 
4 #include <QString>
5 
6 namespace Models {
12 class Search
13 {
14 public:
18  Search();
22  ~Search();
23 
28  QString getFilter();
29 
39  QString &filter, const QStringList list, QString element);
40 
50  QString &filter, const QStringList list, QString element);
51 
58  void filterOnCompany(QString &filter, const QStringList list);
59 
66  void filterOnReferentLastname(QString &filter, const QStringList list);
67 
74  void filterOnProjects(QString &filter, const QStringList list);
75 
82  void filterOnContributories(QString &filter, const QStringList list);
83 
90  void filterOnBillsOrQuotes(QString &filter, const QStringList list);
91 
99  QString &filter, const QStringList list);
100 
105  bool getSearchInCompanies() const;
110  void setSearchInCompanies(bool searchInCompanies);
111 
117  bool getSearchInReferentLastname() const;
124  void setSearchInReferentLastname(bool searchInReferentLastname);
125 
131  bool getSearchInProjects() const;
136  void setSearchInProjects(bool searchInProjects);
137 
143  bool searchInContributories() const;
150  void setSearchInContributories(bool searchInContributories);
151 
157  bool getSearchInBillsQuotes() const;
163  void setSearchInBillsQuotes(bool searchInBillsQuotes);
164 
169  bool getGroupFilter() const;
174  void setGroupFilter(bool getGroupFilter);
175 
180  QString getText() const;
185  void setText(const QString &getText);
186 
187 
188 
189 
190 private:
191  bool _searchInCompanies;
192  bool _searchInReferentLastname;
193  bool _searchInProjects;
194  bool _searchInContributories;
195  bool _searchInBillsQuotes;
196  bool _groupFilter;
197  QString _text;
198 };
199 }
200 #endif // SEARCH_H
void filterOnNumberElements(QString &filter, const QStringList list, QString element)
Search::filterOnNumberElements Search, for each number of the list from the filter, if it corresponds to the element in the database.
Definition: search.cpp:71
void filterOnVarcharElements(QString &filter, const QStringList list, QString element)
Search::filterOnVarcharElements Search, for each word of the list from the filter, if it corresponds to the element in the database.
Definition: search.cpp:58
The Search class.
Definition: search.h:12
~Search()
Search::Search Destruct a search.
Definition: search.cpp:15
void setText(const QString &getText)
Search::setText Modify sql portion.
Definition: search.cpp:187
bool getSearchInReferentLastname() const
Search::getSearchInReferentLastname Return if we search a Last name referent.
Definition: search.cpp:163
void setSearchInProjects(bool searchInProjects)
Search::setSearchInProjects Modify the filter of projects search.
Definition: search.cpp:207
QString getText() const
Search::getText Return sql portion of filter.
Definition: search.cpp:182
void setSearchInContributories(bool searchInContributories)
Search::setSearchInContributories Modify the filter of contributories search.
Definition: search.cpp:216
bool getSearchInBillsQuotes() const
Search::searchInBillsQuotes Return TRUE if it exists one or more bills or quotes in database...
Definition: search.cpp:192
void filterOnCustomersWithoutProject(QString &filter, const QStringList list)
Search::filterOnCustomersWithoutProject Search all customers which are contained in the list of the f...
Definition: search.cpp:122
void setSearchInReferentLastname(bool searchInReferentLastname)
Search::setSearchInReferentLastname Modify the filter of referents last name search.
Definition: search.cpp:168
void setSearchInCompanies(bool searchInCompanies)
Search::setSearchInCompanies Modify the filter of companies search.
Definition: search.cpp:159
void filterOnCompany(QString &filter, const QStringList list)
Search::filterOnCompany Search all companies contained in the list of the filter
Definition: search.cpp:86
Search()
Search::Search Construct a search.
Definition: search.cpp:5
void filterOnContributories(QString &filter, const QStringList list)
Search::filterOnContributories Search all contributories contained in the list of the filter ...
Definition: search.cpp:102
void filterOnProjects(QString &filter, const QStringList list)
Search::filterOnProjects Search all projects contained in the list of the filter
Definition: search.cpp:96
bool getSearchInCompanies() const
Search::getSearchInCompanies Return if we search a company.
Definition: search.cpp:154
void filterOnReferentLastname(QString &filter, const QStringList list)
Search::filterOnReferentLastname Search all referents last name contained in the list of the filter ...
Definition: search.cpp:91
bool getGroupFilter() const
Search::getGroupFilter Return if the filter is actived.
Definition: search.cpp:172
void setGroupFilter(bool getGroupFilter)
Search::setGroupFilter Modify if we active search filter.
Definition: search.cpp:177
QString getFilter()
Search::getFilter Return the search filter.
Definition: search.cpp:20
void filterOnBillsOrQuotes(QString &filter, const QStringList list)
Search::filterOnBillsOrQuotes Search all bills or quotes which are contained in the list of the filte...
Definition: search.cpp:111
void setSearchInBillsQuotes(bool searchInBillsQuotes)
Search::setSearchInBillsQuotes Modify the filter of bills and quotes search.
Definition: search.cpp:197
bool searchInContributories() const
Search::getSearchInContributories Return TRUE if it exists one or more projets in database...
Definition: search.cpp:211
bool getSearchInProjects() const
Search::getSearchInProjects Return TRUE if it exists one or more projets in database.
Definition: search.cpp:202