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.cpp14
1 files changed, 14 insertions, 0 deletions
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
@@ -77,12 +77,14 @@
DateBook::DateBook( QWidget *parent, const char *, WFlags f )
: QMainWindow( parent, "datebook", f ),
aPreset( FALSE ),
presetTime( -1 ),
startTime( 8 ), // an acceptable default
+ rowStyle( 0 ),
+ bJumpToCurTime(FALSE),
syncing(FALSE),
inSearch(FALSE),
alarmCounter(0)
{
QTime t;
t.start();
@@ -246,22 +248,28 @@ DateBook::~DateBook()
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
if ( frmSettings.exec() ) {
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();
// make the change obvious
if ( views->visibleWidget() ) {
@@ -450,12 +458,14 @@ void DateBook::showDay( int year, int month, int day )
void DateBook::initDay()
{
if ( !dayView ) {
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() ),
this, SLOT( fileNew() ) );
connect( dayView, SIGNAL( removeEvent( const Event & ) ),
this, SLOT( removeEvent( const Event & ) ) );
@@ -544,23 +554,27 @@ void DateBook::loadSettings()
{
Config config("DateBook");
config.setGroup("Main");
startTime = config.readNumEntry("startviewtime", 8);
aPreset = config.readBoolEntry("alarmpreset");
presetTime = config.readNumEntry("presettime");
+ bJumpToCurTime = config.readBoolEntry("jumptocurtime");
+ rowStyle = config.readNumEntry("rowstyle");
}
}
void DateBook::saveSettings()
{
Config config( "qpe" );
Config configDB( "DateBook" );
configDB.setGroup( "Main" );
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) {
int val=DAY;
if (a->text() == "Day") val=DAY;
if (a->text() == "Week") val=WEEK;