Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

datebookpluginconfig.cpp

Go to the documentation of this file.
00001 /*
00002  * datebookpluginconfig.cpp
00003  *
00004  * copyright   : (c) 2002,2003,2004 by Maximilian Reiß
00005  * email       : harlekin@handhelds.org
00006  *
00007  */
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  *                                                                         *
00015  ***************************************************************************/
00016 
00017 
00018 #include "datebookpluginconfig.h"
00019 
00020 #include <qpe/config.h>
00021 
00022 #include <qlayout.h>
00023 
00024 DatebookPluginConfig::DatebookPluginConfig( QWidget* parent, const char* name)
00025     : TodayConfigWidget( parent, name ) {
00026 
00027     QVBoxLayout *layout = new QVBoxLayout( this );
00028 
00029     m_gui = new DatebookPluginConfigBase( this );
00030 
00031     layout->addWidget( m_gui );
00032 
00033     readConfig();
00034 }
00035 
00036 void DatebookPluginConfig::readConfig() {
00037     Config cfg( "todaydatebookplugin" );
00038     cfg.setGroup( "config" );
00039 
00040     m_max_lines_meet = cfg.readNumEntry( "maxlinesmeet", 5 );
00041     m_gui->SpinBox1->setValue( m_max_lines_meet );
00042     m_show_location = cfg.readNumEntry( "showlocation", 1 );
00043     m_gui->CheckBox1->setChecked( m_show_location );
00044     m_show_notes = cfg.readNumEntry( "shownotes", 0 );
00045     m_gui->CheckBox2->setChecked( m_show_notes );
00046     m_only_later = cfg.readNumEntry( "onlylater", 1 );
00047     m_gui->CheckBox4->setChecked( cfg.readNumEntry( "timeextraline", 1 ) );
00048     m_gui->CheckBox3->setChecked( m_only_later );
00049     m_more_days = cfg.readNumEntry( "moredays", 0 );
00050     m_gui->SpinBox2->setValue( m_more_days );
00051     m_maxCharClip = cfg.readNumEntry( "maxcharclip" , 38 );
00052     m_gui->SpinBox3->setValue( m_maxCharClip );
00053 }
00054 
00055 
00056 void DatebookPluginConfig::writeConfig() {
00057     Config cfg( "todaydatebookplugin" );
00058     cfg.setGroup( "config" );
00059 
00060     m_max_lines_meet = m_gui->SpinBox1->value();
00061     cfg.writeEntry( "maxlinesmeet",  m_max_lines_meet);
00062     m_show_location = m_gui->CheckBox1->isChecked();
00063     cfg.writeEntry( "showlocation", m_show_location);
00064     m_show_notes = m_gui->CheckBox2->isChecked();
00065     cfg.writeEntry( "shownotes", m_show_notes );
00066     m_only_later  = m_gui->CheckBox3->isChecked();
00067     cfg.writeEntry( "timeextraline",  m_gui->CheckBox4->isChecked() );
00068     cfg.writeEntry( "onlylater", m_only_later );
00069     m_more_days = m_gui->SpinBox2->value();
00070     cfg.writeEntry( "moredays", m_more_days );
00071     m_maxCharClip = m_gui->SpinBox3->value();
00072     cfg.writeEntry( "maxcharclip", m_maxCharClip );
00073     cfg.write();
00074 }
00075 
00076 DatebookPluginConfig::~DatebookPluginConfig() {
00077 }

Generated on Sat Nov 5 16:15:55 2005 for OPIE by  doxygen 1.4.2