| 9 | namespace QodeAssist { |
| 10 | |
| 11 | UpdateStatusWidget::UpdateStatusWidget(QWidget *parent) |
| 12 | : QFrame(parent) |
| 13 | { |
| 14 | setFrameStyle(QFrame::NoFrame); |
| 15 | |
| 16 | auto layout = new QHBoxLayout(this); |
| 17 | layout->setContentsMargins(4, 0, 4, 0); |
| 18 | layout->setSpacing(4); |
| 19 | |
| 20 | m_actionButton = new QToolButton(this); |
| 21 | m_actionButton->setToolButtonStyle(Qt::ToolButtonIconOnly); |
| 22 | |
| 23 | m_chatButton = new QToolButton(this); |
| 24 | m_chatButton->setToolButtonStyle(Qt::ToolButtonIconOnly); |
| 25 | |
| 26 | m_versionLabel = new QLabel(this); |
| 27 | m_versionLabel->setVisible(false); |
| 28 | |
| 29 | m_updateButton = new QPushButton(tr("Update"), this); |
| 30 | m_updateButton->setVisible(false); |
| 31 | m_updateButton->setStyleSheet("QPushButton { padding: 2px 8px; }"); |
| 32 | |
| 33 | layout->addWidget(m_actionButton); |
| 34 | layout->addWidget(m_chatButton); |
| 35 | layout->addWidget(m_versionLabel); |
| 36 | layout->addWidget(m_updateButton); |
| 37 | } |
| 38 | |
| 39 | void UpdateStatusWidget::setDefaultAction(QAction *action) |
| 40 | { |
nothing calls this directly
no outgoing calls
no test coverage detected