-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
57 lines (49 loc) · 1.51 KB
/
Copy pathmain.cpp
File metadata and controls
57 lines (49 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* main.cpp – Coffee Toolkit
*
* Application entry point and CoffeeToolkitApp class.
*
* Build (from project directory):
* make
* or manually:
* g++ -std=c++17 -I/boot/system/develop/headers/private \
* -o coffee_toolkit \
* main.cpp MainWindow.cpp BrewRatioWindow.cpp \
* ExtractionWindow.cpp RoastColorWindow.cpp DetailWindow.cpp \
* -lbe -lroot -ltranslation -ltracker -lshared
*
* Author: David Masson
*/
#include "MainWindow.h"
#include <interface/AboutWindow.h>
#include <Application.h>
class CoffeeToolkitApp : public BApplication {
public:
CoffeeToolkitApp()
: BApplication("application/x-vnd.DavidMasson.CoffeeToolkit"),
fMain(nullptr) {}
void ReadyToRun() override {
fMain = new MainWindow();
fMain->Show();
}
void AboutRequested() override {
BAboutWindow* about = new BAboutWindow(
"Coffee Toolkit", "application/x-vnd.DavidMasson.CoffeeToolkit");
about->AddDescription(
"A native Haiku coffee brewing toolkit.\n\n"
"Tools: Brew Ratio Calculator, Extraction Calculator, "
"and Roast Color Analyzer.");
about->AddCopyright(2025, "David Masson");
about->AddExtraInfo("Released under the MIT License.");
about->SetLook(B_TITLED_WINDOW_LOOK);
about->Show();
}
bool QuitRequested() override {
return true;
}
private:
MainWindow* fMain;
};
int main()
{
return CoffeeToolkitApp().Run();
}