author | tille <tille> | 2002-07-07 17:18:50 (UTC) |
---|---|---|
committer | tille <tille> | 2002-07-07 17:18:50 (UTC) |
commit | 04f29267e391eb4ad7ff9fc86468f6ccd1bd8f6d (patch) (side-by-side diff) | |
tree | 91ed01ce29ec4dfd478f75239f874a22d1672a14 /noncore/apps/confedit/editwidget.cpp | |
parent | a72877e867e70784e3c865fa2948ac40f72b5c39 (diff) | |
download | opie-04f29267e391eb4ad7ff9fc86468f6ccd1bd8f6d.zip opie-04f29267e391eb4ad7ff9fc86468f6ccd1bd8f6d.tar.gz opie-04f29267e391eb4ad7ff9fc86468f6ccd1bd8f6d.tar.bz2 |
better layout
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 ) 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,19 +56,41 @@ EditWidget::~EditWidget() -void EditWidget::isKey(bool h) +void EditWidget::layoutType(int t) { - if (h) + switch (t) { - LineEditGroup->setEnabled(false); - TextLabelKey->show(); - LineEditKey->show(); - TextLabelValue->show(); - LineEditValue->show(); - }else{ - LineEditGroup->setEnabled(true); - TextLabelKey->hide(); - LineEditKey->hide(); - TextLabelValue->hide(); - LineEditValue->hide(); + case Entry: + LineEditGroup->setEnabled(false); + TextLabelKey->show(); + LineEditKey->show(); + TextLabelValue->show(); + LineEditValue->show(); + TextLabelGroup->show(); + LineEditGroup->show(); + TextLabelFileName->show(); + TextFileName->show(); + break; + case Group: + LineEditGroup->setEnabled(true); + TextLabelKey->hide(); + LineEditKey->hide(); + TextLabelValue->hide(); + 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(); } |