summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/impl/dir/dir_setup.cpp
Unidiff
Diffstat (limited to 'noncore/graphics/opie-eye/impl/dir/dir_setup.cpp') (more/less context) (show 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}