Warning: That file was not part of the compilation database. It may have many parsing errors.

1/* This file is part of the KDE project
2 Copyright (C) 2004, 2007 Dag Andersen <danders@get2net.dk>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#include "kptconfigbehaviorpanel.h"
21
22#include "kptdatetime.h"
23#include "kptfactory.h"
24
25#include <kmessagebox.h>
26#include <klineedit.h>
27#include <ktextedit.h>
28#include <kcombobox.h>
29#include <kdatetimewidget.h>
30#include <klocale.h>
31#include <kconfig.h>
32#include <kstandarddirs.h>
33#include <kdebug.h>
34
35#include <QDateTime>
36#include <QCheckBox>
37
38namespace KPlato
39{
40
41ConfigBehaviorPanel::ConfigBehaviorPanel(Behavior &behavior, QWidget *p, const char *n)
42 : ConfigBehaviorPanelBase(p, n),
43 m_oldvalues(behavior),
44 m_behavior(behavior)
45{
46 setStartValues();
47
48 allowOverbooking->setEnabled(false); // not yet used
49}
50
51void ConfigBehaviorPanel::setStartValues() {
52 calculationGroup->setButton(m_oldvalues.calculationMode);
53 allowOverbooking->setChecked(m_oldvalues.allowOverbooking);
54}
55
56bool ConfigBehaviorPanel::ok() {
57 return true;
58}
59
60bool ConfigBehaviorPanel::apply() {
61 m_behavior.calculationMode = calculationGroup->selectedId();
62 m_behavior.allowOverbooking = allowOverbooking->isChecked();
63 return true;
64}
65
66
67} //KPlato namespace
68
69#include "kptconfigbehaviorpanel.moc"
70

Warning: That file was not part of the compilation database. It may have many parsing errors.