mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-19 03:45:30 +08:00
refs #912, application description as functions
(can be reused in identifier)
This commit is contained in:
committed by
Mathew Sutcliffe
parent
09b9ca5d50
commit
142bc82e03
@@ -27,4 +27,28 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
return QString("{ %1, %2, %3, %4, %5 }").arg(QString::number(m_app), QString::number(m_mode), m_exePath, m_version, m_process.convertToQString(i18n));
|
return QString("{ %1, %2, %3, %4, %5 }").arg(QString::number(m_app), QString::number(m_mode), m_exePath, m_version, m_process.convertToQString(i18n));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const QString &CApplicationInfo::swiftPilotClientGui()
|
||||||
|
{
|
||||||
|
static const QString s("swift pilot client GUI");
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QString &CApplicationInfo::swiftLauncher()
|
||||||
|
{
|
||||||
|
static const QString s("swift launcher");
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QString &CApplicationInfo::swiftMappingTool()
|
||||||
|
{
|
||||||
|
static const QString s("swift mapping tool");
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QString &CApplicationInfo::swiftCore()
|
||||||
|
{
|
||||||
|
static const QString s("swift core");
|
||||||
|
return s;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,6 +83,18 @@ namespace BlackMisc
|
|||||||
//! \copydoc BlackMisc::Mixin::String::toQString
|
//! \copydoc BlackMisc::Mixin::String::toQString
|
||||||
QString convertToQString(bool i18n = false) const;
|
QString convertToQString(bool i18n = false) const;
|
||||||
|
|
||||||
|
//! Name of pilot client GUI
|
||||||
|
static const QString &swiftPilotClientGui();
|
||||||
|
|
||||||
|
//! Name of swift launcher
|
||||||
|
static const QString &swiftLauncher();
|
||||||
|
|
||||||
|
//! Name of swift mapping tool
|
||||||
|
static const QString &swiftMappingTool();
|
||||||
|
|
||||||
|
//! Name of swift core
|
||||||
|
static const QString &swiftCore();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int m_app = static_cast<int>(Unknown);
|
int m_app = static_cast<int>(Unknown);
|
||||||
int m_mode = 0;
|
int m_mode = 0;
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ int main(int argc, char *argv[])
|
|||||||
CGuiApplication::highDpiScreenSupport();
|
CGuiApplication::highDpiScreenSupport();
|
||||||
QApplication qa(argc, argv);
|
QApplication qa(argc, argv);
|
||||||
Q_UNUSED(qa); // init of qa is required, but qa not used
|
Q_UNUSED(qa); // init of qa is required, but qa not used
|
||||||
CGuiApplication a("swift core", CApplicationInfo::PilotClientCore, CIcons::swiftCore24());
|
CGuiApplication a(CApplicationInfo::swiftCore(), CApplicationInfo::PilotClientCore, CIcons::swiftCore24());
|
||||||
a.addWindowStateOption();
|
a.addWindowStateOption();
|
||||||
a.addDBusAddressOption();
|
a.addDBusAddressOption();
|
||||||
a.addVatlibOptions();
|
a.addVatlibOptions();
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ int main(int argc, char *argv[])
|
|||||||
CGuiApplication::highDpiScreenSupport();
|
CGuiApplication::highDpiScreenSupport();
|
||||||
QApplication qa(argc, argv);
|
QApplication qa(argc, argv);
|
||||||
Q_UNUSED(qa);
|
Q_UNUSED(qa);
|
||||||
CGuiApplication a("swift mapping tool", CApplicationInfo::MappingTool, CIcons::swiftDatabase48());
|
CGuiApplication a(CApplicationInfo::swiftMappingTool(), CApplicationInfo::MappingTool, CIcons::swiftDatabase48());
|
||||||
a.setSignalStartupAutomatically(false); // application will signal startup on its own
|
a.setSignalStartupAutomatically(false); // application will signal startup on its own
|
||||||
a.splashScreen(CIcons::swiftDatabase256());
|
a.splashScreen(CIcons::swiftDatabase256());
|
||||||
if (!a.parse()) { return EXIT_FAILURE; }
|
if (!a.parse()) { return EXIT_FAILURE; }
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ using namespace BlackMisc;
|
|||||||
using namespace BlackCore;
|
using namespace BlackCore;
|
||||||
|
|
||||||
CSwiftGuiStdApplication::CSwiftGuiStdApplication() :
|
CSwiftGuiStdApplication::CSwiftGuiStdApplication() :
|
||||||
CGuiApplication("swift pilot client GUI", CApplicationInfo::PilotClientGui, CIcons::swift1024())
|
CGuiApplication(CApplicationInfo::swiftPilotClientGui(), CApplicationInfo::PilotClientGui, CIcons::swift1024())
|
||||||
{
|
{
|
||||||
this->addParserOption(this->m_cmdFacadeMode);
|
this->addParserOption(this->m_cmdFacadeMode);
|
||||||
this->addWindowModeOption();
|
this->addWindowModeOption();
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ int main(int argc, char *argv[])
|
|||||||
CGuiApplication::highDpiScreenSupport();
|
CGuiApplication::highDpiScreenSupport();
|
||||||
QApplication qa(argc, argv); // needed
|
QApplication qa(argc, argv); // needed
|
||||||
Q_UNUSED(qa);
|
Q_UNUSED(qa);
|
||||||
CGuiApplication a("swift launcher", CApplicationInfo::Laucher, CIcons::swiftLauncher1024());
|
CGuiApplication a(CApplicationInfo::swiftLauncher(), CApplicationInfo::Laucher, CIcons::swiftLauncher1024());
|
||||||
a.addParserOption({{"i", "installer"}, QCoreApplication::translate("main", "Installer setup.") });
|
a.addParserOption({{"i", "installer"}, QCoreApplication::translate("main", "Installer setup.") });
|
||||||
if (!a.parse()) { return EXIT_FAILURE; }
|
if (!a.parse()) { return EXIT_FAILURE; }
|
||||||
a.useWebDataServices(BlackCore::CWebReaderFlags::AllSwiftDbReaders, CDatabaseReaderConfigList::forLauncher());
|
a.useWebDataServices(BlackCore::CWebReaderFlags::AllSwiftDbReaders, CDatabaseReaderConfigList::forLauncher());
|
||||||
|
|||||||
Reference in New Issue
Block a user