KDChart::BackgroundAttributes Class Reference

#include <KDChartBackgroundAttributes.h>

List of all members.


Detailed Description

Set of attributes usable for background pixmaps.

Definition at line 43 of file KDChartBackgroundAttributes.h.


Public Types

enum  BackgroundPixmapMode {
  BackgroundPixmapModeNone,
  BackgroundPixmapModeCentered,
  BackgroundPixmapModeScaled,
  BackgroundPixmapModeStretched
}

Public Member Functions

 BackgroundAttributes (const BackgroundAttributes &)
 BackgroundAttributes ()
QBrush brush () const
bool isEqualTo (const BackgroundAttributes &other, bool ignorePixmap=false) const
bool isVisible () const
bool operator!= (const BackgroundAttributes &other) const
BackgroundAttributesoperator= (const BackgroundAttributes &)
bool operator== (const BackgroundAttributes &) const
QPixmap pixmap () const
BackgroundPixmapMode pixmapMode () const
void setBrush (const QBrush &brush)
void setPixmap (const QPixmap &backPixmap)
void setPixmapMode (BackgroundPixmapMode mode)
void setVisible (bool visible)
 ~BackgroundAttributes ()

Member Enumeration Documentation

enum KDChart::BackgroundAttributes::BackgroundPixmapMode

Enumerator:
BackgroundPixmapModeNone 
BackgroundPixmapModeCentered 
BackgroundPixmapModeScaled 
BackgroundPixmapModeStretched 

Definition at line 52 of file KDChartBackgroundAttributes.h.


Constructor & Destructor Documentation

BackgroundAttributes::BackgroundAttributes (  ) 

Definition at line 55 of file KDChartBackgroundAttributes.cpp.

00056     : _d( new Private() )
00057 {
00058 }

BackgroundAttributes::BackgroundAttributes ( const BackgroundAttributes r  ) 

Definition at line 60 of file KDChartBackgroundAttributes.cpp.

00061     : _d( new Private( *r.d ) )
00062 {
00063 }

BackgroundAttributes::~BackgroundAttributes (  ) 

Definition at line 100 of file KDChartBackgroundAttributes.cpp.

00101 {
00102     delete _d; _d = 0;
00103 }


Member Function Documentation

QBrush BackgroundAttributes::brush (  )  const

Definition at line 124 of file KDChartBackgroundAttributes.cpp.

References d.

Referenced by isEqualTo(), operator<<(), and KDChart::AbstractAreaBase::paintBackgroundAttributes().

00125 {
00126     return d->brush;
00127 }

bool BackgroundAttributes::isEqualTo ( const BackgroundAttributes other,
bool  ignorePixmap = false 
) const

Definition at line 81 of file KDChartBackgroundAttributes.cpp.

References brush(), isVisible(), pixmap(), and pixmapMode().

Referenced by operator==().

00083 {
00084     /*
00085     qDebug() << "BackgroundAttributes::operator==";
00086     qDebug() << "isVisible" << (isVisible() == other.isVisible());
00087     qDebug() << "brush"     << (brush() == other.brush());
00088     qDebug() << "pixmapMode"<< (pixmapMode() == other.pixmapMode());
00089     qDebug() << "pixmap"    << (pixmap().serialNumber() == other.pixmap().serialNumber());
00090     */
00091     return (
00092             isVisible()  == other.isVisible() &&
00093             brush()      == other.brush() &&
00094             pixmapMode() == other.pixmapMode() &&
00095             (ignorePixmap ||
00096             pixmap().serialNumber() == other.pixmap().serialNumber()) );
00097 }

bool BackgroundAttributes::isVisible (  )  const

Definition at line 114 of file KDChartBackgroundAttributes.cpp.

References d.

Referenced by isEqualTo(), operator<<(), and KDChart::AbstractAreaBase::paintBackgroundAttributes().

00115 {
00116     return d->visible;
00117 }

bool KDChart::BackgroundAttributes::operator!= ( const BackgroundAttributes other  )  const

Definition at line 70 of file KDChartBackgroundAttributes.h.

References KDGantt::operator==().

00070 { return !operator==(other); }

BackgroundAttributes & BackgroundAttributes::operator= ( const BackgroundAttributes r  ) 

Definition at line 65 of file KDChartBackgroundAttributes.cpp.

References d.

00066 {
00067     if( this == &r )
00068         return *this;
00069 
00070     *d = *r.d;
00071 
00072     return *this;
00073 }

bool BackgroundAttributes::operator== ( const BackgroundAttributes r  )  const

Definition at line 75 of file KDChartBackgroundAttributes.cpp.

References isEqualTo().

00076 {
00077     return isEqualTo( r );
00078 }

QPixmap BackgroundAttributes::pixmap (  )  const

Definition at line 144 of file KDChartBackgroundAttributes.cpp.

References d.

Referenced by isEqualTo(), operator<<(), and KDChart::AbstractAreaBase::paintBackgroundAttributes().

00145 {
00146     return d->pixmap;
00147 }

BackgroundAttributes::BackgroundPixmapMode BackgroundAttributes::pixmapMode (  )  const

Definition at line 134 of file KDChartBackgroundAttributes.cpp.

References d.

Referenced by isEqualTo(), operator<<(), and KDChart::AbstractAreaBase::paintBackgroundAttributes().

00135 {
00136     return d->pixmapMode;
00137 }

void BackgroundAttributes::setBrush ( const QBrush &  brush  ) 

Definition at line 119 of file KDChartBackgroundAttributes.cpp.

References d.

00120 {
00121     d->brush = brush;
00122 }

void BackgroundAttributes::setPixmap ( const QPixmap &  backPixmap  ) 

Definition at line 139 of file KDChartBackgroundAttributes.cpp.

References d.

00140 {
00141     d->pixmap = backPixmap;
00142 }

void BackgroundAttributes::setPixmapMode ( BackgroundPixmapMode  mode  ) 

Definition at line 129 of file KDChartBackgroundAttributes.cpp.

References d.

00130 {
00131     d->pixmapMode = mode;
00132 }

void BackgroundAttributes::setVisible ( bool  visible  ) 

Definition at line 108 of file KDChartBackgroundAttributes.cpp.

References d.

00109 {
00110     d->visible = visible;
00111 }


The documentation for this class was generated from the following files:
Generated on Thu Mar 4 23:25:39 2010 for KD Chart 2 by  doxygen 1.5.4