OSDN Git Service

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