kpresenter

#include <KPrGradient.h>

Public Member Functions

 KPrGradient (const TQColor &_color1, const TQColor &_color2, BCType _bcType, bool _unbalanced, int _xfactor, int _yfactor)
 
TQColor getColor1 () const
 
TQColor getColor2 () const
 
BCType getBackColorType () const
 
bool getUnbalanced () const
 
int getXFactor () const
 
int getYFactor () const
 
void setColor1 (const TQColor &_color)
 
void setColor2 (const TQColor &_color)
 
void setBackColorType (BCType _type)
 
void setUnbalanced (bool b)
 
void setXFactor (int i)
 
void setYFactor (int i)
 
void setSize (const TQSize &_size)
 
void setParameters (const TQColor &c1, const TQColor &c2, BCType _type, bool _unbalanced, int xf, int yf)
 
const TQPixmap & pixmap () const
 
TQSize size () const
 
void addRef ()
 
bool removeRef ()
 

Protected Member Functions

void paint ()
 

Protected Attributes

TQColor color1
 
TQColor color2
 
BCType bcType
 
KPixmap m_pixmap
 
int refCount
 
int xFactor
 
int yFactor
 
bool unbalanced
 
bool m_bDirty
 

Detailed Description

Class: KPrGradient.

Encapsulates all gradient related functionality, to share it between KPr2DObject and KPrBackGround. KPrGradient stores the gradient parameters, and generate the gradient on demand, in pixmap().

Definition at line 39 of file KPrGradient.h.

Constructor & Destructor Documentation

◆ KPrGradient() [1/2]

KPrGradient::KPrGradient ( const TQColor &  _color1,
const TQColor &  _color2,
BCType  _bcType,
bool  _unbalanced,
int  _xfactor,
int  _yfactor 
)

Definition at line 26 of file KPrGradient.cpp.

◆ ~KPrGradient()

KPrGradient::~KPrGradient ( )
inline

Definition at line 44 of file KPrGradient.h.

◆ KPrGradient() [2/2]

KPrGradient::KPrGradient ( )
inlineprotected

Definition at line 84 of file KPrGradient.h.

Member Function Documentation

◆ addRef()

void KPrGradient::addRef ( )

Definition at line 47 of file KPrGradient.cpp.

◆ getBackColorType()

BCType KPrGradient::getBackColorType ( ) const
inline

Definition at line 48 of file KPrGradient.h.

◆ getColor1()

TQColor KPrGradient::getColor1 ( ) const
inline

Definition at line 46 of file KPrGradient.h.

◆ getColor2()

TQColor KPrGradient::getColor2 ( ) const
inline

Definition at line 47 of file KPrGradient.h.

◆ getUnbalanced()

bool KPrGradient::getUnbalanced ( ) const
inline

Definition at line 49 of file KPrGradient.h.

◆ getXFactor()

int KPrGradient::getXFactor ( ) const
inline

Definition at line 50 of file KPrGradient.h.

◆ getYFactor()

int KPrGradient::getYFactor ( ) const
inline

Definition at line 51 of file KPrGradient.h.

◆ paint()

void KPrGradient::paint ( )
protected

Create the pixmap containing the gradient.

Definition at line 57 of file KPrGradient.cpp.

◆ pixmap()

const TQPixmap & KPrGradient::pixmap ( ) const

Return the pixmap containing the gradient.

Calculated on demand if necessary (if m_bDirty is true).

Definition at line 130 of file KPrGradient.cpp.

◆ removeRef()

bool KPrGradient::removeRef ( )

Definition at line 52 of file KPrGradient.cpp.

◆ setBackColorType()

void KPrGradient::setBackColorType ( BCType  _type)
inline

Definition at line 55 of file KPrGradient.h.

◆ setColor1()

void KPrGradient::setColor1 ( const TQColor &  _color)
inline

Definition at line 53 of file KPrGradient.h.

◆ setColor2()

void KPrGradient::setColor2 ( const TQColor &  _color)
inline

Definition at line 54 of file KPrGradient.h.

◆ setParameters()

void KPrGradient::setParameters ( const TQColor &  c1,
const TQColor &  c2,
BCType  _type,
bool  _unbalanced,
int  xf,
int  yf 
)

Definition at line 36 of file KPrGradient.cpp.

◆ setSize()

void KPrGradient::setSize ( const TQSize &  _size)
inline

Definition at line 59 of file KPrGradient.h.

◆ setUnbalanced()

void KPrGradient::setUnbalanced ( bool  b)
inline

Definition at line 56 of file KPrGradient.h.

◆ setXFactor()

void KPrGradient::setXFactor ( int  i)
inline

Definition at line 57 of file KPrGradient.h.

◆ setYFactor()

void KPrGradient::setYFactor ( int  i)
inline

Definition at line 58 of file KPrGradient.h.

◆ size()

TQSize KPrGradient::size ( ) const
inline

Definition at line 75 of file KPrGradient.h.

Member Data Documentation

◆ bcType

BCType KPrGradient::bcType
protected

Definition at line 87 of file KPrGradient.h.

◆ color1

TQColor KPrGradient::color1
protected

Definition at line 86 of file KPrGradient.h.

◆ color2

TQColor KPrGradient::color2
protected

Definition at line 86 of file KPrGradient.h.

◆ m_bDirty

bool KPrGradient::m_bDirty
protected

Definition at line 93 of file KPrGradient.h.

◆ m_pixmap

KPixmap KPrGradient::m_pixmap
protected

Definition at line 89 of file KPrGradient.h.

◆ refCount

int KPrGradient::refCount
protected

Definition at line 90 of file KPrGradient.h.

◆ unbalanced

bool KPrGradient::unbalanced
protected

Definition at line 92 of file KPrGradient.h.

◆ xFactor

int KPrGradient::xFactor
protected

Definition at line 91 of file KPrGradient.h.

◆ yFactor

int KPrGradient::yFactor
protected

Definition at line 91 of file KPrGradient.h.


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