summaryrefslogtreecommitdiff
path: root/noncore/apps/confedit/editwidget.cpp
authortille <tille>2002-06-29 20:15:06 (UTC)
committer tille <tille>2002-06-29 20:15:06 (UTC)
commit5960b3a2823037c63afba09ca83dbcc0943cd082 (patch) (unidiff)
treee81a6fed931463b24ef0dd32cd913275e19eb850 /noncore/apps/confedit/editwidget.cpp
parentffc8b4587d6070abc82b22d03f0819d78c1ff9b0 (diff)
downloadopie-5960b3a2823037c63afba09ca83dbcc0943cd082.zip
opie-5960b3a2823037c63afba09ca83dbcc0943cd082.tar.gz
opie-5960b3a2823037c63afba09ca83dbcc0943cd082.tar.bz2
something like regedit ;-)
Diffstat (limited to 'noncore/apps/confedit/editwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/confedit/editwidget.cpp73
1 files changed, 73 insertions, 0 deletions
diff --git a/noncore/apps/confedit/editwidget.cpp b/noncore/apps/confedit/editwidget.cpp
new file mode 100644
index 0000000..64f968a
--- a/dev/null
+++ b/noncore/apps/confedit/editwidget.cpp
@@ -0,0 +1,73 @@
1#include "editwidget.h"
2
3#include <qlabel.h>
4#include <qlineedit.h>
5#include <qpushbutton.h>
6#include <qlayout.h>
7#include <qvariant.h>
8#include <qtooltip.h>
9#include <qwhatsthis.h>
10#include <qtimer.h>
11#include <qpopupmenu.h>
12#include <qaction.h>
13#include "listviewitemconfigentry.h"
14
15EditWidget::EditWidget( QWidget* parent, const char* name, WFlags fl )
16 : QWidget( parent, name, fl )
17{
18
19 EditWidgetLayout = new QGridLayout( this );
20 EditWidgetLayout->setSpacing( 3 );
21 EditWidgetLayout->setMargin( 3 );
22
23 QLabel *TextLabelFileName = new QLabel( this, "TextLabelFileName" );
24 TextLabelFileName->setText( tr( "File Name:" ) );
25 EditWidgetLayout->addWidget( TextLabelFileName, 0, 0 );
26 TextFileName = new QLabel( this, "TextFileName" );
27 EditWidgetLayout->addWidget( TextFileName, 0, 1 );
28
29 QLabel *TextLabelGroup = new QLabel( this, "TextLabelGroup" );
30 TextLabelGroup->setText( tr( "Group:" ) );
31 EditWidgetLayout->addWidget( TextLabelGroup, 1, 0 );
32 LineEditGroup = new QLineEdit( this, "LineEditGroup" );
33 EditWidgetLayout->addWidget( LineEditGroup, 1, 1 );
34
35 TextLabelKey = new QLabel( this, "TextLabelKey" );
36 TextLabelKey->setText( tr( "Key:" ) );
37 EditWidgetLayout->addWidget( TextLabelKey, 2, 0 );
38 LineEditKey = new QLineEdit( this, "LineEditKey" );
39 EditWidgetLayout->addWidget( LineEditKey, 2, 1 );
40
41 TextLabelValue = new QLabel( this, "TextLabelValue" );
42 TextLabelValue->setText( tr( "Value:" ) );
43 EditWidgetLayout->addWidget( TextLabelValue, 3, 0 );
44 LineEditValue = new QLineEdit( this, "LineEditValue" );
45 EditWidgetLayout->addWidget( LineEditValue, 3, 1 );
46
47}
48
49
50EditWidget::~EditWidget()
51{
52}
53
54
55void EditWidget::isKey(bool h)
56{
57 if (h)
58 {
59 LineEditGroup->setEnabled(false);
60 TextLabelKey->show();
61 LineEditKey->show();
62 TextLabelValue->show();
63 LineEditValue->show();
64 }else{
65 LineEditGroup->setEnabled(true);
66 TextLabelKey->hide();
67 LineEditKey->hide();
68 TextLabelValue->hide();
69 LineEditValue->hide();
70 }
71 update();
72}
73