BoundingRectangle.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright (C) 2015 by Ralf Kaestner *
3  * ralf.kaestner@gmail.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the Lesser GNU General Public License as published by*
7  * the Free Software Foundation; either version 3 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * Lesser GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the Lesser GNU General Public License *
16  * along with this program. If not, see <http://www.gnu.org/licenses/>. *
17  ******************************************************************************/
18 
19 #ifndef RQT_MULTIPLOT_BOUNDING_RECTANGLE_H
20 #define RQT_MULTIPLOT_BOUNDING_RECTANGLE_H
21 
22 #include <QPair>
23 #include <QPointF>
24 #include <QRectF>
25 
26 namespace rqt_multiplot {
28  public:
29  BoundingRectangle(const QPointF& minimum = QPointF(0.0, 0.0),
30  const QPointF& maximum = QPointF(-1.0, -1.0));
31  BoundingRectangle(const QRectF& rectangle);
34 
35  void setMinimum(const QPointF& minimum);
36  QPointF& getMinimum();
37  const QPointF& getMinimum() const;
38  void setMaximum(const QPointF& maximum);
39  QPointF& getMaximum();
40  const QPointF& getMaximum() const;
41  QRectF getRectangle() const;
42  bool isValid() const;
43  bool isEmpty() const;
44  bool contains(const QPointF& point) const;
45 
46  void initialize(const QPointF& point);
47  void clear();
48 
49  bool operator==(const BoundingRectangle& rectangle) const;
50  bool operator!=(const BoundingRectangle& rectangle) const;
51 
52  BoundingRectangle& operator+=(const QPointF& point);
54 
55  private:
56  QPointF minimum_;
57  QPointF maximum_;
58  };
59 };
60 
61 #endif
BoundingRectangle(const QPointF &minimum=QPointF(0.0, 0.0), const QPointF &maximum=QPointF(-1.0,-1.0))
bool operator!=(const BoundingRectangle &rectangle) const
bool contains(const QPointF &point) const
void setMaximum(const QPointF &maximum)
void setMinimum(const QPointF &minimum)
BoundingRectangle & operator+=(const QPointF &point)
bool operator==(const BoundingRectangle &rectangle) const
void initialize(const QPointF &point)


rqt_multiplot
Author(s): Ralf Kaestner
autogenerated on Wed Jul 10 2019 03:49:44