This repository was archived by the owner on Mar 2, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathQLSettings.h
More file actions
95 lines (79 loc) · 2.79 KB
/
QLSettings.h
File metadata and controls
95 lines (79 loc) · 2.79 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*
* Copyright 2010-2024. All rights reserved.
* Distributed under the terms of the MIT license.
*
* Authors:
* Humdinger, humdinger@mailbox.org
* Kevin Adams
* Chris Roberts
*/
#ifndef QLSETTINGS_H
#define QLSETTINGS_H
#include "IgnoreListView.h"
#include <Entry.h>
#include <Locker.h>
#include <ObjectList.h>
#include <Rect.h>
#include <String.h>
class QLSettings {
public:
QLSettings();
~QLSettings();
bool Lock();
void Unlock();
void SaveSettings();
void SetMainWindowFrame(BRect frame) { fMainWindowFrame = frame; };
void SetSetupWindowFrame(BRect setupframe)
{ fSetupWindowFrame = setupframe; };
void SetDeskbar(int32 deskbar) { fDeskbar = deskbar; };
void SetShowVersion(int32 version) { fShowVersion = version; };
void SetShowPath(int32 path) { fShowPath = path; };
void SetSearchStart(int32 searchstart) { fSearchStart = searchstart; };
void SetSaveSearch(int32 savesearch) { fSaveSearch = savesearch; };
void SetSearchTerm(BString searchterm) { fSearchTerm = searchterm; };
void SetApplyIgnore(int32 ignore) { fShowIgnore = ignore; };
void SetSortFavorites(int32 sortfavs) { fSortFavorites = sortfavs; };
BRect GetMainWindowFrame() { return fMainWindowFrame; };
BRect GetSetupWindowFrame() { return fSetupWindowFrame; };
int32 GetDeskbar() { return fDeskbar; };
int32 GetShowVersion() { return fShowVersion; };
int32 GetShowPath() { return fShowPath; };
int32 GetSearchStart() { return fSearchStart; };
int32 GetSaveSearch() { return fSaveSearch; };
BString GetSearchTerm() { return fSearchTerm; };
int32 GetApplyIgnore() { return fShowIgnore; };
int32 GetSortFavorites() { return fSortFavorites; };
// Set/Getters for "Temporary options" menu
void SetTempShowVersion(int32 version) { fTempShowVersion = version; };
void SetTempShowPath(int32 path) { fTempShowPath = path; };
void SetTempSearchStart(int32 searchstart) { fTempSearchStart = searchstart; };
void SetTempShowIgnore(int32 ignore) { fTempApplyIgnore = ignore; };
int32 GetTempShowVersion() { return fTempShowVersion; };
int32 GetTempShowPath() { return fTempShowPath; };
int32 GetTempSearchStart() { return fTempSearchStart; };
int32 GetTempApplyIgnore() { return fTempApplyIgnore; };
void InitLists();
IgnoreListView* IgnoreList() { return fIgnoreList; };
void AddDefaultIgnore();
BObjectList<entry_ref, true>* fFavoriteList;
IgnoreListView* fIgnoreList;
private:
BRect fMainWindowFrame;
BRect fSetupWindowFrame;
int32 fDeskbar;
int32 fShowVersion;
int32 fShowPath;
int32 fSearchStart;
int32 fSaveSearch;
BString fSearchTerm;
int32 fShowIgnore;
int32 fSortFavorites;
// Settings for "Temporary options" menu
int32 fTempShowVersion;
int32 fTempShowPath;
int32 fTempSearchStart;
int32 fTempApplyIgnore;
static const char* kDefaultSystemIgnore[];
BLocker fLock;
};
#endif // QLSETTINGS_H