Debian Codegraph @

src/configstate.h

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 /***************************************************************************
2 configstate.h
3 -------------------
4 State for config dialog
5 -------------------
6 Copyright 2006-2008 David Johnson <[email protected]>
7 All rights reserved.
8
9 Redistribution and use in source and binary forms, with or without
10 modification, are permitted provided that the following conditions
11 are met:
12
13 1. Redistributions of source code must retain the above copyright
14 notice, this list of conditions and the following disclaimer.
15
16 2. Redistributions in binary form must reproduce the above copyright
17 notice, this list of conditions and the following disclaimer in the
18 documentation and/or other materials provided with the distribution.
19
20 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
24 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
26 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
28 IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
30 IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 ***************************************************************************/
32
33 #ifndef CONFIGSTATE_H
34 #define CONFIGSTATE_H
35
36 #include <QStringList>
37 #include "hop.h"
38 #include "resource.h"
39
40 struct WinConfigState {
41 #if defined (Q_WS_MAC)
42 WinConfigState() : statusbar(true) { ; }
43 #else
44 WinConfigState() : statusbar(false) { ; }
45 #endif
46 bool statusbar;
47 };
48
49 struct GenConfigState {
50 GenConfigState()
51 : lookfeel(""), showsplash(true), autosave(true), saveinterval(5),
52 autobackup(true), loadlast(true), recentnum(5), recentfiles() { ; }
53 QString lookfeel;
54 bool showsplash;
55 bool autosave;
56 int saveinterval;
57 bool autobackup;
58 bool loadlast;
59 int recentnum;
60 QStringList recentfiles;
61 };
62
63 struct RecipeConfigState {
64 RecipeConfigState()
65 : batch(5.00), style("Generic Ale"), hoptype(Hop::PELLET_STRING) { ; }
66 double batch;
67 QString style;
68 QString hoptype;
69 };
70
71 struct CalcConfigState {
72 CalcConfigState()
73 : steepyield(0.5), efficiency(0.75), morey(false), tinseth(false),
74 units(Resource::UNIT_US) { ; }
75 double steepyield;
76 double efficiency;
77 bool morey;
78 bool tinseth;
79 QString units;
80 };
81
82 struct ConfigState
83 {
84 WinConfigState window;
85 GenConfigState general;
86 RecipeConfigState recipe;
87 CalcConfigState calc;
88 };
89
90 #endif // CONFIGSTATE_H