File indexing completed on 2024-05-12 04:20:33
0001 /* 0002 * SPDX-FileCopyrightText: 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved. 0003 * 0004 * This file is part of the KD Chart library. 0005 * 0006 * SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 #ifndef KCHARTFRAMEATTRIBUTES_H 0010 #define KCHARTFRAMEATTRIBUTES_H 0011 0012 #include <QDebug> 0013 #include <QMetaType> 0014 #include <QPen> 0015 #include "KChartGlobal.h" 0016 0017 namespace KChart { 0018 0019 /** 0020 * @brief A set of attributes for frames around items 0021 */ 0022 class KCHART_EXPORT FrameAttributes 0023 { 0024 public: 0025 FrameAttributes(); 0026 FrameAttributes( const FrameAttributes& ); 0027 FrameAttributes &operator= ( const FrameAttributes& ); 0028 0029 ~FrameAttributes(); 0030 0031 void setVisible( bool visible ); 0032 bool isVisible() const; 0033 0034 void setPen( const QPen & pen ); 0035 QPen pen() const; 0036 0037 void setCornerRadius( qreal radius ); 0038 qreal cornerRadius() const; 0039 0040 void setPadding( int padding ); 0041 int padding() const; 0042 0043 bool operator==( const FrameAttributes& ) const; 0044 inline bool operator!=( const FrameAttributes& other ) const { return !operator==(other); } 0045 0046 private: 0047 0048 KCHART_DECLARE_PRIVATE_BASE_VALUE( FrameAttributes ) 0049 }; // End of class FrameAttributes 0050 0051 } 0052 0053 #if !defined(QT_NO_DEBUG_STREAM) 0054 KCHART_EXPORT QDebug operator<<(QDebug, const KChart::FrameAttributes& ); 0055 #endif /* QT_NO_DEBUG_STREAM */ 0056 0057 KCHART_DECLARE_SWAP_SPECIALISATION( KChart::FrameAttributes ) 0058 0059 QT_BEGIN_NAMESPACE 0060 Q_DECLARE_TYPEINFO( KChart::FrameAttributes, Q_MOVABLE_TYPE ); 0061 QT_END_NAMESPACE 0062 0063 Q_DECLARE_METATYPE( KChart::FrameAttributes ) 0064 0065 #endif // KCHARTFRAMEATTRIBUTES_H