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
35 class LayoutGrid
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:
69 UMLScene *m_scene;
70 int m_gridSpacingX;
71 int m_gridSpacingY;
72 QColor m_gridDotColor;
73 bool m_isVisible;
74 };
75
76 #endif // LAYOUTGRID_H
LayoutGrid::m_isVisible
bool m_isVisible
Definition: layoutgrid.h:73
LayoutGrid::setGridSpacing
void setGridSpacing(int sizeX, int sizeY)
Definition: layoutgrid.cpp:83
LayoutGrid::paint
void paint(QPainter *painter, const QRectF &rect)
Definition: layoutgrid.cpp:51
x
int x
Definition: cxx11-lambda-functions-and-expressions.h:4
LayoutGrid::gridSpacingX
int gridSpacingX() const
Definition: layoutgrid.cpp:73
LayoutGrid::isVisible
bool isVisible() const
Definition: layoutgrid.cpp:101
LayoutGrid::textColor
const QColor & textColor() const
LayoutGrid::gridCrossColor
const QColor & gridCrossColor() const
DEBUG_REGISTER_DISABLED
#define DEBUG_REGISTER_DISABLED(src)
Definition: debug_utils.h:132
LayoutGrid::gridRect
QRect gridRect() const
LayoutGrid::textFont
QFont textFont() const
LayoutGrid::isTextVisible
bool isTextVisible() const
layoutgrid.h
LayoutGrid::setGridRect
void setGridRect(const QRect &rect)
LayoutGrid::setGridCrossColor
void setGridCrossColor(const QColor &color)
LayoutGrid::setVisible
void setVisible(bool visible)
Definition: layoutgrid.cpp:106
LayoutGrid::setTextColor
void setTextColor(const QColor &color)
LayoutGrid::m_gridSpacingX
int m_gridSpacingX
Definition: layoutgrid.h:70
LayoutGrid
Definition: layoutgrid.h:36
int
int int y int
Definition: cxx11-lambda-functions-and-expressions.h:4
LayoutGrid::gridSpacingY
int gridSpacingY() const
Definition: layoutgrid.cpp:78
LayoutGrid::gridDotColor
const QColor & gridDotColor() const
Definition: layoutgrid.cpp:90
LayoutGrid::~LayoutGrid
~LayoutGrid()
Definition: layoutgrid.cpp:47
LayoutGrid::setTextVisible
void setTextVisible(bool visible)
umlscene.h
LayoutGrid::setTextFont
void setTextFont(const QFont &font)
debug_utils.h
UMLScene
Definition: umlscene.h:69
LayoutGrid::m_scene
UMLScene * m_scene
Definition: layoutgrid.h:69
DBG_LOG
#define DBG_LOG()
Definition: layoutgrid.cpp:29
LayoutGrid::m_gridDotColor
QColor m_gridDotColor
Definition: layoutgrid.h:72
LayoutGrid::LayoutGrid
LayoutGrid(UMLScene *scene)
Definition: layoutgrid.cpp:35
LayoutGrid::setGridDotColor
void setGridDotColor(const QColor &color)
Definition: layoutgrid.cpp:95
LayoutGrid::m_gridSpacingY
int m_gridSpacingY
Definition: layoutgrid.h:71