kchart

#include <KDFrameProfileSection.h>

Public Types

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

Public Member Functions

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

Static Public Member Functions

static TQString directionToString (Direction dir)
static Direction stringToDirection (const TQString &string)
static TQString curvatureToString (Curvature curv)
static Curvature stringToCurvature (const TQString &string)
static void createFrameProfileSectionNode (TQDomDocument &document, TQDomNode &parent, const TQString &elementName, const KDFrameProfileSection *section)
static bool readFrameProfileSectionNode (const TQDomElement &element, KDFrameProfileSection *section)

Detailed Description

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

Definition at line 41 of file KDFrameProfileSection.h.

Member Enumeration Documentation

◆ Curvature

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.

Definition at line 114 of file KDFrameProfileSection.h.

◆ Direction

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.

\Note 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 TQFrame::Shadow / TQFrame::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

Definition at line 65 of file KDFrameProfileSection.h.

Constructor & Destructor Documentation

◆ KDFrameProfileSection() [1/2]

KDFrameProfileSection::KDFrameProfileSection ( Direction direction,
Curvature curvature,
int width,
TQPen pen )
inline

Ctor of KDFrameProfileSection.

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

Definition at line 160 of file KDFrameProfileSection.h.

◆ KDFrameProfileSection() [2/2]

KDFrameProfileSection::KDFrameProfileSection ( )
inline

Default ctor of FrameProfileSection.

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

Definition at line 175 of file KDFrameProfileSection.h.

◆ ~KDFrameProfileSection()

KDFrameProfileSection::~KDFrameProfileSection ( )
virtual

Destructor.

Only defined to have it virtual.

Definition at line 32 of file KDFrameProfileSection.cpp.

Member Function Documentation

◆ createFrameProfileSectionNode()

void KDFrameProfileSection::createFrameProfileSectionNode ( TQDomDocument & document,
TQDomNode & parent,
const TQString & elementName,
const KDFrameProfileSection * section )
static

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

Parameters
documentthe DOM document to which the node will belong
parentthe parent node to which the new node will be appended
elementNamethe name of the new node
sectionthe section to be represented

Definition at line 38 of file KDFrameProfileSection.cpp.

◆ curvature()

Curvature KDFrameProfileSection::curvature ( ) const
inline

Definition at line 214 of file KDFrameProfileSection.h.

◆ curvatureToString()

TQString KDFrameProfileSection::curvatureToString ( Curvature curv)
inlinestatic

Converts the specified curvature enum to a string representation.

Parameters
curvthe curvature enum to convert
Returns
the string representation of the curvature enum

Definition at line 122 of file KDFrameProfileSection.h.

◆ direction()

Direction KDFrameProfileSection::direction ( ) const
inline

Definition at line 213 of file KDFrameProfileSection.h.

◆ directionToString()

TQString KDFrameProfileSection::directionToString ( Direction dir)
inlinestatic

Converts the specified direction enum to a string representation.

Parameters
dirthe direction enum to convert
Returns
the string representation of the direction enum

Definition at line 73 of file KDFrameProfileSection.h.

◆ pen()

TQPen KDFrameProfileSection::pen ( ) const
inline

Definition at line 216 of file KDFrameProfileSection.h.

◆ readFrameProfileSectionNode()

bool KDFrameProfileSection::readFrameProfileSectionNode ( const TQDomElement & 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
elementthe DOM element to read from
sectiona pointer to the frame profile section object to read the data into

Definition at line 55 of file KDFrameProfileSection.cpp.

◆ stringToCurvature()

Curvature KDFrameProfileSection::stringToCurvature ( const TQString & string)
inlinestatic

Converts the specified string to a curvature enum value.

Parameters
stringthe string to convert
Returns
the curvature enum value

Definition at line 142 of file KDFrameProfileSection.h.

◆ stringToDirection()

Direction KDFrameProfileSection::stringToDirection ( const TQString & string)
inlinestatic

Converts the specified string to a direction enum value.

Parameters
stringthe string to convert
Returns
the direction enum value

Definition at line 93 of file KDFrameProfileSection.h.

◆ width()

int KDFrameProfileSection::width ( ) const
inline

Definition at line 215 of file KDFrameProfileSection.h.


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