kmymoneyplugin.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           kmymoneyplugin.h
00003                              -------------------
00004     begin                : Wed Jan 5 2005
00005     copyright            : (C) 2005 Thomas Baumgart
00006     email                : ipwizard@users.sourceforge.net
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef KMYMONEYPLUGIN_H
00019 #define KMYMONEYPLUGIN_H
00020 
00021 #ifdef HAVE_CONFIG_H
00022 #include <config.h>
00023 #endif
00024 
00025 // ----------------------------------------------------------------------------
00026 // QT Includes
00027 
00028 #include <qobject.h>
00029 
00030 // ----------------------------------------------------------------------------
00031 // KDE Includes
00032 
00033 #include <kxmlguiclient.h>
00034 class KAboutData;
00035 class KInstance;
00036 class KAction;
00037 class KToggleAction;
00038 
00039 // ----------------------------------------------------------------------------
00040 // Project Includes
00041 
00042 #include <kmymoney/viewinterface.h>
00043 #include <kmymoney/statementinterface.h>
00044 #include <kmymoney/importinterface.h>
00045 #include <kmymoney/export.h>
00046 
00047 namespace KMyMoneyPlugin {
00048 
00059   class KMYMONEY_EXPORT Plugin : public QObject, public KXMLGUIClient
00060   {
00061     Q_OBJECT
00062   public:
00063     Plugin(QObject* parent, const char* name);
00064     virtual ~Plugin();
00065 
00066   protected:
00068     KAction* action(const QString& name) const;
00069 
00071     KToggleAction* toggleAction(const QString& name) const;
00072 
00073     // define interface classes here. The interface classes provide a mechanism
00074     // for the plugin to interact with KMyMoney
00075     // they are defined in the following form for an interface
00076     // named Xxx:
00077     //
00078     // XxxInterface* xxxInterface();
00079     ViewInterface*          viewInterface() const;
00080     StatementInterface*     statementInterface() const;
00081     ImportInterface*        importInterface() const;
00082   };
00083 
00094   class KMYMONEY_EXPORT OnlinePlugin
00095   {
00096   public:
00097     OnlinePlugin() {}
00098     virtual ~OnlinePlugin() {}
00099 
00100     virtual void protocols(QStringList& protocolList) const = 0;
00101 
00115     virtual QWidget* accountConfigTab(const MyMoneyAccount& account, QString& tabName) = 0;
00116 
00124     virtual MyMoneyKeyValueContainer onlineBankingSettings(const MyMoneyKeyValueContainer& current) = 0;
00125 
00135     virtual bool mapAccount(const MyMoneyAccount& acc, MyMoneyKeyValueContainer& onlineBankingSettings) = 0;
00136 
00147     virtual bool updateAccount(const MyMoneyAccount& acc, bool moreAccounts = false) = 0;
00148   };
00149 
00160   class KMYMONEY_EXPORT ImporterPlugin
00161   {
00162   public:
00163     ImporterPlugin() {}
00164     virtual ~ImporterPlugin() {}
00165 
00172     virtual QString formatName(void) const = 0;
00173 
00181     virtual QString formatFilenameFilter(void) const = 0;
00182 
00191     virtual bool isMyFormat( const QString& filename ) const = 0;
00192 
00200     virtual bool import( const QString& filename) = 0;
00201 
00209     virtual QString lastError(void) const = 0;
00210 
00211   };
00212 
00213 }; // end of namespace
00214 #endif

Generated on Wed Jan 26 13:03:17 2011 for KMyMoney by  doxygen 1.5.6