blob: 5599ad1d3492abcee4cfbcd44c7460bb63f2b820 (
plain)
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
|
/*
* GPLv2
* zecke@handhelds.org
*/
#include "dir_ifaceinfo.h"
/* OPIE */
#include <opie2/odebug.h>
#include <qpe/config.h>
using namespace Opie::Core;
/* QT */
#include <qwidget.h>
#include <qcheckbox.h>
#include <qhbox.h>
#include <qlabel.h>
namespace {
class DirImageWidget : public QHBox {
public:
DirImageWidget() {
chkbox = new QCheckBox( QObject::tr("Show all files"), this );
}
~DirImageWidget() {}
QCheckBox* chkbox;
};
}
DirInterfaceInfo::DirInterfaceInfo() {
}
DirInterfaceInfo::~DirInterfaceInfo() {
}
QString DirInterfaceInfo::name()const {
return QString::fromLatin1(QObject::tr("DirView" ));
}
QWidget* DirInterfaceInfo::configWidget(const Config& cfg) {
DirImageWidget* wid = new DirImageWidget();
wid->chkbox->setChecked( cfg.readBoolEntry("Dir_Check_All_Files", true) );
return wid;
}
void DirInterfaceInfo::writeConfig( QWidget* _wid, Config& cfg) {
owarn << "Write Config" << oendl;
DirImageWidget* wid = static_cast<DirImageWidget*>(_wid);
cfg.writeEntry("Dir_Check_All_Files", wid->chkbox->isChecked() );
}
|