-
Notifications
You must be signed in to change notification settings - Fork 1
/
types.h
205 lines (165 loc) · 3.43 KB
/
types.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
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
#ifndef TYPES_H
#define TYPES_H
#include <qdir.h>
namespace Farman
{
// 起動時のウィンドウサイズ
enum class SizeAtStartup : int
{
Default = 0,
LastTime = 1,
Fixed = 2,
};
// 起動時のウィンドウ位置
enum class PositionAtStartup : int
{
Default = 0,
LastTime = 1,
Fixed = 2,
};
// 起動時のフォルダ位置
enum class FolderAtStartup : int
{
Default = 0,
LastTime = 1,
Fixed = 2,
};
// ImageViewer の透過部分背景タイプ
enum class ImageViewerTransparentBGType : int
{
Solid = 0,
Checkered = 1,
};
enum class PaneMode : int
{
Single = 0,
Dual = 1,
PaneModeNum,
};
enum class PaneType : int
{
Left = 0,
Right = 1,
PaneTypeNum,
};
enum class SectionType : int
{
Unknown = -1,
FileName = 0,
FileType,
FileSize,
LastModified,
NoSpecify,
SectionTypeNum
};
enum class SortDirsType : int
{
First = 0,
Last = 1,
NoSpecify = 2,
SortDirsTypeNum
};
enum class FolderViewColorRoleType : int
{
Unknown = -1,
Normal,
Normal_Selected,
Folder,
Folder_Selected,
ReadOnly,
ReadOnly_Selected,
Hidden,
Hidden_Selected,
System,
System_Selected,
Background,
Selected_Background,
FolderViewColorRoleTypeNum
};
enum class FileSizeFormatType : int
{
SI, // QLocale::FileSizeSIFormat
IEC, // QLocale::FileSizeIecFormat
Detail,
FileSizeFormatTypeNum,
};
enum class DateFormatType : int
{
Default, // Qt::TextDate
ISO, // Qt::ISODate
Original,
DateFormatTypeNum,
};
// 属性フィルタ
enum class AttrFilterFlag : int
{
None = 0,
Hidden = (1 << 0), // 隠しファイル
System = (1 << 1), // システムファイル(Windows)
Parent = (1 << 8), // ".."
};
Q_DECLARE_FLAGS(AttrFilterFlags, AttrFilterFlag)
Q_DECLARE_OPERATORS_FOR_FLAGS(AttrFilterFlags)
// ファイル/フォルダ フィルタ
enum class FileFolderFilterType : int
{
All = 0, // 全て
File, // ファイルのみ
Folder, // フォルダのみ
};
// 同名ファイルが存在する場合の処理タイプ
enum class OverwriteMethodType : int
{
Overwrite = 0,
OverwriteIfNewer = 1,
Skip = 2,
Rename = 3,
OverwriteMethodTypeNum,
};
// Viewer 種別
enum class ViewerType : int
{
Auto = -1,
Text = 0,
Hex = 1,
Image = 2,
ViewerTypeNum,
};
// FolderView にドラッグ&ドロップした際の振る舞い
enum class DragAndDropBehaviorType : int
{
Select = 0,
Copy = 1,
Move = 2,
DragAndDropBehaviorTypeNum,
};
// 設定ダイアログのタブ
enum class PreferencesDialogTabPage : int
{
General = 0,
Appearance = 1,
FolderView = 2,
Viewer = 3,
ExternalApp = 4,
PreferencesDialogTabPageNum,
};
#ifdef Q_OS_WIN
// ファイルアトリビュートフラグ
enum class WinFileAttrFlag : int
{
None = 0,
ReadOnly = (1 << 0), // 読み取り専用
Hidden = (1 << 1), // 隠し
Archive = (1 << 2), // アーカイブ
System = (1 << 3), // システム
};
Q_DECLARE_FLAGS(WinFileAttrFlags, WinFileAttrFlag)
Q_DECLARE_OPERATORS_FOR_FLAGS(WinFileAttrFlags)
#endif
#ifdef Q_OS_WIN
#define LINEFEED_CODE "\r\n"
#else
#define LINEFEED_CODE "\n"
#endif
}
#endif // TYPES_H