KDChartLeveyJenningsAxis.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 ** Copyright (C) 2001-2010 Klaralvdalens Datakonsult AB.  All rights reserved.
00003 **
00004 ** This file is part of the KD Chart library.
00005 **
00006 ** Licensees holding valid commercial KD Chart licenses may use this file in
00007 ** accordance with the KD Chart Commercial License Agreement provided with
00008 ** the Software.
00009 **
00010 **
00011 ** This file may be distributed and/or modified under the terms of the
00012 ** GNU General Public License version 2 and version 3 as published by the
00013 ** Free Software Foundation and appearing in the file LICENSE.GPL included.
00014 **
00015 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00016 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00017 **
00018 ** Contact info@kdab.com if any conditions of this licensing are not
00019 ** clear to you.
00020 **
00021 **********************************************************************/
00022 
00023 #ifndef KDCHARTLEVEYJENNINGSAXIS_H
00024 #define KDCHARTLEVEYJENNINGSAXIS_H
00025 
00026 #include <QList>
00027 
00028 #include "../KDChartCartesianAxis.h"
00029 
00030 #include "KDChartLeveyJenningsGridAttributes.h"
00031 
00032 namespace KDChart {
00033 
00034     class LeveyJenningsDiagram;
00035 
00044     class KDCHART_EXPORT LeveyJenningsAxis : public CartesianAxis
00045     {
00046         Q_OBJECT
00047 
00048         Q_DISABLE_COPY( LeveyJenningsAxis )
00049         KDCHART_DECLARE_PRIVATE_DERIVED_PARENT( LeveyJenningsAxis, AbstractDiagram* )
00050 
00051     public:
00062         explicit LeveyJenningsAxis ( LeveyJenningsDiagram* diagram = 0 );
00063         ~LeveyJenningsAxis();
00064 
00065         LeveyJenningsGridAttributes::GridType type() const;
00066         void setType( LeveyJenningsGridAttributes::GridType type );
00067 
00068         Qt::DateFormat dateFormat() const;
00069         void setDateFormat( Qt::DateFormat format );
00070 
00074         bool compare( const LeveyJenningsAxis* other ) const;
00075 
00077         void paintCtx( PaintContext* );
00078 
00079     protected:
00080         virtual void paintAsOrdinate( PaintContext* );
00081 
00082         virtual void paintAsAbscissa( PaintContext* );
00083     };
00084 
00085     typedef QList<LeveyJenningsAxis*> LeveyJenningsAxisList;
00086 }
00087 
00088 #endif