Changeset View
Changeset View
Standalone View
Standalone View
widgets/toolbars/options/kpToolWidgetLineWidth.cpp
Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Line(s) | 52 | { | |||
---|---|---|---|---|---|
63 | 63 | | |||
64 | addOption (QPixmap::fromImage(image), QString::number (lineWidths [i])); | 64 | addOption (QPixmap::fromImage(image), QString::number (lineWidths [i])); | ||
65 | startNewOptionRow (); | 65 | startNewOptionRow (); | ||
66 | } | 66 | } | ||
67 | 67 | | |||
68 | finishConstruction (0, 0); | 68 | finishConstruction (0, 0); | ||
69 | } | 69 | } | ||
70 | 70 | | |||
71 | kpToolWidgetLineWidth::~kpToolWidgetLineWidth () | 71 | kpToolWidgetLineWidth::~kpToolWidgetLineWidth () = default; | ||
72 | { | | |||
73 | } | | |||
74 | 72 | | |||
75 | int kpToolWidgetLineWidth::lineWidth () const | 73 | int kpToolWidgetLineWidth::lineWidth () const | ||
76 | { | 74 | { | ||
77 | return lineWidths [selectedRow ()]; | 75 | return lineWidths [selectedRow ()]; | ||
78 | } | 76 | } | ||
79 | 77 | | |||
80 | // virtual protected slot [base kpToolWidgetBase] | 78 | // virtual protected slot [base kpToolWidgetBase] | ||
81 | bool kpToolWidgetLineWidth::setSelected (int row, int col, bool saveAsDefault) | 79 | bool kpToolWidgetLineWidth::setSelected (int row, int col, bool saveAsDefault) | ||
82 | { | 80 | { | ||
83 | const bool ret = kpToolWidgetBase::setSelected (row, col, saveAsDefault); | 81 | const bool ret = kpToolWidgetBase::setSelected (row, col, saveAsDefault); | ||
84 | if (ret) | 82 | if (ret) { | ||
85 | emit lineWidthChanged (lineWidth ()); | 83 | emit lineWidthChanged (lineWidth ()); | ||
84 | } | ||||
86 | return ret; | 85 | return ret; | ||
87 | } | 86 | } | ||
88 | 87 | | |||
89 | 88 | |