]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/qt-console/util/comboutil.h
kes Change Bacula trademark owner from John Walker to Kern Sibbald
[bacula/bacula] / bacula / src / qt-console / util / comboutil.h
1 #ifndef _COMBOUTIL_H_
2 #define _COMBOUTIL_H_
3 /*
4    Bacula® - The Network Backup Solution
5
6    Copyright (C) 2007-2008 Free Software Foundation Europe e.V.
7
8    The main author of Bacula is Kern Sibbald, with contributions from
9    many others, a complete list can be found in the file AUTHORS.
10    This program is Free Software; you can redistribute it and/or
11    modify it under the terms of version two of the GNU General Public
12    License as published by the Free Software Foundation and included
13    in the file LICENSE.
14
15    This program is distributed in the hope that it will be useful, but
16    WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18    General Public License for more details.
19
20    You should have received a copy of the GNU General Public License
21    along with this program; if not, write to the Free Software
22    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23    02110-1301, USA.
24
25    Bacula® is a registered trademark of Kern Sibbald.
26    The licensor of Bacula is the Free Software Foundation Europe
27    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
28    Switzerland, email:ftf@fsfeurope.org.
29 */
30 /*
31  *   Version $Id$
32  *
33  *   Combobox helpers - Riccardo Ghetta, May 2008 
34  */
35
36 class QComboBox;
37 class QString;
38 class QStringList;
39
40 /* selects value val on combo, if exists */
41 void comboSel(QComboBox *combo, const QString &val);
42
43 /* if the combo has selected something different from "Any" uses the selection
44  * to build a condition on field fldname and adds it to the condition list */
45 void comboCond(QStringList &cndlist, const QComboBox *combo, const char *fldname);
46
47 /* these helpers are used to give an uniform content to common combos.
48  * There are two routines per combo type:
49  * - XXXXComboFill fills the combo with values.
50  * - XXXXComboCond checks the combo and, if selected adds a condition
51  *   on the field fldName to the list of conditions cndList
52  */
53
54 /* boolean combo (yes/no) */
55 void boolComboFill(QComboBox *combo);
56 void boolComboCond(QStringList &cndlist, const QComboBox *combo, const char *fldname);
57
58 /* backup level combo */
59 void levelComboFill(QComboBox *combo);
60 void levelComboCond(QStringList &cndlist, const QComboBox *combo, const char *fldname);
61
62 /* job status combo */
63 void jobStatusComboFill(QComboBox *combo);
64 void jobStatusComboCond(QStringList &cndlist, const QComboBox *combo, const char *fldname);
65
66 #endif /* _COMBOUTIL_H_ */