Diffstat (limited to 'noncore/apps/confedit/editwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/confedit/editwidget.cpp | 40 |
1 files changed, 32 insertions, 8 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 ) EditWidgetLayout = new QGridLayout( this ); - EditWidgetLayout->setSpacing( 3 ); - EditWidgetLayout->setMargin( 3 ); + EditWidgetLayout->setSpacing( 0 ); + EditWidgetLayout->setMargin( 0 ); +// setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Maximum));//, sizePolicy().hasHeightForWidth() ) ); - QLabel *TextLabelFileName = new QLabel( this, "TextLabelFileName" ); + TextLabelFileName = new QLabel( this, "TextLabelFileName" ); TextLabelFileName->setText( tr( "File Name:" ) ); @@ -28,3 +29,3 @@ EditWidget::EditWidget( QWidget* parent, const char* name, WFlags fl ) - QLabel *TextLabelGroup = new QLabel( this, "TextLabelGroup" ); + TextLabelGroup = new QLabel( this, "TextLabelGroup" ); TextLabelGroup->setText( tr( "Group:" ) ); @@ -46,2 +47,3 @@ EditWidget::EditWidget( QWidget* parent, const char* name, WFlags fl ) + // layoutType(Nothing); } @@ -54,6 +56,7 @@ EditWidget::~EditWidget() -void EditWidget::isKey(bool h) +void EditWidget::layoutType(int t) { - if (h) + switch (t) { + case Entry: LineEditGroup->setEnabled(false); @@ -63,3 +66,8 @@ void EditWidget::isKey(bool h) LineEditValue->show(); - }else{ + TextLabelGroup->show(); + LineEditGroup->show(); + TextLabelFileName->show(); + TextFileName->show(); + break; + case Group: LineEditGroup->setEnabled(true); @@ -69,4 +77,20 @@ void EditWidget::isKey(bool h) LineEditValue->hide(); + TextLabelGroup->show(); + LineEditGroup->show(); + TextLabelFileName->show(); + TextFileName->show(); + break; + default: + TextLabelKey->hide(); + LineEditKey->hide(); + TextLabelValue->hide(); + LineEditValue->hide(); + TextLabelGroup->hide(); + LineEditGroup->hide(); + TextLabelFileName->hide(); + TextFileName->hide(); } - update(); +// update(); +// updateGeometry(); +// adjustSize(); } |