mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-08-12 04:35:41 +08:00
refs #304, Icons, using new CIcon class
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
#include "blackcore/context_settings.h"
|
||||
#include "blackcore/context_application.h"
|
||||
#include "blackcore/context_application_impl.h"
|
||||
#include "blackmisc/iconsstandard.h"
|
||||
#include "blackmisc/icons.h"
|
||||
#include "blackmisc/networkutils.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
#include "blackmisc/project.h"
|
||||
@@ -27,7 +27,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
// metadata are registered in runtime
|
||||
QApplication a(argc, argv); // not QCoreApplication because of icon, http://qt-project.org/forums/viewthread/15412
|
||||
QIcon icon(BlackMisc::CIconsStandard::swiftNova24());
|
||||
QIcon icon(BlackMisc::CIcons::swiftNova24());
|
||||
QApplication::setWindowIcon(icon);
|
||||
QTextStream cin(stdin);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "blackcore/context_runtime_config.h"
|
||||
#include "blacksim/blacksimfreefunctions.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
#include "blackmisc/iconsstandard.h"
|
||||
#include "blackmisc/icons.h"
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QApplication>
|
||||
@@ -41,7 +41,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
// application
|
||||
QApplication a(argc, argv);
|
||||
QIcon icon(BlackMisc::CIconsStandard::swift24());
|
||||
QIcon icon(BlackMisc::CIcons::swift24());
|
||||
QApplication::setWindowIcon(icon);
|
||||
const QString s = CStyleSheetUtility::instance().styles(
|
||||
{
|
||||
|
||||
@@ -54,7 +54,7 @@ void MainWindow::init(const CRuntimeConfig &runtimeConfig)
|
||||
QHBoxLayout *menuBarLayout = new QHBoxLayout();
|
||||
QPushButton *closeIcon = new QPushButton(this);
|
||||
closeIcon->setStyleSheet("margin: 0; padding: 0; background: transparent;");
|
||||
closeIcon->setIcon(CIconsStandard::close16());
|
||||
closeIcon->setIcon(CIcons::close16());
|
||||
QObject::connect(closeIcon, &QPushButton::clicked, this, &QMainWindow::close);
|
||||
menuBarLayout->addWidget(this->ui->mb_MainMenuBar, 0, Qt::AlignTop | Qt::AlignLeft);
|
||||
menuBarLayout->addWidget(closeIcon, 0, Qt::AlignTop | Qt::AlignRight);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
#include "blackmisc/iconsstandard.h"
|
||||
#include "blackmisc/icons.h"
|
||||
#include "blackgui/models/atcstationlistmodel.h"
|
||||
#include "blackcore/dbus_server.h"
|
||||
#include "blackcore/context_network.h"
|
||||
@@ -76,8 +76,8 @@ void MainWindow::ps_setAudioVolumes()
|
||||
com1.setEnabled(!muted);
|
||||
com2.setEnabled(!muted);
|
||||
this->ui->pb_SoundMute->setText(muted ? "Unmute" : "Mute");
|
||||
this->ui->lbl_StatusVoiceStatus->setPixmap(muted ? CIconsStandard::volumneMuted16() : CIconsStandard::volumneHigh16());
|
||||
this->ui->comp_Cockpit->setCockpitVoiceStatusPixmap(muted ? CIconsStandard::volumneMuted16() : CIconsStandard::volumneHigh16());
|
||||
this->ui->comp_InfoBarStatus->setVolume(muted ? 0 : 66); // TODO
|
||||
this->ui->comp_Cockpit->setCockpitVoiceStatusPixmap(muted ? CIcons::volumeMuted16() : CIcons::volumeHigh16());
|
||||
this->ui->pb_SoundMute->setStyleSheet(muted ? "background-color: red;" : "");
|
||||
if (muted) this->m_compInfoWindow->displayStringMessage("Sound is muted!");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user