KDChartDataValueAttributes.h

Go to the documentation of this file.
00001 /****************************************************************************
00002  ** Copyright (C) 2005-2007 Klaralvdalens Datakonsult AB.  All rights reserved.
00003  **
00004  ** This file is part of the KD Chart library.
00005  **
00006  ** This file may be distributed and/or modified under the terms of the
00007  ** GNU General Public License version 2 as published by the Free Software
00008  ** Foundation and appearing in the file LICENSE.GPL included in the
00009  ** packaging of this file.
00010  **
00011  ** Licensees holding valid commercial KD Chart licenses may use this file in
00012  ** accordance with the KD Chart Commercial License Agreement provided with
00013  ** the Software.
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  ** See http://www.kdab.net/kdchart for
00019  **   information about KD Chart Commercial License Agreements.
00020  **
00021  ** Contact info@kdab.net if any conditions of this
00022  ** licensing are not clear to you.
00023  **
00024  **********************************************************************/
00025 
00026 #ifndef KDCHARTDATAVALUEATTRIBUTES_H
00027 #define KDCHARTDATAVALUEATTRIBUTES_H
00028 
00029 #include <Qt>
00030 #include <QMetaType>
00031 #include "KDChartGlobal.h"
00032 #include "KDChartEnums.h"
00033 #include "KDChartRelativePosition.h"
00034 
00042 namespace KDChart {
00043 
00044   class TextAttributes;
00045   class BackgroundAttributes;
00046   class FrameAttributes;
00047   class MarkerAttributes;
00048 
00058 class KDCHART_EXPORT DataValueAttributes
00059 {
00060 public:
00061   DataValueAttributes();
00062   DataValueAttributes( const DataValueAttributes& );
00063   DataValueAttributes &operator= ( const DataValueAttributes& );
00064   bool operator==( const DataValueAttributes& ) const;
00065   inline bool operator!=( const DataValueAttributes& other ) const { return !operator==(other); }
00066 
00067   ~DataValueAttributes();
00068 
00069   static const DataValueAttributes& defaultAttributes();
00070   static const QVariant& defaultAttributesAsVariant();
00071 
00075   void setVisible( bool visible );
00076 
00080   bool isVisible() const;
00081 
00087   void setTextAttributes( const TextAttributes &a );
00088 
00092   TextAttributes textAttributes() const;
00093 
00099   void setFrameAttributes( const FrameAttributes &a );
00100 
00106   FrameAttributes frameAttributes() const;
00107 
00113   void setBackgroundAttributes( const BackgroundAttributes &a );
00114 
00120   BackgroundAttributes backgroundAttributes() const;
00121 
00128   void setMarkerAttributes( const MarkerAttributes &a );
00129 
00135   MarkerAttributes markerAttributes() const;
00136 
00142   void setDecimalDigits( int digits );
00143 
00147   int decimalDigits() const;
00148 
00153   void setPrefix( const QString prefix );
00154 
00159   QString prefix() const;
00160 
00165   void setSuffix( const QString suffix );
00166 
00171   QString suffix() const;
00172 
00178   void setDataLabel( const QString label );
00179 
00184   QString dataLabel() const;
00185 
00191   bool showRepetitiveDataLabels() const;
00192 
00198   void setShowRepetitiveDataLabels( bool showRepetitiveDataLabels );
00199 
00206   void setPowerOfTenDivisor( int powerOfTenDivisor );
00207   int powerOfTenDivisor() const;
00219   void setShowInfinite( bool infinite );
00220   bool showInfinite() const;
00234   void setNegativePosition( const RelativePosition& relPosition );
00235 
00240   const RelativePosition negativePosition() const;
00241 
00251   void setPositivePosition( const RelativePosition& relPosition );
00252 
00257   const RelativePosition positivePosition() const;
00258 
00259   const RelativePosition position( bool positive ) const
00260   {
00261     return positive ? positivePosition() : negativePosition();
00262   }
00263 
00264 private:
00265   KDCHART_DECLARE_PRIVATE_BASE_VALUE( DataValueAttributes )
00266 
00267 }; // End of class DataValueAttributes
00268 
00269 }
00270 
00271 #if !defined(QT_NO_DEBUG_STREAM)
00272 KDCHART_EXPORT QDebug operator<<(QDebug, const KDChart::DataValueAttributes& );
00273 #endif /* QT_NO_DEBUG_STREAM */
00274 
00275 Q_DECLARE_METATYPE( KDChart::DataValueAttributes )
00276 Q_DECLARE_TYPEINFO( KDChart::DataValueAttributes, Q_MOVABLE_TYPE );
00277 KDCHART_DECLARE_SWAP_SPECIALISATION( KDChart::DataValueAttributes )
00278 
00279 #endif // KDCHARTDATAVALUEATTRIBUTES_H

Generated on Mon Sep 17 16:16:50 2007 for KD Chart 2 by  doxygen 1.5.1