F:/KPlato/koffice/kplato/kptconfigbehaviorpanel.cc

Aller à la documentation de ce fichier.
00001 /* This file is part of the KDE project
00002    Copyright (C) 2004 Dag Andersen <danders@get2net.dk>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation;
00007    version 2 of the License.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #include "kptconfigbehaviorpanel.h"
00021 
00022 #include "kptdatetime.h"
00023 #include "kptfactory.h"
00024 
00025 #include <kmessagebox.h>
00026 #include <klineedit.h>
00027 #include <ktextedit.h>
00028 #include <kcombobox.h>
00029 #include <kdatetimewidget.h>
00030 #include <klocale.h>
00031 #include <kcommand.h>
00032 #include <kconfig.h>
00033 #include <kstandarddirs.h>
00034 #include <kdebug.h>
00035 
00036 #include <QLayout>
00037 #include <qdatetime.h> 
00038 #include <q3buttongroup.h> 
00039 #include <QCheckBox> 
00040 
00041 namespace KPlato
00042 {
00043 
00044 ConfigBehaviorPanel::ConfigBehaviorPanel(Behavior &behavior, QWidget *p, const char *n)
00045     : ConfigBehaviorPanelBase(p, n),
00046       m_oldvalues(behavior),
00047       m_behavior(behavior)
00048 {
00049     setStartValues();
00050     
00051     allowOverbooking->setEnabled(false); // not yet used
00052 }
00053 
00054 void ConfigBehaviorPanel::setStartValues() {
00055     calculationGroup->setButton(m_oldvalues.calculationMode);
00056     allowOverbooking->setChecked(m_oldvalues.allowOverbooking);
00057 }
00058 
00059 bool ConfigBehaviorPanel::ok() {
00060     return true;
00061 }
00062 
00063 bool ConfigBehaviorPanel::apply() {
00064     m_behavior.calculationMode = calculationGroup->selectedId();
00065     m_behavior.allowOverbooking = allowOverbooking->isChecked();
00066     return true;
00067 }
00068 
00069 
00070 }  //KPlato namespace
00071 
00072 #include "kptconfigbehaviorpanel.moc"

Généré le Wed Nov 22 23:40:56 2006 pour KPlato par  doxygen 1.5.1-p1