KD Chart 2: KDChartCartesianAxis.h Source File

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- File List
- File Members

# KDChartCartesianAxis.h

Go to the documentation of this file.

    00001 /* -*- Mode: C++ -*-
    00002    KDChart - a multi-platform charting engine
    00003 */
    00004
    00005 /****************************************************************************
    00006  ** Copyright (C) 2005-2007 Klarälvdalens Datakonsult AB.  All rights reserved.
    00007  **
    00008  ** This file is part of the KD Chart library.
    00009  **
    00010  ** This file may be distributed and/or modified under the terms of the
    00011  ** GNU General Public License version 2 as published by the Free Software
    00012  ** Foundation and appearing in the file LICENSE.GPL included in the
    00013  ** packaging of this file.
    00014  **
    00015  ** Licensees holding valid commercial KD Chart licenses may use this file in
    00016  ** accordance with the KD Chart Commercial License Agreement provided with
    00017  ** the Software.
    00018  **
    00019  ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
    00020  ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
    00021  **
    00022  ** See http://www.kdab.net/kdchart for
    00023  **   information about KD Chart Commercial License Agreements.
    00024  **
    00025  ** Contact info@kdab.net if any conditions of this
    00026  ** licensing are not clear to you.
    00027  **
    00028  **********************************************************************/
    00029 #ifndef KDCHARTCARTESIANAXIS_H
    00030 #define KDCHARTCARTESIANAXIS_H
    00031
    00032 #include <QList>
    00033
    00034 #include "KDChartAbstractAxis.h"
    00035
    00036 namespace KDChart {
    00037
    00038     class AbstractCartesianDiagram;
    00039
    00048     class KDCHART_EXPORT CartesianAxis : public AbstractAxis
    00049     {
    00050         Q_OBJECT
    00051
    00052         Q_DISABLE_COPY( CartesianAxis )
    00053         KDCHART_DECLARE_PRIVATE_DERIVED_PARENT( CartesianAxis, AbstractDiagram* )
    00054
    00055     public:
    00056         enum Position {
    00057             Bottom,
    00058             Top,
    00059             Right,
    00060             Left
    00061         };
    00062
    00073         explicit CartesianAxis ( AbstractCartesianDiagram* diagram = 0 );
    00074         ~CartesianAxis();
    00075
    00079         bool compare( const CartesianAxis* other )const;
    00080
    00082         virtual void paint( QPainter* );
    00084         virtual void paintCtx( PaintContext* );
    00085
    00086         void setTitleText( const QString& text );
    00087         QString titleText() const;
    00088
    00089         void setTitleTextAttributes( const TextAttributes &a );
    00097         TextAttributes titleTextAttributes() const;
    00104         void resetTitleTextAttributes();
    00105         bool hasDefaultTitleTextAttributes() const;
    00106
    00107         virtual void setPosition ( Position p );
    00108         virtual const Position position () const;
    00109
    00110         virtual void layoutPlanes();
    00111
    00112         virtual bool isAbscissa() const;
    00113         virtual bool isOrdinate() const;
    00114
    00115
    00116
    00118         virtual bool isEmpty() const;
    00120         virtual Qt::Orientations expandingDirections() const;
    00122         virtual QSize maximumSize() const;
    00124         virtual QSize minimumSize() const;
    00126         virtual QSize sizeHint() const;
    00128         virtual void setGeometry( const QRect& r );
    00130         virtual QRect geometry() const;
    00131
    00132         int tickLength( bool subUnitTicks = false ) const;
    00133     };
    00134
    00135     typedef QList<CartesianAxis*> CartesianAxisList;
    00136 }
    00137
    00138 #endif