This commit is contained in:
Klaus Basan
2019-03-18 23:54:46 +01:00
committed by Mat Sutcliffe
parent ae3ebdd443
commit 0a013fc906
11 changed files with 24 additions and 15 deletions

View File

@@ -76,7 +76,6 @@ namespace BlackGui
QPushButton *button = new QPushButton(this);
button->setText(station.getCallsignAsString());
if (m_withIcons) { button->setIcon(station.toPixmap()); }
// else { button->setStyleSheet("text-align: left;"); }
QObject::connect(button, &QPushButton::released, this, &CAtcButtonComponent::onButtonClicked);
const CVariant atcv = CVariant::fromValue(station);
layout->addWidget(button, row, col++);

View File

@@ -37,7 +37,7 @@ namespace BlackGui
explicit CInfoBarStatusComponent(QWidget *parent = nullptr);
//!Destructor
virtual ~CInfoBarStatusComponent();
virtual ~CInfoBarStatusComponent() override;
//! DBus used?
void setDBusStatus(bool dbus);

View File

@@ -81,6 +81,7 @@ namespace BlackGui
void CRawFsdMessagesComponent::enableDisableRawFsdMessages()
{
//! \fixme KB 2019-03 hardcoded style sheet
bool enable;
if (ui->pb_EnableDisable->text() == "Enable")
{

View File

@@ -7,7 +7,6 @@
*/
#include "blackgui/components/transpondercodespinbox.h"
#include <QChar>
namespace BlackGui

View File

@@ -17,8 +17,6 @@
#include <QSpinBox>
#include <QString>
class QWidget;
namespace BlackGui
{
namespace Components

View File

@@ -24,6 +24,8 @@ namespace BlackGui
this->setWindowTitle("Info status bar");
this->setWindowIcon(CIcons::swift24());
this->onStyleSheetsChanged(); // margins from infobar
// style changed overridden from CDockWidget
}
void CDockWidgetInfoBar::addToContextMenu(QMenu *contextMenu) const
@@ -34,7 +36,10 @@ namespace BlackGui
void CDockWidgetInfoBar::onStyleSheetsChanged()
{
// overridden from CDockWidget
if (!sGui || sGui->isShuttingDown()) { return; }
const QString st = sGui->getStyleSheetUtility().style(CStyleSheetUtility::fileNameInfoBar());
this->setStyleSheet("");
this->setStyleSheet(st);
}
}

View File

@@ -17,7 +17,6 @@
#include <QObject>
class QMenu;
class QWidget;
namespace BlackGui
{

View File

@@ -19,8 +19,6 @@
#include <QPixmap>
#include <QString>
class QWidget;
namespace BlackGui
{
//! Representing a ticked or crossed icon
@@ -49,10 +47,10 @@ namespace BlackGui
void tickChanged(bool ticked);
private:
bool m_isPixmapTicked = false; //!< ticked state
QString m_toolTipTicked = "on";
bool m_isPixmapTicked = false; //!< ticked state
QString m_toolTipTicked = "on";
QString m_toolTipUnticked = "off";
QPixmap m_pixmapTicked = BlackMisc::CIcons::tick16();
QPixmap m_pixmapTicked = BlackMisc::CIcons::tick16();
QPixmap m_pixmapUnticked = BlackMisc::CIcons::cross16();
//! Set the label

View File

@@ -40,7 +40,8 @@ namespace BlackGui
QCheckBox *cb = new QCheckBox(parent);
if (!m_iconCheckedUrl.isEmpty() && !m_iconUncheckedUrl.isEmpty())
{
QString style = CStyleSheetUtility::styleForIconCheckBox(m_iconCheckedUrl, m_iconUncheckedUrl);
const QString style = CStyleSheetUtility::styleForIconCheckBox(m_iconCheckedUrl, m_iconUncheckedUrl);
cb->setStyleSheet("");
cb->setStyleSheet(style);
}
return cb;
@@ -48,7 +49,7 @@ namespace BlackGui
void CCheckBoxDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const
{
bool v = index.model()->data(index, Qt::UserRole).toBool();
const bool v = index.model()->data(index, Qt::UserRole).toBool();
QCheckBox *cb = qobject_cast<QCheckBox *>(editor);
cb->setChecked(v);
}
@@ -56,7 +57,7 @@ namespace BlackGui
void CCheckBoxDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
{
QCheckBox *cb = qobject_cast<QCheckBox *>(editor);
bool v = cb->isChecked();
const bool v = cb->isChecked();
model->setData(index, QVariant(v), Qt::EditRole);
}

View File

@@ -62,6 +62,8 @@ void CSwiftData::initStyleSheet()
CStyleSheetUtility::fileNameStandardWidget(),
CStyleSheetUtility::fileNameSwiftData()
});
this->setStyleSheet("");
this->setStyleSheet(s);
}

View File

@@ -329,7 +329,14 @@
<number>0</number>
</property>
<item alignment="Qt::AlignTop">
<widget class="BlackGui::Components::CInfoBarStatusComponent" name="comp_InfoBarStatus" native="true"/>
<widget class="BlackGui::Components::CInfoBarStatusComponent" name="comp_InfoBarStatus" native="true">
<property name="minimumSize">
<size>
<width>200</width>
<height>20</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>