labplot  2.8.2
About: LabPlot is an application for plotting and analysis of 2D and 3D functions and data. It is a complete rewrite of LabPlot1 and lacks in the first release a lot of features available in the predecessor. On the other hand, the GUI and the usability is more superior.
  Fossies Dox: labplot-2.8.2.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

AbstractPlot.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : AbstractPlot.h
3  Project : LabPlot
4  Description : Base class for plots of different types
5  --------------------------------------------------------------------
6  Copyright : (C) 2009 Tilman Benkert (thzs@gmx.net)
7  Copyright : (C) 2011-2017 by Alexander Semke (alexander.semke@web.de)
8 
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  * This program is distributed in the hope that it will be useful, *
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
21  * GNU General Public License for more details. *
22  * *
23  * You should have received a copy of the GNU General Public License *
24  * along with this program; if not, write to the Free Software *
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
26  * Boston, MA 02110-1301 USA *
27  * *
28  ***************************************************************************/
29 
30 #ifndef ABSTRACTPLOT_H
31 #define ABSTRACTPLOT_H
32 
34 #include "backend/lib/macros.h"
35 
37 class PlotArea;
38 class TextLabel;
40 
42  Q_OBJECT
43 
44 public:
45  AbstractPlot(const QString &name, AspectType type);
46  ~AbstractPlot() override= default;
47 
48  void handleResize(double horizontalRatio, double verticalRatio, bool pageResize) override;
50  PlotArea* plotArea();
51  TextLabel* title();
52 
53  BASIC_D_ACCESSOR_DECL(float, horizontalPadding, HorizontalPadding)
54  BASIC_D_ACCESSOR_DECL(float, verticalPadding, VerticalPadding)
55  BASIC_D_ACCESSOR_DECL(double, rightPadding, RightPadding)
56  BASIC_D_ACCESSOR_DECL(double, bottomPadding, BottomPadding)
57  BASIC_D_ACCESSOR_DECL(bool, symmetricPadding, SymmetricPadding)
58 
60 
61 protected:
62  AbstractPlot(const QString&, AbstractPlotPrivate*, AspectType);
64  PlotArea* m_plotArea{nullptr};
65  TextLabel* m_title{nullptr};
66 
67 private:
68  void init();
69  Q_DECLARE_PRIVATE(AbstractPlot)
70 };
71 
72 #endif
AspectType
AspectType type() const
QString name() const
Base class of all worksheet coordinate systems.
Second level container in a Worksheet for logical grouping.
Definition: AbstractPlot.h:41
~AbstractPlot() override=default
TextLabel * title()
PlotArea * plotArea()
PlotArea * m_plotArea
Definition: AbstractPlot.h:64
AbstractCoordinateSystem * coordinateSystem() const
AbstractCoordinateSystem * m_coordinateSystem
Definition: AbstractPlot.h:63
AbstractPlot(const QString &name, AspectType type)
TextLabel * m_title
Definition: AbstractPlot.h:65
void handleResize(double horizontalRatio, double verticalRatio, bool pageResize) override
Plot area (for background filling and clipping).
Definition: PlotArea.h:38
A label supporting rendering of html- and tex-formatted texts.
Definition: TextLabel.h:44
Worksheet element container - parent of multiple elements This class provides the functionality for a...
#define BASIC_D_ACCESSOR_DECL(type, method, Method)
Definition: macros.h:107