KSpread::CustomStyle Class Reference

#include <kspread_style.h>

Inheritance diagram for KSpread::CustomStyle:
KSpread::Style

Public Member Functions

 CustomStyle (Style *style, TQString const &name)
 
 CustomStyle (TQString const &name, CustomStyle *parent)
 
TQString const & name () const
 
void save (TQDomDocument &doc, TQDomElement &styles)
 
virtual TQString saveOasis (KoGenStyle &style, KoGenStyles &mainStyles)
 
void loadOasis (KoOasisStyles &oasisStyles, const TQDomElement &style, const TQString &name)
 
bool loadXML (TQDomElement const &style, TQString const &name)
 
void setType (StyleType type)
 
void setName (TQString const &name)
 
void refreshParentName ()
 
bool definesAll () const
 
void changeAlignX (Format::Align alignX)
 
void changeAlignY (Format::AlignY alignY)
 
void changeFont (TQFont const &f)
 
void changeFontFamily (TQString const &fam)
 
void changeFontSize (int size)
 
void changeFontFlags (uint flags)
 
void changePen (TQPen const &pen)
 
void changeTextColor (TQColor const &color)
 
void changeBgColor (TQColor const &color)
 
void changeRightBorderPen (TQPen const &pen)
 
void changeBottomBorderPen (TQPen const &pen)
 
void changeLeftBorderPen (TQPen const &pen)
 
void changeTopBorderPen (TQPen const &pen)
 
void changeFallBorderPen (TQPen const &pen)
 
void changeGoUpBorderPen (TQPen const &pen)
 
void changeRotateAngle (int angle)
 
void changeIndent (double indent)
 
void changeBackGroundBrush (TQBrush const &brush)
 
void changeFloatFormat (Format::FloatFormat format)
 
void changeFloatColor (Format::FloatColor color)
 
void changeFormatType (FormatType format)
 
void changeStrFormat (TQString const &strFormat)
 
void changePrecision (int precision)
 
void changePrefix (TQString const &prefix)
 
void changePostfix (TQString const &postfix)
 
void changeCurrency (Format::Currency const &currency)
 
void addProperty (Properties p)
 
void removeProperty (Properties p)
 
bool operator== (const CustomStyle &other) const
 
bool operator!= (const CustomStyle &other) const
 
- Public Member Functions inherited from KSpread::Style
 Style ()
 
 Style (Style *style)
 
virtual ~Style ()
 
bool operator== (const Style &style) const
 
bool operator!= (const Style &other) const
 
StyleType type () const
 
void saveXML (TQDomDocument &doc, TQDomElement &format) const
 
bool loadXML (TQDomElement &format)
 
void loadOasisStyle (KoOasisStyles &oasisStyles, const TQDomElement &element)
 
bool release ()
 
void addRef ()
 
int usage () const
 
bool hasProperty (Properties p) const
 
bool hasFeature (FlagsSet f, bool withoutParent) const
 
void clearFeature (FlagsSet f)
 
uint features () const
 
uint bottomPenValue () const
 
uint rightPenValue () const
 
uint leftPenValue () const
 
uint topPenValue () const
 
TQPen const & pen () const
 
TQColor const & bgColor () const
 
TQPen const & rightBorderPen () const
 
TQPen const & bottomBorderPen () const
 
TQPen const & leftBorderPen () const
 
TQPen const & topBorderPen () const
 
TQPen const & fallDiagonalPen () const
 
TQPen const & goUpDiagonalPen () const
 
TQBrush const & backGroundBrush () const
 
TQString const & strFormat () const
 
TQString const & prefix () const
 
TQString const & postfix () const
 
TQString const & fontFamily () const
 
Format::Align alignX () const
 
Format::AlignY alignY () const
 
Format::FloatFormat floatFormat () const
 
Format::FloatColor floatColor () const
 
FormatType formatType () const
 
Format::Currency const & currency () const
 
TQFont font () const
 
uint fontFlags () const
 
int fontSize () const
 
int precision () const
 
int rotateAngle () const
 
double indent () const
 
Style * setAlignX (Format::Align alignX)
 
Style * setAlignY (Format::AlignY alignY)
 
Style * setFont (TQFont const &f)
 
Style * setFontFamily (TQString const &fam)
 
Style * setFontFlags (uint flags)
 
Style * setFontSize (int size)
 
Style * setPen (TQPen const &pen)
 
Style * setBgColor (TQColor const &color)
 
Style * setRightBorderPen (TQPen const &pen)
 
Style * setBottomBorderPen (TQPen const &pen)
 
Style * setLeftBorderPen (TQPen const &pen)
 
Style * setTopBorderPen (TQPen const &pen)
 
Style * setFallDiagonalPen (TQPen const &pen)
 
Style * setGoUpDiagonalPen (TQPen const &pen)
 
Style * setRotateAngle (int angle)
 
Style * setIndent (double indent)
 
Style * setBackGroundBrush (TQBrush const &brush)
 
Style * setFloatFormat (Format::FloatFormat format)
 
Style * setFloatColor (Format::FloatColor color)
 
Style * setFormatType (FormatType format)
 
Style * setStrFormat (TQString const &strFormat)
 
Style * setPrecision (int precision)
 
Style * setPrefix (TQString const &prefix)
 
Style * setPostfix (TQString const &postfix)
 
Style * setCurrency (Format::Currency const &currency)
 
Style * setProperty (Properties p)
 
Style * clearProperty (Properties p)
 
CustomStyle * parent () const
 
TQString const & parentName () const
 
void setParent (CustomStyle *parent)
 

Friends

class StyleManager
 

Additional Inherited Members

- Public Types inherited from KSpread::Style
enum  StyleType { BUILTIN , CUSTOM , AUTO , TENTATIVE }
 
enum  FontFlags { FBold = 0x01 , FUnderline = 0x02 , FItalic = 0x04 , FStrike = 0x08 }
 
enum  Properties {
  PDontPrintText = 0x01 , PCustomFormat = 0x02 , PNotProtected = 0x04 , PHideAll = 0x08 ,
  PHideFormula = 0x10 , PMultiRow = 0x20 , PVerticalText = 0x40
}
 
enum  FlagsSet {
  SAlignX = 0x01 , SAlignY = 0x02 , SPrefix = 0x08 , SPostfix = 0x10 ,
  SLeftBorder = 0x20 , SRightBorder = 0x40 , STopBorder = 0x80 , SBottomBorder = 0x100 ,
  SFallDiagonal = 0x200 , SGoUpDiagonal = 0x400 , SBackgroundBrush = 0x800 , SFont = 0x1000 ,
  STextPen = 0x2000 , SBackgroundColor = 0x4000 , SFloatFormat = 0x8000 , SFloatColor = 0x10000 ,
  SMultiRow = 0x20000 , SVerticalText = 0x40000 , SPrecision = 0x80000 , SFormatType = 0x100000 ,
  SAngle = 0x200000 , SIndent = 0x800000 , SDontPrintText = 0x1000000 , SCustomFormat = 0x2000000 ,
  SNotProtected = 0x4000000 , SHideAll = 0x8000000 , SHideFormula = 0x10000000 , SFontSize = 0x20000000 ,
  SFontFlag = 0x40000000 , SFontFamily = 0x80000000
}
 
- Static Public Member Functions inherited from KSpread::Style
static FormatType dateType (const TQString &_format)
 
static FormatType timeType (const TQString &_format)
 
static FormatType fractionType (const TQString &_format)
 
static TQString saveOasisStyleNumeric (KoGenStyle &style, KoGenStyles &mainStyles, FormatType _style, const TQString &_prefix, const TQString &_postfix, int _precision, const TQString &symbol)
 
static TQString saveOasisStyleNumericDate (KoGenStyles &mainStyles, FormatType _style, const TQString &_prefix, const TQString &_suffix)
 
static TQString saveOasisStyleNumericFraction (KoGenStyles &mainStyles, FormatType _style, const TQString &_prefix, const TQString _suffix)
 
static TQString saveOasisStyleNumericTime (KoGenStyles &mainStyles, FormatType _style, const TQString &_prefix, const TQString &_suffix)
 
static TQString saveOasisStyleNumericCustom (KoGenStyles &mainStyles, FormatType _style, const TQString &_prefix, const TQString &_suffix)
 
static TQString saveOasisStyleNumericScientific (KoGenStyles &mainStyles, FormatType _style, const TQString &_prefix, const TQString _suffix, int _precision)
 
static TQString saveOasisStyleNumericPercentage (KoGenStyles &mainStyles, FormatType _style, int _precision, const TQString &_prefix, const TQString &_suffix)
 
static TQString saveOasisStyleNumericMoney (KoGenStyles &mainStyles, FormatType _style, const TQString &symbol, int _precision, const TQString &_prefix, const TQString &_suffix)
 
static TQString saveOasisStyleNumericText (KoGenStyles &mainStyles, FormatType _style, int _precision, const TQString &_prefix, const TQString &_suffix)
 
static TQString saveOasisStyleNumericNumber (KoGenStyles &mainStyles, FormatType _style, int _precision, const TQString &_prefix, const TQString &_suffix)
 
static TQString saveOasisBackgroundStyle (KoGenStyles &mainStyles, const TQBrush &brush)
 
static TQString colorName (const TQColor &color)
 
- Protected Member Functions inherited from KSpread::Style
void saveOasisStyle (KoGenStyle &style, KoGenStyles &mainStyles)
 
void loadOasisDataStyle (KoOasisStyles &oasisStyles, const TQDomElement &styleStack)
 
void loadOasisParagraphProperties (KoOasisStyles &oasisStyles, const KoStyleStack &styleStack)
 
void loadOasisTableCellProperties (KoOasisStyles &oasisStyles, const KoStyleStack &styleStack)
 
void loadOasisTextProperties (KoOasisStyles &oasisStyles, const KoStyleStack &styleStack)
 
bool featureSet (FlagsSet f) const
 
- Protected Attributes inherited from KSpread::Style
CustomStyle * m_parent
 
TQString m_parentName
 
StyleType m_type
 
uint m_usageCount
 
uint m_featuresSet
 
Format::Align m_alignX
 
Format::AlignY m_alignY
 
Format::FloatFormat m_floatFormat
 
Format::FloatColor m_floatColor
 
FormatType m_formatType
 
TQString m_fontFamily
 
uint m_fontFlags
 
int m_fontSize
 
TQPen m_textPen
 
TQColor m_bgColor
 
TQPen m_rightBorderPen
 
TQPen m_bottomBorderPen
 
TQPen m_leftBorderPen
 
TQPen m_topBorderPen
 
TQPen m_fallDiagonalPen
 
TQPen m_goUpDiagonalPen
 
TQBrush m_backGroundBrush
 
int m_rotateAngle
 
double m_indent
 
TQString m_strFormat
 
int m_precision
 
TQString m_prefix
 
TQString m_postfix
 
Format::Currency m_currency
 
uint m_properties
 
uint m_bottomPenValue
 
uint m_rightPenValue
 
uint m_leftPenValue
 
uint m_topPenValue
 

Detailed Description

Built-in or custom style defined in StyleManager dialog.

Definition at line 405 of file kspread_style.h.

Constructor & Destructor Documentation

◆ CustomStyle() [1/2]

CustomStyle::CustomStyle ( Style *  style,
TQString const &  name 
)

Constructor.

Creates a custom style.

Parameters
styleThe style which's features are copied.
nameThe name of this style.

Definition at line 2702 of file kspread_style.cpp.

◆ CustomStyle() [2/2]

CustomStyle::CustomStyle ( TQString const &  name,
CustomStyle *  parent 
)

Definition at line 2751 of file kspread_style.cpp.

◆ ~CustomStyle()

CustomStyle::~CustomStyle ( )

Definition at line 2760 of file kspread_style.cpp.

Member Function Documentation

◆ addProperty()

void CustomStyle::addProperty ( Properties  p)

Definition at line 3147 of file kspread_style.cpp.

◆ changeAlignX()

void CustomStyle::changeAlignX ( Format::Align  alignX)

Definition at line 2929 of file kspread_style.cpp.

◆ changeAlignY()

void CustomStyle::changeAlignY ( Format::AlignY  alignY)

Definition at line 2935 of file kspread_style.cpp.

◆ changeBackGroundBrush()

void CustomStyle::changeBackGroundBrush ( TQBrush const &  brush)

Definition at line 3094 of file kspread_style.cpp.

◆ changeBgColor()

void CustomStyle::changeBgColor ( TQColor const &  color)

Definition at line 3036 of file kspread_style.cpp.

◆ changeBottomBorderPen()

void CustomStyle::changeBottomBorderPen ( TQPen const &  pen)

Definition at line 3049 of file kspread_style.cpp.

◆ changeCurrency()

void CustomStyle::changeCurrency ( Format::Currency const &  currency)

Definition at line 3142 of file kspread_style.cpp.

◆ changeFallBorderPen()

void CustomStyle::changeFallBorderPen ( TQPen const &  pen)

Definition at line 3070 of file kspread_style.cpp.

◆ changeFloatColor()

void CustomStyle::changeFloatColor ( Format::FloatColor  color)

Definition at line 3106 of file kspread_style.cpp.

◆ changeFloatFormat()

void CustomStyle::changeFloatFormat ( Format::FloatFormat  format)

Definition at line 3100 of file kspread_style.cpp.

◆ changeFont()

void CustomStyle::changeFont ( TQFont const &  f)

Definition at line 2941 of file kspread_style.cpp.

◆ changeFontFamily()

void CustomStyle::changeFontFamily ( TQString const &  fam)

Definition at line 2994 of file kspread_style.cpp.

◆ changeFontFlags()

void CustomStyle::changeFontFlags ( uint  flags)

Definition at line 3014 of file kspread_style.cpp.

◆ changeFontSize()

void CustomStyle::changeFontSize ( int  size)

Definition at line 3004 of file kspread_style.cpp.

◆ changeFormatType()

void CustomStyle::changeFormatType ( FormatType  format)

Definition at line 3112 of file kspread_style.cpp.

◆ changeGoUpBorderPen()

void CustomStyle::changeGoUpBorderPen ( TQPen const &  pen)

Definition at line 3076 of file kspread_style.cpp.

◆ changeIndent()

void CustomStyle::changeIndent ( double  indent)

Definition at line 3088 of file kspread_style.cpp.

◆ changeLeftBorderPen()

void CustomStyle::changeLeftBorderPen ( TQPen const &  pen)

Definition at line 3056 of file kspread_style.cpp.

◆ changePen()

void CustomStyle::changePen ( TQPen const &  pen)

Definition at line 3030 of file kspread_style.cpp.

◆ changePostfix()

void CustomStyle::changePostfix ( TQString const &  postfix)

Definition at line 3136 of file kspread_style.cpp.

◆ changePrecision()

void CustomStyle::changePrecision ( int  precision)

Definition at line 3124 of file kspread_style.cpp.

◆ changePrefix()

void CustomStyle::changePrefix ( TQString const &  prefix)

Definition at line 3130 of file kspread_style.cpp.

◆ changeRightBorderPen()

void CustomStyle::changeRightBorderPen ( TQPen const &  pen)

Definition at line 3042 of file kspread_style.cpp.

◆ changeRotateAngle()

void CustomStyle::changeRotateAngle ( int  angle)

Definition at line 3082 of file kspread_style.cpp.

◆ changeStrFormat()

void CustomStyle::changeStrFormat ( TQString const &  strFormat)

Definition at line 3118 of file kspread_style.cpp.

◆ changeTextColor()

void CustomStyle::changeTextColor ( TQColor const &  color)

Definition at line 3024 of file kspread_style.cpp.

◆ changeTopBorderPen()

void CustomStyle::changeTopBorderPen ( TQPen const &  pen)

Definition at line 3063 of file kspread_style.cpp.

◆ definesAll()

bool CustomStyle::definesAll ( ) const

Definition at line 2865 of file kspread_style.cpp.

◆ loadOasis()

void CustomStyle::loadOasis ( KoOasisStyles &  oasisStyles,
const TQDomElement &  style,
const TQString &  name 
)

Loads the style properties from style .

Determines also the parent's name.

Parameters
oasisStylesmap of all styles
stylethe DOM element defining the style
namethe style's new name

Definition at line 2800 of file kspread_style.cpp.

◆ loadXML()

bool CustomStyle::loadXML ( TQDomElement const &  style,
TQString const &  name 
)

Definition at line 2831 of file kspread_style.cpp.

◆ name()

TQString const & KSpread::CustomStyle::name ( ) const
inline

Definition at line 418 of file kspread_style.h.

◆ operator!=()

bool KSpread::CustomStyle::operator!= ( const CustomStyle &  other) const
inline

Definition at line 475 of file kspread_style.h.

◆ operator==()

bool CustomStyle::operator== ( const CustomStyle &  other) const

Definition at line 3209 of file kspread_style.cpp.

◆ refreshParentName()

void CustomStyle::refreshParentName ( )

Definition at line 2859 of file kspread_style.cpp.

◆ removeProperty()

void CustomStyle::removeProperty ( Properties  p)

Definition at line 3178 of file kspread_style.cpp.

◆ save()

void CustomStyle::save ( TQDomDocument &  doc,
TQDomElement &  styles 
)

Definition at line 2813 of file kspread_style.cpp.

◆ saveOasis()

TQString CustomStyle::saveOasis ( KoGenStyle &  style,
KoGenStyles &  mainStyles 
)
virtual
Reimplemented from superclass.
Stores an OASIS user style.
Returns
the OASIS style's name

Reimplemented from KSpread::Style.

Definition at line 2764 of file kspread_style.cpp.

◆ setName()

void CustomStyle::setName ( TQString const &  name)

Definition at line 2854 of file kspread_style.cpp.

◆ setType()

void KSpread::CustomStyle::setType ( StyleType  type)
inline

Definition at line 438 of file kspread_style.h.

Friends And Related Symbol Documentation

◆ StyleManager

friend class StyleManager
friend

Definition at line 478 of file kspread_style.h.


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