kitchensync Library API Documentation

kitchensync_part.cpp

00001 /* 00002 This file is part of KitchenSync. 00003 00004 Copyright (c) 2000 Cornelius Schumacher <schumacher@kde.org> 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00019 00020 As a special exception, permission is given to link this program 00021 with any edition of Qt, and distribute the resulting executable, 00022 without including the source code for Qt in the source distribution. 00023 */ 00024 00025 #include "kitchensync_part.h" 00026 00027 #include "actionmanager.h" 00028 #include "kitchensync.h" 00029 #include "aboutdata.h" 00030 00031 #include <kinstance.h> 00032 #include <klocale.h> 00033 #include <kaboutdata.h> 00034 #include <kaction.h> 00035 #include <kdebug.h> 00036 #include <kstandarddirs.h> 00037 #include <kconfig.h> 00038 #include <kstatusbar.h> 00039 #include <kkeydialog.h> 00040 #include <kparts/genericfactory.h> 00041 00042 #include <qapplication.h> 00043 #include <qfile.h> 00044 00045 typedef KParts::GenericFactory< KitchenSyncPart > KitchenSyncFactory; 00046 K_EXPORT_COMPONENT_FACTORY( libkitchensyncpart, KitchenSyncFactory ) 00047 00048 KitchenSyncPart::KitchenSyncPart( QWidget *parentWidget, const char *, 00049 QObject *parent, const char *name, 00050 const QStringList & ) 00051 : KParts::ReadOnlyPart( parent, name ) 00052 { 00053 QString pname( name ); 00054 00055 mActionManager = new KSync::ActionManager( actionCollection() ); 00056 00057 KSync::KitchenSync *view = new KSync::KitchenSync( mActionManager, 00058 parentWidget ); 00059 00060 mActionManager->setView( view ); 00061 mActionManager->initActions(); 00062 00063 setWidget( view ); 00064 00065 view->initProfiles(); 00066 mActionManager->readConfig(); 00067 view->activateProfile(); 00068 00069 setInstance( KitchenSyncFactory::instance() ); 00070 00071 setXMLFile("ksyncgui.rc"); 00072 } 00073 00074 KitchenSyncPart::~KitchenSyncPart() 00075 { 00076 delete mActionManager; 00077 } 00078 00079 KAboutData *KitchenSyncPart::createAboutData() 00080 { 00081 return KSync::AboutData::self(); 00082 } 00083 00084 bool KitchenSyncPart::openFile() 00085 { 00086 return true; 00087 } 00088 00089 using namespace KParts; 00090 00091 #include "kitchensync_part.moc" 00092 00093
KDE Logo
This file is part of the documentation for kitchensync Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Oct 1 15:18:59 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003