Diffstat (limited to 'noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp b/noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp new file mode 100644 index 0000000..79f4510 --- a/dev/null +++ b/noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * GPLv2 | ||
3 | * zecke@handhelds.org | ||
4 | */ | ||
5 | |||
6 | #include <qwidget.h> | ||
7 | #include <qcheckbox.h> | ||
8 | #include <qhbox.h> | ||
9 | #include <qlabel.h> | ||
10 | |||
11 | #include <qpe/config.h> | ||
12 | |||
13 | #include "dir_ifaceinfo.h" | ||
14 | |||
15 | namespace { | ||
16 | class DirImageWidget : public QHBox { | ||
17 | public: | ||
18 | DirImageWidget() { | ||
19 | chkbox = new QCheckBox( QObject::tr("Show all files"), this ); | ||
20 | } | ||
21 | ~DirImageWidget() {} | ||
22 | QCheckBox* chkbox; | ||
23 | }; | ||
24 | } | ||
25 | |||
26 | |||
27 | DirInterfaceInfo::DirInterfaceInfo() { | ||
28 | } | ||
29 | DirInterfaceInfo::~DirInterfaceInfo() { | ||
30 | } | ||
31 | |||
32 | QString DirInterfaceInfo::name()const { | ||
33 | return QString::fromLatin1(QObject::tr("DirView" )); | ||
34 | } | ||
35 | |||
36 | QWidget* DirInterfaceInfo::configWidget(const Config& cfg) { | ||
37 | DirImageWidget* wid = new DirImageWidget(); | ||
38 | wid->chkbox->setChecked( cfg.readBoolEntry("Dir_Check_All_Files", true) ); | ||
39 | |||
40 | return wid; | ||
41 | } | ||
42 | |||
43 | void DirInterfaceInfo::writeConfig( QWidget* _wid, Config& cfg) { | ||
44 | qWarning( "Write Config" ); | ||
45 | DirImageWidget* wid = static_cast<DirImageWidget*>(_wid); | ||
46 | cfg.writeEntry("Dir_Check_All_Files", wid->chkbox->isChecked() ); | ||
47 | } | ||