forked from HaikuArchives/Weather
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPreferencesWindow.h
54 lines (42 loc) · 1.16 KB
/
PreferencesWindow.h
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
/*
* Copyright 2015 Adrián Arroyo Calle <adrian.arroyocalle@gmail.com>
* Copyright 2015 Przemysław Buczkowski <przemub@przemub.pl>
* All rights reserved. Distributed under the terms of the MIT license.
*/
#ifndef _PREFERENCESWINDOW_H_
#define _PREFERENCESWINDOW_H_
#include <RadioButton.h>
#include <Message.h>
#include <Slider.h>
#include <String.h>
#include <Window.h>
class MainWindow;
const int32 kSavePrefMessage = 'SavP';
const int32 kUpdatePrefMessage = 'UpdM';
const int32 kClosePrefWindowMessage = 'CPrW';
enum DisplayUnit{
CELSIUS = 1,
FAHRENHEIT = 2,
KELVIN = 3,
RANKINE = 4,
DELISLE = 5
};
typedef enum DisplayUnit DisplayUnit;
class PreferencesWindow : public BWindow {
public:
PreferencesWindow(BRect frame, MainWindow* parent,
int32 updateDelay, DisplayUnit unit);
void MessageReceived(BMessage *msg);
virtual bool QuitRequested();
private:
void _UpdatePreferences();
MainWindow* fParent;
int32 fUpdateDelay;
DisplayUnit fDisplayUnit;
BRadioButton* fCelsiusButton;
BRadioButton* fFahrenheitButton;
BRadioButton* fKelvinButton;
BRadioButton* fRankineButton;
BRadioButton* fDelisleButton;
};
#endif // _PREFERENCESWINDOW_H_