]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/qt-console/util/comboutil.h
Change copyright as per agreement with FSFE
[bacula/bacula] / bacula / src / qt-console / util / comboutil.h
1 #ifndef _COMBOUTIL_H_
2 #define _COMBOUTIL_H_
3 /*
4    Bacula(R) - The Network Backup Solution
5
6    Copyright (C) 2000-2016 Kern Sibbald
7
8    The original author of Bacula is Kern Sibbald, with contributions
9    from many others, a complete list can be found in the file AUTHORS.
10
11    You may use this file and others of this release according to the
12    license defined in the LICENSE file, which includes the Affero General
13    Public License, v3.0 ("AGPLv3") and some additional permissions and
14    terms pursuant to its AGPLv3 Section 7.
15
16    This notice must be preserved when any source code is 
17    conveyed and/or propagated.
18
19    Bacula(R) is a registered trademark of Kern Sibbald.
20 */
21 /*
22  *   Combobox helpers - Riccardo Ghetta, May 2008 
23  */
24
25 class QComboBox;
26 class QString;
27 class QStringList;
28
29 /* selects value val on combo, if exists */
30 void comboSel(QComboBox *combo, const QString &val);
31
32 /* if the combo has selected something different from "Any" uses the selection
33  * to build a condition on field fldname and adds it to the condition list */
34 void comboCond(QStringList &cndlist, const QComboBox *combo, const char *fldname);
35
36 /* these helpers are used to give an uniform content to common combos.
37  * There are two routines per combo type:
38  * - XXXXComboFill fills the combo with values.
39  * - XXXXComboCond checks the combo and, if selected adds a condition
40  *   on the field fldName to the list of conditions cndList
41  */
42
43 /* boolean combo (yes/no) */
44 void boolComboFill(QComboBox *combo);
45 void boolComboCond(QStringList &cndlist, const QComboBox *combo, const char *fldname);
46
47 /* backup level combo */
48 void levelComboFill(QComboBox *combo);
49 void levelComboCond(QStringList &cndlist, const QComboBox *combo, const char *fldname);
50
51 /* job status combo */
52 void jobStatusComboFill(QComboBox *combo);
53 void jobStatusComboCond(QStringList &cndlist, const QComboBox *combo, const char *fldname);
54
55 #endif /* _COMBOUTIL_H_ */