kaddressbook Library API Documentation

KABDetailedView Class Reference

This class implements kabīs detailed view. More...

#include <look_details.h>

Inheritance diagram for KABDetailedView:

KABBasicLook QWidget List of all members.

Public Types

enum  BackgroundStyle { None, Tiled, Bordered }
 Enum to select how the background is drawn. More...


Public Slots

void slotBorderedBGSelected (int index)
void slotTiledBGSelected (int index)

Public Member Functions

 KABDetailedView (QWidget *parent=0, const char *name=0)
 The constructor.

virtual ~KABDetailedView ()
 The virtual destructor.

void setEntry (const KABC::Addressee &)
 Set the entry.

void setReadonly (bool)
 Overloaded from KABBasicLook.

void configure (KConfig *config)
 Overloaded from KABBasicLook.


Protected Member Functions

void paintEvent (QPaintEvent *)
 Paint it.

void mousePressEvent (QMouseEvent *)
 Handle mouse events.

void mouseMoveEvent (QMouseEvent *)
 Handle mouse movement.

bool getBackground (QString path, QPixmap &image)
 A method to retrieve a background image according to the path stored in the entry.


Protected Attributes

QPtrList< QRectlocURLs
 Store locations of the URLs.

QPtrList< QRectlocEmails
 Store locations of the email addresses.

QPtrList< QRectlocPhones
 Store locations of the phone numbers.

KABEntryPainter * epainter
 The settings for painting.

QMap< QString, QPixmapbackgrounds
 Map of QImages to save loaded background images into it.

QPixmap background
 The background image used in that entry.

BackgroundStyle bgStyle
 The background style.

bool useDefaultBGImage
 Setting: default background is a color (defaultBGColor).

QColor defaultBGColor
 The default background color.

bool useHeadlineBGColor
 Colored headline background and text?

QColor headlineBGColor
 The headline background color.

QColor headlineTextColor
 The headline color.

QPixmap defaultBGImage
 The default background image.

KToggleAction * actionShowAddresses
 Show addresses?

KToggleAction * actionShowEmails
 Show emails?

KToggleAction * actionShowTelephones
 Show telephones?

KToggleAction * actionShowURLs
 Show URLs?

const int Grid
 Used for constant distances.

QStringList borders
 Stores a list of the contents of the bordered backgrounds directory.

QStringList tiles
 Stores a list of the contents of the tiled backgrounds directory.

QPopupMenumenuBorderedBG
 The bordered backgrounds menu.

QPopupMenumenuTiledBG
 The tiled backgrounds menu.


Static Protected Attributes

const QString BorderedBGDir = "kab3part/backgrounds/bordered/"
const QString TiledBGDir = "kab3part/backgrounds/tiled/"

Detailed Description

This class implements kabīs detailed view.

Currently, there is no possibility to change the entry in this view.

Definition at line 37 of file look_details.h.


Member Enumeration Documentation

enum KABDetailedView::BackgroundStyle
 

Enum to select how the background is drawn.

Enumeration values:
None  The is no background, we use the default background color.
Tiled  The background is displayed as a tile.
Bordered  This is a bordered background, paint it from top left and down, but do not repeat it to the right.

Definition at line 42 of file look_details.h.

Referenced by setEntry().


Constructor & Destructor Documentation

KABDetailedView::KABDetailedView QWidget parent = 0,
const char *  name = 0
 

The constructor.

Definition at line 36 of file look_details.cpp.

References actionShowAddresses, actionShowEmails, actionShowTelephones, actionShowURLs, epainter, QFont::family(), headlineBGColor, headlineTextColor, QFont::pixelSize(), QFont::pointSize(), QWidget::setMouseTracking(), and useHeadlineBGColor.

KABDetailedView::~KABDetailedView  )  [virtual]
 

The virtual destructor.

Definition at line 98 of file look_details.cpp.

References epainter.


Member Function Documentation

void KABDetailedView::setEntry const KABC::Addressee &   )  [virtual]
 

Set the entry.

Reimplemented from KABBasicLook.

Definition at line 318 of file look_details.cpp.

References QDir::absPath(), background, BackgroundStyle, bgStyle, Bordered, KABBasicLook::current, getBackground(), QString::isEmpty(), None, QWidget::repaint(), QPixmap::resize(), KABBasicLook::setEntry(), QDir::setPath(), QWidget::style(), Tiled, and QString::toInt().

void KABDetailedView::setReadonly bool   )  [virtual]
 

Overloaded from KABBasicLook.

Reimplemented from KABBasicLook.

Definition at line 402 of file look_details.cpp.

References QWidget::repaint(), and KABBasicLook::setReadonly().

void KABDetailedView::configure KConfig *  config  )  [virtual]
 

Overloaded from KABBasicLook.

Reimplemented from KABBasicLook.

Definition at line 408 of file look_details.cpp.

References defaultBGColor, defaultBGImage, epainter, QFont::family(), getBackground(), headlineBGColor, headlineTextColor, QFont::pixelSize(), QFont::pointSize(), useDefaultBGImage, and useHeadlineBGColor.

void KABDetailedView::paintEvent QPaintEvent  )  [protected]
 

Paint it.

Reimplemented from QWidget.

Definition at line 123 of file look_details.cpp.

References actionShowAddresses, actionShowEmails, actionShowTelephones, actionShowURLs, background, QPainter::begin(), bgStyle, Bordered, KABBasicLook::current, defaultBGColor, defaultBGImage, QPainter::drawRect(), QPainter::drawTiledPixmap(), QPainter::end(), epainter, Grid, QRect::height(), QWidget::height(), None, QPainter::setBrush(), QPainter::setPen(), QPainter::setViewport(), Tiled, useDefaultBGImage, QRect::width(), QPixmap::width(), and QWidget::width().

void KABDetailedView::mousePressEvent QMouseEvent  )  [protected]
 

Handle mouse events.

Reimplemented from QWidget.

Definition at line 217 of file look_details.cpp.

References actionShowAddresses, actionShowEmails, actionShowTelephones, actionShowURLs, borders, KABBasicLook::browse(), QMouseEvent::button(), KABBasicLook::current, QDir::entryList(), epainter, QPopupMenu::exec(), QMouseEvent::globalPos(), Grid, QPopupMenu::idAt(), QPopupMenu::insertItem(), QPopupMenu::insertSeparator(), KABBasicLook::m_ro, menuBorderedBG, menuTiledBG, QMouseEvent::pos(), KABBasicLook::sendEmail(), QPopupMenu::setItemEnabled(), QDir::setPath(), and tiles.

void KABDetailedView::mouseMoveEvent QMouseEvent  )  [protected]
 

Handle mouse movement.

Reimplemented from QWidget.

Definition at line 166 of file look_details.cpp.

References QWidget::cursor(), epainter, Grid, QMouseEvent::pos(), and QWidget::setCursor().

bool KABDetailedView::getBackground QString  path,
QPixmap image
[protected]
 

A method to retrieve a background image according to the path stored in the entry.

It is either loaded from backgrounds, that acts as a cache, or from the file and added to

See also:
backgrounds.

Definition at line 103 of file look_details.cpp.

References backgrounds, QMap< QString, QPixmap >::end(), QMap< QString, QPixmap >::find(), QPixmap::load(), and QWidget::pos().

Referenced by configure(), and setEntry().


Member Data Documentation

QPtrList<QRect> KABDetailedView::locURLs [protected]
 

Store locations of the URLs.

Definition at line 72 of file look_details.h.

QPtrList<QRect> KABDetailedView::locEmails [protected]
 

Store locations of the email addresses.

Definition at line 74 of file look_details.h.

QPtrList<QRect> KABDetailedView::locPhones [protected]
 

Store locations of the phone numbers.

Definition at line 76 of file look_details.h.

KABEntryPainter* KABDetailedView::epainter [protected]
 

The settings for painting.

Definition at line 78 of file look_details.h.

Referenced by configure(), KABDetailedView(), mouseMoveEvent(), mousePressEvent(), paintEvent(), and ~KABDetailedView().

QMap<QString, QPixmap> KABDetailedView::backgrounds [protected]
 

Map of QImages to save loaded background images into it.

Definition at line 86 of file look_details.h.

Referenced by getBackground().

QPixmap KABDetailedView::background [protected]
 

The background image used in that entry.

Definition at line 88 of file look_details.h.

Referenced by paintEvent(), and setEntry().

BackgroundStyle KABDetailedView::bgStyle [protected]
 

The background style.

Definition at line 90 of file look_details.h.

Referenced by paintEvent(), and setEntry().

bool KABDetailedView::useDefaultBGImage [protected]
 

Setting: default background is a color (defaultBGColor).

Definition at line 92 of file look_details.h.

Referenced by configure(), and paintEvent().

QColor KABDetailedView::defaultBGColor [protected]
 

The default background color.

Definition at line 94 of file look_details.h.

Referenced by configure(), and paintEvent().

bool KABDetailedView::useHeadlineBGColor [protected]
 

Colored headline background and text?

Definition at line 96 of file look_details.h.

Referenced by configure(), and KABDetailedView().

QColor KABDetailedView::headlineBGColor [protected]
 

The headline background color.

Definition at line 98 of file look_details.h.

Referenced by configure(), and KABDetailedView().

QColor KABDetailedView::headlineTextColor [protected]
 

The headline color.

Definition at line 100 of file look_details.h.

Referenced by configure(), and KABDetailedView().

QPixmap KABDetailedView::defaultBGImage [protected]
 

The default background image.

Definition at line 102 of file look_details.h.

Referenced by configure(), and paintEvent().

KToggleAction* KABDetailedView::actionShowAddresses [protected]
 

Show addresses?

Definition at line 104 of file look_details.h.

Referenced by KABDetailedView(), mousePressEvent(), and paintEvent().

KToggleAction* KABDetailedView::actionShowEmails [protected]
 

Show emails?

Definition at line 106 of file look_details.h.

Referenced by KABDetailedView(), mousePressEvent(), and paintEvent().

KToggleAction* KABDetailedView::actionShowTelephones [protected]
 

Show telephones?

Definition at line 108 of file look_details.h.

Referenced by KABDetailedView(), mousePressEvent(), and paintEvent().

KToggleAction* KABDetailedView::actionShowURLs [protected]
 

Show URLs?

Definition at line 110 of file look_details.h.

Referenced by KABDetailedView(), mousePressEvent(), and paintEvent().

const int KABDetailedView::Grid [protected]
 

Used for constant distances.

Definition at line 112 of file look_details.h.

Referenced by mouseMoveEvent(), mousePressEvent(), and paintEvent().

QStringList KABDetailedView::borders [protected]
 

Stores a list of the contents of the bordered backgrounds directory.

Definition at line 114 of file look_details.h.

Referenced by mousePressEvent().

QStringList KABDetailedView::tiles [protected]
 

Stores a list of the contents of the tiled backgrounds directory.

Definition at line 116 of file look_details.h.

Referenced by mousePressEvent().

QPopupMenu* KABDetailedView::menuBorderedBG [protected]
 

The bordered backgrounds menu.

Only valid when not zero (e.g., when handling a mouse click event.

Definition at line 119 of file look_details.h.

Referenced by mousePressEvent().

QPopupMenu* KABDetailedView::menuTiledBG [protected]
 

The tiled backgrounds menu.

Only valid when not zero (e.g., when handling a mouse click event.

Definition at line 122 of file look_details.h.

Referenced by mousePressEvent().


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