diff options
| author | Peter Penz <[email protected]> | 2006-12-13 07:41:11 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2006-12-13 07:41:11 +0000 |
| commit | 163fa7ce30c0bd1b18d0c750bf9358560c2db7af (patch) | |
| tree | cf99237a8dd236324fa1fd7967712f861be0477b /src/viewpropertiesdialog.cpp | |
| parent | cb2b58535bedacbec50b3dad9680b1fa4fe30a9e (diff) | |
Instead of having a the 3 view modes "icons", "details" and "previews" only 2 view modes are used now: "icons" and "details". Whether a preview is shown or not is part of the directory view properties. This also means that it will be possible to show previews in the "details" view in future releases.
svn path=/trunk/playground/utils/dolphin/; revision=613029
Diffstat (limited to 'src/viewpropertiesdialog.cpp')
| -rw-r--r-- | src/viewpropertiesdialog.cpp | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/src/viewpropertiesdialog.cpp b/src/viewpropertiesdialog.cpp index b13b3d4a6..8393401c7 100644 --- a/src/viewpropertiesdialog.cpp +++ b/src/viewpropertiesdialog.cpp @@ -40,7 +40,14 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : KDialog(dolphinView), m_isDirty(false), - m_dolphinView(dolphinView) + m_dolphinView(dolphinView), + m_viewProps(0), + m_viewMode(0), + m_sorting(0), + m_sortOrder(0), + m_showPreview(0), + m_showHiddenFiles(0), + m_applyToSubFolders(0) { assert(dolphinView != 0); @@ -61,7 +68,6 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : m_viewMode = new QComboBox(propsBox); m_viewMode->addItem(SmallIcon("view_icon"), i18n("Icons")); m_viewMode->addItem(SmallIcon("view_text"), i18n("Details")); - m_viewMode->addItem(SmallIcon("gvdirpart"), i18n("Previews")); const int index = static_cast<int>(m_viewProps->viewMode()); m_viewMode->setCurrentIndex(index); @@ -86,8 +92,11 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : const int sortOrderIdx = (m_viewProps->sortOrder() == Qt::Ascending) ? 0 : 1; m_sortOrder->setCurrentIndex(sortOrderIdx); + m_showPreview = new QCheckBox(i18n("Show preview"), propsBox); + m_showPreview->setChecked(m_viewProps->showPreview()); + m_showHiddenFiles = new QCheckBox(i18n("Show hidden files"), propsBox); - m_showHiddenFiles->setChecked(m_viewProps->isShowHiddenFilesEnabled()); + m_showHiddenFiles->setChecked(m_viewProps->showHiddenFiles()); QGridLayout* propsBoxLayout = new QGridLayout(propsBox); propsBoxLayout->addWidget(viewModeLabel, 0, 0); @@ -97,7 +106,8 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : propsBoxLayout->addWidget(m_sorting, 1, 1); propsBoxLayout->addWidget(sortOrderLabel, 2, 0); propsBoxLayout->addWidget(m_sortOrder, 2, 1); - propsBoxLayout->addWidget(m_showHiddenFiles, 3, 0); + propsBoxLayout->addWidget(m_showPreview, 3, 0); + propsBoxLayout->addWidget(m_showHiddenFiles, 4, 0); m_applyToSubFolders = new QCheckBox(i18n("Apply changes to all sub folders"), main); topLayout->addWidget(propsBox); @@ -109,6 +119,8 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : this, SLOT(slotSortingChanged(int))); connect(m_sortOrder, SIGNAL(activated(int)), this, SLOT(slotSortOrderChanged(int))); + connect(m_showPreview, SIGNAL(clicked()), + this, SLOT(slotShowPreviewChanged())); connect(m_showHiddenFiles, SIGNAL(clicked()), this, SLOT(slotShowHiddenFilesChanged())); @@ -166,10 +178,17 @@ void ViewPropertiesDialog::slotSortOrderChanged(int index) m_isDirty = true; } +void ViewPropertiesDialog::slotShowPreviewChanged() +{ + const bool show = m_showPreview->isChecked(); + m_viewProps->setShowPreview(show); + m_isDirty = true; +} + void ViewPropertiesDialog::slotShowHiddenFilesChanged() { const bool show = m_showHiddenFiles->isChecked(); - m_viewProps->setShowHiddenFilesEnabled(show); + m_viewProps->setShowHiddenFiles(show); m_isDirty = true; } |
