00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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);
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 }
00071
00072 #include "kptconfigbehaviorpanel.moc"