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
|
#include "Config.h"
#include <tdeconfig.h>
#include <tdeglobal.h>
bool Config::scanAcrossMounts;
bool Config::scanRemoteMounts;
bool Config::scanRemovableMedia;
bool Config::varyLabelFontSizes;
bool Config::showSmallFiles;
uint Config::contrast;
uint Config::antiAliasFactor;
uint Config::minFontPitch;
uint Config::defaultRingDepth;
Filelight::MapScheme Config::scheme;
TQStringList Config::skipList;
inline TDEConfig&
Filelight::Config::tdeconfig()
{
TDEConfig *config = TDEGlobal::config();
config->setGroup( "filelight_part" );
return *config;
}
void
Filelight::Config::read()
{
const TDEConfig &config = tdeconfig();
scanAcrossMounts = config.readBoolEntry( "scanAcrossMounts", false );
scanRemoteMounts = config.readBoolEntry( "scanRemoteMounts", false );
scanRemovableMedia = config.readBoolEntry( "scanRemovableMedia", false );
varyLabelFontSizes = config.readBoolEntry( "varyLabelFontSizes", true );
showSmallFiles = config.readBoolEntry( "showSmallFiles", false );
contrast = config.readNumEntry( "contrast", 75 );
antiAliasFactor = config.readNumEntry( "antiAliasFactor", 2 );
minFontPitch = config.readNumEntry( "minFontPitch", TQFont().pointSize() - 3);
scheme = (MapScheme) config.readNumEntry( "scheme", 0 );
skipList = config.readPathListEntry( "skipList" );
defaultRingDepth = 4;
}
void
Filelight::Config::write()
{
TDEConfig &config = tdeconfig();
config.writeEntry( "scanAcrossMounts", scanAcrossMounts );
config.writeEntry( "scanRemoteMounts", scanRemoteMounts );
config.writeEntry( "scanRemovableMedia", scanRemovableMedia );
config.writeEntry( "varyLabelFontSizes", varyLabelFontSizes );
config.writeEntry( "showSmallFiles", showSmallFiles);
config.writeEntry( "contrast", contrast );
config.writeEntry( "antiAliasFactor", antiAliasFactor );
config.writeEntry( "minFontPitch", minFontPitch );
config.writeEntry( "scheme", scheme );
config.writePathEntry( "skipList", skipList );
}
|