7 #include <QApplication>
9 #include <QCommandLineParser>
10 #include <QDesktopServices>
11 #include <QDialogButtonBox>
15 #include <QGuiApplication>
17 #include <QKeySequence>
18 #include <QMainWindow>
20 #include <QMessageBox>
22 #include <QStringBuilder>
23 #include <QStringList>
25 #include <QStyleFactory>
26 #include <QTextBrowser>
29 #include <QVBoxLayout>
46 #include "gui/registermetadata.h"
59 using namespace swift::config;
61 using namespace swift::misc::db;
62 using namespace swift::misc::network;
66 using namespace swift::core::context;
72 CGuiApplication *CGuiApplication::instance() {
return qobject_cast<CGuiApplication *>(CApplication::instance()); }
76 static const QStringList l(CApplication::getLogCategories() +
QStringList { CLogCategories::guiComponent() });
80 const QString &CGuiApplication::settingsOrganization()
82 static const QString o(
"swift-project.org");
86 bool CGuiApplication::removeAllWindowsSwiftRegistryEntries()
118 CApplication::init(
false);
119 CGuiApplication::adjustPalette();
121 this->settingsChanged();
122 this->setCurrentFontValues();
136 CApplication::registerMetadata();
176 else {
return CEnableForFramelessWindow::WindowNormal; }
183 m_splashScreen.reset();
193 m_splashScreen->show();
194 m_splashScreen->showStatusMessage(
"Version " + CBuildConfig::getVersionString());
212 if (this->
getGlobalSetup().isSwiftVersionMinimumMappingVersion()) {
return true; }
215 QStringLiteral(
"Your are using swift version: '%1'.\nCreating mappings requires at least '%2'.")
216 .
arg(CBuildConfig::getVersionString(), this->
getGlobalSetup().getMappingMinimumVersionString());
234 if (!mainWidget) {
return; }
235 if (m_uiSetupCompleted) {
return; }
236 m_uiSetupCompleted =
true;
253 windowFlags |= flags;
260 if (!myself) {
return; }
269 if (!extraInfo.
isEmpty()) { name = extraInfo % u
' ' % name; }
270 if (!mainWindowWidget) {
return name; }
310 const QString &CGuiApplication::fileForWindowGeometryAndStateSettings()
312 static const QString filename = [] {
314 CFileUtils::appendFilePaths(CSwiftDirectories::normalizedApplicationDataDirectory(),
"settings/qgeom");
315 return CFileUtils::appendFilePaths(
321 int CGuiApplication::hashForStateSettingsSchema(
const QMainWindow *window)
326 hash ^=
qHash(obj->objectName());
330 hash ^=
qHash(obj->objectName());
332 return static_cast<int>((hash & 0xffff) ^ (hash >> 16));
337 if (!window) {
return false; }
340 settings.
setValue(
"windowState", window->
saveState(hashForStateSettingsSchema(window)));
349 settings.
setValue(
"windowState", ba);
354 if (!window) {
return false; }
371 QStringLiteral(
"Restoring the window state/geometry failed!\n"
372 "You need to reset the window size (command -%1).\n\n"
373 "Original msg: %2\n\n"
374 "We can try to reset the values and restart\n"
375 "Do you want to try?")
388 window->
restoreState(s, hashForStateSettingsSchema(window));
395 CApplication::onStartUpCompleted();
396 this->setCurrentFontValues();
402 if (m_minWidthChars > 0 || m_minHeightChars > 0)
410 if (m_minWidthChars > 0) { cs.
setWidth(qRound(fontMetricEstSize.
width())); }
411 if (m_minHeightChars > 0) { cs.
setHeight(qRound(fontMetricEstSize.
height())); }
415 if (m_saveMainWidgetState && !this->
isSet(m_cmdWindowSizeReset))
424 m_splashScreen->close();
425 m_splashScreen.reset();
432 if (informativeText.
length() < 300)
444 if (msgs.
isEmpty()) {
return; }
448 { CStatusMessage::IndexSeverityAsString, CStatusMessage::IndexMessage });
449 const QString msgsHtml = msgs.
toHtml(msgs.
size() > 1 ? propertiesMulti : propertiesSingle);
461 if (!m) {
return false; }
467 if (message.
isEmpty()) {
return false; }
476 if (messages.
isEmpty()) {
return false; }
485 if (html.
isEmpty()) {
return false; }
494 QMenu *sm = menu.
addMenu(CIcons::appSettings16(),
"Settings");
495 sm->
setIcon(CIcons::appSettings16());
502 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
507 CSettingsCache::instance()->clearAllValues();
510 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
512 a = sm->
addAction(
"List settings files");
515 const QStringList files(CSettingsCache::instance()->enumerateStore());
518 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
521 sm->
setIcon(CIcons::appSettings16());
522 a = sm->
addAction(CIcons::disk16(),
"Cache directory");
527 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
532 const QStringList files = CApplication::clearCaches();
535 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
540 const QStringList files(CDataCache::instance()->enumerateStore());
543 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
545 a = menu.
addAction(CIcons::disk16(),
"Log directory");
548 this->openStandardLogDirectory();
550 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
552 a = menu.
addAction(CIcons::disk16(),
"Crash dumps directory");
555 this->openStandardCrashDumpDirectory();
557 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
559 a = menu.
addAction(CIcons::swift24(),
"Check for updates");
561 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
571 this->reloadStyleSheets();
573 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
578 this->openStandardWidgetStyleSheet();
580 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
607 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
623 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
625 a = sm->
addAction(
"JSON version update info (for info only)");
634 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
638 a = menu.
addAction(
"Services log.(console)");
646 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
648 a = sm->
addAction(
"JSON DB info (for info only)");
658 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
660 a = sm->
addAction(
"JSON shared info (for info only)");
670 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
681 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
689 const QSize iconSize = CIcons::empty16().size();
698 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
706 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
714 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
716 a = menu.
addAction(
"Toggle stay on top");
721 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
723 a = menu.
addAction(
"Toggle to front or back");
725 Q_ASSERT_X(c, Q_FUNC_INFO,
"connect failed");
729 Q_ASSERT_X(c, Q_FUNC_INFO,
"connect failed");
733 Q_ASSERT_X(c, Q_FUNC_INFO,
"connect failed");
735 a = menu.
addAction(
"Toggle normal or minimized");
740 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
746 if (url.
isEmpty() || this->isShuttingDown()) {
return; }
760 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
768 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
773 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
779 Q_ASSERT_X(c, Q_FUNC_INFO,
"Connect failed");
798 const QString changelogPath = CFileUtils::appendFilePaths(CSwiftDirectories::shareDirectory(),
"CHANGELOG.md");
799 const QString changelog = CFileUtils::readFileToString(changelogPath);
803 QStringLiteral(
"Unable to load changelog from %1").arg(changelogPath));
813 browser->setMarkdown(changelog);
814 browser->setOpenExternalLinks(
true);
815 layout->addWidget(browser);
819 layout->addWidget(buttons);
830 if (currentWidgetStyle.
startsWith(
'Q')) { currentWidgetStyle.
remove(0, 1); }
831 return currentWidgetStyle.
replace(
"Style",
"");
845 if (!
QDir(path).exists()) {
return false; }
852 if (!
QDir(path).exists()) {
return false; }
859 return m_styleSheetUtility.
updateFont(fontFamily, fontSize, fontStyle, fontWeight, fontColor);
868 m_minWidthChars = widthChars;
869 m_minHeightChars = heightChars;
896 if (mainWindow && !mainWindow->
windowTitle().isEmpty())
910 if (closeEvent) { closeEvent->
ignore(); }
933 const int result = m_updateDialog->
exec();
940 if (!w) {
return QStringLiteral(
"Font info not available"); }
941 return QStringLiteral(
"Family: '%1', average width: %2")
942 .arg(w->
font().family())
949 if (!w) {
return false; }
951 CLogMessage(w).
info(onTop ? QStringLiteral(
"Window on top") : QStringLiteral(
"Window not always on top"));
1023 m_normalizeMinimize = !m_normalizeMinimize;
1028 if (!m_updateSetting.get()) {
return; }
1031 if (m_updateDialog) {
return; }
1041 CLogMessage(
this).
info(u
"Graceful shutdown of GUI application started");
1042 if (m_saveMainWidgetState)
1049 CApplication::gracefulShutdown();
1053 if (modals.
count() > 0)
1056 CLogMessage(
this).
info(u
"Graceful shutdown, still %1 modal widget(s), closed: %2")
1064 if (docks.
count() > 0)
1067 CLogMessage(
this).
warning(u
"Graceful shutdown, still %1 floating dock widget(s), closed: %2")
1072 void CGuiApplication::settingsChanged()
1075 const QString widgetStyle = m_guiSettings.get().getWidgetStyle();
1077 Q_ASSERT_X(CThreadUtils::thisIsMainThread(), Q_FUNC_INFO,
"Wrong thread");
1081 if (availableStyles.
contains(widgetStyle))
1099 else {
CLogMessage(
this).
error(u
"Unable to set requested style '%1'") << widgetStyle; }
1105 void CGuiApplication::checkNewVersionMenu() { this->
checkNewVersion(
false); }
1107 void CGuiApplication::adjustPalette()
1112 QPalette newPalette(qApp->palette());
1113 const QColor linkColor(135, 206, 250);
1116 qApp->setPalette(newPalette);
1119 void CGuiApplication::onStyleSheetsChanged()
1130 void CGuiApplication::setCurrentFontValues()
1133 m_fontFamily = font.
family();
static constexpr bool isRunningOnWindowsNtPlatform()
Running on Windows NT platform?
QString getParserValue(const QString &option) const
Delegates to QCommandLineParser::value.
std::atomic_bool m_shutdown
Is being shutdown?
void restartApplication(const QStringList &newArguments={}, const QStringList &removeArguments={})
Stop and restart application.
bool isParserOptionSet(const QString &option) const
Delegates to QCommandLineParser::isSet.
data::CGlobalSetup getGlobalSetup() const
Global setup.
QCommandLineParser m_parser
cmd parser
bool hasUnsavedSettings() const
Unsaved settings.
bool hasWebDataServices() const
Web data services available?
const context::IContextNetwork * getIContextNetwork() const
Direct access to contexts if a CCoreFacade has been initialized.
bool addParserOption(const QCommandLineOption &option)
bool isShuttingDown() const
Is application shutting down?
bool isSet(const QCommandLineOption &option) const
Flag set or explicitly set to true.
std::atomic_bool m_shutdownInProgress
shutdown in progress?
const QString & getApplicationNameVersionDetailed() const
Version, name beta and dev info.
CWebDataServices * getWebDataServices() const
Get the web data services.
const QString & getApplicationNameAndVersion() const
Application name and version.
void saveSettingsOnShutdown(bool saveSettings)
Save settings on shutdown.
void startUpCompleted(bool success)
Startup has been completed Will be triggered shortly before starting the event loop.
swift::core::db::CInfoDataReader * getDbInfoDataReader() const
DB info data reader.
swift::core::db::CInfoDataReader * getSharedInfoDataReader() const
Shared info data reader.
Global settings for readers, debug flags, etc.
swift::misc::network::CUrl getHelpPageUrl() const
Help page URL.
swift::misc::db::CDbInfoList getInfoObjects() const
Get info list (either shared or from DB)
static WindowMode stringToWindowMode(const QString &s)
String to window mode.
GUI application, a specialized version of swift::core::CApplication for GUI applications.
bool openStandardWidgetStyleSheet()
Opens the standard stylesheet.
static void modalWindowToFront()
Bring any modal dialog to front.
bool isCmdWindowSizeResetSet() const
Window size reset mode set.
QString setExtraWindowTitle(const QString &extraInfo, QWidget *mainWindowWidget=mainApplicationWidget()) const
Set window title.
QString getFontInfo() const
Info about font.
static swift::gui::IMainWindowAccess * mainWindowAccess()
Main window access interface.
void onCoreFacadeStarted()
Called when facade/contexts have been started.
void registerMainApplicationWidget(QWidget *mainWidget)
Register main application window widget if this is known.
void addWindowResetSizeOption()
CMD line arguments (reset size store)
void addWindowStateOption()
CMD line arguments.
void processEventsToRefreshGui() const
Allow the GUI to refresh by processing events, call the event loop.
Qt::WindowState getWindowState() const
Window state.
bool hasMinimumMappingVersion() const
Minimum mapping version check.
void addWindowModeOption()
CMD line arguments.
static QRect currentScreenGeometry()
Current screen resolution.
void triggerNewVersionCheck(int delayedMs)
Trigger new version check.
bool openStandardCrashDumpDirectory()
Opens the standard dumps directory.
static CGuiApplication * instance()
Similar to.
void windowToFront()
Window to front/back.
CEnableForFramelessWindow::WindowMode getWindowMode() const
Window mode (window flags)
void addMenuHelp(QMenu &menu)
Help operations.
void addMenuForStyleSheets(QMenu &menu)
Add menu for style sheets.
~CGuiApplication()
Destructor.
bool reloadStyleSheets()
Reload style sheets.
void cmdLineErrorMessage(const QString &text, const QString &informativeText) const
print messages generated during parsing / cmd handling
static void exit(int retcode=0)
Exit application, perform graceful shutdown and exit.
void addMenuFile(QMenu &menu)
File menu.
void addMenuInternals(QMenu &menu)
Internals menu.
bool displayInOverlayWindow(const swift::misc::CStatusMessage &message, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
direct access to main application window
void checkNewVersion(bool onlyIfNew)
Check for a new version (update)
void splashScreen(const QPixmap &pixmap)
Add a splash screen based on resource, empty means remove splash screen.
bool restoreWindowGeometryAndState(QMainWindow *window=CGuiApplication::mainApplicationWindow())
Restore widget's geometry and state.
void fontChanged()
Font has been changed.
const CStyleSheetUtility & getStyleSheetUtility() const
Style sheet handling.
bool saveWindowGeometryAndState(const QMainWindow *window=CGuiApplication::mainApplicationWindow()) const
Save widget's geometry and state.
QDialog::DialogCode showCloseDialog(QMainWindow *mainWindow, QCloseEvent *closeEvent)
Show close dialog.
void windowToBack()
Window to front/back.
void gracefulShutdown()
Graceful shutdown.
void onStartUpCompleted()
Startup completed.
bool toggleStayOnTop()
Toggle stay on top.
void windowToFrontBackToggle()
Window to front/back.
static void registerMetadata()
Register metadata.
static void setWindowIcon(const QPixmap &icon)
Set icon.
bool resetFont()
Reset the font to default.
void displaySetupLoadFailure(swift::misc::CStatusMessageList msgs)
Display the failures caused by loading the setup file.
void windowMinimizeNormalToggle()
Window minimize/normalize.
void addMenuForSettingsAndCache(QMenu &menu)
Add menu items for settings and cache.
bool updateFont(const QString &fontFamily, const QString &fontSize, const QString &fontStyle, const QString &fontWeight, const QString &fontColor)
Update the fonts.
void showHelp(const QString &subpath={}) const
Show help page (online help)
bool displayInStatusBar(const swift::misc::CStatusMessage &message)
direct access to main application window
void alwaysOnTop(bool onTop)
always on top
static QWidget * mainApplicationWidget()
Main application window widget.
static QMainWindow * mainApplicationWindow()
Main application window.
bool parsingHookIn()
Handle parsing of special GUI cmd arguments.
void uiObjectTreeReady()
Object tree ready (means ui->setupUi() completed)
void openUrl(const swift::misc::network::CUrl &url)
Open a given URL.
bool openStandardLogDirectory()
Opens the standard log directory.
void addMenuWindow(QMenu &menu)
Window operations.
void initMainApplicationWidget(QWidget *mainWidget)
Init the main application window based on information in this application.
static QScreen * currentScreen()
Current screen.
void addWindowFlags(Qt::WindowFlags flags)
Set window flag on main application window.
QString getWidgetStyle() const
Current widget style.
void showChangelog() const
Show changelog popup.
void styleSheetsChanged()
Style sheet changed.
void setMinimumSizeInCharacters(int widthChars, int heightChars)
Set minimum width/height in characters.
void resetWindowGeometryAndState()
Reset the saved values.
static bool stayOnTop(bool onTop, QWidget *widget)
Window flags / stay on top.
static QStringList deleteLaterAllDockWidgetsGetTitles(QWidget *parent, bool floatingOnly)
"deleteLater" all dock widgets
static bool staysOnTop(QWidget *widget)
Window on top?
static void registerMainApplicationWidget(QWidget *mainWidget)
Register main application window widget if this is known.
static QSizeF fontMetricsEstimateSize(int xCharacters, int yCharacters, bool withRatio=false)
Estimate size based on current font.
static void superviseMainWindowMinSizes(qreal wRatio=0.85, qreal hRatio=0.85)
Make sure that the min.sizes to not exceed the screen resolution.
static QString metricsInfo()
Some info about font metrics.
static QWidget * mainApplicationWidget()
Main application window widget.
static QStringList closeAllModalWidgetsGetTitles()
Close all modal widgets and get titles.
static QFont currentFont()
Main window font or default font.
static bool toggleStayOnTop(QWidget *widget)
Toggle window flags / stay on top.
Reads and provides style sheets.
static const QString & fileNameStandardWidget()
File name for standard widgets.
bool updateFont(const QFont &font)
Update the fonts.
static void setQSysInfoProperties(QWidget *widget, bool withChildWidgets)
Set QSysInfo properties for given widget (which can be used in stylesheet)
bool read()
Read the *.qss files.
static const QString & fileNameAndPathStandardWidget()
Full file path and name for standard widgets.
void styleSheetsChanged()
Sheets have been changed.
QString styles(const QStringList &fileNames) const
Multiple styles concatenated.
bool resetFont()
Reset font.
static const QString & fileNameFonts()
File name fonts.qss.
Direct acccess to main window`s status bar, info bar and such.
virtual bool displayInOverlayWindow(const swift::misc::CStatusMessage &message, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
Display in overlay window.
virtual bool displayInStatusBar(const swift::misc::CStatusMessage &message)
Display in status bar.
Close dialog for application.
Setup dialog, if loading the boostrap file fails.
Download and install swift.
bool isNewVersionAvailable() const
A new version existing?
Application
Enumeration of application roles.
QString toJsonString(QJsonDocument::JsonFormat format=QJsonDocument::Indented) const
Convenience function JSON as string.
Class for emitting a log message.
Value class for matching log messages based on their categories.
CLogPattern withSeverity(CStatusMessage::StatusSeverity severity) const
Returns a CLogPattern which will match the same messages as this one, but only with a given severity.
A helper class for subscribing to log messages matching a particular pattern, with the ability to cha...
void changeSubscription(const CLogPattern &pattern)
Change the pattern which you want to subscribe to.
Derived & warning(const char16_t(&format)[N])
Set the severity to warning, providing a format string.
bool isEmpty() const
Message empty.
Derived & validationError(const char16_t(&format)[N])
Set the severity to error, providing a format string, and adding the validation category.
Derived & error(const char16_t(&format)[N])
Set the severity to error, providing a format string.
Derived & info(const char16_t(&format)[N])
Set the severity to info, providing a format string.
Value object encapsulating a list of property indexes.
size_type size() const
Returns number of elements in the sequence.
bool isEmpty() const
Synonym for empty.
Streamable status message, e.g.
QString getMessage() const
Message.
Status messages, e.g. from Core -> GUI.
QString toHtml(const CPropertyIndexList &indexes=simpleHtmlOutput()) const
Specialized version to convert to HTML.
bool hasErrorMessages() const
Error messages.
Value object encapsulating a list of info objects.
Update info, i.e. artifacts and distributions.
Value object encapsulating information of a location, kind of simplified CValueObject compliant versi...
bool isEmpty() const
Empty.
CUrl withAppendedPath(const QString &path) const
Append path.
SWIFT_GUI_EXPORT swift::gui::CGuiApplication * sGui
Single instance of GUI application object.
Core data traits (aka cached values) and classes.
Backend services of the swift project, like dealing with the network or the simulators.
High level reusable GUI components.
void registerMetadata()
Register metadata for GUI.
Free functions in swift::misc.
QString getAllUserMetatypesTypes(const QString &separator)
Get all user metatypes.
QMetaObject::Connection connectOnce(T *sender, F signal, U *receiver, G &&slot, Qt::ConnectionType type=Qt::AutoConnection)
Wrapper around QObject::connect which disconnects after the signal has been emitted once.
SWIFT_MISC_EXPORT bool stringCompare(const QString &c1, const QString &c2, Qt::CaseSensitivity cs)
String compare.
QString className(const QObject *object)
Class name as from QMetaObject::className with namespace.
QString applicationName()
Get application name.
void triggered(bool checked)
QStyle * setStyle(const QString &style)
bool isEmpty() const const
QStringList names() const const
QString valueName() const const
bool isSet(const QCommandLineOption &option) const const
QString applicationFilePath()
void processEvents(QEventLoop::ProcessEventsFlags flags)
QString translate(const char *context, const char *sourceText, const char *disambiguation, int n)
bool openUrl(const QUrl &url)
void setModal(bool modal)
QString toNativeSeparators(const QString &pathName)
QString family() const const
int pointSize() const const
void setFamily(const QString &family)
void setPointSize(int pointSize)
void setStretch(int factor)
int averageCharWidth() const const
Qt::KeyboardModifiers queryKeyboardModifiers()
void setWindowIcon(const QIcon &icon)
qsizetype count() const const
bool restoreState(const QByteArray &state, int version)
QByteArray saveState(int version) const const
QMessageBox::StandardButton critical(QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton)
void setDetailedText(const QString &text)
virtual int exec() override
void setInformativeText(const QString &text)
QMessageBox::StandardButton warning(QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton)
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QList< T > findChildren(QAnyStringView name, Qt::FindChildOptions options) const const
QObject * parent() const const
void setObjectName(QAnyStringView name)
bool isNull() const const
QPixmap scaled(const QSize &size, Qt::AspectRatioMode aspectRatioMode, Qt::TransformationMode transformMode) const const
QString fileName() const const
void remove(QAnyStringView key)
void setValue(QAnyStringView key, const QVariant &value)
QVariant value(QAnyStringView key) const const
void setHeight(int height)
qreal height() const const
qreal width() const const
QString arg(Args &&... args) const const
bool isEmpty() const const
qsizetype length() const const
QString number(double n, char format, int precision)
QString & remove(QChar ch, Qt::CaseSensitivity cs)
QString & replace(QChar before, QChar after, Qt::CaseSensitivity cs)
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
bool contains(QLatin1StringView str, Qt::CaseSensitivity cs) const const
QString join(QChar separator) const const
QStyle * create(const QString &key)
typedef KeyboardModifiers
QUrl fromLocalFile(const QString &localFile)
QByteArray toByteArray() const const
void setWindowIconText(const QString &)
QScreen * screen() const const
#define SWIFT_VERIFY_X(COND, WHERE, WHAT)
A weaker kind of assert.