-rw-r--r-- | noncore/graphics/opie-eye/impl/dir/dir.pro | 6 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp | 41 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/impl/dir/dir_setup.cpp | 48 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/impl/dir/dir_setup.h | 22 |
4 files changed, 77 insertions, 40 deletions
diff --git a/noncore/graphics/opie-eye/impl/dir/dir.pro b/noncore/graphics/opie-eye/impl/dir/dir.pro index 675c327..6544fd9 100644 --- a/noncore/graphics/opie-eye/impl/dir/dir.pro +++ b/noncore/graphics/opie-eye/impl/dir/dir.pro | |||
@@ -2,3 +2,4 @@ HEADERS += impl/dir/dir_dirview.h \ | |||
2 | impl/dir/dir_ifaceinfo.h \ | 2 | impl/dir/dir_ifaceinfo.h \ |
3 | impl/dir/dir_lister.h | 3 | impl/dir/dir_lister.h \ |
4 | impl/dir/dir_setup.h | ||
4 | 5 | ||
@@ -8,3 +9,4 @@ SOURCES += impl/dir/dir_dirview.cpp \ | |||
8 | impl/dir/dir_ifaceinfo.cpp \ | 9 | impl/dir/dir_ifaceinfo.cpp \ |
9 | impl/dir/dir_lister.cpp | 10 | impl/dir/dir_lister.cpp \ |
11 | impl/dir/dir_setup.cpp | ||
10 | 12 | ||
diff --git a/noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp b/noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp index 1e4ec40..3132a9e 100644 --- a/noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp +++ b/noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp | |||
@@ -6,2 +6,3 @@ | |||
6 | #include "dir_ifaceinfo.h" | 6 | #include "dir_ifaceinfo.h" |
7 | #include "dir_setup.h" | ||
7 | 8 | ||
@@ -20,42 +21,5 @@ | |||
20 | 21 | ||
21 | namespace { | ||
22 | class DirImageWidget : public QFrame { | ||
23 | public: | ||
24 | DirImageWidget(): QFrame() { | ||
25 | setFrameStyle(Box|Raised); | ||
26 | QVBoxLayout *m_MainLayout = new QVBoxLayout( this, 6, 2, "m_MainLayout"); | ||
27 | QGridLayout*RecDepthLayout = new QGridLayout( 0, 1, 1, 0, 6, "RecDepthLayout"); | ||
28 | |||
29 | chkbox = new QCheckBox( QObject::tr("Show all files"), this ); | ||
30 | m_MainLayout->addWidget(chkbox); | ||
31 | recWarningLabel = new QLabel(this); | ||
32 | recWarningLabel->setText(QObject::tr("<center><b>Be carefull with the following options!</b></center>")); | ||
33 | m_MainLayout->addWidget(recWarningLabel); | ||
34 | recBox = new QCheckBox( QObject::tr("Show files recursive"),this); | ||
35 | m_MainLayout->addWidget(recBox); | ||
36 | recDepthLabel = new QLabel(this); | ||
37 | recDepthLabel->setText(QObject::tr("Recursion depth:")); | ||
38 | RecDepthLayout->addWidget(recDepthLabel,0,0); | ||
39 | recDepth = new QSpinBox(this); | ||
40 | recDepth->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Fixed)); | ||
41 | recDepth->setMaxValue(10); | ||
42 | recDepth->setMinValue(1); | ||
43 | recDepth->setSuffix(QObject::tr(" directories")); | ||
44 | RecDepthLayout->addWidget(recDepth,0,1); | ||
45 | m_MainLayout->addLayout(RecDepthLayout); | ||
46 | QSpacerItem *spacer1 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding ); | ||
47 | m_MainLayout->addItem( spacer1 ); | ||
48 | |||
49 | } | ||
50 | ~DirImageWidget() {} | ||
51 | QCheckBox* chkbox,*recBox; | ||
52 | QSpinBox * recDepth; | ||
53 | QLabel* recDepthLabel,*recWarningLabel; | ||
54 | |||
55 | }; | ||
56 | } | ||
57 | |||
58 | |||
59 | DirInterfaceInfo::DirInterfaceInfo() { | 22 | DirInterfaceInfo::DirInterfaceInfo() { |
60 | } | 23 | } |
24 | |||
61 | DirInterfaceInfo::~DirInterfaceInfo() { | 25 | DirInterfaceInfo::~DirInterfaceInfo() { |
@@ -72,2 +36,3 @@ QWidget* DirInterfaceInfo::configWidget(const Config& cfg) { | |||
72 | wid->recDepth->setValue(cfg.readNumEntry("Dir_Recursive_Files_Depth",10)); | 36 | wid->recDepth->setValue(cfg.readNumEntry("Dir_Recursive_Files_Depth",10)); |
37 | wid->recDepth->setEnabled(wid->recBox->isChecked()); | ||
73 | return wid; | 38 | return wid; |
diff --git a/noncore/graphics/opie-eye/impl/dir/dir_setup.cpp b/noncore/graphics/opie-eye/impl/dir/dir_setup.cpp new file mode 100644 index 0000000..7ce7434 --- a/dev/null +++ b/noncore/graphics/opie-eye/impl/dir/dir_setup.cpp | |||
@@ -0,0 +1,48 @@ | |||
1 | #include "dir_setup.h" | ||
2 | |||
3 | /* QT */ | ||
4 | #include <qwidget.h> | ||
5 | #include <qcheckbox.h> | ||
6 | #include <qframe.h> | ||
7 | #include <qhbox.h> | ||
8 | #include <qlabel.h> | ||
9 | #include <qlayout.h> | ||
10 | #include <qspinbox.h> | ||
11 | |||
12 | DirImageWidget::DirImageWidget() | ||
13 | : QFrame() | ||
14 | { | ||
15 | setFrameStyle(Box|Raised); | ||
16 | QVBoxLayout *m_MainLayout = new QVBoxLayout( this, 6, 2, "m_MainLayout"); | ||
17 | QGridLayout*RecDepthLayout = new QGridLayout( 0, 1, 1, 0, 6, "RecDepthLayout"); | ||
18 | |||
19 | chkbox = new QCheckBox( QObject::tr("Show all files"), this ); | ||
20 | m_MainLayout->addWidget(chkbox); | ||
21 | recWarningLabel = new QLabel(this); | ||
22 | recWarningLabel->setText(QObject::tr("<center><b>Be carefull with the following options!</b></center>")); | ||
23 | m_MainLayout->addWidget(recWarningLabel); | ||
24 | recBox = new QCheckBox( QObject::tr("Show files recursive"),this); | ||
25 | m_MainLayout->addWidget(recBox); | ||
26 | recDepthLabel = new QLabel(this); | ||
27 | recDepthLabel->setText(QObject::tr("Recursion depth:")); | ||
28 | RecDepthLayout->addWidget(recDepthLabel,0,0); | ||
29 | recDepth = new QSpinBox(this); | ||
30 | recDepth->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Fixed)); | ||
31 | recDepth->setMaxValue(10); | ||
32 | recDepth->setMinValue(1); | ||
33 | recDepth->setSuffix(QObject::tr(" directories")); | ||
34 | RecDepthLayout->addWidget(recDepth,0,1); | ||
35 | m_MainLayout->addLayout(RecDepthLayout); | ||
36 | QSpacerItem *spacer1 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding ); | ||
37 | m_MainLayout->addItem( spacer1 ); | ||
38 | connect(recBox,SIGNAL(toggled(bool)),this,SLOT(recBoxToggled(bool))); | ||
39 | } | ||
40 | |||
41 | DirImageWidget::~DirImageWidget() | ||
42 | { | ||
43 | } | ||
44 | |||
45 | void DirImageWidget::recBoxToggled(bool how) | ||
46 | { | ||
47 | recDepth->setEnabled(how); | ||
48 | } | ||
diff --git a/noncore/graphics/opie-eye/impl/dir/dir_setup.h b/noncore/graphics/opie-eye/impl/dir/dir_setup.h new file mode 100644 index 0000000..932af17 --- a/dev/null +++ b/noncore/graphics/opie-eye/impl/dir/dir_setup.h | |||
@@ -0,0 +1,22 @@ | |||
1 | #ifndef _DIRSETUP_H | ||
2 | #define _DIRSETUP_H | ||
3 | |||
4 | #include <qframe.h> | ||
5 | |||
6 | class QCheckBox; | ||
7 | class QSpinBox; | ||
8 | class QLabel; | ||
9 | |||
10 | class DirImageWidget : public QFrame { | ||
11 | Q_OBJECT | ||
12 | public: | ||
13 | DirImageWidget(); | ||
14 | ~DirImageWidget(); | ||
15 | QCheckBox* chkbox,*recBox; | ||
16 | QSpinBox * recDepth; | ||
17 | QLabel* recDepthLabel,*recWarningLabel; | ||
18 | protected slots: | ||
19 | void recBoxToggled(bool); | ||
20 | }; | ||
21 | |||
22 | #endif | ||