summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/impl/dir/dir.pro6
-rw-r--r--noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp41
-rw-r--r--noncore/graphics/opie-eye/impl/dir/dir_setup.cpp48
-rw-r--r--noncore/graphics/opie-eye/impl/dir/dir_setup.h22
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
@@ -1,5 +1,6 @@
HEADERS += impl/dir/dir_dirview.h \
impl/dir/dir_ifaceinfo.h \
- impl/dir/dir_lister.h
+ impl/dir/dir_lister.h \
+ impl/dir/dir_setup.h
@@ -7,4 +8,5 @@ HEADERS += impl/dir/dir_dirview.h \
SOURCES += impl/dir/dir_dirview.cpp \
impl/dir/dir_ifaceinfo.cpp \
- impl/dir/dir_lister.cpp
+ impl/dir/dir_lister.cpp \
+ impl/dir/dir_setup.cpp
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
@@ -5,4 +5,5 @@
#include "dir_ifaceinfo.h"
+#include "dir_setup.h"
/* OPIE */
@@ -19,44 +20,7 @@
#include <qspinbox.h>
-namespace {
- class DirImageWidget : public QFrame {
- public:
- DirImageWidget(): QFrame() {
- setFrameStyle(Box|Raised);
- QVBoxLayout *m_MainLayout = new QVBoxLayout( this, 6, 2, "m_MainLayout");
- QGridLayout*RecDepthLayout = new QGridLayout( 0, 1, 1, 0, 6, "RecDepthLayout");
-
- chkbox = new QCheckBox( QObject::tr("Show all files"), this );
- m_MainLayout->addWidget(chkbox);
- recWarningLabel = new QLabel(this);
- recWarningLabel->setText(QObject::tr("<center><b>Be carefull with the following options!</b></center>"));
- m_MainLayout->addWidget(recWarningLabel);
- recBox = new QCheckBox( QObject::tr("Show files recursive"),this);
- m_MainLayout->addWidget(recBox);
- recDepthLabel = new QLabel(this);
- recDepthLabel->setText(QObject::tr("Recursion depth:"));
- RecDepthLayout->addWidget(recDepthLabel,0,0);
- recDepth = new QSpinBox(this);
- recDepth->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Fixed));
- recDepth->setMaxValue(10);
- recDepth->setMinValue(1);
- recDepth->setSuffix(QObject::tr(" directories"));
- RecDepthLayout->addWidget(recDepth,0,1);
- m_MainLayout->addLayout(RecDepthLayout);
- QSpacerItem *spacer1 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding );
- m_MainLayout->addItem( spacer1 );
-
- }
- ~DirImageWidget() {}
- QCheckBox* chkbox,*recBox;
- QSpinBox * recDepth;
- QLabel* recDepthLabel,*recWarningLabel;
-
- };
-}
-
-
DirInterfaceInfo::DirInterfaceInfo() {
}
+
DirInterfaceInfo::~DirInterfaceInfo() {
}
@@ -71,4 +35,5 @@ QWidget* DirInterfaceInfo::configWidget(const Config& cfg) {
wid->recBox->setChecked(cfg.readBoolEntry("Dir_Check_Recursive_Files",false));
wid->recDepth->setValue(cfg.readNumEntry("Dir_Recursive_Files_Depth",10));
+ wid->recDepth->setEnabled(wid->recBox->isChecked());
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 @@
+#include "dir_setup.h"
+
+/* QT */
+#include <qwidget.h>
+#include <qcheckbox.h>
+#include <qframe.h>
+#include <qhbox.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qspinbox.h>
+
+DirImageWidget::DirImageWidget()
+ : QFrame()
+{
+ setFrameStyle(Box|Raised);
+ QVBoxLayout *m_MainLayout = new QVBoxLayout( this, 6, 2, "m_MainLayout");
+ QGridLayout*RecDepthLayout = new QGridLayout( 0, 1, 1, 0, 6, "RecDepthLayout");
+
+ chkbox = new QCheckBox( QObject::tr("Show all files"), this );
+ m_MainLayout->addWidget(chkbox);
+ recWarningLabel = new QLabel(this);
+ recWarningLabel->setText(QObject::tr("<center><b>Be carefull with the following options!</b></center>"));
+ m_MainLayout->addWidget(recWarningLabel);
+ recBox = new QCheckBox( QObject::tr("Show files recursive"),this);
+ m_MainLayout->addWidget(recBox);
+ recDepthLabel = new QLabel(this);
+ recDepthLabel->setText(QObject::tr("Recursion depth:"));
+ RecDepthLayout->addWidget(recDepthLabel,0,0);
+ recDepth = new QSpinBox(this);
+ recDepth->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Fixed));
+ recDepth->setMaxValue(10);
+ recDepth->setMinValue(1);
+ recDepth->setSuffix(QObject::tr(" directories"));
+ RecDepthLayout->addWidget(recDepth,0,1);
+ m_MainLayout->addLayout(RecDepthLayout);
+ QSpacerItem *spacer1 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ m_MainLayout->addItem( spacer1 );
+ connect(recBox,SIGNAL(toggled(bool)),this,SLOT(recBoxToggled(bool)));
+}
+
+DirImageWidget::~DirImageWidget()
+{
+}
+
+void DirImageWidget::recBoxToggled(bool how)
+{
+ recDepth->setEnabled(how);
+}
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 @@
+#ifndef _DIRSETUP_H
+#define _DIRSETUP_H
+
+#include <qframe.h>
+
+class QCheckBox;
+class QSpinBox;
+class QLabel;
+
+class DirImageWidget : public QFrame {
+ Q_OBJECT
+public:
+ DirImageWidget();
+ ~DirImageWidget();
+ QCheckBox* chkbox,*recBox;
+ QSpinBox * recDepth;
+ QLabel* recDepthLabel,*recWarningLabel;
+protected slots:
+ void recBoxToggled(bool);
+};
+
+#endif