summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebook.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/datebook/datebook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebook.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp
index 8ae4f84..70dd7b5 100644
--- a/core/pim/datebook/datebook.cpp
+++ b/core/pim/datebook/datebook.cpp
@@ -218,96 +218,97 @@ void DateBook::receive( const QCString &msg, const QByteArray &data )
else if ( weekAction->isOn() )
viewWeek();
else if ( monthAction->isOn() )
viewMonth();
}
else if (msg == "editEvent(int)") {
int uid;
stream >> uid;
Event e=db->eventByUID(uid);
editEvent(e);
}else if (msg == "viewDefault(QDate)"){
QDate day;
stream >> day;
viewDefault(day);
}
}
DateBook::~DateBook()
{
delete db_holiday;
}
void DateBook::slotSettings()
{
DateBookSettings frmSettings( ampm, this );
frmSettings.setStartTime( startTime );
frmSettings.setAlarmPreset( aPreset, presetTime );
frmSettings.setJumpToCurTime( bJumpToCurTime );
frmSettings.setRowStyle( rowStyle );
frmSettings.comboDefaultView->setCurrentItem(defaultView-1);
frmSettings.comboWeekListView->setCurrentItem(weeklistviewconfig);
frmSettings.setPluginList(db_holiday->pluginManager(),db_holiday->pluginLoader());
bool found=false;
for (int i=0; i<(frmSettings.comboLocation->count()); i++) {
if ( frmSettings.comboLocation->text(i) == defaultLocation ) {
frmSettings.comboLocation->setCurrentItem(i);
found=true;
break;
}
}
if(!found) {
frmSettings.comboLocation->insertItem(defaultLocation);
frmSettings.comboLocation->setCurrentItem(frmSettings.comboLocation->count()-1);
}
frmSettings.comboCategory->setCategories(defaultCategories,"Calendar", tr("Calendar"));
if ( QPEApplication::execDialog( &frmSettings ) ) {
+ frmSettings.savePlugins();
db_holiday->pluginManager()->save();
db_holiday->reloadPlugins();
aPreset = frmSettings.alarmPreset();
presetTime = frmSettings.presetTime();
startTime = frmSettings.startTime();
bJumpToCurTime = frmSettings.jumpToCurTime();
rowStyle = frmSettings.rowStyle();
defaultView=frmSettings.comboDefaultView->currentItem()+1;
weeklistviewconfig=frmSettings.comboWeekListView->currentItem();
defaultLocation=frmSettings.comboLocation->currentText();
defaultCategories=frmSettings.comboCategory->currentCategories();
if ( dayView ) {
dayView->setStartViewTime( startTime );
dayView->setJumpToCurTime( bJumpToCurTime );
dayView->setRowStyle( rowStyle );
}
if ( weekView ) {
weekView->setStartViewTime( startTime );
}
saveSettings();
// make the change obvious
if ( views->visibleWidget() ) {
if ( views->visibleWidget() == dayView )
dayView->redraw();
else if ( views->visibleWidget() == weekView )
weekView->redraw();
else if ( views->visibleWidget() == weekLstView )
weekLstView->redraw();
}
}
}
void DateBook::fileNew()
{
slotNewEventFromKey("");
}
QString DateBook::checkEvent(const Event &e)
{
/* check if overlaps with itself */
bool checkFailed = FALSE;
/* check the next 12 repeats. should catch most problems */
QDate current_date = e.start().date();
Event previous = e;