| 57 | } |
| 58 | |
| 59 | YACReaderTitledToolBar::YACReaderTitledToolBar(const QString &title, QWidget *parent) |
| 60 | : QWidget(parent) |
| 61 | { |
| 62 | QHBoxLayout *mainLayout = new QHBoxLayout; |
| 63 | mainLayout->setContentsMargins(0, 0, 0, 0); |
| 64 | mainLayout->setSpacing(0); |
| 65 | |
| 66 | QString styleSheet = "QWidget {border:0px;}"; |
| 67 | setStyleSheet(styleSheet); |
| 68 | |
| 69 | nameLabel = new DropShadowLabel(this); |
| 70 | busyIndicator = new BusyIndicator(this, 12); |
| 71 | connect(busyIndicator, &BusyIndicator::clicked, this, &YACReaderTitledToolBar::cancelOperationRequested); |
| 72 | busyIndicator->setIndicatorStyle(BusyIndicator::StyleArc); |
| 73 | busyIndicator->setHidden(true); |
| 74 | |
| 75 | nameLabel->setText(title); |
| 76 | QString nameLabelStyleSheet = "QLabel {padding:0 0 0 10px; margin:0px; font-size:11px; font-weight:bold;}"; |
| 77 | nameLabel->setStyleSheet(nameLabelStyleSheet); |
| 78 | |
| 79 | mainLayout->addWidget(nameLabel); |
| 80 | mainLayout->addWidget(busyIndicator); |
| 81 | mainLayout->addStretch(); |
| 82 | |
| 83 | setLayout(mainLayout); |
| 84 | |
| 85 | setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum); |
| 86 | |
| 87 | setMinimumHeight(25); |
| 88 | |
| 89 | initTheme(this); |
| 90 | } |
| 91 | |
| 92 | void YACReaderTitledToolBar::addAction(QAction *action) |
| 93 | { |
nothing calls this directly
no test coverage detected