1 /*
2  * Copyright (C) 2001-2015 Klaralvdalens Datakonsult AB.  All rights reserved.
3  *
4  * This file is part of the KD Chart library.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef KCHARTABSTRACTAREAWIDGET_P_H
21 #define KCHARTABSTRACTAREAWIDGET_P_H
22 
23 //
24 //  W A R N I N G
25 //  -------------
26 //
27 // This file is not part of the KD Chart API.  It exists purely as an
28 // implementation detail.  This header file may change from version to
29 // version without notice, or even be removed.
30 //
31 // We mean it.
32 //
33 
34 /** \file KChartAbstractAreaWidget_p.h
35  *  \internal
36  */
37 
38 #include "KChartAbstractAreaWidget.h"
39 #include "KChartAbstractAreaBase_p.h"
40 
41 #include "KChartMath_p.h"
42 
43 
44 namespace KChart {
45 
46 /**
47  * \internal
48  */
49 class Q_DECL_HIDDEN AbstractAreaWidget::Private : public AbstractAreaBase::Private
50 {
51     friend class AbstractAreaWidget;
52 public:
53     explicit Private();
54     virtual ~Private();
55 
Private(const Private & rhs)56     Private( const Private& rhs ) :
57         AbstractAreaBase::Private( rhs ),
58         currentLayoutSize()
59         {
60             // Just for consistency
61         }
62 
63     QSize currentLayoutSize;
64 
65     // non-virtual method, calling widget->resizeLayout( size )
66     void resizeLayout( AbstractAreaWidget* widget, const QSize& sz );
67 };
68 
69 
AbstractAreaWidget(AbstractAreaWidget::Private * p,QWidget * parent)70 inline AbstractAreaWidget::AbstractAreaWidget( AbstractAreaWidget::Private * p, QWidget* parent )
71   : QWidget( parent ), AbstractAreaBase( p )
72 {
73     init();
74 }
d_func()75 inline AbstractAreaWidget::Private * AbstractAreaWidget::d_func()
76 {
77     return static_cast<Private*>( AbstractAreaBase::d_func() );
78 }
d_func()79 inline const AbstractAreaWidget::Private * AbstractAreaWidget::d_func() const
80 {
81     return static_cast<const Private*>( AbstractAreaBase::d_func() );
82 }
83 
84 
85 }
86 
87 #endif /* KCHARTABSTRACTAREAWIDGET_P_H */
88