mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-08-06 01:06:31 +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));
|
||||
}
|
||||
|
||||
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
|
||||
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:
|
||||
int m_app = static_cast<int>(Unknown);
|
||||
int m_mode = 0;
|
||||
|
||||
@@ -28,7 +28,7 @@ int main(int argc, char *argv[])
|
||||
CGuiApplication::highDpiScreenSupport();
|
||||
QApplication qa(argc, argv);
|
||||
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.addDBusAddressOption();
|
||||
a.addVatlibOptions();
|
||||
|
||||
@@ -26,7 +26,7 @@ int main(int argc, char *argv[])
|
||||
CGuiApplication::highDpiScreenSupport();
|
||||
QApplication qa(argc, argv);
|
||||
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.splashScreen(CIcons::swiftDatabase256());
|
||||
if (!a.parse()) { return EXIT_FAILURE; }
|
||||
|
||||
@@ -20,7 +20,7 @@ using namespace BlackMisc;
|
||||
using namespace BlackCore;
|
||||
|
||||
CSwiftGuiStdApplication::CSwiftGuiStdApplication() :
|
||||
CGuiApplication("swift pilot client GUI", CApplicationInfo::PilotClientGui, CIcons::swift1024())
|
||||
CGuiApplication(CApplicationInfo::swiftPilotClientGui(), CApplicationInfo::PilotClientGui, CIcons::swift1024())
|
||||
{
|
||||
this->addParserOption(this->m_cmdFacadeMode);
|
||||
this->addWindowModeOption();
|
||||
|
||||
@@ -32,7 +32,7 @@ int main(int argc, char *argv[])
|
||||
CGuiApplication::highDpiScreenSupport();
|
||||
QApplication qa(argc, argv); // needed
|
||||
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.") });
|
||||
if (!a.parse()) { return EXIT_FAILURE; }
|
||||
a.useWebDataServices(BlackCore::CWebReaderFlags::AllSwiftDbReaders, CDatabaseReaderConfigList::forLauncher());
|
||||
|
||||
Reference in New Issue
Block a user