kpilot
time-setup.ccGo to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #include "options.h"
00030
00031 #include <qtabwidget.h>
00032 #include <qradiobutton.h>
00033 #include <qbuttongroup.h>
00034
00035 #include <kapplication.h>
00036 #include <kaboutdata.h>
00037
00038 #include "time-setup_dialog.h"
00039
00040 #include "time-setup.moc"
00041 #include "timeConduitSettings.h"
00042
00043
00044
00045 static KAboutData *createAbout()
00046 {
00047 KAboutData *fAbout = new KAboutData("Timeconduit",
00048 I18N_NOOP("Time Synchronization Conduit for KPilot"),
00049 KPILOT_VERSION,
00050 I18N_NOOP("Synchronizes the Time on the Handheld and the PC"),
00051 KAboutData::License_GPL,
00052 "(C) 2002, Reinhold Kainhofer");
00053 fAbout->addAuthor("Reinhold Kainhofer",
00054 I18N_NOOP("Primary Author"), "reinhold@kainhofer.com", "http://reinhold.kainhofer.com/");
00055 return fAbout;
00056 }
00057
00058
00059
00060 TimeWidgetConfig::TimeWidgetConfig(QWidget *w, const char *n) :
00061 ConduitConfigBase(w,n),
00062 fConfigWidget(new TimeWidget(w))
00063 {
00064 FUNCTIONSETUP;
00065 fAbout = createAbout();
00066 ConduitConfigBase::addAboutPage(fConfigWidget->tabWidget,fAbout);
00067 fWidget=fConfigWidget;
00068 fConduitName=i18n("Time");
00069 }
00070
00071 void TimeWidgetConfig::commit()
00072 {
00073 FUNCTIONSETUP;
00074 TimeConduitSettings::setDirection(
00075 fConfigWidget->directionGroup->id(fConfigWidget->directionGroup->selected()) );
00076 TimeConduitSettings::self()->writeConfig();
00077 }
00078
00079 void TimeWidgetConfig::load()
00080 {
00081 FUNCTIONSETUP;
00082 TimeConduitSettings::self()->readConfig();
00083
00084 fConfigWidget->directionGroup->setButton( TimeConduitSettings::direction() );
00085 }
00086
|