Engauge Digitizer
2
Loading...
Searching...
No Matches
Guideline
GuidelineFormat.cpp
Go to the documentation of this file.
1
/******************************************************************************************************
2
* (C) 2019 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3
* under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4
* LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5
******************************************************************************************************/
6
7
#include "
EnumsToQt.h
"
8
#include "
GuidelineFormat.h
"
9
#include <QColor>
10
11
GuidelineFormat::GuidelineFormat
(
ColorPalette
color) :
12
m_color (
ColorPaletteToQColor
(color))
13
{
14
}
15
16
GuidelineFormat::~GuidelineFormat
()
17
{
18
}
19
20
QColor
GuidelineFormat::colorDeployedHover
()
const
21
{
22
QColor color (m_color);
23
color.setAlphaF (0.8);
24
25
return
color;
26
}
27
28
QColor
GuidelineFormat::colorDeployedNonHover
()
const
29
{
30
return
m_color;
31
}
32
33
QColor
GuidelineFormat::colorHidden
()
const
34
{
35
return
QColor (Qt::transparent);
36
}
37
38
double
GuidelineFormat::lineWidthHover
()
const
39
{
40
return
5.0;
// Wide so easy to see and click on
41
}
42
43
double
GuidelineFormat::lineWidthNonHover
()
const
44
{
45
return
0.8;
// Narrow for precision
46
}
47
ColorPalette
ColorPalette
Definition
ColorPalette.h:12
ColorPaletteToQColor
QColor ColorPaletteToQColor(ColorPalette color)
Definition
EnumsToQt.cpp:16
EnumsToQt.h
GuidelineFormat.h
GuidelineFormat::colorDeployedNonHover
QColor colorDeployedNonHover() const
Guideline color when not hovering.
Definition
GuidelineFormat.cpp:28
GuidelineFormat::GuidelineFormat
GuidelineFormat(ColorPalette color)
Single constructor.
Definition
GuidelineFormat.cpp:11
GuidelineFormat::~GuidelineFormat
~GuidelineFormat()
Definition
GuidelineFormat.cpp:16
GuidelineFormat::lineWidthHover
double lineWidthHover() const
Guideline line width.
Definition
GuidelineFormat.cpp:38
GuidelineFormat::lineWidthNonHover
double lineWidthNonHover() const
Guideline line width for narrow lines.
Definition
GuidelineFormat.cpp:43
GuidelineFormat::colorDeployedHover
QColor colorDeployedHover() const
Guideline color when hovering.
Definition
GuidelineFormat.cpp:20
GuidelineFormat::colorHidden
QColor colorHidden() const
Color when object is transparent but still handling (probably hover) events.
Definition
GuidelineFormat.cpp:33
Generated on
for Engauge Digitizer by
1.14.0