2
* MainWindow.h is part of Brewtarget, and is Copyright Philip G. Lee
3
* (rocketman768@gmail.com), 2009.
5
* Brewtarget is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* (at your option) any later version.
10
* Brewtarget is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
25
#include <QMainWindow>
28
#include <QFileDialog>
30
#include <QCloseEvent>
31
#include "ui_mainWindow.h"
32
#include "FermentableDialog.h"
33
#include "HopDialog.h"
34
#include "MiscDialog.h"
35
#include "YeastDialog.h"
36
#include "AboutDialog.h"
37
#include "observable.h"
39
#include "BeerColorWidget.h"
40
#include "FermentableEditor.h"
41
#include "MiscEditor.h"
42
#include "HopEditor.h"
43
#include "YeastEditor.h"
44
#include "EquipmentEditor.h"
45
#include "StyleEditor.h"
46
#include "OptionDialog.h"
47
#include "MaltinessWidget.h"
48
#include "MashEditor.h"
49
#include "MashStepEditor.h"
50
#include "MashWizard.h"
51
#include "BrewDayWidget.h"
52
#include "HtmlViewer.h"
53
#include "ScaleRecipeTool.h"
54
#include "RecipeFormatter.h"
56
class MainWindow : public QMainWindow, public Ui::mainWindow, public Observer
60
friend class OptionDialog;
62
MainWindow(QWidget* parent=0);
63
void setRecipe(Recipe* recipe);
64
virtual void notify(Observable* notifier, QVariant info = QVariant()); // Inherited from Observer
66
static const char* homedir;
70
void setRecipeByName(const QString& name);
73
void updateRecipeName();
74
void updateRecipeStyle();
75
void updateRecipeEquipment(const QString&);
76
void updateRecipeBatchSize();
77
void updateRecipeBoilSize();
78
void updateRecipeEfficiency();
79
void updateRecipeStyle(const QString&);
81
void addFermentableToRecipe(Fermentable* ferm);
82
void removeSelectedFermentable();
83
void editSelectedFermentable();
84
void addHopToRecipe(Hop *hop);
85
void removeSelectedHop();
86
void editSelectedHop();
87
void addMiscToRecipe(Misc* misc);
88
void removeSelectedMisc();
89
void editSelectedMisc();
90
void addYeastToRecipe(Yeast* yeast);
91
void removeSelectedYeast();
92
void editSelectedYeast();
95
void removeSelectedMashStep();
96
void editSelectedMashStep();
101
void importRecipes();
106
virtual void closeEvent(QCloseEvent* event);
110
AboutDialog* dialog_about;
111
QFileDialog* fileOpener;
112
QFileDialog* fileSaver;
113
EquipmentEditor* equipEditor;
114
FermentableDialog* fermDialog;
115
FermentableEditor* fermEditor;
116
HopDialog* hopDialog;
117
HopEditor* hopEditor;
118
MashEditor* mashEditor;
119
MashStepEditor* mashStepEditor;
120
MashWizard* mashWizard;
121
MiscDialog* miscDialog;
122
MiscEditor* miscEditor;
123
StyleEditor* styleEditor;
124
YeastDialog* yeastDialog;
125
YeastEditor* yeastEditor;
127
BeerColorWidget beerColorWidget;
128
OptionDialog* optionDialog;
129
QPalette lcdPalette_old, lcdPalette_tooLow, lcdPalette_good, lcdPalette_tooHigh;
130
MaltinessWidget* maltWidget;
131
QDialog* brewDayDialog;
132
BrewDayWidget* brewDayWidget;
133
HtmlViewer* htmlViewer;
134
ScaleRecipeTool* recipeScaler;
135
RecipeFormatter* recipeFormatter;
141
#endif /* _MAINWINDOW_H */