KD Chart 2: KDChartChart.cpp File Reference

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# KDChartChart.cpp File Reference

`#include <QList>`
`#include <QtDebug>`
`#include <QGridLayout>`
`#include <QLabel>`
`#include <QHash>`
`#include <QPainter>`
`#include <QPaintEvent>`
`#include <QLayoutItem>`
`#include <QPushButton>`
`#include <QApplication>`
`#include <QEvent>`
`#include "KDChartChart.h"`
`#include "KDChartChart_p.h"`
`#include "KDChartCartesianCoordinatePlane.h"`
`#include "KDChartAbstractCartesianDiagram.h"`
`#include "KDChartHeaderFooter.h"`
`#include "KDChartEnums.h"`
`#include "KDChartLegend.h"`
`#include "KDChartLayoutItems.h"`
`#include <KDChartTextAttributes.h>`
`#include <KDChartMarkerAttributes>`
`#include "KDChartPainterSaver_p.h"`
`#include <KDABLibFakes>`

Include dependency graph for KDChartChart.cpp:

Go to the source code of this file.

## Defines
#define | ADD_AUTO_SPACER_IF_NEEDED(spacerRow, spacerColumn, hLayoutIsAtTop, hLayout, vLayoutIsAtLeft, vLayout)
#define | ADD_VBOX_WITH_LEGENDS(row, column, align)
#define | d d_func()
#define | SET_ALL_MARGINS_TO_ZERO
## Functions
QHBoxLayout * | findOrCreateHBoxLayoutByObjectName (QLayout *parentLayout, const char *name)
template<typename T> T * | findOrCreateLayoutByObjectName (QLayout *parentLayout, const char *name)
QVBoxLayout * | findOrCreateVBoxLayoutByObjectName (QLayout *parentLayout, const char *name)

## Define Documentation

#define ADD_AUTO_SPACER_IF_NEEDED | ( | spacerRow,
|  | spacerColumn,
|  | hLayoutIsAtTop,
|  | hLayout,
|  | vLayoutIsAtLeft,
|  | vLayout |  | ) |

| Value:
    { \
        if( hLayout || vLayout ) { \
            AutoSpacerLayoutItem * spacer \
                    = new AutoSpacerLayoutItem( hLayoutIsAtTop, hLayout, vLayoutIsAtLeft, vLayout ); \
            planeLayout->addItem( spacer, spacerRow, spacerColumn, 1, 1 ); \
            spacer->setParentLayout( planeLayout ); \
            planeLayoutItems << spacer; \
        } \
    }

#define ADD_VBOX_WITH_LEGENDS | ( | row,
|  | column,
|  | align |  | ) |

| Value:
    { \
        QVBoxLayout* innerLayout = new QVBoxLayout(); \
        for (int i = 0; i < count; ++i) { \
            legend = list.at(i); \
            if( legend->alignment() == ( align ) ) \
                innerLayout->addItem( new MyWidgetItem(legend, Qt::AlignLeft) ); \
        } \
        gridLayout->addLayout( innerLayout, row, column, ( align  ) ); \
    }

#define d d_func()

| Definition at line 803 of file KDChartChart.cpp.

#define SET_ALL_MARGINS_TO_ZERO

| Definition at line 57 of file KDChartChart.cpp.

## Function Documentation

QHBoxLayout* findOrCreateHBoxLayoutByObjectName | ( | QLayout * | parentLayout,
|  | const char * | name
| ) | `[static]`

| Definition at line 444 of file KDChartChart.cpp.
    00445 {
    00446     return findOrCreateLayoutByObjectName<QHBoxLayout>( parentLayout, name );
    00447 }

template<typename T>
T* findOrCreateLayoutByObjectName | ( | QLayout * | parentLayout,
|  | const char * | name
| ) | `[static]`

| Definition at line 424 of file KDChartChart.cpp.
    00425 {
    00426     T *box = qFindChild<T*>( parentLayout, QString::fromLatin1( name ) );
    00427     if ( !box ) {
    00428         box = new T();
    00429         // TESTING(khz): set the margin of all of the layouts to Zero
    00430 #if defined SET_ALL_MARGINS_TO_ZERO
    00431         box->setMargin(0);
    00432 #endif
    00433         box->setObjectName( QString::fromLatin1( name ) );
    00434         box->setSizeConstraint( QLayout::SetFixedSize );
    00435     }
    00436     return box;
    00437 }

QVBoxLayout* findOrCreateVBoxLayoutByObjectName | ( | QLayout * | parentLayout,
|  | const char * | name
| ) | `[static]`

| Definition at line 439 of file KDChartChart.cpp.
    00440 {
    00441     return findOrCreateLayoutByObjectName<QVBoxLayout>( parentLayout, name );
    00442 }