1.1 --- a/ornamentedobj.cpp Wed Apr 25 16:02:54 2007 +0000
1.2 +++ b/ornamentedobj.cpp Wed Apr 25 16:02:54 2007 +0000
1.3 @@ -106,18 +106,23 @@
1.4 return heading->getColor();
1.5 }
1.6
1.7 -FrameType OrnamentedObj::getFrameType()
1.8 +FrameObj::FrameType OrnamentedObj::getFrameType()
1.9 {
1.10 return frame->getFrameType();
1.11 }
1.12
1.13 -void OrnamentedObj::setFrameType(const FrameType &t)
1.14 +QString OrnamentedObj::getFrameTypeName()
1.15 +{
1.16 + return frame->getFrameTypeName();
1.17 +}
1.18 +
1.19 +void OrnamentedObj::setFrameType(const FrameObj::FrameType &t)
1.20 {
1.21 frame->setFrameType(t);
1.22 - if (t == NoFrame)
1.23 - linkpos=LinkBottom;
1.24 + if (t == FrameObj::NoFrame)
1.25 + linkpos=LinkableMapObj::Bottom;
1.26 else
1.27 - linkpos=LinkMiddle;
1.28 + linkpos=LinkableMapObj::Middle;
1.29
1.30 calcBBoxSize();
1.31 positionBBox();
1.32 @@ -127,16 +132,42 @@
1.33 void OrnamentedObj::setFrameType(const QString &t)
1.34 {
1.35 frame->setFrameType(t);
1.36 - if (frame->getFrameType() == NoFrame)
1.37 - linkpos=LinkBottom;
1.38 + if (frame->getFrameType() == FrameObj::NoFrame)
1.39 + linkpos=LinkableMapObj::Bottom;
1.40 else
1.41 - linkpos=LinkMiddle;
1.42 + linkpos=LinkableMapObj::Middle;
1.43
1.44 calcBBoxSize();
1.45 positionBBox();
1.46 requestReposition();
1.47 }
1.48
1.49 +void OrnamentedObj::setFramePadding (const int &i)
1.50 +{
1.51 + frame->setPadding (i);
1.52 + calcBBoxSize();
1.53 + positionBBox();
1.54 + requestReposition();
1.55 +}
1.56 +
1.57 +int OrnamentedObj::getFramePadding ()
1.58 +{
1.59 + return frame->getPadding();
1.60 +}
1.61 +
1.62 +void OrnamentedObj::setFrameBorderWidth (const int &i)
1.63 +{
1.64 + frame->setBorderWidth(i);
1.65 + calcBBoxSize();
1.66 + positionBBox();
1.67 + requestReposition();
1.68 +}
1.69 +
1.70 +int OrnamentedObj::getFrameBorderWidth()
1.71 +{
1.72 + return frame->getBorderWidth();
1.73 +}
1.74 +
1.75 void OrnamentedObj::setFramePenColor(QColor col)
1.76 {
1.77 frame->setPenColor (col);
1.78 @@ -159,7 +190,7 @@
1.79
1.80 void OrnamentedObj::positionContents()
1.81 {
1.82 - double d=frame->getBorder()/2;
1.83 + double d=frame->getPadding()/2;
1.84 double x=absPos.x();
1.85 double y=absPos.y();
1.86
2.1 --- a/ornamentedobj.h Wed Apr 25 16:02:54 2007 +0000
2.2 +++ b/ornamentedobj.h Wed Apr 25 16:02:54 2007 +0000
2.3 @@ -4,6 +4,19 @@
2.4 #include "frameobj.h"
2.5 #include "linkablemapobj.h"
2.6
2.7 +/*! \brief Adds various ornaments to the class LinkableMapObj
2.8 +
2.9 +The ornaments are:
2.10 + - frame
2.11 + - note
2.12 + - references
2.13 + - URL
2.14 + -vymLink
2.15 + - flags
2.16 + - standard flags
2.17 + - system flags
2.18 + */
2.19 +
2.20 class OrnamentedObj:public LinkableMapObj {
2.21 public:
2.22 OrnamentedObj ();
2.23 @@ -13,14 +26,19 @@
2.24 virtual void init ();
2.25 virtual void copy (OrnamentedObj*);
2.26
2.27 - virtual QString getHeading(); // returns the heading
2.28 + virtual QString getHeading(); //!< returns the heading
2.29 virtual void setLinkColor(); // sets color according to colorhint, overloaded
2.30 virtual void setColor(QColor); // set the color of text and link
2.31 QColor getColor (); // get color of heading
2.32
2.33 - virtual FrameType getFrameType ();
2.34 - virtual void setFrameType (const FrameType &);
2.35 + virtual FrameObj::FrameType getFrameType ();
2.36 + virtual QString getFrameTypeName ();
2.37 + virtual void setFrameType (const FrameObj::FrameType &);
2.38 virtual void setFrameType (const QString &);
2.39 + virtual void setFramePadding (const int &);
2.40 + virtual int getFramePadding ();
2.41 + virtual void setFrameBorderWidth(const int &);
2.42 + virtual int getFrameBorderWidth ();
2.43 virtual void setFramePenColor (QColor);
2.44 virtual QColor getFramePenColor ();
2.45 virtual void setFrameBrushColor (QColor);