-
Notifications
You must be signed in to change notification settings - Fork 4
/
Settings.h
56 lines (44 loc) · 1.17 KB
/
Settings.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
55
56
/*
* Copyright 2011-2012. All rights reserved.
* Distributed under the terms of the MIT license.
*
* Author:
* Humdinger, [email protected]
*/
#ifndef SETTINGS_H
#define SETTINGS_H
#include <ObjectList.h>
#include <Path.h>
#include <Rect.h>
#include <String.h>
static const char kSettingsFile[] = "UberTuber_settings";
static const char kMonitorFile[] = "UberTuber_monitored_sites";
class Settings {
public:
Settings();
~Settings();
BPath LastDir() const { return fLastDir; }
bool StateAuto() const { return fStateAuto; }
bool StateClear() const { return fStateClear; }
BRect WindowPosition() const { return fPosition; }
void SetChangedMonitoredList();
void SetDefaults();
void SetLastDir(BPath);
void SetStateAuto(bool);
void SetStateClear(bool);
void SetWindowPosition(BRect);
bool ValidURL(BString);
void ReadMonitoredSitesList();
private:
BPath fLastDir;
BRect fPosition;
bool fStateAuto;
bool fStateClear;
BPath originalLastDir;
BRect originalPosition;
bool originalStateAuto;
bool originalStateClear;
BObjectList<BString> fValidAddressList;
bool fChangedMonitoredList;
};
#endif /* SETTINGS_H */