| 1 | // For license of this file, see <project-root-folder>/LICENSE.md.cxx . . $ `<file>/src/librssguard/gui/reusable/labelwithstatus.cpp`/ |
| 2 | |
| 3 | #include "gui/reusable/labelwithstatus.h"cxx . . $ `<file>/src/librssguard/gui/reusable/labelwithstatus.h`/ |
| 4 | |
| 5 | #include "gui/reusable/plaintoolbutton.h"cxx . . $ `<file>/src/librssguard/gui/reusable/plaintoolbutton.h`/ |
| 6 | |
| 7 | #include <QHBoxLayout> |
| 8 | |
| 9 | LabelWithStatuscxx . . $ LabelWithStatus#::LabelWithStatuscxx . . $ LabelWithStatus#LabelWithStatus(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget#* parent) : WidgetWithStatuscxx . . $ WidgetWithStatus#(parent) { |
| 10 | m_wdgInputcxx . . $ WidgetWithStatus#m_wdgInput. = new QLabelcxx . . $ QLabel#(this); |
| 11 | |
| 12 | // Set correct size for the tool button. |
| 13 | int label_height = m_wdgInputcxx . . $ WidgetWithStatus#m_wdgInput.->sizeHintcxx . . $ QWidget#sizeHint(4b3b776e5ee2b367).().heightcxx . . $ QSize#height(ea6fe5115c70a13f).() * 1.2; |
| 14 | |
| 15 | m_btnStatuscxx . . $ WidgetWithStatus#m_btnStatus.->setFixedSizecxx . . $ QWidget#setFixedSize(3e454b8ccf442868).(label_height, label_height); |
| 16 | |
| 17 | // Compose the layout. |
| 18 | m_layoutcxx . . $ WidgetWithStatus#m_layout.->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(m_wdgInputcxx . . $ WidgetWithStatus#m_wdgInput.); |
| 19 | m_layoutcxx . . $ WidgetWithStatus#m_layout.->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(m_btnStatuscxx . . $ WidgetWithStatus#m_btnStatus.); |
| 20 | |
| 21 | setLayoutDirectioncxx . . $ QWidget#setLayoutDirection(c4f507b8ff4f71fc).(Qtcxx . . $ Qt/::LayoutDirectioncxx . . $ Qt/LayoutDirection#::RightToLeftcxx . . $ Qt/RightToLeft.); |
| 22 | } |
| 23 | |
| 24 | void LabelWithStatuscxx . . $ LabelWithStatus#::setStatuscxx . . $ LabelWithStatus#setStatus(810dc34ace2b0f32).(WidgetWithStatuscxx . . $ WidgetWithStatus#::StatusTypecxx . . $ WidgetWithStatus#StatusType# status, |
| 25 | const QStringcxx . . $ QString#& label_text, |
| 26 | const QStringcxx . . $ QString#& status_text) { |
| 27 | WidgetWithStatuscxx . . $ WidgetWithStatus#::setStatuscxx . . $ WidgetWithStatus#setStatus(e987dce66bda7b0a).(status, status_text); |
| 28 | labelcxx . . $ LabelWithStatus#label(a31910c5384f8d7e).()->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(label_text); |
| 29 | } |