Changeset View
Changeset View
Standalone View
Standalone View
widgets/toolbars/options/kpToolWidgetOpaqueOrTransparent.cpp
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 42 | { | |||
---|---|---|---|---|---|
44 | startNewOptionRow (); | 44 | startNewOptionRow (); | ||
45 | addOption (UserIcon ("option_transparent"), i18n ("Transparent")/*tooltip*/); | 45 | addOption (UserIcon ("option_transparent"), i18n ("Transparent")/*tooltip*/); | ||
46 | 46 | | |||
47 | finishConstruction (0, 0); | 47 | finishConstruction (0, 0); | ||
48 | } | 48 | } | ||
49 | 49 | | |||
50 | //--------------------------------------------------------------------- | 50 | //--------------------------------------------------------------------- | ||
51 | 51 | | |||
52 | kpToolWidgetOpaqueOrTransparent::~kpToolWidgetOpaqueOrTransparent () | 52 | kpToolWidgetOpaqueOrTransparent::~kpToolWidgetOpaqueOrTransparent () = default; | ||
53 | { | | |||
54 | } | | |||
55 | 53 | | |||
56 | //--------------------------------------------------------------------- | 54 | //--------------------------------------------------------------------- | ||
57 | 55 | | |||
58 | 56 | | |||
59 | // public | 57 | // public | ||
60 | bool kpToolWidgetOpaqueOrTransparent::isOpaque () const | 58 | bool kpToolWidgetOpaqueOrTransparent::isOpaque () const | ||
61 | { | 59 | { | ||
62 | return (selected () == 0); | 60 | return (selected () == 0); | ||
Show All 24 Lines | |||||
87 | } | 85 | } | ||
88 | 86 | | |||
89 | 87 | | |||
90 | // protected slot virtual [base kpToolWidgetBase] | 88 | // protected slot virtual [base kpToolWidgetBase] | ||
91 | bool kpToolWidgetOpaqueOrTransparent::setSelected (int row, int col, bool saveAsDefault) | 89 | bool kpToolWidgetOpaqueOrTransparent::setSelected (int row, int col, bool saveAsDefault) | ||
92 | { | 90 | { | ||
93 | #if DEBUG_KP_TOOL_WIDGET_OPAQUE_OR_TRANSPARENT && 1 | 91 | #if DEBUG_KP_TOOL_WIDGET_OPAQUE_OR_TRANSPARENT && 1 | ||
94 | qCDebug(kpLogWidgets) << "kpToolWidgetOpaqueOrTransparent::setSelected(" | 92 | qCDebug(kpLogWidgets) << "kpToolWidgetOpaqueOrTransparent::setSelected(" | ||
95 | << row << "," << col << ")" << endl; | 93 | << row << "," << col << ")"; | ||
96 | #endif | 94 | #endif | ||
97 | const bool ret = kpToolWidgetBase::setSelected (row, col, saveAsDefault); | 95 | const bool ret = kpToolWidgetBase::setSelected (row, col, saveAsDefault); | ||
98 | if (ret) | 96 | if (ret) { | ||
99 | emit isOpaqueChanged (isOpaque ()); | 97 | emit isOpaqueChanged (isOpaque ()); | ||
98 | } | ||||
100 | return ret; | 99 | return ret; | ||
101 | } | 100 | } | ||
102 | 101 | | |||
103 | 102 | |