swift
Loading...
Searching...
No Matches
main.cpp
1// SPDX-FileCopyrightText: Copyright (C) 2013 swift Project Community / Contributors
2// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
4#include <cstdlib>
5
6#include <QApplication>
7
8#include "swiftguistd.h"
10
12#include "gui/guiapplication.h"
13#include "gui/guiutility.h"
14#include "misc/crashhandler.h"
15
16using namespace swift::gui;
17using namespace swift::misc;
18using namespace swift::misc::audio;
19using namespace swift::core;
20
21int main(int argc, char *argv[])
22{
23 QApplication qa(argc, argv);
24 Q_UNUSED(qa) // application init needed
25
27
28 // at shutdown the whole application will be "deleted" outside the block
29 // that should already delete all widgets
30 int r = 0;
31 {
32 CSwiftGuiStdApplication a; // application with contexts
34 {
35 return EXIT_FAILURE;
36 }
38 a.setMinimumSizeInCharacters(60, 42); // experimental
39 if (!a.start())
40 {
42 return EXIT_FAILURE;
43 }
44
45 // show window
47 SwiftGuiStd w(windowMode);
48 r = a.exec();
49 }
50
51 // bye
52 return r;
53}
Specialized GUI application for swift pilot client.
swift GUI
Definition swiftguistd.h:63
bool parseCommandLineArgsAndLoadSetup()
Combined function that does a startup check, parses the command line arguments and loads the setup.
virtual bool start()
Start services, if not yet parsed call CApplication::parse.
int exec()
Finishes initialization and executes the event loop.
CEnableForFramelessWindow::WindowMode getWindowMode() const
Window mode (window flags).
void splashScreen(const QPixmap &pixmap)
Add a splash screen based on resource, empty means remove splash screen.
void gracefulShutdown()
Graceful shutdown.
void setMinimumSizeInCharacters(int widthChars, int heightChars)
Set minimum width/height in characters.
void init()
Initialize and start crashpad handler process.
static CCrashHandler * instance()
Get singleton instance.
static const QPixmap & swift256()
swift icon
Backend services of the swift project, like dealing with the network or the simulators.
Definition actionbind.cpp:7
GUI related classes.
Free functions in swift::misc.