24 #include "KDChartAbstractAxis_p.h"
30 #include <KDABLibFakes>
32 using namespace KDChart;
45 AbstractAxis::Private::~Private()
51 bool AbstractAxis::Private::setDiagram(
62 ((diagram == mDiagram) || secondaryDiagrams.contains( diagram )) )
65 bool bNewDiagramStored =
false;
71 const bool con = connect( observer, SIGNAL( diagramDataChanged(
AbstractDiagram *) ),
72 mAxis, SIGNAL( coordinateSystemChanged() ) );
75 bNewDiagramStored = true;
81 secondaryDiagrams.enqueue( diagram );
83 return bNewDiagramStored;
88 if ( diagram == mDiagram ) {
93 secondaryDiagrams.removeAll( diagram );
95 if ( !secondaryDiagrams.isEmpty() ) {
97 setDiagram( nextDiagram );
101 bool AbstractAxis::Private::hasDiagram(
AbstractDiagram* diagram )
const
103 return diagram == mDiagram || secondaryDiagrams.contains( diagram );
116 d->secondaryDiagrams.clear();
120 void AbstractAxis::init()
123 d->textAttributes.setFontSize( m );
126 d->textAttributes.setMinimalFontSize( m );
136 d->setDiagram( 0,
true );
141 if ( other ==
this ) {
148 return ( static_cast<const AbstractAreaBase*>(
this)->
compare( other ) ) &&
163 d->setDiagram( diagram );
168 d->unsetDiagram( diagram );
174 const bool con = connect(
d->observer, SIGNAL( diagramDataChanged(
AbstractDiagram *) ),
183 if (
d->textAttributes == a )
186 d->textAttributes = a;
192 return d->textAttributes;
198 d->rulerAttributes = a;
204 return d->rulerAttributes;
209 if (
d->hardLabels == list )
212 d->hardLabels = list;
218 return d->hardLabels;
223 if (
d->hardShortLabels == list )
226 d->hardShortLabels = list;
232 return d->hardShortLabels;
238 return d->diagram()->coordinatePlane();
249 return d->hasDiagram( diagram );
255 d->diagram()->update();