Blokkal
an Extendable KDE Blogging Client
SourceForge.net Logo

blokkalprotocol.h

00001 /***************************************************************************
00002  *   Copyright (C) 2006 - 2007 by Martin Müller                            *
00003  *   orvio@orvio.de                                                        *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 #ifndef BLOKPROTOCOL_H
00021 #define BLOKPROTOCOL_H
00022 
00023 #include "blokkalplugin.h"
00024 
00025 namespace Blokkal {
00026 class Account;
00027 
00028 namespace Ui {
00029 class EditAccountWidget;
00030 class FormattingBackend;
00031 class EditEntryWidget;
00032 }
00033 
00045 class BLOKKAL_EXPORT Protocol : public Plugin
00046 {
00047 Q_OBJECT
00048 public:
00055         Protocol( const KComponentData & instance, QObject * parent = 0 );
00056 
00060         virtual ~Protocol( void );
00061 
00069         virtual Blokkal::Ui::EditAccountWidget * createEditAccountWidget( Blokkal::Account * account = 0, QWidget * parent = 0 ) = 0;
00070 
00076         virtual Blokkal::Account * createAccount( const QString & accountName = 0 ) = 0;
00077 
00084         virtual Blokkal::Ui::FormattingBackend * createFormattingBackend( Blokkal::Ui::EditEntryWidget * widget );
00085         
00086 public Q_SLOTS:
00090         virtual void prepareToUnload( void );
00091 
00092 protected Q_SLOTS:
00099         virtual void checkAccountStates( void );
00100 };
00101 
00102 }
00103 
00104 #endif