Engauge Digitizer  2
Public Member Functions | List of all members
ViewPointStyle Class Reference

Class that displays a view of the current Curve's point style. More...

#include <ViewPointStyle.h>

Inheritance diagram for ViewPointStyle:
Inheritance graph
Collaboration diagram for ViewPointStyle:
Collaboration graph

Public Member Functions

 ViewPointStyle (QWidget *parent=0)
 Single constructor. More...
 
void setEnabled (bool enabled)
 Show the style with semi-transparency or full-transparency to indicate if associated Curve is active or not. More...
 
void setPointStyle (const PointStyle &pointStyle)
 Apply the PointStyle of the currently selected curve. More...
 
void unsetPointStyle ()
 Apply no PointStyle. More...
 

Detailed Description

Class that displays a view of the current Curve's point style.

Do NOT apply a visible border since that would hide a square drawn just inside the four sides.

Definition at line 16 of file ViewPointStyle.h.

Constructor & Destructor Documentation

◆ ViewPointStyle()

ViewPointStyle::ViewPointStyle ( QWidget *  parent = 0)

Single constructor.

Definition at line 16 of file ViewPointStyle.cpp.

16  :
17  QLabel (parent),
18  m_enabled (false)
19 {
20  // Note the size is set externally by the layout engine
21 }

Member Function Documentation

◆ setEnabled()

void ViewPointStyle::setEnabled ( bool  enabled)

Show the style with semi-transparency or full-transparency to indicate if associated Curve is active or not.

Definition at line 72 of file ViewPointStyle.cpp.

73 {
74  LOG4CPP_INFO_S ((*mainCat)) << "ViewPointStyle::setEnabled"
75  << " enabled=" << (enabled ? "true" : "false");
76 
77  m_enabled = enabled;
78  setPixmap (pixmapForCurrentSettings ());
79 }
#define LOG4CPP_INFO_S(logger)
Definition: convenience.h:18
log4cpp::Category * mainCat
Definition: Logger.cpp:14

◆ setPointStyle()

void ViewPointStyle::setPointStyle ( const PointStyle pointStyle)

Apply the PointStyle of the currently selected curve.

Definition at line 81 of file ViewPointStyle.cpp.

82 {
83  LOG4CPP_INFO_S ((*mainCat)) << "ViewPointStyle::setPointStyle";
84 
85  m_pointStyle = pointStyle;
86  setPixmap (pixmapForCurrentSettings ());
87 }
#define LOG4CPP_INFO_S(logger)
Definition: convenience.h:18
log4cpp::Category * mainCat
Definition: Logger.cpp:14

◆ unsetPointStyle()

void ViewPointStyle::unsetPointStyle ( )

Apply no PointStyle.

Definition at line 89 of file ViewPointStyle.cpp.

90 {
91  LOG4CPP_INFO_S ((*mainCat)) << "ViewPointStyle::unsetPointStyle";
92 
93  QPixmap pEmpty (width (),
94  height ());
95  pEmpty.fill (COLOR_FOR_BRUSH_DISABLED);
96 
97  setPixmap (pEmpty);
98 }
const QColor COLOR_FOR_BRUSH_DISABLED(Qt::gray)
#define LOG4CPP_INFO_S(logger)
Definition: convenience.h:18
log4cpp::Category * mainCat
Definition: Logger.cpp:14

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