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 
00189   bool showRepetitiveDataLabels() const;
00190 
00196   void setShowRepetitiveDataLabels( bool showRepetitiveDataLabels );
00197 
00201   bool showOverlappingDataLabels() const;
00202 
00208   void setShowOverlappingDataLabels( bool showOverlappingDataLabels );
00209 
00216   void setPowerOfTenDivisor( int powerOfTenDivisor );
00217   int powerOfTenDivisor() const;
00229   void setShowInfinite( bool infinite );
00230   bool showInfinite() const;
00244   void setNegativePosition( const RelativePosition& relPosition );
00245 
00250   const RelativePosition negativePosition() const;
00251 
00261   void setPositivePosition( const RelativePosition& relPosition );
00262 
00267   const RelativePosition positivePosition() const;
00268 
00269   const RelativePosition position( bool positive ) const
00270   {
00271     return positive ? positivePosition() : negativePosition();
00272   }
00273 
00274 private:
00275   KDCHART_DECLARE_PRIVATE_BASE_VALUE( DataValueAttributes )
00276 
00277 }; // End of class DataValueAttributes
00278 
00279 }
00280 
00281 #if !defined(QT_NO_DEBUG_STREAM)
00282 KDCHART_EXPORT QDebug operator<<(QDebug, const KDChart::DataValueAttributes& );
00283 #endif /* QT_NO_DEBUG_STREAM */
00284 
00285 Q_DECLARE_METATYPE( KDChart::DataValueAttributes )
00286 Q_DECLARE_TYPEINFO( KDChart::DataValueAttributes, Q_MOVABLE_TYPE );
00287 KDCHART_DECLARE_SWAP_SPECIALISATION( KDChart::DataValueAttributes )
00288 
00289 #endif // KDCHARTDATAVALUEATTRIBUTES_H

Generated on Thu Mar 4 23:19:11 2010 for KD Chart 2 by  doxygen 1.5.4