1 /* ============================================================
2 * Copyright 2005-2007 by Tom Albers <tomalbers@kde.nl>
4 * This program is free software; you can redistribute it
5 * and/or modify it under the terms of the GNU General
6 * Public License as published by the Free Software Foundation;
7 * either version 2, or (at your option)
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.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * ============================================================ */
23 #include <qtabwidget.h>
25 #include <qapplication.h>
29 #include <kiconloader.h>
33 #include "setupgeneral.h"
34 #include "setuptiming.h"
35 #include "setupmaximized.h"
40 SetupGeneral
*generalPage
;
41 SetupTiming
*timingPage
;
42 SetupMaximized
*maximizedPage
;
45 Setup::Setup( QWidget
* parent
)
46 : KPageDialog( parent
)
51 d
->generalPage
= new SetupGeneral( this );
52 KPageWidgetItem
* page1
= addPage( d
->generalPage
, i18n( "General Settings" ) );
53 page1
->setIcon( KIcon( "configure" ) );
55 d
->timingPage
= new SetupTiming( this );
56 KPageWidgetItem
* page2
= addPage( d
->timingPage
, i18n( "Timings" ) );
57 page2
->setIcon( KIcon( "timings" ) );
59 d
->maximizedPage
= new SetupMaximized( this );
60 KPageWidgetItem
* page3
= addPage( d
->maximizedPage
, i18n( "During Breaks" ) );
61 page3
->setIcon( KIcon( "duringbreaks" ) );
63 connect( this, SIGNAL( okClicked() ), this, SLOT( slotOkClicked() ) );
65 setInitialSize( QSize( 625, 575 ) );
66 KConfigGroup config
= KGlobal::config()->group( "SetupDimensions" );
67 restoreDialogSize( config
);
73 KConfigGroup config
= KGlobal::config()->group( "SetupDimensions" );
74 saveDialogSize( config
);
78 void Setup::slotOkClicked()
80 d
->generalPage
->applySettings();
81 d
->timingPage
->applySettings();
82 d
->maximizedPage
->applySettings();