diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-01-05 15:47:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-01-05 15:47:31 +0300 |
commit | 5aa5429c62096034769ffdaef92a0fcb5db08301 (patch) | |
tree | 15fb060f619c30c4e7349e2d18f3cf6cfba05928 /src/gui/widgets/widgetgroup.cpp | |
parent | ad3a223908a77d42ee97ef28b598e3c831bee7d1 (diff) | |
download | mv-5aa5429c62096034769ffdaef92a0fcb5db08301.tar.gz mv-5aa5429c62096034769ffdaef92a0fcb5db08301.tar.bz2 mv-5aa5429c62096034769ffdaef92a0fcb5db08301.tar.xz mv-5aa5429c62096034769ffdaef92a0fcb5db08301.zip |
Allow set pressed item in widgetgroup and child objects.
Diffstat (limited to 'src/gui/widgets/widgetgroup.cpp')
-rw-r--r-- | src/gui/widgets/widgetgroup.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/widgets/widgetgroup.cpp b/src/gui/widgets/widgetgroup.cpp index 1e5c81bed..3cddc625a 100644 --- a/src/gui/widgets/widgetgroup.cpp +++ b/src/gui/widgets/widgetgroup.cpp @@ -38,18 +38,20 @@ WidgetGroup::WidgetGroup(const Widget2 *const widget, addWidgetListener(this); } -void WidgetGroup::addButton(const std::string &tag) +void WidgetGroup::addButton(const std::string &tag, + const bool pressed) { - addButton(tag, tag); + addButton(tag, tag, pressed); } void WidgetGroup::addButton(const std::string &restrict text, - const std::string &restrict tag) + const std::string &restrict tag, + const bool pressed) { if (text.empty() || tag.empty()) return; - Widget *const widget = createWidget(text); + Widget *const widget = createWidget(text, pressed); if (widget) { widget->setActionEventId(mActionEventId + tag); |