[kde-doc-english] [kde-workspace] kmenuedit: KMenuEdit UI
Julien Borderie
frajibe at gmail.com
Mon Sep 2 18:28:33 UTC 2013
Git commit 5ffe0e7e3a88cd681e2ded42a24f07794d6a8f12 by Julien Borderie.
Committed on 02/09/2013 at 18:21.
Pushed by jborderie into branch 'master'.
KMenuEdit UI
Configuration dialog now gathers config elements into groupBoxes
GUI: general options are now included into a group box
M +13 -6 kmenuedit/preferencesdlg.cpp
http://commits.kde.org/kde-workspace/5ffe0e7e3a88cd681e2ded42a24f07794d6a8f12
diff --git a/kmenuedit/preferencesdlg.cpp b/kmenuedit/preferencesdlg.cpp
index 65178ae..6a34f22 100644
--- a/kmenuedit/preferencesdlg.cpp
+++ b/kmenuedit/preferencesdlg.cpp
@@ -21,6 +21,7 @@
#include <QHBoxLayout>
#include <QCheckBox>
+#include <QGroupBox>
#include <KLocale>
#include <KConfigGroup>
@@ -34,7 +35,7 @@ PreferencesDialog::PreferencesDialog( QWidget *parent )
setDefaultButton( Ok );
m_pageMisc = new MiscPage( this );
- KPageWidgetItem *page = new KPageWidgetItem( m_pageMisc , i18n( "General" ) );
+ KPageWidgetItem *page = new KPageWidgetItem( m_pageMisc , i18n( "General options" ) );
page->setIcon( KIcon( "kmenuedit" ) );
addPage(page);
@@ -70,12 +71,18 @@ void SpellCheckingPage::saveOptions()
MiscPage::MiscPage( QWidget *parent )
: QWidget( parent )
{
- QVBoxLayout *lay = new QVBoxLayout( this );
- m_showHiddenEntries = new QCheckBox( i18n( "Show hidden entries" ), this );
- lay->addWidget( m_showHiddenEntries );
- lay->addStretch();
- setLayout( lay );
+ // general group
+ QGroupBox *generalGroup = new QGroupBox(i18n("General"));
+ QVBoxLayout *generalGroupLayout = new QVBoxLayout(generalGroup);
+ m_showHiddenEntries = new QCheckBox(i18n("Show hidden entries"));
+ generalGroupLayout->addWidget(m_showHiddenEntries);
+
+ // add groups
+ QVBoxLayout *pageLayout = new QVBoxLayout(this);
+ pageLayout->addWidget(generalGroup);
+ pageLayout->addStretch();
+ // update displayed config
KConfigGroup group( KGlobal::config(), "General" );
m_showHiddenEntries->setChecked( group.readEntry( "ShowHidden", false ) );
}
More information about the kde-doc-english
mailing list