MCPcopy Create free account
hub / github.com/YACReader/yacreader / YACReaderTitledToolBar

Method YACReaderTitledToolBar

custom_widgets/yacreader_titled_toolbar.cpp:59–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59YACReaderTitledToolBar::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
92void YACReaderTitledToolBar::addAction(QAction *action)
93{

Callers

nothing calls this directly

Calls 2

setIndicatorStyleMethod · 0.80
setTextMethod · 0.45

Tested by

no test coverage detected