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)  

WorksheetElementContainer.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : WorksheetElementContainer.h
3  Project : LabPlot
4  Description : Worksheet element container - parent of multiple elements.
5  --------------------------------------------------------------------
6  Copyright : (C) 2009 Tilman Benkert (thzs@gmx.net)
7  Copyright : (C) 2012-2017 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 WORKSHEETELEMENTCONTAINER_H
31 #define WORKSHEETELEMENTCONTAINER_H
32 
34 
36 
38  Q_OBJECT
39 
40 public:
41  WorksheetElementContainer(const QString&, AspectType);
43 
44  QGraphicsItem* graphicsItem() const override;
45 
46  void setVisible(bool) override;
47  bool isVisible() const override;
48  bool isFullyVisible() const override;
49  void setPrinting(bool) override;
50 
51  QRectF rect() const;
52  virtual void setRect(const QRectF&) = 0;
53  virtual void prepareGeometryChange();
54  void handleResize(double horizontalRatio, double verticalRatio, bool pageResize = false) override;
55 
57 
58 public slots:
59  void retransform() override;
60  void childHovered();
61  void childUnhovered();
62 
63 protected:
66 
67 protected slots:
68  virtual void handleAspectAdded(const AbstractAspect*);
69 
70 private:
71  Q_DECLARE_PRIVATE(WorksheetElementContainer)
72 
73 signals:
75  void visibleChanged(bool);
76 };
77 
78 #endif
AspectType
Base class of all persistent objects in a Project.
Worksheet element container - parent of multiple elements This class provides the functionality for a...
virtual void handleAspectAdded(const AbstractAspect *)
WorksheetElementContainerPrivate *const d_ptr
WorksheetElementContainerPrivate Private
bool isVisible() const override
Return whether the element is (at least) partially visible.
void handleResize(double horizontalRatio, double verticalRatio, bool pageResize=false) override
WorksheetElementContainer(const QString &, AspectType)
void setPrinting(bool) override
Switches the printing mode on/off.
bool isFullyVisible() const override
Return whether the element is fully visible (i.e., including all child elements).
~WorksheetElementContainer() override
virtual void setRect(const QRectF &)=0
void setVisible(bool) override
Show/hide the element.
QGraphicsItem * graphicsItem() const override
Return the graphics item representing this element.
Base class for all Worksheet children.