kaddressbook Library API Documentation

ViewWrapper Class Reference

The ViewWrapper class is a lightweight class that will be instantiated for each view type. More...

#include <viewwrapper.h>

List of all members.

Public Member Functions

virtual QString type () const =0
virtual QString description () const =0
virtual KAddressBookViewcreateView (KABC::AddressBook *doc, QWidget *parent, const char *name)=0
 Creates a view of the given type and returns the view.

virtual ConfigureViewDialogcreateConfigureViewDialog (const QString &viewName, KABC::AddressBook *doc, QWidget *parent, const char *name)
 Creates a config dialog for the view type.


Detailed Description

The ViewWrapper class is a lightweight class that will be instantiated for each view type.

It's job it to provide meta data about the view type as well as some utility functions for creating the actual view object and its config dialog.

A view implementer will need to subclass from this class to fill in the createView() and createViewConfigDialog() methods.

Definition at line 43 of file viewwrapper.h.


Member Function Documentation

virtual QString ViewWrapper::type  )  const [pure virtual]
 

Returns:
The type of the view. This is normally a small one word string (ie: Table, Icon, Tree, etc).

virtual QString ViewWrapper::description  )  const [pure virtual]
 

Returns:
The description of the view. This should be a 3 to 4 line string (don't actually use return characters in the string) describing the features offered by the view.

virtual KAddressBookView* ViewWrapper::createView KABC::AddressBook *  doc,
QWidget parent,
const char *  name
[pure virtual]
 

Creates a view of the given type and returns the view.

The caller is responsible for managing the memory allocated by the view.

Referenced by ViewManager::setActiveView().

ConfigureViewDialog * ViewWrapper::createConfigureViewDialog const QString viewName,
KABC::AddressBook *  doc,
QWidget parent,
const char *  name
[virtual]
 

Creates a config dialog for the view type.

The default implementation will return a ViewConfigDialog. This default dialog will allow the user to set the visible fields only. If you need more config options (as most views will), this method can be overloaded to return your sublcass of ViewConfigDialog. If this method is over loaded the base classes method should not be called.

Definition at line 37 of file viewwrapper.cpp.

Referenced by ViewManager::modifyView().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sat Oct 18 02:47:10 2003 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001