umbrello 2.39.2 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

- Main Page
- Related Pages
- Topics
- Namespaces
- Classes
- Files

- File List
- File Members

layoutgrid.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2011 Andi Fischer <andi.fischer@hispeed.ch>
3 SPDX-FileCopyrightText: 2012 Ralf Habacker <ralf.habacker@freenet.de>
4
5 SPDX-License-Identifier: GPL-2.0-or-later
6*/
7
8#ifndef LAYOUTGRID_H
9#define LAYOUTGRID_H
10
11#include <QColor>
12#include <QFont>
13
14 class UMLScene;
15 class QRectF;
16
22 class LayoutGrid
23{
24 public:
25 explicit LayoutGrid(UMLScene *scene);
26 ~LayoutGrid();
27
28 void paint(QPainter *painter, const QRectF &rect);
29
30 QRect gridRect() const;
31 void setGridRect(const QRect& rect);
32
33 int gridSpacingX() const;
34 int gridSpacingY() const;
35 void setGridSpacing(int sizeX, int sizeY);
36
37 const QColor& gridDotColor() const;
38 void setGridDotColor(const QColor& color);
39
40 const QColor& gridCrossColor() const;
41 void setGridCrossColor(const QColor& color);
42
43 const QColor& textColor() const;
44 void setTextColor(const QColor& color);
45
46 QFont textFont() const;
47 void setTextFont(const QFont& font);
48
49 bool isVisible() const;
50 void setVisible(bool visible);
51
52 bool isTextVisible() const;
53 void setTextVisible(bool visible);
54
55 private:
56 UMLScene *m_scene;
57 int m_gridSpacingX;
58 int m_gridSpacingY;
59 QColor m_gridDotColor;
60 bool m_isVisible;
61};
62
63#endif // LAYOUTGRID_H
LayoutGrid
Definition layoutgrid.h:23
LayoutGrid::setGridSpacing
void setGridSpacing(int sizeX, int sizeY)
Definition layoutgrid.cpp:71
LayoutGrid::gridSpacingX
int gridSpacingX() const
Definition layoutgrid.cpp:61
LayoutGrid::m_gridSpacingY
int m_gridSpacingY
Definition layoutgrid.h:58
LayoutGrid::setTextFont
void setTextFont(const QFont &font)
LayoutGrid::setGridCrossColor
void setGridCrossColor(const QColor &color)
LayoutGrid::setGridRect
void setGridRect(const QRect &rect)
LayoutGrid::isVisible
bool isVisible() const
Definition layoutgrid.cpp:89
LayoutGrid::setGridDotColor
void setGridDotColor(const QColor &color)
Definition layoutgrid.cpp:83
LayoutGrid::m_isVisible
bool m_isVisible
Definition layoutgrid.h:60
LayoutGrid::textColor
const QColor & textColor() const
LayoutGrid::gridDotColor
const QColor & gridDotColor() const
Definition layoutgrid.cpp:78
LayoutGrid::m_gridDotColor
QColor m_gridDotColor
Definition layoutgrid.h:59
LayoutGrid::LayoutGrid
LayoutGrid(UMLScene *scene)
Definition layoutgrid.cpp:23
LayoutGrid::gridSpacingY
int gridSpacingY() const
Definition layoutgrid.cpp:66
LayoutGrid::gridRect
QRect gridRect() const
LayoutGrid::isTextVisible
bool isTextVisible() const
LayoutGrid::textFont
QFont textFont() const
LayoutGrid::m_scene
UMLScene * m_scene
Definition layoutgrid.h:56
LayoutGrid::paint
void paint(QPainter *painter, const QRectF &rect)
Definition layoutgrid.cpp:39
LayoutGrid::setVisible
void setVisible(bool visible)
Definition layoutgrid.cpp:94
LayoutGrid::setTextColor
void setTextColor(const QColor &color)
LayoutGrid::gridCrossColor
const QColor & gridCrossColor() const
LayoutGrid::m_gridSpacingX
int m_gridSpacingX
Definition layoutgrid.h:57
LayoutGrid::~LayoutGrid
~LayoutGrid()
Definition layoutgrid.cpp:35
LayoutGrid::setTextVisible
void setTextVisible(bool visible)
UMLScene
Definition umlscene.h:65