SVN_SILENT made messages (.desktop file)
[rsibreak.git] / src / setup.cpp
blob0521b54c5957352fb90835e44dc251fb32b7ce33
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)
8 * any later version.
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 * ============================================================ */
20 #include "setup.h"
22 // Qt includes.
23 #include <qtabwidget.h>
24 #include <qlabel.h>
25 #include <qapplication.h>
26 //Added by qt3to4:
28 // KDE includes.
29 #include <kiconloader.h>
30 #include <klocale.h>
32 // Local includes.
33 #include "setupgeneral.h"
34 #include "setuptiming.h"
35 #include "setupmaximized.h"
37 class SetupPriv
39 public:
40 SetupGeneral *generalPage;
41 SetupTiming *timingPage;
42 SetupMaximized *maximizedPage;
45 Setup::Setup( QWidget* parent )
46 : KPageDialog( parent )
48 setFaceType( List );
49 d = new SetupPriv;
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 );
68 show();
71 Setup::~Setup()
73 KConfigGroup config = KGlobal::config()->group( "SetupDimensions" );
74 saveDialogSize( config );
75 delete d;
78 void Setup::slotOkClicked()
80 d->generalPage->applySettings();
81 d->timingPage->applySettings();
82 d->maximizedPage->applySettings();
83 close();
86 #include "setup.moc"