umbrello  2.32.3
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
layoutgrid.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2011 by Andi Fischer <andi.fischer@hispeed.ch> *
3  * Copyright (C) 2012 by Ralf Habacker <ralf.habacker@freenet.de> *
4  * *
5  * This is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2, or (at your option) *
8  * any later version. *
9  * *
10  * This software 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  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this package; see the file COPYING. If not, write to *
17  * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, *
18  * Boston, MA 02110-1301, USA. *
19  ***************************************************************************/
20 
21 #ifndef LAYOUTGRID_H
22 #define LAYOUTGRID_H
23 
24 #include <QColor>
25 #include <QFont>
26 
27 class UMLScene;
28 class QRectF;
29 
36 {
37 public:
38  explicit LayoutGrid(UMLScene *scene);
39  ~LayoutGrid();
40 
41  void paint(QPainter *painter, const QRectF &rect);
42 
43  QRect gridRect() const;
44  void setGridRect(const QRect& rect);
45 
46  int gridSpacingX() const;
47  int gridSpacingY() const;
48  void setGridSpacing(int sizeX, int sizeY);
49 
50  const QColor& gridDotColor() const;
51  void setGridDotColor(const QColor& color);
52 
53  const QColor& gridCrossColor() const;
54  void setGridCrossColor(const QColor& color);
55 
56  const QColor& textColor() const;
57  void setTextColor(const QColor& color);
58 
59  QFont textFont() const;
60  void setTextFont(const QFont& font);
61 
62  bool isVisible() const;
63  void setVisible(bool visible);
64 
65  bool isTextVisible() const;
66  void setTextVisible(bool visible);
67 
68 private:
74 };
75 
76 #endif // LAYOUTGRID_H
Definition: layoutgrid.h:36
void setGridSpacing(int sizeX, int sizeY)
Definition: layoutgrid.cpp:83
int gridSpacingX() const
Definition: layoutgrid.cpp:73
int m_gridSpacingY
Definition: layoutgrid.h:71
void setTextFont(const QFont &font)
void setGridCrossColor(const QColor &color)
void setGridRect(const QRect &rect)
bool isVisible() const
Definition: layoutgrid.cpp:101
const QColor & textColor() const
void setGridDotColor(const QColor &color)
Definition: layoutgrid.cpp:95
bool m_isVisible
Definition: layoutgrid.h:73
const QColor & gridDotColor() const
Definition: layoutgrid.cpp:90
QColor m_gridDotColor
Definition: layoutgrid.h:72
LayoutGrid(UMLScene *scene)
Definition: layoutgrid.cpp:35
int gridSpacingY() const
Definition: layoutgrid.cpp:78
QRect gridRect() const
bool isTextVisible() const
QFont textFont() const
UMLScene * m_scene
Definition: layoutgrid.h:69
const QColor & gridCrossColor() const
void paint(QPainter *painter, const QRectF &rect)
Definition: layoutgrid.cpp:51
void setVisible(bool visible)
Definition: layoutgrid.cpp:106
void setTextColor(const QColor &color)
int m_gridSpacingX
Definition: layoutgrid.h:70
~LayoutGrid()
Definition: layoutgrid.cpp:47
void setTextVisible(bool visible)
Definition: umlscene.h:69