Seamly2D
Code documentation
PenToolBar Class Reference

#include <pen_toolbar.h>

Inheritance diagram for PenToolBar:
Collaboration diagram for PenToolBar:

Public Slots

void colorChanged (const QString &color)
 
void lineWeightChanged (const qreal &weight)
 
void lineTypeChanged (const QString &type)
 
void penReset ()
 penReset resets the current pen to the preferred defaults. More...
 
void savePreset ()
 

Signals

void penChanged (Pen pen)
 

Public Member Functions

 PenToolBar (const QString &title, QWidget *parent=0)
 
virtual ~PenToolBar ()
 
Pen getPen () const
 

Public Attributes

Pen currentPen
 
QPointer< ColorComboBoxcolorBox
 
QPointer< LineTypeComboBoxlineTypeBox
 
QPointer< LineWeightComboBoxlineWeightBox
 

Private Attributes

QAction * resetAction
 
QAction * savePresetAction
 

Detailed Description

Definition at line 56 of file pen_toolbar.h.

Constructor & Destructor Documentation

◆ PenToolBar()

PenToolBar::PenToolBar ( const QString &  title,
QWidget *  parent = 0 
)

Constructor.

Definition at line 39 of file pen_toolbar.cpp.

◆ ~PenToolBar()

PenToolBar::~PenToolBar ( )
virtualdefault

Destructor

Member Function Documentation

◆ colorChanged

void PenToolBar::colorChanged ( const QString &  color)
slot

Called when the color was changed by the user.

Definition at line 116 of file pen_toolbar.cpp.

References Pen::color, currentPen, and penChanged().

◆ getPen()

Pen PenToolBar::getPen ( ) const

Definition at line 97 of file pen_toolbar.cpp.

References currentPen.

◆ lineTypeChanged

void PenToolBar::lineTypeChanged ( const QString &  type)
slot

Called when the linetype was changed by the user.

Definition at line 105 of file pen_toolbar.cpp.

References currentPen, Pen::lineType, and penChanged().

◆ lineWeightChanged

void PenToolBar::lineWeightChanged ( const qreal &  weight)
slot

Called when the width was changed by the user.

Definition at line 127 of file pen_toolbar.cpp.

References currentPen, Pen::lineWeight, and penChanged().

◆ penChanged

void PenToolBar::penChanged ( Pen  pen)
signal

◆ penReset

void PenToolBar::penReset ( )
slot

penReset resets the current pen to the preferred defaults.

Definition at line 138 of file pen_toolbar.cpp.

References Pen::color, colorBox, currentPen, Pen::lineType, lineTypeBox, Pen::lineWeight, lineWeightBox, penChanged(), and qApp.

◆ savePreset

void PenToolBar::savePreset ( )
slot

savePreset() Save the current pen to the preferences.

Definition at line 169 of file pen_toolbar.cpp.

References Pen::color, currentPen, Pen::lineType, Pen::lineWeight, and qApp.

Member Data Documentation

◆ colorBox

QPointer<ColorComboBox> PenToolBar::colorBox

Definition at line 67 of file pen_toolbar.h.

Referenced by penReset().

◆ currentPen

Pen PenToolBar::currentPen

◆ lineTypeBox

QPointer<LineTypeComboBox> PenToolBar::lineTypeBox

Definition at line 68 of file pen_toolbar.h.

Referenced by penReset().

◆ lineWeightBox

QPointer<LineWeightComboBox> PenToolBar::lineWeightBox

Definition at line 69 of file pen_toolbar.h.

Referenced by penReset().

◆ resetAction

QAction* PenToolBar::resetAction
private

Definition at line 82 of file pen_toolbar.h.

◆ savePresetAction

QAction* PenToolBar::savePresetAction
private

Definition at line 83 of file pen_toolbar.h.


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