00001 /* 00002 * todopluginconfig.cpp 00003 * 00004 * copyright : (c) 2002, 2003 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 #include "todopluginconfig.h" 00018 00019 #include <qpe/config.h> 00020 00021 #include <qlayout.h> 00022 00023 00024 TodolistPluginConfig::TodolistPluginConfig( QWidget *parent, const char* name) 00025 : TodayConfigWidget(parent, name ) { 00026 00027 QVBoxLayout * layout = new QVBoxLayout( this ); 00028 00029 m_gui = new TodoPluginConfigBase( this ); 00030 00031 layout->addWidget( m_gui ); 00032 00033 readConfig(); 00034 } 00035 00036 void TodolistPluginConfig::readConfig() { 00037 Config cfg( "todaytodoplugin" ); 00038 cfg.setGroup( "config" ); 00039 m_max_lines_task = cfg.readNumEntry( "maxlinestask", 5 ); 00040 m_gui->SpinBox2->setValue( m_max_lines_task ); 00041 m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); 00042 m_gui->SpinBoxClip->setValue( m_maxCharClip ); 00043 } 00044 00045 00046 void TodolistPluginConfig::writeConfig() { 00047 Config cfg( "todaytodoplugin" ); 00048 cfg.setGroup( "config" ); 00049 m_max_lines_task = m_gui->SpinBox2->value(); 00050 cfg.writeEntry( "maxlinestask", m_max_lines_task ); 00051 m_maxCharClip = m_gui->SpinBoxClip->value(); 00052 cfg.writeEntry( "maxcharclip", m_maxCharClip ); 00053 cfg.write(); 00054 } 00055 00056 00057 TodolistPluginConfig::~TodolistPluginConfig() { 00058 }
1.4.2