-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Leveled encoder/synthesizer commands via Application class
- Loading branch information
1 parent
44707bb
commit bd216bd
Showing
16 changed files
with
1,003 additions
and
391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,9 @@ | ||
// Copyright 2023 Joseph Bellahcen <[email protected]> | ||
|
||
#ifdef TMSEXPRESS_GUI | ||
#include <QApplication> | ||
#endif // TMSEXPRESS_GUI | ||
// Copyright (C) 2022-2024 Joseph Bellahcen <[email protected]> | ||
|
||
#include "ui/cli/CommandLineApp.hpp" | ||
|
||
#ifdef TMSEXPRESS_GUI | ||
#include "ui/gui/MainWindow.hpp" | ||
#endif // TMSEXPRESS_GUI | ||
|
||
int runCommandLineApp(int argc, char **argv) { | ||
int main(int argc, char** argv) { | ||
auto cli = tms_express::ui::CommandLineApp(); | ||
int status = cli.run(argc, argv); | ||
return status; | ||
} | ||
|
||
#ifdef TMSEXPRESS_GUI | ||
int runGraphicalApp(int argc, char **argv) { | ||
QApplication app(argc, argv); | ||
|
||
tms_express::ui::MainWindow w; | ||
w.show(); | ||
|
||
return app.exec(); | ||
} | ||
#endif // TMSEXPRESS_GUI | ||
|
||
int main(int argc, char **argv) { | ||
// If no arguments are passed, launch GUI | ||
if (argc == 1) { | ||
#ifdef TMSEXPRESS_GUI | ||
runGraphicalApp(argc, argv); | ||
#else | ||
runCommandLineApp(argc, argv); | ||
#endif | ||
} | ||
|
||
// Otherwise, use command-line interface | ||
if (argc > 1) { | ||
runCommandLineApp(argc, argv); | ||
} | ||
CLI11_PARSE(cli, argc, argv); | ||
return 0; | ||
} |
Oops, something went wrong.