00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef RTKSTYLE_H
00022 #define RTKSTYLE_H
00023
00024 #include "rtknamespace.h"
00025 #include "rtkvariant.h"
00026
00027 namespace RTK {
00028
00029 class Style {
00030
00031
00032 public:
00033 Style(const String& name = String::null, const Variant &marginleft = 0,
00034 const Variant &marginright = 0, const Variant &margintop = 0, const Variant &marginbottom = 0,
00035 const Variant &visible = true, const Variant &supressed = false, const Variant &fontfamily = String::null,
00036 const Variant &fontsize = 12, const Variant &fontweight = 0, const Variant &fontitalic = false,
00037 const Variant &mask = String::null, const Variant &format = String::null, const Variant &halignment = AlignAuto,
00038 const Variant &valignment = AlignTop, const Variant &maxlines = 0, const Variant &minfontsize = 8,
00039 const Variant &adjustment = AdjustTrim, const Variant &textcolor = Qt::black, const Variant &backcolor = Qt::white,
00040 const Variant &bordercolor = Qt::black, const Variant &borderwidth = 0, const Variant &borderstyle = BorderNone, const Variant &backgroundimage = String::null)
00041 :mName(name), mMarginLeft(marginleft),
00042 mMarginRight(marginright), mMarginTop(margintop), mMarginBottom(marginbottom),
00043 mVisible(visible), mSupressed(supressed), mFontFamily(fontfamily),
00044 mFontSize(fontsize), mFontWeight(fontweight), mFontItalic(fontitalic),
00045 mMask(mask), mFormat(format), mHAlignment(halignment),
00046 mVAlignment(valignment), mMaxLines(maxlines), mMinFontSize(minfontsize),
00047 mAdjustment(adjustment), mTextColor(textcolor), mBackColor(backcolor),
00048 mBorderColor(bordercolor), mBorderWidth(borderwidth), mBorderStyle(borderstyle), mBackgroundImage(backgroundimage)
00049
00050 {};
00051
00052
00053
00054 public:
00056 const String& getName() const { return mName; };
00058 void setName(const String& name) { mName = name; };
00060 String getMarginLeft() const { return mMarginLeft.toString(); }
00061 bool isNullMarginLeft() const { return mMarginLeft.isNull(); }
00063 void setMarginLeft(const Variant & marginleft) { mMarginLeft = marginleft; };
00065 String getMarginRight() const { return mMarginRight.toString(); }
00066 bool isNullMarginRight() const { return mMarginRight.isNull(); }
00068 void setMarginRight(const Variant & marginright) { mMarginRight = marginright; };
00070 String getMarginTop() const { return mMarginTop.toString(); }
00071 bool isNullMarginTop() const { return mMarginTop.isNull(); }
00073 void setMarginTop(const Variant & margintop) { mMarginTop = margintop; };
00075 String getMarginBottom() const { return mMarginBottom.toString(); }
00076 bool isNullMarginBottom() const { return mMarginBottom.isNull(); }
00078 void setMarginBottom(const Variant & marginbottom) { mMarginBottom = marginbottom; };
00080 bool isVisible() const { return mVisible.toBool(); }
00081 bool isNullVisible() const { return mVisible.isNull(); }
00083 void setVisible(const Variant & visible) { mVisible = visible; };
00085 bool isSupressed() const { return mSupressed.toBool(); }
00086 bool isNullSupressed() const { return mSupressed.isNull(); }
00088 void setSupressed(const Variant & supressed) { mSupressed = supressed; };
00090 String getFontFamily() const { return mFontFamily.toString(); }
00091 bool isNullFontFamily() const { return mFontFamily.isNull(); }
00093 void setFontFamily(const Variant & fontfamily) { mFontFamily = fontfamily; };
00095 int getFontSize() const { return mFontSize.toInt(); }
00096 bool isNullFontSize() const { return mFontSize.isNull(); }
00098 void setFontSize(const Variant & fontsize) { mFontSize = fontsize; };
00100 int getFontWeight() const { return mFontWeight.toInt(); }
00101 bool isNullFontWeight() const { return mFontWeight.isNull(); }
00103 void setFontWeight(const Variant & fontweight) { mFontWeight = fontweight; };
00105 bool isFontItalic() const { return mFontItalic.toBool(); }
00106 bool isNullFontItalic() const { return mFontItalic.isNull(); }
00108 void setFontItalic(const Variant & fontitalic) { mFontItalic = fontitalic; };
00110 String getMask() const { return mMask.toString(); }
00111 bool isNullMask() const { return mMask.isNull(); }
00113 void setMask(const Variant & mask) { mMask = mask; };
00115 String getFormat() const { return mFormat.toString(); }
00116 bool isNullFormat() const { return mFormat.isNull(); }
00118 void setFormat(const Variant & format) { mFormat = format; };
00120 AlignmentType getHAlignment() const { return mHAlignment.toAlignmentType(); }
00121 bool isNullHAlignment() const { return mHAlignment.isNull(); }
00123 void setHAlignment(const Variant & halignment) { mHAlignment = halignment; };
00125 AlignmentType getVAlignment() const { return mVAlignment.toAlignmentType(); }
00126 bool isNullVAlignment() const { return mVAlignment.isNull(); }
00128 void setVAlignment(const Variant & valignment) { mVAlignment = valignment; };
00130 int getMaxLines() const { return mMaxLines.toInt(); }
00131 bool isNullMaxLines() const { return mMaxLines.isNull(); }
00133 void setMaxLines(const Variant & maxlines) { mMaxLines = maxlines; };
00135 int getMinFontSize() const { return mMinFontSize.toInt(); }
00136 bool isNullMinFontSize() const { return mMinFontSize.isNull(); }
00138 void setMinFontSize(const Variant & minfontsize) { mMinFontSize = minfontsize; };
00140 AdjustmentType getAdjustment() const { return mAdjustment.toAdjustmentType(); }
00141 bool isNullAdjustment() const { return mAdjustment.isNull(); }
00143 void setAdjustment(const Variant & adjustment) { mAdjustment = adjustment; };
00145 Color getTextColor() const { return mTextColor.toColor(); }
00146 bool isNullTextColor() const { return mTextColor.isNull(); }
00148 void setTextColor(const Variant & textcolor) { mTextColor = textcolor; };
00150 Color getBackColor() const { return mBackColor.toColor(); }
00151 bool isNullBackColor() const { return mBackColor.isNull(); }
00153 void setBackColor(const Variant & backcolor) { mBackColor = backcolor; };
00155 Color getBorderColor() const { return mBorderColor.toColor(); }
00156 bool isNullBorderColor() const { return mBorderColor.isNull(); }
00158 void setBorderColor(const Variant & bordercolor) { mBorderColor = bordercolor; };
00160 int getBorderWidth() const { return mBorderWidth.toInt(); }
00161 bool isNullBorderWidth() const { return mBorderWidth.isNull(); }
00163 void setBorderWidth(const Variant & borderwidth) { mBorderWidth = borderwidth; };
00165 BorderStyle getBorderStyle() const { return mBorderStyle.toBorderStyle(); }
00166 bool isNullBorderStyle() const { return mBorderStyle.isNull(); }
00168 void setBorderStyle(const Variant & borderstyle) { mBorderStyle = borderstyle; };
00170 String getBackgroundImage() const { return mBackgroundImage.toString(); }
00171 bool isNullBackgroundImage() const { return mBackgroundImage.isNull(); }
00173 void setBackgroundImage(const Variant & backgroundimage) { mBackgroundImage = backgroundimage; };
00174 protected:
00175 String mName;
00176 Variant mMarginLeft;
00177 Variant mMarginRight;
00178 Variant mMarginTop;
00179 Variant mMarginBottom;
00180 Variant mVisible;
00181 Variant mSupressed;
00182 Variant mFontFamily;
00183 Variant mFontSize;
00184 Variant mFontWeight;
00185 Variant mFontItalic;
00186 Variant mMask;
00187 Variant mFormat;
00188 Variant mHAlignment;
00189 Variant mVAlignment;
00190 Variant mMaxLines;
00191 Variant mMinFontSize;
00192 Variant mAdjustment;
00193 Variant mTextColor;
00194 Variant mBackColor;
00195 Variant mBorderColor;
00196 Variant mBorderWidth;
00197 Variant mBorderStyle;
00198 Variant mBackgroundImage;
00199
00200
00201 };
00202
00203 };
00204
00205 #endif