-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaconfig.h
87 lines (73 loc) · 1.59 KB
/
aconfig.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
#ifndef __AVIEW_CONFIG_H__
#define __AVIEW_CONFIG_H__
#include <qpe/config.h>
#include <qcolor.h>
#include "gconfig.h"
struct PositionInfo {
QString file_name;
int para, offset;
PositionInfo *next;
};
enum {
ACFG_FontName,
ACFG_FontSize,
ACFG_FontBold,
ACFG_FakeBold,
ACFG_LineMargin,
ACFG_Margin,
ACFG_Rotation,
ACFG_Background,
ACFG_TextColor,
ACFG_HighLight1,
ACFG_HighLight2,
ACFG_HighLight3,
ACFG_HighLight4,
ACFG_HighLight5,
ACFG_HighLight6,
ACFG_HighLight7,
ACFG_BarFG,
ACFG_BarBG,
ACFG_BarText,
ACFG_BarHeight,
ACFG_BarVisible,
ACFG_HistoryLimit,
ACFG_LoadLastDir,
ACFG_LoadLastFile,
ACFG_ScrollHeight,
ACFG_ScrollDelay,
ACFG_SlicingMethod,
ACFG_HSlicing,
ACFG_VSlicing,
ACFG_ScalingMethod,
ACFG_ScaleFactor,
ACFG_ScrollPolicy,
ACFG_PagingPolicy,
ACFG_ScaleUp,
ACFG_HoldDelay,
ACFG_Reserved
};
class AViewConfigManager : public GenConfig {
private:
bool m_change;
int m_historyLimit;
PositionInfo *m_position;
QString m_lastDir;
private:
AViewConfigManager();
void writeHistory();
public:
~AViewConfigManager();
static AViewConfigManager *getInstance();
void setLastPosition(const QString &f_name, int para, int offset);
bool getLastPosition(const QString &f_name, int ¶, int &offset);
QString getLastFile();
QStringList getRescentFiles();
void setLastDir(const QString &d_path);
QString getLastDir();
void sync();
};
/**
* AView configuration reference.
*/
extern AViewConfigManager *g_cfg;
#endif