Diffstat (limited to 'noncore/apps/confedit/editwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/confedit/editwidget.cpp | 60 |
1 files changed, 42 insertions, 18 deletions
diff --git a/noncore/apps/confedit/editwidget.cpp b/noncore/apps/confedit/editwidget.cpp index 64f968a..f7dc408 100644 --- a/noncore/apps/confedit/editwidget.cpp +++ b/noncore/apps/confedit/editwidget.cpp | |||
@@ -19,6 +19,7 @@ EditWidget::EditWidget( QWidget* parent, const char* name, WFlags fl ) | |||
19 | EditWidgetLayout = new QGridLayout( this ); | 19 | EditWidgetLayout = new QGridLayout( this ); |
20 | EditWidgetLayout->setSpacing( 3 ); | 20 | EditWidgetLayout->setSpacing( 0 ); |
21 | EditWidgetLayout->setMargin( 3 ); | 21 | EditWidgetLayout->setMargin( 0 ); |
22 | // setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Maximum));//, sizePolicy().hasHeightForWidth() ) ); | ||
22 | 23 | ||
23 | QLabel *TextLabelFileName = new QLabel( this, "TextLabelFileName" ); | 24 | TextLabelFileName = new QLabel( this, "TextLabelFileName" ); |
24 | TextLabelFileName->setText( tr( "File Name:" ) ); | 25 | TextLabelFileName->setText( tr( "File Name:" ) ); |
@@ -28,3 +29,3 @@ EditWidget::EditWidget( QWidget* parent, const char* name, WFlags fl ) | |||
28 | 29 | ||
29 | QLabel *TextLabelGroup = new QLabel( this, "TextLabelGroup" ); | 30 | TextLabelGroup = new QLabel( this, "TextLabelGroup" ); |
30 | TextLabelGroup->setText( tr( "Group:" ) ); | 31 | TextLabelGroup->setText( tr( "Group:" ) ); |
@@ -46,2 +47,3 @@ EditWidget::EditWidget( QWidget* parent, const char* name, WFlags fl ) | |||
46 | 47 | ||
48 | // layoutType(Nothing); | ||
47 | } | 49 | } |
@@ -54,19 +56,41 @@ EditWidget::~EditWidget() | |||
54 | 56 | ||
55 | void EditWidget::isKey(bool h) | 57 | void EditWidget::layoutType(int t) |
56 | { | 58 | { |
57 | if (h) | 59 | switch (t) |
58 | { | 60 | { |
59 | LineEditGroup->setEnabled(false); | 61 | case Entry: |
60 | TextLabelKey->show(); | 62 | LineEditGroup->setEnabled(false); |
61 | LineEditKey->show(); | 63 | TextLabelKey->show(); |
62 | TextLabelValue->show(); | 64 | LineEditKey->show(); |
63 | LineEditValue->show(); | 65 | TextLabelValue->show(); |
64 | }else{ | 66 | LineEditValue->show(); |
65 | LineEditGroup->setEnabled(true); | 67 | TextLabelGroup->show(); |
66 | TextLabelKey->hide(); | 68 | LineEditGroup->show(); |
67 | LineEditKey->hide(); | 69 | TextLabelFileName->show(); |
68 | TextLabelValue->hide(); | 70 | TextFileName->show(); |
69 | LineEditValue->hide(); | 71 | break; |
72 | case Group: | ||
73 | LineEditGroup->setEnabled(true); | ||
74 | TextLabelKey->hide(); | ||
75 | LineEditKey->hide(); | ||
76 | TextLabelValue->hide(); | ||
77 | LineEditValue->hide(); | ||
78 | TextLabelGroup->show(); | ||
79 | LineEditGroup->show(); | ||
80 | TextLabelFileName->show(); | ||
81 | TextFileName->show(); | ||
82 | break; | ||
83 | default: | ||
84 | TextLabelKey->hide(); | ||
85 | LineEditKey->hide(); | ||
86 | TextLabelValue->hide(); | ||
87 | LineEditValue->hide(); | ||
88 | TextLabelGroup->hide(); | ||
89 | LineEditGroup->hide(); | ||
90 | TextLabelFileName->hide(); | ||
91 | TextFileName->hide(); | ||
70 | } | 92 | } |
71 | update(); | 93 | // update(); |
94 | // updateGeometry(); | ||
95 | // adjustSize(); | ||
72 | } | 96 | } |