diff options
| author | Peter Penz <[email protected]> | 2007-12-04 20:56:42 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-12-04 20:56:42 +0000 |
| commit | 569033022089a8e2a025b4899df9051172dd36c7 (patch) | |
| tree | 435367003d2563950fe6903ce04d4841bb0f9f03 /src/iconsviewsettingspage.cpp | |
| parent | 7cdaa3f5bff507812e3e68f14c52aa0782887886 (diff) | |
Allow turning off the feature that additional information might be shown in the icons view. Per default the setting is still on, but for people who prefer browsing with the details view and only temporary switch to the icons view (e. g. for having a larger preview), this feature gets a showstopper (discussed with Eike Hein).
Got the OK from the translator team for adding the new string.
CCMAIL: [email protected]
svn path=/trunk/KDE/kdebase/apps/; revision=744901
Diffstat (limited to 'src/iconsviewsettingspage.cpp')
| -rw-r--r-- | src/iconsviewsettingspage.cpp | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/src/iconsviewsettingspage.cpp b/src/iconsviewsettingspage.cpp index bfe23ffa5..56e75ac10 100644 --- a/src/iconsviewsettingspage.cpp +++ b/src/iconsviewsettingspage.cpp @@ -30,14 +30,15 @@ #include <kglobalsettings.h> #include <klocale.h> -#include <QtGui/QComboBox> -#include <QtGui/QGroupBox> -#include <QtGui/QLabel> -#include <QtGui/QListView> -#include <QtGui/QPushButton> -#include <QtGui/QSpinBox> -#include <QtGui/QGridLayout> -#include <QtCore/QDebug> +#include <QCheckBox> +#include <QComboBox> +#include <QGroupBox> +#include <QLabel> +#include <QListView> +#include <QPushButton> +#include <QSpinBox> +#include <QGridLayout> +#include <QVBoxLayout> IconsViewSettingsPage::IconsViewSettingsPage(DolphinMainWindow* mainWindow, QWidget* parent) : @@ -49,6 +50,7 @@ IconsViewSettingsPage::IconsViewSettingsPage(DolphinMainWindow* mainWindow, m_textWidthBox(0), m_fontRequester(0), m_textlinesCountBox(0), + m_showAdditionalInfo(0), m_arrangementBox(0), m_gridSpacingBox(0) { @@ -82,7 +84,12 @@ IconsViewSettingsPage::IconsViewSettingsPage(DolphinMainWindow* mainWindow, m_textWidthBox->addItem(i18nc("@item:inlistbox Text width", "Medium")); m_textWidthBox->addItem(i18nc("@item:inlistbox Text width", "Large")); - QGridLayout* textGroupLayout = new QGridLayout(textGroup); + m_showAdditionalInfo = new QCheckBox(i18nc("@option:check", + "Allow showing of additional information"), textGroup); + + QVBoxLayout* textVBoxLayout = new QVBoxLayout(textGroup); + + QGridLayout* textGroupLayout = new QGridLayout(); textGroupLayout->addWidget(fontLabel, 0, 0); textGroupLayout->addWidget(m_fontRequester, 0, 1); textGroupLayout->addWidget(textlinesCountLabel, 1, 0); @@ -90,6 +97,9 @@ IconsViewSettingsPage::IconsViewSettingsPage(DolphinMainWindow* mainWindow, textGroupLayout->addWidget(textWidthLabel, 2, 0); textGroupLayout->addWidget(m_textWidthBox, 2, 1); + textVBoxLayout->addLayout(textGroupLayout); + textVBoxLayout->addWidget(m_showAdditionalInfo); + // create the 'Grid' group for selecting the arrangement and the grid spacing QGroupBox* gridGroup = new QGroupBox(i18nc("@title:group", "Grid"), this); gridGroup->setSizePolicy(sizePolicy); @@ -120,7 +130,8 @@ IconsViewSettingsPage::IconsViewSettingsPage(DolphinMainWindow* mainWindow, } IconsViewSettingsPage::~IconsViewSettingsPage() -{} +{ +} void IconsViewSettingsPage::applySettings() { @@ -160,6 +171,8 @@ void IconsViewSettingsPage::applySettings() settings->setNumberOfTextlines(numberOfTextlines); + settings->setShowAdditionalInfo(m_showAdditionalInfo->isChecked()); + settings->setGridSpacing(GridSpacingBase + m_gridSpacingBox->currentIndex() * GridSpacingInc); } @@ -195,6 +208,8 @@ void IconsViewSettingsPage::loadSettings() m_textlinesCountBox->setValue(settings->numberOfTextlines()); + m_showAdditionalInfo->setChecked(settings->showAdditionalInfo()); + const bool leftToRightArrangement = (settings->arrangement() == QListView::LeftToRight); int textWidthIndex = 0; const int remainingWidth = settings->itemWidth() - settings->iconSize(); |
