]> cloud.milkyroute.net Git - dolphin.git/blob - src/viewsettingspage.cpp
Added setters in urlnavigator to remove dependency on dolphinsettings.
[dolphin.git] / src / viewsettingspage.cpp
1 /***************************************************************************
2 * Copyright (C) 2006 by Peter Penz *
3 * peter.penz@gmx.at *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
19 ***************************************************************************/
20
21 #include "viewsettingspage.h"
22 #include "generalviewsettingspage.h"
23 #include "iconsviewsettingspage.h"
24 #include "detailsviewsettingspage.h"
25
26 #include <QVBoxLayout>
27 #include <QTabWidget>
28 #include <QLayout>
29 #include <QLabel>
30
31 #include <kdialog.h>
32 #include <klocale.h>
33 #include <kiconloader.h>
34
35 ViewSettingsPage::ViewSettingsPage(DolphinMainWindow* mainWindow,
36 QWidget* parent) :
37 SettingsPageBase(parent),
38 m_generalPage(0),
39 m_iconsPage(0),
40 m_detailsPage(0)
41 {
42 QVBoxLayout* topLayout = new QVBoxLayout(this);
43 topLayout->setMargin(0);
44 topLayout->setSpacing(KDialog::spacingHint());
45
46 QTabWidget* tabWidget = new QTabWidget(this);
47
48 // initialize 'General' tab
49 m_generalPage = new GeneralViewSettingsPage(mainWindow, tabWidget);
50 tabWidget->addTab(m_generalPage, KIcon("view-choose"), i18n("General"));
51
52 // initialize 'Icons' tab
53 m_iconsPage = new IconsViewSettingsPage(mainWindow, tabWidget);
54 tabWidget->addTab(m_iconsPage, KIcon("view-icon"), i18n("Icons"));
55
56 // initialize 'Details' tab
57 m_detailsPage = new DetailsViewSettingsPage(mainWindow, tabWidget);
58 tabWidget->addTab(m_detailsPage, KIcon("fileview-text"), i18n("Details"));
59
60 topLayout->addWidget(tabWidget, 0, 0 );
61 }
62
63 ViewSettingsPage::~ViewSettingsPage()
64 {
65 }
66
67 void ViewSettingsPage::applySettings()
68 {
69 m_generalPage->applySettings();
70 m_iconsPage->applySettings();
71 m_detailsPage->applySettings();
72 }
73
74 #include "viewsettingspage.moc"