2006-11-21 06:02:05 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2006 by Peter Penz *
|
|
|
|
* peter.penz@gmx.at *
|
|
|
|
* *
|
|
|
|
* 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 *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
* along with this program; if not, write to the *
|
|
|
|
* Free Software Foundation, Inc., *
|
|
|
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#include "viewsettingspage.h"
|
2006-12-20 19:10:39 +00:00
|
|
|
#include "generalviewsettingspage.h"
|
|
|
|
#include "iconsviewsettingspage.h"
|
|
|
|
#include "detailsviewsettingspage.h"
|
|
|
|
|
2006-11-21 06:02:05 +00:00
|
|
|
#include <Q3VBoxLayout>
|
2006-12-20 19:10:39 +00:00
|
|
|
#include <QTabWidget>
|
|
|
|
#include <QLayout>
|
|
|
|
#include <QLabel>
|
|
|
|
|
2006-11-22 11:34:19 +00:00
|
|
|
#include <kdialog.h>
|
2006-11-21 06:02:05 +00:00
|
|
|
#include <klocale.h>
|
2006-11-24 22:10:33 +00:00
|
|
|
#include <kiconloader.h>
|
2006-11-21 06:02:05 +00:00
|
|
|
|
|
|
|
ViewSettingsPage::ViewSettingsPage(QWidget *parent) :
|
|
|
|
SettingsPageBase(parent),
|
2006-12-20 19:10:39 +00:00
|
|
|
m_generalPage(0),
|
2006-11-21 06:02:05 +00:00
|
|
|
m_iconsPage(0),
|
2006-12-13 07:41:11 +00:00
|
|
|
m_detailsPage(0)
|
2006-11-21 06:02:05 +00:00
|
|
|
{
|
2006-11-25 17:46:22 +00:00
|
|
|
Q3VBoxLayout* topLayout = new Q3VBoxLayout(this, 0, KDialog::spacingHint());
|
2006-11-21 06:02:05 +00:00
|
|
|
|
2006-11-25 17:46:22 +00:00
|
|
|
QTabWidget* tabWidget = new QTabWidget(this);
|
2006-11-21 06:02:05 +00:00
|
|
|
|
2006-12-20 19:10:39 +00:00
|
|
|
// initialize 'General' tab
|
|
|
|
m_generalPage = new GeneralViewSettingsPage(tabWidget);
|
|
|
|
tabWidget->addTab(m_generalPage, SmallIcon("view_choose"), i18n("General"));
|
|
|
|
|
2006-11-21 06:02:05 +00:00
|
|
|
// initialize 'Icons' tab
|
2006-12-13 07:41:11 +00:00
|
|
|
m_iconsPage = new IconsViewSettingsPage(tabWidget);
|
2006-11-21 06:02:05 +00:00
|
|
|
tabWidget->addTab(m_iconsPage, SmallIcon("view_icon"), i18n("Icons"));
|
|
|
|
|
|
|
|
// initialize 'Details' tab
|
|
|
|
m_detailsPage = new DetailsViewSettingsPage(tabWidget);
|
|
|
|
tabWidget->addTab(m_detailsPage, SmallIcon("view_text"), i18n("Details"));
|
|
|
|
|
|
|
|
topLayout->addWidget(tabWidget, 0, 0 );
|
|
|
|
}
|
|
|
|
|
|
|
|
ViewSettingsPage::~ViewSettingsPage()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ViewSettingsPage::applySettings()
|
|
|
|
{
|
2006-12-20 19:10:39 +00:00
|
|
|
m_generalPage->applySettings();
|
2006-11-21 06:02:05 +00:00
|
|
|
m_iconsPage->applySettings();
|
|
|
|
m_detailsPage->applySettings();
|
|
|
|
}
|
|
|
|
|
|
|
|
#include "viewsettingspage.moc"
|