Blokkal
an Extendable KDE Blogging Client
SourceForge.net Logo

Blokkal::Blog Class Reference

An abstraction of a blog. More...

#include <blokkalblog.h>

Inheritance diagram for Blokkal::Blog:

List of all members.


Public Types

enum  EntryFeatures {
  FeatureDate = 0x01, FeatureSubject = 0x02, FeatureText = 0x04, FeatureCategory = 0x08,
  FeatureAddCategories = 0x10 | FeatureCategory, FeatureRemoveCategories = 0x20 | FeatureCategory, FeatureMultipleCategories = 0x40 | FeatureCategory
}

Public Slots

void browseEntries (void)
void startNewEntry (void)

Signals

void blogDestroyed (Blokkal::Blog *blog)
void propertiesChanged (Blokkal::Blog *blog)

Public Member Functions

Blokkal::Accountaccount (void) const
virtual QList< QAction * > actionList (void)
 Blog (Blokkal::Account *parentAccount, const QString &id)
virtual
Blokkal::Io::BlogBrowsingDriver
blogBrowsingDriver (void) const =0
Blokkal::Ui::EditEntryWidgetcreateEditEntryWidget (Blokkal::Entry *entry, QWidget *parent)
virtual Blokkal::EntrycreateEntry (void)=0
virtual KIcon icon (void) const
QString id (void) const
void removeBlog (void)
virtual void saveProperties (void)
void setTitle (const QString &title)
virtual unsigned int supportedFeatures (void) const
QString title (void) const
virtual QString type (void) const
virtual KUrl url (void) const =0
virtual ~Blog (void)

Protected Member Functions

Blokkal::BlogConfigconfig (void) const

Detailed Description

An abstraction of a blog.

An Abstraction of a blog. This class is the base for all protocol implementations of a blog. Blogs are always children of an account object.

Author:
Martin Mueller <orvio@orvio.de>

Definition at line 55 of file blokkalblog.h.


Member Enumeration Documentation

This enumeration is used to identify the standard features supported by this entry. The Blokkal::Ui::EditEntryWidget uses these values to determine which inputs to show/enable.

See also:
supportedFeatures()
Enumerator:
FeatureDate  Entry can have a date.
FeatureSubject  Entry can have a subject line.
FeatureText  Entry can have a body text.
FeatureCategory  Entry can have a category.
FeatureAddCategories  Categories may be added while editing the entry.
FeatureRemoveCategories  Categories may be removed while editing the entry.
FeatureMultipleCategories  Entry may be assigned to more than one category.

Definition at line 79 of file blokkalblog.h.


Constructor & Destructor Documentation

Blokkal::Blog::Blog ( Blokkal::Account parentAccount,
const QString &  id 
)

Constructs a new Blog object.

Parameters:
parentAccount the account this blog belongs to
id the internal identifier of this blog

Definition at line 46 of file blokkalblog.cpp.

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

Destroys the object. The configuration will not be removed. To delete this blog permanently, use removeBlog()

Definition at line 54 of file blokkalblog.cpp.


Member Function Documentation

Blokkal::Account * Blokkal::Blog::account ( void   )  const

This method returns the account this blog belongs to

Returns:
the owning account

Definition at line 82 of file blokkalblog.cpp.

QList< QAction * > Blokkal::Blog::actionList ( void   )  [virtual]

Returns a list of custom actions for context menus. The default implementation returns an empty list.

Returns:
a list of custom actions

Definition at line 147 of file blokkalblog.cpp.

virtual Blokkal::Io::BlogBrowsingDriver* Blokkal::Blog::blogBrowsingDriver ( void   )  const [pure virtual]

Returns:
the BlogBrowsingDriver of this blog

void Blokkal::Blog::blogDestroyed ( Blokkal::Blog blog  )  [signal]

This signal is emitted when the blog object is destroyed

void Blokkal::Blog::browseEntries ( void   )  [slot]

Displays a view to browse past entries.

Definition at line 100 of file blokkalblog.cpp.

Blokkal::BlogConfig * Blokkal::Blog::config ( void   )  const [protected]

Returns the blog config object for this account.

Returns:
the blog config

Definition at line 122 of file blokkalblog.cpp.

Blokkal::Ui::EditEntryWidget * Blokkal::Blog::createEditEntryWidget ( Blokkal::Entry entry,
QWidget *  parent 
)

This method creates a widget to edit an entry.

Parameters:
entry the entry the widget is to edit, if 0 a new entry is created
parent the parent widget

Definition at line 137 of file blokkalblog.cpp.

virtual Blokkal::Entry* Blokkal::Blog::createEntry ( void   )  [pure virtual]

Creates a new Blokkal::Entry object.

Returns:
a new Blokkal::Entry object.

KIcon Blokkal::Blog::icon ( void   )  const [virtual]

This method returns an icon, representing the type of the blog. The default implementation returns the account icon.

Returns:
an icon representing the type of the blog

Definition at line 77 of file blokkalblog.cpp.

QString Blokkal::Blog::id ( void   )  const

This method returns the internal identifier of the blog

Returns:
the internal identifier

Definition at line 117 of file blokkalblog.cpp.

void Blokkal::Blog::propertiesChanged ( Blokkal::Blog blog  )  [signal]

This signal is emitted, when the properties of a blog have been changed.

void Blokkal::Blog::removeBlog ( void   ) 

Removes the blog from the configuration and deletes this object.

Definition at line 127 of file blokkalblog.cpp.

void Blokkal::Blog::saveProperties ( void   )  [virtual]

Saves the properties of this blog, so that it can be restored before the parent account connects to the server. Standard properties are saved automatically. If you store your data in the config() object, you do not need to reimplement this method. The default implementation does nothing.

Definition at line 133 of file blokkalblog.cpp.

void Blokkal::Blog::setTitle ( const QString &  title  ) 

Sets the title of the blog object.

Parameters:
title the new title

Definition at line 71 of file blokkalblog.cpp.

void Blokkal::Blog::startNewEntry ( void   )  [slot]

Creates a new entry and displays a view to edit the new entry.

Definition at line 87 of file blokkalblog.cpp.

unsigned int Blokkal::Blog::supportedFeatures ( void   )  const [virtual]

Returns an or'ed list of Blokkal::Blog::EntryFeatures values to indicate the possible options of entry editing. The default implementation returns FeatureDate|FeatureSubject|FeatureText.

Returns:
an or'ed list of Blokkal::Blog::EntryFeatures values

Definition at line 142 of file blokkalblog.cpp.

QString Blokkal::Blog::title ( void   )  const

This method returns the title of the blog. This string is intended to be shown to the user.

Returns:
the name or title of the blog.

Definition at line 66 of file blokkalblog.cpp.

QString Blokkal::Blog::type ( void   )  const [virtual]

This methid returns a string describing the type of the blog. This type name is intended to be shown to the user. The default implementation returns i18n("Blog").

Returns:
a very short description of the blog type(preferrably one word)

Definition at line 61 of file blokkalblog.cpp.

virtual KUrl Blokkal::Blog::url ( void   )  const [pure virtual]

This method returns the url of the blog.

Returns:
the url of the blog.


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