#include <linetype_combobox.h>
Signals | |
void | lineTypeChanged (const QString &type) |
Public Member Functions | |
LineTypeComboBox (QWidget *parent=nullptr) | |
LineTypeComboBox (int width, int height, QWidget *parent=nullptr, const char *name=nullptr) | |
virtual | ~LineTypeComboBox () |
QString | getLineType () |
void | setLineType (const QString &type) |
void | init () |
Private Slots | |
void | updateLineType (int index) |
Private Member Functions | |
QIcon | createIcon (const QString &type) |
Private Attributes | |
QString | m_currentLineType |
int | m_iconWidth |
int | m_iconHeight |
A comboBox for choosing a line type.
Definition at line 38 of file linetype_combobox.h.
LineTypeComboBox::LineTypeComboBox | ( | QWidget * | parent = nullptr | ) |
Definition at line 37 of file linetype_combobox.cpp.
References init().
LineTypeComboBox::LineTypeComboBox | ( | int | width, |
int | height, | ||
QWidget * | parent = nullptr , |
||
const char * | name = nullptr |
||
) |
Constructor that provides a width & height for the icon, and a name for the combobox.
Definition at line 50 of file linetype_combobox.cpp.
References init().
|
virtual |
Destructor
Definition at line 63 of file linetype_combobox.cpp.
|
private |
Definition at line 137 of file linetype_combobox.cpp.
References lineTypeToPenStyle(), m_iconHeight, and m_iconWidth.
Referenced by init().
|
inline |
Definition at line 48 of file linetype_combobox.h.
References m_currentLineType.
void LineTypeComboBox::init | ( | ) |
Initialisation called from constructor or manually but only once.
Definition at line 69 of file linetype_combobox.cpp.
References createIcon(), LineTypeDashDotDotLine, LineTypeDashDotLine, LineTypeDashLine, LineTypeDotLine, LineTypeNone, LineTypeSolidLine, m_iconHeight, m_iconWidth, and updateLineType().
Referenced by LineTypeComboBox().
|
signal |
Referenced by updateLineType().
void LineTypeComboBox::setLineType | ( | const QString & | type | ) |
Sets the currently selected linetype item to the given linetype.
Definition at line 109 of file linetype_combobox.cpp.
References m_currentLineType, and updateLineType().
|
privateslot |
Definition at line 126 of file linetype_combobox.cpp.
References lineTypeChanged(), and m_currentLineType.
Referenced by init(), and setLineType().
|
private |
Definition at line 61 of file linetype_combobox.h.
Referenced by getLineType(), setLineType(), and updateLineType().
|
private |
Definition at line 63 of file linetype_combobox.h.
Referenced by createIcon(), and init().
|
private |
Definition at line 62 of file linetype_combobox.h.
Referenced by createIcon(), and init().