From 6034297853dc1edd6009cfe7c6786d12cab9367a Mon Sep 17 00:00:00 2001 From: alwin Date: Tue, 02 Nov 2004 22:59:10 +0000 Subject: setup dlg into extra files - its a little bit cleaner --- (limited to 'noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.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 @@ -4,6 +4,7 @@ */ #include "dir_ifaceinfo.h" +#include "dir_setup.h" /* OPIE */ #include @@ -18,46 +19,9 @@ #include #include -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("
Be carefull with the following options!
")); - 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() { } @@ -70,6 +34,7 @@ QWidget* DirInterfaceInfo::configWidget(const Config& cfg) { wid->chkbox->setChecked(cfg.readBoolEntry("Dir_Check_All_Files",false)); 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; } -- cgit v0.9.0.2