Blokkal
an Extendable KDE Blogging Client
SourceForge.net Logo

Blokkal::Protocol Class Reference

Base class for protocol plugins. More...

#include <blokkalprotocol.h>

Inheritance diagram for Blokkal::Protocol:

Blokkal::Plugin

List of all members.


Public Slots

virtual void prepareToUnload (void)

Public Member Functions

virtual Blokkal::AccountcreateAccount (const QString &accountName=0)=0
virtual
Blokkal::Ui::EditAccountWidget
createEditAccountWidget (Blokkal::Account *account=0, QWidget *parent=0)=0
virtual
Blokkal::Ui::FormattingBackend
createFormattingBackend (Blokkal::Ui::EditEntryWidget *widget)
 Protocol (const KComponentData &instance, QObject *parent=0)
virtual ~Protocol (void)

Protected Slots

virtual void checkAccountStates (void)

Detailed Description

Base class for protocol plugins.

Protocol plugins must implement this class. Protocols are basically factory classes for Account objects which in turn are factory classes for Blog objects etc. Thus, if you delete a protocol all its accounts, blogs and entries will be destroyed. Do not delete a protocol plugin without calling prepareToUnload().

Author:
Martin Müller <orvio@orvio.de>

Definition at line 45 of file blokkalprotocol.h.


Constructor & Destructor Documentation

Blokkal::Protocol::Protocol ( const KComponentData &  instance,
QObject *  parent = 0 
)

Creates a new Protocol object

Parameters:
parent owning object
instance instance of the plugin
See also:
Blokkal::Plugin

Definition at line 29 of file blokkalprotocol.cpp.

Blokkal::Protocol::~Protocol ( void   )  [virtual]

Destructor

Definition at line 33 of file blokkalprotocol.cpp.


Member Function Documentation

void Blokkal::Protocol::checkAccountStates ( void   )  [protected, virtual, slot]

This slot is called when an account changes its connection status after prepareToUnload() has been called. When all accounts are disconnected, this slot will emit the readyToUnload() signal.

Definition at line 65 of file blokkalprotocol.cpp.

virtual Blokkal::Account* Blokkal::Protocol::createAccount ( const QString &  accountName = 0  )  [pure virtual]

Creates an Blokkal::Account object.

Parameters:
accountName the name of the new account
Returns:
a new account object

virtual Blokkal::Ui::EditAccountWidget* Blokkal::Protocol::createEditAccountWidget ( Blokkal::Account account = 0,
QWidget *  parent = 0 
) [pure virtual]

This method returns a pointer to an Blokkal::Ui::EditAccountWidget used for editing the account account.

Parameters:
account the account this widget should edit. If 0, this widget is used to create a new account.
parent The designated parent widget.
Returns:
a widget for editing the properties of an account.

Blokkal::Ui::FormattingBackend * Blokkal::Protocol::createFormattingBackend ( Blokkal::Ui::EditEntryWidget widget  )  [virtual]

Creates a custom Blokkal::Ui::FormattingBackend. The default implementation just returns an instance of Blokkal::Ui::FormattingBackend.

Parameters:
widget parent EditEntryWidget.
Returns:
a custom Blokkal::Ui::FormattingBackend

Definition at line 94 of file blokkalprotocol.cpp.

void Blokkal::Protocol::prepareToUnload ( void   )  [virtual, slot]

Disconnects all accounts of this protocol type.

Reimplemented from Blokkal::Plugin.

Definition at line 36 of file blokkalprotocol.cpp.


The documentation for this class was generated from the following files: