19 #include <QApplication> 21 #include <QProxyStyle> 22 #include <QStyleFactory> 23 #include <QFontDatabase> 32 QApplication a(argc, argv);
37 QCoreApplication::setOrganizationName(COMPANY);
38 QCoreApplication::setApplicationName(APPLICATION_NAME);
39 QCoreApplication::setApplicationVersion(SDRANGEL_VERSION);
41 #if QT_VERSION >= 0x050600 42 QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
43 QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
50 palette.setColor(QPalette::Window, QColor(53,53,53));
51 palette.setColor(QPalette::WindowText, Qt::white);
52 palette.setColor(QPalette::Base, QColor(25,25,25));
53 palette.setColor(QPalette::AlternateBase, QColor(53,53,53));
54 palette.setColor(QPalette::ToolTipBase, Qt::white);
55 palette.setColor(QPalette::ToolTipText, Qt::black);
56 palette.setColor(QPalette::Text, Qt::white);
57 palette.setColor(QPalette::Button, QColor(0x40, 0x40, 0x40));
58 palette.setColor(QPalette::ButtonText, Qt::white);
59 palette.setColor(QPalette::BrightText, Qt::red);
61 palette.setColor(QPalette::Light, QColor(53,53,53).lighter(125).lighter());
62 palette.setColor(QPalette::Mid, QColor(53,53,53).lighter(125));
63 palette.setColor(QPalette::Dark, QColor(53,53,53).lighter(125).darker());
65 palette.setColor(QPalette::Link, QColor(0,0xa0,0xa0));
66 palette.setColor(QPalette::LinkVisited, QColor(0,0xa0,0xa0).lighter());
67 palette.setColor(QPalette::Highlight, QColor(0xff, 0x8c, 0x00));
68 palette.setColor(QPalette::HighlightedText, Qt::black);
69 qApp->setPalette(palette);
72 if(QFontDatabase::addApplicationFont(
"/tmp/Cuprum.otf") >= 0) {
73 QFont font(
"CuprumFFU");
74 font.setPointSize(10);
79 if(QFontDatabase::addApplicationFont(
"/tmp/PTN57F.ttf") >= 0) {
80 QFont font(
"PT Sans Narrow");
81 font.setPointSize(10);
86 if(QFontDatabase::addApplicationFont(
"/tmp/PTS55F.ttf") >= 0) {
87 QFont font(
"PT Sans");
88 font.setPointSize(10);
94 QFont font(
"Ubuntu Condensed");
95 font.setPointSize(10);
104 #if QT_VERSION >= 0x050400 105 qInfo(
"%s %s Qt %s %db %s %s DSP Rx:%db Tx:%db PID %lld",
106 qPrintable(qApp->applicationName()),
107 qPrintable(qApp->applicationVersion()),
108 qPrintable(QString(QT_VERSION_STR)),
110 qPrintable(QSysInfo::currentCpuArchitecture()),
111 qPrintable(QSysInfo::prettyProductName()),
114 qApp->applicationPid());
116 qInfo(
"%s %s Qt %s %db DSP Rx:%db Tx:%db PID: %lld",
117 qPrintable(qApp->applicationName()),
118 qPrintable((qApp->applicationVersion()),
119 qPrintable(QString(QT_VERSION_STR)),
132 int main(
int argc,
char* argv[])
136 int res = runQtApplication(argc, argv, logger);
137 qWarning(
"SDRangel quit.");
void * create(QString type)
void parse(const QCoreApplication &app)
int main(int argc, char *argv[])