┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2007-03-14 21:45:06 +0000
committerPeter Penz <[email protected]>2007-03-14 21:45:06 +0000
commited35e27bb70d67cf5ce42d823179e904c03e8728 (patch)
tree6fdaa855b50357cdc2115cfbd7f39fba5aeaf5d0 /src
parente8686083b9de4e83a448ddfd36ea57de7b9e2cd8 (diff)
cleanup of setting dialogs (no Q3 classes anymore)
svn path=/trunk/KDE/kdebase/apps/; revision=642623
Diffstat (limited to 'src')
-rw-r--r--src/detailsviewsettingspage.cpp85
-rw-r--r--src/detailsviewsettingspage.h3
-rw-r--r--src/generalviewsettingspage.cpp9
-rw-r--r--src/generalviewsettingspage.h3
-rw-r--r--src/iconsviewsettingspage.cpp4
5 files changed, 54 insertions, 50 deletions
diff --git a/src/detailsviewsettingspage.cpp b/src/detailsviewsettingspage.cpp
index 8d20fe392..9a9d55093 100644
--- a/src/detailsviewsettingspage.cpp
+++ b/src/detailsviewsettingspage.cpp
@@ -1,6 +1,5 @@
/***************************************************************************
- * Copyright (C) 2006 by Peter Penz *
+ * Copyright (C) 2006 by Peter Penz <[email protected]> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -20,24 +19,21 @@
#include "detailsviewsettingspage.h"
-#include <qcheckbox.h>
+#include "dolphinsettings.h"
+#include "dolphin_detailsmodesettings.h"
+
+#include <kdialog.h>
#include <kfontrequester.h>
#include <klocale.h>
-#include <kdialog.h>
-#include <qfontcombobox.h>
-#include <qspinbox.h>
-#include <qlabel.h>
-#include <q3grid.h>
-#include <q3buttongroup.h>
-#include <qradiobutton.h>
-#include <qcombobox.h>
-#include <q3groupbox.h>
-#include <q3groupbox.h>
-#include <kvbox.h>
-#include "dolphinsettings.h"
-#include "dolphin_detailsmodesettings.h"
-#include "dolphindetailsview.h"
+#include <QButtonGroup>
+#include <QCheckBox>
+#include <QComboBox>
+#include <QGroupBox>
+#include <QGridLayout>
+#include <QLabel>
+#include <QRadioButton>
+#include <QSpinBox>
DetailsViewSettingsPage::DetailsViewSettingsPage(DolphinMainWindow* mainWindow,
QWidget* parent) :
@@ -63,30 +59,34 @@ DetailsViewSettingsPage::DetailsViewSettingsPage(DolphinMainWindow* mainWindow,
Q_ASSERT(settings != 0);
// create "Columns" properties
- Q3GroupBox* columnsGroup = new Q3GroupBox(4, Qt::Vertical, i18n("Columns"), this);
- columnsGroup->setSizePolicy(sizePolicy);
- columnsGroup->setMargin(margin);
+ QGroupBox* columnsBox = new QGroupBox(i18n("Columns"), this);
+ columnsBox->setSizePolicy(sizePolicy);
- KHBox* visibleColumnsLayout = new KHBox(columnsGroup);
- m_dateBox = new QCheckBox(i18n("Date"), visibleColumnsLayout);
+ m_dateBox = new QCheckBox(i18n("Date"), this);
m_dateBox->setChecked(settings->showDate());
- m_permissionsBox = new QCheckBox(i18n("Permissions"), visibleColumnsLayout);
+ m_permissionsBox = new QCheckBox(i18n("Permissions"), this);
m_permissionsBox->setChecked(settings->showPermissions());
- m_ownerBox = new QCheckBox(i18n("Owner"), visibleColumnsLayout);
+ m_ownerBox = new QCheckBox(i18n("Owner"), this);
m_ownerBox->setChecked(settings->showOwner());
- m_groupBox = new QCheckBox(i18n("Group"), visibleColumnsLayout);
+ m_groupBox = new QCheckBox(i18n("Group"), this);
m_groupBox->setChecked(settings->showGroup());
+ QHBoxLayout* columnsLayout = new QHBoxLayout(columnsBox);
+ columnsLayout->addWidget(m_dateBox);
+ columnsLayout->addWidget(m_permissionsBox);
+ columnsLayout->addWidget(m_ownerBox);
+ columnsLayout->addWidget(m_groupBox);
+
// Create "Icon" properties
- Q3ButtonGroup* iconSizeGroup = new Q3ButtonGroup(3, Qt::Horizontal, i18n("Icon Size"), this);
- iconSizeGroup->setSizePolicy(sizePolicy);
- iconSizeGroup->setMargin(margin);
- m_smallIconSize = new QRadioButton(i18n("Small"), iconSizeGroup);
- m_mediumIconSize = new QRadioButton(i18n("Medium"), iconSizeGroup);
- m_largeIconSize = new QRadioButton(i18n("Large"), iconSizeGroup);
+ QGroupBox* iconSizeBox = new QGroupBox(i18n("Icon Size"), this);
+ iconSizeBox->setSizePolicy(sizePolicy);
+
+ m_smallIconSize = new QRadioButton(i18n("Small"), this);
+ m_mediumIconSize = new QRadioButton(i18n("Medium"), this);
+ m_largeIconSize = new QRadioButton(i18n("Large"), this);
switch (settings->iconSize()) {
case K3Icon::SizeLarge:
m_largeIconSize->setChecked(true);
@@ -101,19 +101,32 @@ DetailsViewSettingsPage::DetailsViewSettingsPage(DolphinMainWindow* mainWindow,
m_smallIconSize->setChecked(true);
}
+ QButtonGroup* iconSizeGroup = new QButtonGroup(this);
+ iconSizeGroup->addButton(m_smallIconSize);
+ iconSizeGroup->addButton(m_mediumIconSize);
+ iconSizeGroup->addButton(m_largeIconSize);
+
+ QHBoxLayout* iconSizeLayout = new QHBoxLayout(iconSizeBox);
+ iconSizeLayout->addWidget(m_smallIconSize);
+ iconSizeLayout->addWidget(m_mediumIconSize);
+ iconSizeLayout->addWidget(m_largeIconSize);
+
// create "Text" properties
- Q3GroupBox* textGroup = new Q3GroupBox(2, Qt::Horizontal, i18n("Text"), this);
- textGroup->setSizePolicy(sizePolicy);
- textGroup->setMargin(margin);
+ QGroupBox* textBox = new QGroupBox(i18n("Text"), this);
+ textBox->setSizePolicy(sizePolicy);
- new QLabel(i18n("Font:"), textGroup);
- m_fontRequester = new KFontRequester(textGroup);
+ QLabel* fontLabel = new QLabel(i18n("Font:"), textBox);
+ m_fontRequester = new KFontRequester(textBox);
QFont font(settings->fontFamily(),
settings->fontSize());
font.setItalic(settings->italicFont());
font.setBold(settings->boldFont());
m_fontRequester->setFont(font);
+ QHBoxLayout* textLayout = new QHBoxLayout(textBox);
+ textLayout->addWidget(fontLabel);
+ textLayout->addWidget(m_fontRequester);
+
// Add a dummy widget with no restriction regarding
// a vertical resizing. This assures that the dialog layout
// is not stretched vertically.
diff --git a/src/detailsviewsettingspage.h b/src/detailsviewsettingspage.h
index f0214daa0..2318f9760 100644
--- a/src/detailsviewsettingspage.h
+++ b/src/detailsviewsettingspage.h
@@ -1,6 +1,5 @@
/***************************************************************************
- * Copyright (C) 2006 by Peter Penz *
+ * Copyright (C) 2006 by Peter Penz <[email protected]> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
diff --git a/src/generalviewsettingspage.cpp b/src/generalviewsettingspage.cpp
index 5c1137fd2..5a9b3a9a6 100644
--- a/src/generalviewsettingspage.cpp
+++ b/src/generalviewsettingspage.cpp
@@ -1,6 +1,5 @@
/***************************************************************************
- * Copyright (C) 2006 by Peter Penz *
+ * Copyright (C) 2006 by Peter Penz <[email protected]> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -24,8 +23,6 @@
#include "dolphin_generalsettings.h"
#include "viewproperties.h"
-#include <assert.h>
-
#include <QLabel>
#include <QGroupBox>
#include <QRadioButton>
@@ -48,7 +45,7 @@ GeneralViewSettingsPage::GeneralViewSettingsPage(DolphinMainWindow* mainWindow,
m_maxPreviewSize(0)
{
GeneralSettings* settings = DolphinSettings::instance().generalSettings();
- assert(settings != 0);
+ Q_ASSERT(settings != 0);
const int spacing = KDialog::spacingHint();
const int margin = KDialog::marginHint();
@@ -133,7 +130,7 @@ void GeneralViewSettingsPage::applySettings()
const bool useGlobalProps = m_globalProps->isChecked();
GeneralSettings* settings = DolphinSettings::instance().generalSettings();
- assert(settings != 0);
+ Q_ASSERT(settings != 0);
settings->setGlobalViewProps(useGlobalProps);
if (useGlobalProps) {
diff --git a/src/generalviewsettingspage.h b/src/generalviewsettingspage.h
index 08257c6f1..ad9a68761 100644
--- a/src/generalviewsettingspage.h
+++ b/src/generalviewsettingspage.h
@@ -1,6 +1,5 @@
/***************************************************************************
- * Copyright (C) 2006 by Peter Penz *
+ * Copyright (C) 2006 by Peter Penz <[email protected]> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
diff --git a/src/iconsviewsettingspage.cpp b/src/iconsviewsettingspage.cpp
index 5142cb647..abc9ab56f 100644
--- a/src/iconsviewsettingspage.cpp
+++ b/src/iconsviewsettingspage.cpp
@@ -63,10 +63,6 @@ IconsViewSettingsPage::IconsViewSettingsPage(DolphinMainWindow* mainWindow,
m_iconSize = settings->iconSize();
m_previewSize = settings->previewSize();
- KHBox* sizesLayout = new KHBox(this);
- sizesLayout->setSpacing(spacing);
- sizesLayout->setSizePolicy(sizePolicy);
-
m_iconSizeButton = new QPushButton(i18n("Change icon and preview size..."), this);
connect(m_iconSizeButton, SIGNAL(clicked()),
this, SLOT(openIconSizeDialog()));