Blokkal
an Extendable KDE Blogging Client
SourceForge.net Logo

Blokkal::Io::BlogBrowsingDriver Class Reference

Abstract base class for all BlogBrowsingDriver used in Blokkal. More...

#include <blogbrowsingdriver.h>

Inheritance diagram for Blokkal::Io::BlogBrowsingDriver:

List of all members.


Public Types

enum  BlogOperations { LoadIndex = 0x0001, LoadEntryById = 0x0002, LoadEntriesByDate = 0x0004, LoadRecentEntries = 0x0008 }
enum  BrowseMode { BrowseEdit = 1, BrowseLink = 2 }

Public Member Functions

Blokkal::Blogblog (void) const
 BlogBrowsingDriver (Blokkal::Blog *parent)
Blokkal::Ui::BrowseEntryDialogbrowseBlogDialog (BrowseMode mode)
virtual Blokkal::Io::LoadEntryJobcreateLoadEntryJob (unsigned int n)
virtual Blokkal::Io::LoadEntryJobcreateLoadEntryJob (const QDate &date)
virtual Blokkal::Io::LoadEntryJobcreateLoadEntryJob (const QStringList &idList)
virtual Blokkal::Io::LoadIndexJobcreateLoadIndexJob (const QDate &from=QDate(), const QDate &to=QDate())
virtual QList
< Blokkal::Ui::BrowseOptionWidget * > 
customBrowseOptionWidgets (QWidget *parent)
virtual unsigned int recentLimit (void) const
virtual unsigned int supportedBrowseModes (void) const
virtual unsigned int supportedOperations (void) const

Detailed Description

Abstract base class for all BlogBrowsingDriver used in Blokkal.

A BlogBrowsingDriver creates jobs to load entries and the index of of a blog. If a blog does not support a certain operation the create*()-methods return 0. To help the GUI determine which operations are supported, you must reimplement the supportedOperations() method.

Definition at line 48 of file blogbrowsingdriver.h.


Member Enumeration Documentation

Enumerations to identify certain blogoperations

Enumerator:
LoadIndex  the index of a blog may be loaded
LoadEntryById  an entry may be loaded by id
LoadEntriesByDate  entries may be loaded by date
LoadRecentEntries  a list of recent entries may be loaded

Definition at line 74 of file blogbrowsingdriver.h.

Enumeration for the different modes used to browse old entries of this blog

Enumerator:
BrowseEdit  Browse blog in order to edit old entries.
BrowseLink  Browse blog in order to aquire a link to old entries.

Definition at line 54 of file blogbrowsingdriver.h.


Constructor & Destructor Documentation

Blokkal::Io::BlogBrowsingDriver::BlogBrowsingDriver ( Blokkal::Blog parent  ) 

Constructor

Parameters:
parent parent blog

Definition at line 38 of file blogbrowsingdriver.cpp.


Member Function Documentation

Blokkal::Blog * Blokkal::Io::BlogBrowsingDriver::blog ( void   )  const

Returns:
the blog this driver belongs to

Definition at line 91 of file blogbrowsingdriver.cpp.

Blokkal::Ui::BrowseEntryDialog * Blokkal::Io::BlogBrowsingDriver::browseBlogDialog ( BrowseMode  mode  ) 

Returns a BrowseEntryDialog for mode. This method tries to reuse dialog to minimise network traffic.

Definition at line 101 of file blogbrowsingdriver.cpp.

Blokkal::Io::LoadEntryJob * Blokkal::Io::BlogBrowsingDriver::createLoadEntryJob ( unsigned int  n  )  [virtual]

Creates and returns a job that loads the last n entries in the blog. The default implementation returns 0.

See also:
recentLimit()
Returns:
a job that loads the last n entries in the blog

Definition at line 78 of file blogbrowsingdriver.cpp.

Blokkal::Io::LoadEntryJob * Blokkal::Io::BlogBrowsingDriver::createLoadEntryJob ( const QDate &  date  )  [virtual]

Creates and returns a job that loads all entries posted on date. The default implementation returns 0.

Returns:
a job that loads all entries posted on date

Definition at line 72 of file blogbrowsingdriver.cpp.

Blokkal::Io::LoadEntryJob * Blokkal::Io::BlogBrowsingDriver::createLoadEntryJob ( const QStringList &  idList  )  [virtual]

Creates and returns a job that loads all entries in idList. The default implementation returns 0.

Returns:
a job that loads all entries in idList

Definition at line 66 of file blogbrowsingdriver.cpp.

Blokkal::Io::LoadIndexJob * Blokkal::Io::BlogBrowsingDriver::createLoadIndexJob ( const QDate &  from = QDate(),
const QDate &  to = QDate() 
) [virtual]

Creates and returns a job that loads the index of the blog between from and to. If from is invalid, the index starts with the date the blog was created on. If to is invalid, the index ends with the current date. The default implementation returns 0.

Returns:
job that loads the index of the blog between from and to

Definition at line 84 of file blogbrowsingdriver.cpp.

QList< Blokkal::Ui::BrowseOptionWidget * > Blokkal::Io::BlogBrowsingDriver::customBrowseOptionWidgets ( QWidget *  parent  )  [virtual]

If your protocol provides special browse options, especially ones that are not covered by BlogOperations, you can return widgets for them in this method. The default implementation returns an empty list.

Parameters:
parent parent widget for the BrowseOptionWidget

Definition at line 161 of file blogbrowsingdriver.cpp.

unsigned int Blokkal::Io::BlogBrowsingDriver::recentLimit ( void   )  const [virtual]

If your protocol does only support a limited number of entries to be loaded by this mode, overridde this method to return the limit. If your protocol does not support this type of operation at all you do not need to reimplement this method. The default implementation returns 0, which means no limit

Definition at line 56 of file blogbrowsingdriver.cpp.

unsigned int Blokkal::Io::BlogBrowsingDriver::supportedBrowseModes ( void   )  const [virtual]

Returns the browse modes supported by this blog. The default implementation returns BrowseEdit|BrowseLink

Returns:
the browse modes supported by this blog

Definition at line 96 of file blogbrowsingdriver.cpp.

unsigned int Blokkal::Io::BlogBrowsingDriver::supportedOperations ( void   )  const [virtual]

This method returns an or'ed list of BlogOperations values. The default implementation returns 0.

Returns:
returns an or'ed list of BlogOperations values

Definition at line 61 of file blogbrowsingdriver.cpp.


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