OSDN Git Service

Ver0.13
[gefu/Gefu.git] / common.h
1 #ifndef COMMON_H\r
2 #define COMMON_H\r
3 \r
4 #include <QMap>\r
5 typedef QMap<QString, QString> StringMap;\r
6 \r
7 class MainWindow;\r
8 class QKeyEvent;\r
9 extern MainWindow* getMainWnd();\r
10 extern QString FilesizeToString(quint64 size);\r
11 extern QString ViewerIgnoreExt();\r
12 extern QString KeyEventToSequence(const QKeyEvent *event);\r
13 \r
14 #define slash   QString("/")\r
15 #define QQ(x)   ("\"" + QString(x) + "\"")\r
16 \r
17 #define IniKey_ShowHidden               "Common/ShowHidden"\r
18 #define IniKey_ShowSystem               "Common/ShowSystem"\r
19 #define IniKey_DefaultOnCopy            "Common/DefaultCopyMode"\r
20 #define IniKey_MoveAfterCreateFolder    "Common/MoveAfterFolderCreation"\r
21 #define IniKey_OpenAfterCreateFile      "Common/OpenAfterFileCreation"\r
22 #define IniKey_CheckUpdates             "Common/CheckUpdates"\r
23 #define IniKey_BootSizeSpec             "BootAndExit/SizeSpec"\r
24 #define IniKey_BootSizeRel              "BootAndExit/SizeRel"\r
25 #define IniKey_BootSizeAbs              "BootAndExit/SizeAbs"\r
26 #define IniKey_BootPosSpec              "BootAndExit/PosSpec"\r
27 #define IniKey_BootPosRel               "BootAndExit/PosRel"\r
28 #define IniKey_BootPosAbs               "BootAndExit/PosAbs"\r
29 #define IniKey_ResetOnBoot              "BootAndExit/Reset"\r
30 #define IniKey_BoxColorFg               "Appearance/BoxColorFg"\r
31 #define IniKey_BoxColorBg               "Appearance/BoxColorBg"\r
32 #define IniKey_BoxFont                  "Appearance/BoxFont"\r
33 #define IniKey_ViewFont                 "Appearance/ViewFont"\r
34 #define IniKey_ViewColorBgNormal        "Appearance/ViewColorBgNormal"\r
35 #define IniKey_ViewColorBgMark          "Appearance/ViewColorBgMark"\r
36 #define IniKey_ViewColorFgNormal        "Appearance/ViewColorFgNormal"\r
37 #define IniKey_ViewColorFgMark          "Appearance/ViewColorFgMark"\r
38 #define IniKey_ViewColorFgSystem        "Appearance/ViewColorFgSystem"\r
39 #define IniKey_ViewColorFgHidden        "Appearance/ViewColorFgHidden"\r
40 #define IniKey_ViewColorFgReadonly      "Appearance/ViewColorFgReadonly"\r
41 #define IniKey_ConfirmExit              "Confirm/Exit"\r
42 #define IniKey_ConfirmCopy              "Confirm/Copy"\r
43 #define IniKey_ConfirmMove              "Confirm/Move"\r
44 #define IniKey_ConfirmDelete            "Confirm/Delete"\r
45 #define IniKey_ConfirmRename            "Confirm/Rename"\r
46 #define IniKey_AutoCloseCopy            "AutoClose/Copy"\r
47 #define IniKey_AutoCloseMove            "AutoClose/Move"\r
48 #define IniKey_AutoCloseDelete          "AutoClose/Delete"\r
49 #define IniKey_AutoCloseRename          "AutoClose/Rename"\r
50 #define IniKey_EditorPath               "Editor/Path"\r
51 #define IniKey_EditorOption             "Editor/Option"\r
52 #define IniKey_TerminalPath             "Terminal/Path"\r
53 #define IniKey_TerminalOption           "Terminal/Option"\r
54 #define IniKey_ViewerFont               "Viewer/Font"\r
55 #define IniKey_ViewerColorBg            "Viewer/ColorBg"\r
56 #define IniKey_ViewerColorFg            "Viewer/ColorFg"\r
57 #define IniKey_ViewerInherit            "Viewer/Inherit"\r
58 #define IniKey_ViewerForceOpen          "Viewer/ForceOpen"\r
59 #define IniKey_ViewerIgnoreExt          "Viewer/IgnoreExt"\r
60 #define IniKey_WindowGeometry           "Window/Geometry"\r
61 #define iniKey_WindowState              "Window/State"\r
62 // 以下は[Left/Right]セクションのキー\r
63 #define IniKey_Dir                  "dir"\r
64 #define IniKey_SortBy               "SortBy"\r
65 #define IniKey_OrderBy              "OrderBy"\r
66 #define IniKey_PutDirs              "PutDirs"\r
67 #define IniKey_IgnoreCase           "IgnoreCase"\r
68 \r
69 #define SortByName  QDir::Name\r
70 #define SortByDate  QDir::Time\r
71 #define SortBySize  QDir::Size\r
72 #define SortByType  QDir::Type\r
73 \r
74 #define OrderByAsc  0\r
75 #define OrderByDesc QDir::Reversed\r
76 \r
77 #define PutDirsFirst    QDir::DirsFirst\r
78 #define PutDirsLast     QDir::DirsLast\r
79 #define PutDirsDefault  0\r
80 \r
81 #endif // COMMON_H\r