certmanager Library API Documentation

configuredialog.cpp

00001 /*
00002     configuredialog.cpp
00003 
00004     This file is part of kleopatra
00005     Copyright (C) 2000 Espen Sand, espen@kde.org
00006     Copyright (C) 2001-2002 Marc Mutz <mutz@kde.org>
00007     Copyright (c) 2004 Klarälvdalens Datakonsult AB
00008 
00009     Libkleopatra is free software; you can redistribute it and/or
00010     modify it under the terms of the GNU General Public License,
00011     version 2, as published by the Free Software Foundation.
00012 
00013     Libkleopatra is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016     General Public License for more details.
00017 
00018     You should have received a copy of the GNU General Public License
00019     along with this program; if not, write to the Free Software
00020     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021 
00022     In addition, as a special exception, the copyright holders give
00023     permission to link the code of this program with any edition of
00024     the Qt library by Trolltech AS, Norway (or with modified versions
00025     of Qt that use the same license as Qt), and distribute linked
00026     combinations including the two.  You must obey the GNU General
00027     Public License in all respects for all of the code used other than
00028     Qt.  If you modify this file, you may extend this exception to
00029     your version of the file, but you are not obligated to do so.  If
00030     you do not wish to do so, delete this exception statement from
00031     your version.
00032 */
00033 
00034 #include "configuredialog.h"
00035 
00036 #include <kwin.h>
00037 #include <kapplication.h>
00038 #include <kconfig.h>
00039 #include <klocale.h>
00040 
00041 ConfigureDialog::ConfigureDialog( QWidget *parent, const char *name, bool modal )
00042   : KCMultiDialog( KDialogBase::IconList, i18n( "Configure" ), parent, name, modal )
00043 {
00044   KWin::setIcons( winId(), kapp->icon(), kapp->miniIcon() );
00045   showButton( User1, true );
00046 
00047   addModule( "kleopatra_config_dirserv", false );
00048   addModule( "kleopatra_config_appear", false );
00049   addModule( "kleopatra_config_dnorder", false );
00050 
00051   // We store the size of the dialog on hide, because otherwise
00052   // the KCMultiDialog starts with the size of the first kcm, not
00053   // the largest one. This way at least after the first showing of
00054   // the largest kcm the size is kept.
00055   const KConfigGroup geometry( KGlobal::config(), "Geometry" );
00056   const int width = geometry.readNumEntry( "ConfigureDialogWidth" );
00057   const int height = geometry.readNumEntry( "ConfigureDialogHeight" );
00058   if ( width != 0 && height != 0 ) {
00059      setMinimumSize( width, height );
00060   }
00061 
00062 }
00063 
00064 void ConfigureDialog::hideEvent( QHideEvent * ) {
00065   KConfigGroup geometry( KGlobal::config(), "Geometry" );
00066   geometry.writeEntry( "ConfigureDialogWidth", width() );
00067   geometry.writeEntry( "ConfigureDialogHeight",height() );
00068 }
00069 
00070 ConfigureDialog::~ConfigureDialog() {
00071 }
00072 
00073 #include "configuredialog.moc"
KDE Logo
This file is part of the documentation for certmanager Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Apr 4 04:45:40 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003