Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove runtime from configui #64

Merged
merged 9 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ set(RUNTIME_PROJECT "ConfigGUI")
project(${RUNTIME_PROJECT})

set(CMAKE_AUTOMOC ON)
qt5_add_resources(Resources res/POC_Runtime.qrc)

add_executable(${RUNTIME_PROJECT}
src/c_configuration_validator.cpp
Expand All @@ -21,12 +20,8 @@ add_executable(${RUNTIME_PROJECT}
src/ui/c_param_dialog.cpp
src/ui/c_local_param_dialog.cpp
src/ui/c_global_param_dialog.cpp
src/ui/c_process_log.cpp
src/ui/c_process_view.cpp
src/ui/c_runtime_control.cpp
src/ui/c_runtime_thread.cpp
src/ui/c_runtime_window.cpp
${Resources}
)

target_link_libraries(${RUNTIME_PROJECT} PRIVATE
Expand Down
6 changes: 0 additions & 6 deletions src/runtime/res/POC_Runtime.qrc

This file was deleted.

Binary file removed src/runtime/res/icons/pause.png
Binary file not shown.
Binary file removed src/runtime/res/icons/run.png
Binary file not shown.
29 changes: 8 additions & 21 deletions src/runtime/src/runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ int main(int argc, char *argv[])
std::string strConfigurationFilepath = "";
std::string strXODRFilepath = "";
std::string strXOSCFilePath = "";
bool bAutostart = false;

std::cout << std::endl << std::endl;

Expand Down Expand Up @@ -50,11 +49,6 @@ int main(int argc, char *argv[])
std::cout << "XOSC: " << strXOSCFilePath << std::endl;
}
}
else if (strcmp(argv[i], "-autostart") == 0)
{
bAutostart = true;
std::cout << "Autostart: true" << std::endl;
}
else if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "--help") == 0)
{
ShowHelp(strToolpath);
Expand All @@ -67,7 +61,7 @@ int main(int argc, char *argv[])
strConfigurationFilepath = argv[1];

QApplication app(argc, argv);
RunConfigGUI(strConfigurationFilepath, strXODRFilepath, strXOSCFilePath, bAutostart, app);
RunConfigGUI(strConfigurationFilepath, strXODRFilepath, strXOSCFilePath, app);
return 0;
}

Expand All @@ -82,28 +76,21 @@ void ShowHelp(const std::string &toolPath)
std::cout << "\nOpen the application with DefaultXodrConfiguration.xml: \n"
<< applicationName << " myConfiguration.xml" << std::endl;
std::cout << "\nOpen the application with myConfiguration.xml and a given xodr which is under "
"test. Autostart enables the automatic validation mode: \n"
<< applicationName << " -config myConfiguration.xml -xodr myTrack.xodr [-autostart]" << std::endl;
"test. \n"
<< applicationName << " -config myConfiguration.xml -xodr myTrack.xodr " << std::endl;
std::cout << "\nOpen the application with myConfiguration.xml and a given xosc which is under "
"test. Autostart enables the automatic validation mode: \n"
<< applicationName << " -config myConfiguration.xml -xosc myTrack.xosc [-autostart]" << std::endl;
"test. \n"
<< applicationName << " -config myConfiguration.xml -xosc myTrack.xosc " << std::endl;
std::cout << "\n\n";
}

void RunConfigGUI(const std::string &strConfigurationFilepath, const std::string &strXODRFilepath,
const std::string &strXOSCFilePath, const bool bAutostart, const QApplication &app)
const std::string &strXOSCFilePath, const QApplication &app)
{
cRuntimeWindow mainWindow(strConfigurationFilepath, strXODRFilepath, strXOSCFilePath, bAutostart);
cRuntimeWindow mainWindow(strConfigurationFilepath, strXODRFilepath, strXOSCFilePath);
mainWindow.show();

app.processEvents();

if (bAutostart)
{
mainWindow.Run();
while (mainWindow.IsRunning())
app.processEvents(QEventLoop::AllEvents, 200);
}
else
app.exec();
app.exec();
}
2 changes: 1 addition & 1 deletion src/runtime/src/runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ void ShowHelp(const std::string &applicationName);
* Runs the config gui
*/
void RunConfigGUI(const std::string &strConfigurationFilepath, const std::string &strXODRFilepath,
const std::string &strXOSCFilePath, const bool bAutostart, const QApplication &app);
const std::string &strXOSCFilePath, const QApplication &app);
150 changes: 0 additions & 150 deletions src/runtime/src/ui/c_process_log.cpp

This file was deleted.

102 changes: 0 additions & 102 deletions src/runtime/src/ui/c_process_log.h

This file was deleted.

Loading
Loading