KDFrameProfileSection Class Reference

#include <KDFrameProfileSection.h>

Collaboration diagram for KDFrameProfileSection:

Collaboration graph
[legend]

List of all members.

Public Types

enum  Direction { DirPlain, DirRaising, DirSinking }
enum  Curvature { CvtPlain, CvtConvex, CvtConcave }

Public Member Functions

 KDFrameProfileSection (Direction direction, Curvature curvature, int width, QPen pen)
 KDFrameProfileSection ()
virtual ~KDFrameProfileSection ()
Direction direction () const
Curvature curvature () const
int width () const
QPen pen () const

Static Public Member Functions

static QString directionToString (Direction dir)
static Direction stringToDirection (const QString &string)
static QString curvatureToString (Curvature curv)
static Curvature stringToCurvature (const QString &string)
static void createFrameProfileSectionNode (QDomDocument &document, QDomNode &parent, const QString &elementName, const KDFrameProfileSection *section)
static bool readFrameProfileSectionNode (const QDomElement &element, KDFrameProfileSection *section)

Private Attributes

Direction _direction
Curvature _curvature
int _width
QPen _pen


Detailed Description

Settings for one profile section of one side of the frame.

Member Enumeration Documentation

Profile Direction Mode: specifying whether a part of a profile looks embossed or engraved in comparison to the next outer part (or to the surrounding area, resp.).

  • DirPlain the part of the profile is neither embossed nor engraved.
  • DirRaising the part of the profile lookes embossed from the outer part.
  • DirSinking the part of the profile lookes engraved into the outer part.
Since a frame border may consist of several parts you must specify the direction mode for each of these parts. This is quite different from the QFrame::Shadow / QFrame::Shape schema where you would select a predefined profile. KDFrame lets you specify both the number of sections used to compose frame border's profile and the look of each individual section by calling addProfileSection() multiple times.

Some commonly used profiles are allready pre-defined for your convenience, setSimpleProfile is used to select one of them, see setProfile for an example how to do this.

See also:
addProfileSection, setProfile, setSimpleProfile, SimpleProfile
Enumerator:
DirPlain 
DirRaising 
DirSinking 

Profile Curvature Mode: specifying the shape of a frame profile section. (curvature setting will be ignored for DirPlain profiles)

  • CvtFlat looking like a evenly sloping surface.
  • CvtConvex looking like quarter of a torus.
  • CvtConcave looking like half of a groove.
Enumerator:
CvtPlain 
CvtConvex 
CvtConcave 


Constructor & Destructor Documentation

KDFrameProfileSection::KDFrameProfileSection ( Direction  direction,
Curvature  curvature,
int  width,
QPen  pen 
) [inline]

Ctor of KDFrameProfileSection.

Instead of instantiating KDFrameProfileSection yourself you would normally rather call KDFrame::addProfileSection()

KDFrameProfileSection::KDFrameProfileSection (  )  [inline]

Default ctor of FrameProfileSection.

Instead of instantiating KDFrameProfileSection yourself, you would normally rather call KDFrame::addProfileSection()

virtual KDFrameProfileSection::~KDFrameProfileSection (  )  [virtual]

Destructor. Only defined to have it virtual.


Member Function Documentation

static QString KDFrameProfileSection::directionToString ( Direction  dir  )  [inline, static]

Converts the specified direction enum to a string representation.

Parameters:
dir the direction enum to convert
Returns:
the string representation of the direction enum

static Direction KDFrameProfileSection::stringToDirection ( const QString &  string  )  [inline, static]

Converts the specified string to a direction enum value.

Parameters:
string the string to convert
Returns:
the direction enum value

static QString KDFrameProfileSection::curvatureToString ( Curvature  curv  )  [inline, static]

Converts the specified curvature enum to a string representation.

Parameters:
curv the curvature enum to convert
Returns:
the string representation of the curvature enum

static Curvature KDFrameProfileSection::stringToCurvature ( const QString &  string  )  [inline, static]

Converts the specified string to a curvature enum value.

Parameters:
string the string to convert
Returns:
the curvature enum value

static void KDFrameProfileSection::createFrameProfileSectionNode ( QDomDocument &  document,
QDomNode &  parent,
const QString &  elementName,
const KDFrameProfileSection section 
) [static]

Creates a DOM element node that represents a frame profile section for use in a DOM document.

Parameters:
document the DOM document to which the node will belong
parent the parent node to which the new node will be appended
elementName the name of the new node
section the section to be represented

static bool KDFrameProfileSection::readFrameProfileSectionNode ( const QDomElement &  element,
KDFrameProfileSection section 
) [static]

Reads data from a DOM element node that represents a frame profile section and fills a KDFrameProfileSection object with the data.

Parameters:
element the DOM element to read from
section a pointer to the frame profile section object to read the data into

Direction KDFrameProfileSection::direction ( void   )  const [inline]

Curvature KDFrameProfileSection::curvature (  )  const [inline]

int KDFrameProfileSection::width (  )  const [inline]

QPen KDFrameProfileSection::pen (  )  const [inline]


Member Data Documentation


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

Generated on Wed Jan 26 13:06:56 2011 for KMyMoney by  doxygen 1.5.6