Engauge Digitizer 2
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
GuidelineFormat Class Reference

This class centralizes the formatting information (color, line width, alpha) for the Guidelines. More...

#include <GuidelineFormat.h>

Collaboration diagram for GuidelineFormat:
Collaboration graph

Public Types

enum  HoverOption { HOVER_OFF , HOVER_ON }
 Public enum. More...
 

Public Member Functions

 GuidelineFormat (ColorPalette color)
 Single constructor.
 
 ~GuidelineFormat ()
 
QColor colorDeployedHover () const
 Guideline color when hovering.
 
QColor colorDeployedNonHover () const
 Guideline color when not hovering.
 
QColor colorHidden () const
 Color when object is transparent but still handling (probably hover) events.
 
double lineWidthHover () const
 Guideline line width.
 
double lineWidthNonHover () const
 Guideline line width for narrow lines.
 

Detailed Description

This class centralizes the formatting information (color, line width, alpha) for the Guidelines.

Definition at line 14 of file GuidelineFormat.h.

Member Enumeration Documentation

◆ HoverOption

Public enum.

Enumerator
HOVER_OFF 
HOVER_ON 

Definition at line 22 of file GuidelineFormat.h.

Constructor & Destructor Documentation

◆ GuidelineFormat()

GuidelineFormat::GuidelineFormat ( ColorPalette color)

Single constructor.

Definition at line 11 of file GuidelineFormat.cpp.

11 :
12 m_color (ColorPaletteToQColor (color))
13{
14}
QColor ColorPaletteToQColor(ColorPalette color)
Definition EnumsToQt.cpp:16

◆ ~GuidelineFormat()

GuidelineFormat::~GuidelineFormat ( )

Definition at line 16 of file GuidelineFormat.cpp.

17{
18}

Member Function Documentation

◆ colorDeployedHover()

QColor GuidelineFormat::colorDeployedHover ( ) const

Guideline color when hovering.

Definition at line 20 of file GuidelineFormat.cpp.

21{
22 QColor color (m_color);
23 color.setAlphaF (0.8);
24
25 return color;
26}
const int INNER_RADIUS_MIN

◆ colorDeployedNonHover()

QColor GuidelineFormat::colorDeployedNonHover ( ) const

Guideline color when not hovering.

Definition at line 28 of file GuidelineFormat.cpp.

29{
30 return m_color;
31}

◆ colorHidden()

QColor GuidelineFormat::colorHidden ( ) const

Color when object is transparent but still handling (probably hover) events.

Definition at line 33 of file GuidelineFormat.cpp.

34{
35 return QColor (Qt::transparent);
36}

◆ lineWidthHover()

double GuidelineFormat::lineWidthHover ( ) const

Guideline line width.

Definition at line 38 of file GuidelineFormat.cpp.

39{
40 return 5.0; // Wide so easy to see and click on
41}

◆ lineWidthNonHover()

double GuidelineFormat::lineWidthNonHover ( ) const

Guideline line width for narrow lines.

Definition at line 43 of file GuidelineFormat.cpp.

44{
45 return 0.8; // Narrow for precision
46}

The documentation for this class was generated from the following files: