Changeset View
Changeset View
Standalone View
Standalone View
src/settings/trash/trashsettingspage.cpp
Show All 15 Lines | |||||
16 | * Free Software Foundation, Inc., * | 16 | * Free Software Foundation, Inc., * | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * | ||
18 | ***************************************************************************/ | 18 | ***************************************************************************/ | ||
19 | 19 | | |||
20 | #include "trashsettingspage.h" | 20 | #include "trashsettingspage.h" | ||
21 | 21 | | |||
22 | #include <KCModuleProxy> | 22 | #include <KCModuleProxy> | ||
23 | 23 | | |||
24 | #include <QVBoxLayout> | 24 | #include <QFormLayout> | ||
25 | 25 | | |||
26 | TrashSettingsPage::TrashSettingsPage(QWidget* parent) : | 26 | TrashSettingsPage::TrashSettingsPage(QWidget* parent) : | ||
27 | SettingsPageBase(parent) | 27 | SettingsPageBase(parent) | ||
28 | { | 28 | { | ||
29 | QVBoxLayout* topLayout = new QVBoxLayout(this); | 29 | QFormLayout* topLayout = new QFormLayout(this); | ||
30 | QWidget* vBox = new QWidget(this); | | |||
31 | QVBoxLayout *vBoxVBoxLayout = new QVBoxLayout(vBox); | | |||
32 | vBoxVBoxLayout->setMargin(0); | | |||
33 | 30 | | |||
34 | m_proxy = new KCModuleProxy(QStringLiteral("kcmtrash")); | 31 | m_proxy = new KCModuleProxy(QStringLiteral("kcmtrash")); | ||
35 | topLayout->addWidget(m_proxy); | 32 | topLayout->addRow(m_proxy); | ||
36 | | ||||
37 | // Add a dummy widget with no restriction regarding | | |||
38 | // a vertical resizing. This assures that the dialog layout | | |||
39 | // is not stretched vertically. | | |||
40 | QWidget *w = new QWidget(vBox); | | |||
41 | vBoxVBoxLayout->addWidget(w); | | |||
42 | | ||||
43 | topLayout->addWidget(vBox); | | |||
44 | 33 | | |||
45 | loadSettings(); | 34 | loadSettings(); | ||
46 | 35 | | |||
47 | connect(m_proxy, static_cast<void(KCModuleProxy::*)(bool)>(&KCModuleProxy::changed), this, &TrashSettingsPage::changed); | 36 | connect(m_proxy, static_cast<void(KCModuleProxy::*)(bool)>(&KCModuleProxy::changed), this, &TrashSettingsPage::changed); | ||
48 | } | 37 | } | ||
49 | 38 | | |||
50 | TrashSettingsPage::~TrashSettingsPage() | 39 | TrashSettingsPage::~TrashSettingsPage() | ||
51 | { | 40 | { | ||
Show All 17 Lines |