From f0e656b51a2dcee1dec594636cbc1ba8d4b11eef Mon Sep 17 00:00:00 2001 From: zecke Date: Sun, 23 Jun 2002 18:18:27 +0000 Subject: Patch by to configure the size of the row of the dayview Adds an option to jump to the current time in the dayview and some small fixes ( zecke ) --- (limited to 'core/pim/datebook/datebook.cpp') diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp index c0d45c9..7dd93a6 100644 --- a/core/pim/datebook/datebook.cpp +++ b/core/pim/datebook/datebook.cpp @@ -80,6 +80,8 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f ) aPreset( FALSE ), presetTime( -1 ), startTime( 8 ), // an acceptable default + rowStyle( 0 ), + bJumpToCurTime(FALSE), syncing(FALSE), inSearch(FALSE), alarmCounter(0) @@ -249,6 +251,8 @@ void DateBook::slotSettings() DateBookSettings frmSettings( ampm, this ); frmSettings.setStartTime( startTime ); frmSettings.setAlarmPreset( aPreset, presetTime ); + frmSettings.setJumpToCurTime( bJumpToCurTime ); + frmSettings.setRowStyle( rowStyle ); #if defined (Q_WS_QWS) || defined(_WS_QWS_) frmSettings.showMaximized(); #endif @@ -257,8 +261,12 @@ void DateBook::slotSettings() aPreset = frmSettings.alarmPreset(); presetTime = frmSettings.presetTime(); startTime = frmSettings.startTime(); + bJumpToCurTime = frmSettings.jumpToCurTime(); + rowStyle = frmSettings.rowStyle(); if ( dayView ) dayView->setStartViewTime( startTime ); + dayView->setJumpToCurTime( bJumpToCurTime ); + dayView->setRowStyle( rowStyle ); if ( weekView ) weekView->setStartViewTime( startTime ); saveSettings(); @@ -453,6 +461,8 @@ void DateBook::initDay() dayView = new DateBookDay( ampm, onMonday, db, views, "day view" ); views->addWidget( dayView, DAY ); dayView->setStartViewTime( startTime ); + dayView->setJumpToCurTime( bJumpToCurTime ); + dayView->setRowStyle( rowStyle ); connect( this, SIGNAL( newEvent() ), dayView, SLOT( redraw() ) ); connect( dayView, SIGNAL( newEvent() ), @@ -547,6 +557,8 @@ void DateBook::loadSettings() startTime = config.readNumEntry("startviewtime", 8); aPreset = config.readBoolEntry("alarmpreset"); presetTime = config.readNumEntry("presettime"); + bJumpToCurTime = config.readBoolEntry("jumptocurtime"); + rowStyle = config.readNumEntry("rowstyle"); } } @@ -558,6 +570,8 @@ void DateBook::saveSettings() configDB.writeEntry("startviewtime",startTime); configDB.writeEntry("alarmpreset",aPreset); configDB.writeEntry("presettime",presetTime); + configDB.writeEntry("jumptocurtime", bJumpToCurTime); + configDB.writeEntry("rowstyle", rowStyle); } void DateBook::newDefaultView(QAction *a) { -- cgit v0.9.0.2