KD Chart 2  [rev.2.5]
KDChartDataValueAttributes.h
Go to the documentation of this file.
00001 /****************************************************************************
00002 ** Copyright (C) 2001-2012 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.txt 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 KDCHARTDATAVALUEATTRIBUTES_H
00024 #define KDCHARTDATAVALUEATTRIBUTES_H
00025 
00026 #include <Qt>
00027 #include <QMetaType>
00028 #include "KDChartGlobal.h"
00029 #include "KDChartEnums.h"
00030 #include "KDChartRelativePosition.h"
00031 
00039 namespace KDChart {
00040 
00041   class TextAttributes;
00042   class BackgroundAttributes;
00043   class FrameAttributes;
00044   class MarkerAttributes;
00045 
00055 class KDCHART_EXPORT DataValueAttributes
00056 {
00057 public:
00058   DataValueAttributes();
00059   DataValueAttributes( const DataValueAttributes& );
00060   DataValueAttributes &operator= ( const DataValueAttributes& );
00061   bool operator==( const DataValueAttributes& ) const;
00062   inline bool operator!=( const DataValueAttributes& other ) const { return !operator==(other); }
00063 
00064   ~DataValueAttributes();
00065 
00066   static const DataValueAttributes& defaultAttributes();
00067   static const QVariant& defaultAttributesAsVariant();
00068 
00072   void setVisible( bool visible );
00073 
00077   bool isVisible() const;
00078 
00084   void setTextAttributes( const TextAttributes &a );
00085 
00089   TextAttributes textAttributes() const;
00090 
00097   bool mirrorNegativeValueTextRotation() const;
00098 
00102   void setMirrorNegativeValueTextRotation( bool enable );
00103 
00109   void setFrameAttributes( const FrameAttributes &a );
00110 
00116   FrameAttributes frameAttributes() const;
00117 
00123   void setBackgroundAttributes( const BackgroundAttributes &a );
00124 
00130   BackgroundAttributes backgroundAttributes() const;
00131 
00138   void setMarkerAttributes( const MarkerAttributes &a );
00139 
00145   MarkerAttributes markerAttributes() const;
00146 
00156   void setUsePercentage( bool enable );
00157 
00162   bool usePercentage() const;
00163 
00169   void setDecimalDigits( int digits );
00170 
00174   int decimalDigits() const;
00175 
00180   void setPrefix( const QString prefix );
00181 
00186   QString prefix() const;
00187 
00192   void setSuffix( const QString suffix );
00193 
00198   QString suffix() const;
00199 
00205   void setDataLabel( const QString label );
00206 
00211   QString dataLabel() const;
00212 
00216   bool showRepetitiveDataLabels() const;
00217 
00223   void setShowRepetitiveDataLabels( bool showRepetitiveDataLabels );
00224 
00228   bool showOverlappingDataLabels() const;
00229 
00235   void setShowOverlappingDataLabels( bool showOverlappingDataLabels );
00236 
00244   void setPowerOfTenDivisor( int powerOfTenDivisor );
00245   int powerOfTenDivisor() const;
00257   void setShowInfinite( bool infinite );
00258   bool showInfinite() const;
00275   void setNegativePosition( const RelativePosition& relPosition );
00276 
00281   const RelativePosition negativePosition() const;
00282 
00295   void setPositivePosition( const RelativePosition& relPosition );
00296 
00301   const RelativePosition positivePosition() const;
00302 
00303   const RelativePosition position( bool positive ) const
00304   {
00305     return positive ? positivePosition() : negativePosition();
00306   }
00307 
00308 private:
00309   KDCHART_DECLARE_PRIVATE_BASE_VALUE( DataValueAttributes )
00310 
00311 }; // End of class DataValueAttributes
00312 
00313 }
00314 
00315 #if !defined(QT_NO_DEBUG_STREAM)
00316 KDCHART_EXPORT QDebug operator<<(QDebug, const KDChart::DataValueAttributes& );
00317 #endif /* QT_NO_DEBUG_STREAM */
00318 
00319 KDCHART_DECLARE_SWAP_SPECIALISATION( KDChart::DataValueAttributes )
00320 
00321 QT_BEGIN_NAMESPACE
00322 Q_DECLARE_TYPEINFO( KDChart::DataValueAttributes, Q_MOVABLE_TYPE );
00323 QT_END_NAMESPACE
00324 
00325 Q_DECLARE_METATYPE( KDChart::DataValueAttributes )
00326 
00327 #endif // KDCHARTDATAVALUEATTRIBUTES_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines

Klarälvdalens Datakonsult AB (KDAB)
Qt-related services and products
http://www.kdab.com/
http://www.kdab.com/products/kd-chart/