mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
Issue #77 toIcon returns a simple enum instead of a full object
This commit is contained in:
@@ -76,7 +76,7 @@ namespace BlackGui
|
||||
|
||||
QPushButton *button = new QPushButton(this);
|
||||
button->setText(station.getCallsignAsString());
|
||||
if (m_withIcons) { button->setIcon(station.toPixmap()); }
|
||||
if (m_withIcons) { button->setIcon(CIcon(station.toIcon()).toQIcon()); }
|
||||
QObject::connect(button, &QPushButton::released, this, &CAtcButtonComponent::onButtonClicked);
|
||||
const CVariant atcv = CVariant::fromValue(station);
|
||||
layout->addWidget(button, row, col++);
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace BlackGui
|
||||
else
|
||||
{
|
||||
ui->le_Color->setText(color.hex());
|
||||
ui->lbl_ColorIcon->setPixmap(color.toPixmap());
|
||||
ui->lbl_ColorIcon->setPixmap(CIcon(color.toIcon()));
|
||||
m_lastColor = color;
|
||||
}
|
||||
emit colorChanged(color);
|
||||
@@ -176,7 +176,7 @@ namespace BlackGui
|
||||
|
||||
mimeData->setColorData(QVariant::fromValue(c.toQColor()));
|
||||
drag->setMimeData(mimeData);
|
||||
drag->setPixmap(c.toPixmap());
|
||||
drag->setPixmap(CIcon(c.toIcon()));
|
||||
|
||||
Qt::DropAction dropAction = drag->exec(Qt::CopyAction);
|
||||
Q_UNUSED(dropAction);
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace BlackGui
|
||||
{
|
||||
ui->le_CountryIso->setText(country.getIsoCode());
|
||||
ui->le_CountryName->setText(country.getName());
|
||||
ui->lbl_CountryIcon->setPixmap(country.toPixmap());
|
||||
ui->lbl_CountryIcon->setPixmap(CIcon(country.toIcon()));
|
||||
if (country != m_currentCountry)
|
||||
{
|
||||
m_currentCountry = country;
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace BlackGui
|
||||
}
|
||||
else
|
||||
{
|
||||
this->addItem(country.toPixmap(), d);
|
||||
this->addItem(CIcon(country.toIcon()).toPixmap(), d);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace BlackGui
|
||||
void CStatusMessageForm::setValue(const CStatusMessage &message)
|
||||
{
|
||||
ui->te_Message->setPlainText(message.getMessage());
|
||||
ui->lbl_SeverityIcon->setPixmap(message.toPixmap());
|
||||
ui->lbl_SeverityIcon->setPixmap(CIcon(message.toIcon()));
|
||||
const QString hrc(message.getHumanReadablePattern());
|
||||
if (hrc.isEmpty())
|
||||
{
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace BlackGui
|
||||
void CStatusMessageFormSmall::setValue(const CStatusMessage &message)
|
||||
{
|
||||
ui->te_Message->setPlainText(message.getMessage());
|
||||
ui->lbl_SeverityIcon->setPixmap(message.toPixmap());
|
||||
ui->lbl_SeverityIcon->setPixmap(CIcon(message.toIcon()));
|
||||
ui->le_Categories->setText(message.getHumanOrTechnicalCategoriesAsString());
|
||||
ui->le_Severity->setText(message.getSeverityAsString());
|
||||
ui->le_Timestamp->setText(message.getFormattedUtcTimestampYmdhms());
|
||||
|
||||
@@ -491,7 +491,7 @@ namespace BlackGui
|
||||
if (supervisor)
|
||||
{
|
||||
//! \fixme hardcoded stylesheet color
|
||||
bar->setTabIcon(index, callsign.toPixmap());
|
||||
bar->setTabIcon(index, CIcon(callsign.toIcon()).toQIcon());
|
||||
bar->setTabTextColor(index, QColor(Qt::yellow));
|
||||
}
|
||||
ui->tw_TextMessages->setCurrentIndex(index);
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace BlackGui
|
||||
ui->cb_Platforms->clear();
|
||||
for (const CPlatform &platform : platforms)
|
||||
{
|
||||
ui->cb_Platforms->insertItem(i++, platform.toPixmap(), platform.getPlatformName());
|
||||
ui->cb_Platforms->insertItem(i++, CIcon(platform.toIcon()).toPixmap(), platform.getPlatformName());
|
||||
}
|
||||
if (platforms.contains(settings.last())) { ui->cb_Platforms->setCurrentText(settings.last()); }
|
||||
else if (platforms.contains(CPlatform::currentPlatform().getPlatformName())) { ui->cb_Platforms->setCurrentText(CPlatform::currentPlatform().getPlatformName()); }
|
||||
@@ -116,7 +116,7 @@ namespace BlackGui
|
||||
ui->cb_Channels->clear();
|
||||
for (const CDistribution &distribution : distributions)
|
||||
{
|
||||
ui->cb_Channels->insertItem(i++, distribution.getRestrictionIcon().toPixmap(), distribution.getChannel());
|
||||
ui->cb_Channels->insertItem(i++, CIcon(distribution.getRestrictionIcon()).toPixmap(), distribution.getChannel());
|
||||
}
|
||||
if (distributions.containsChannel(settings.front())) { ui->cb_Channels->setCurrentText(settings.front()); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user