summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/impl/dir/dir_setup.cpp
authoralwin <alwin>2004-11-02 22:59:10 (UTC)
committer alwin <alwin>2004-11-02 22:59:10 (UTC)
commit6034297853dc1edd6009cfe7c6786d12cab9367a (patch) (unidiff)
tree557639b47018613a32cd59f33f4b5d2b4fcfaf0c /noncore/graphics/opie-eye/impl/dir/dir_setup.cpp
parentb2cb5b7e90c13c90a6090ab11831f1369675c14b (diff)
downloadopie-6034297853dc1edd6009cfe7c6786d12cab9367a.zip
opie-6034297853dc1edd6009cfe7c6786d12cab9367a.tar.gz
opie-6034297853dc1edd6009cfe7c6786d12cab9367a.tar.bz2
setup dlg into extra files - its a little bit cleaner
Diffstat (limited to 'noncore/graphics/opie-eye/impl/dir/dir_setup.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/impl/dir/dir_setup.cpp48
1 files changed, 48 insertions, 0 deletions
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
12DirImageWidget::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
41DirImageWidget::~DirImageWidget()
42{
43}
44
45void DirImageWidget::recBoxToggled(bool how)
46{
47 recDepth->setEnabled(how);
48}