kchart
KDFrameProfileSection Class Reference
#include <KDFrameProfileSection.h>
Detailed Description
Settings for one profile section of one side of the frame.
Definition at line 41 of file KDFrameProfileSection.h.
Public Types | |
DirPlain | |
DirRaising | |
DirSinking | |
CvtPlain | |
CvtConvex | |
CvtConcave | |
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) |
Member Enumeration Documentation
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.
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 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.
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::KDFrameProfileSection | ( | Direction | direction, | |
Curvature | curvature, | |||
int | width, | |||
QPen | 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::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 | ( | ) | [virtual] |
Destructor.
Only defined to have it virtual.
Definition at line 32 of file KDFrameProfileSection.cpp.
Member Function Documentation
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
Definition at line 38 of file KDFrameProfileSection.cpp.
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
Definition at line 122 of file KDFrameProfileSection.h.
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
Definition at line 73 of file KDFrameProfileSection.h.
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
Definition at line 55 of file KDFrameProfileSection.cpp.
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
Definition at line 142 of file KDFrameProfileSection.h.
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
Definition at line 93 of file KDFrameProfileSection.h.
The documentation for this class was generated from the following files: