Skip to content

Commit

Permalink
Remove runtime from Configuration GUI (#64)
Browse files Browse the repository at this point in the history
Signed-off-by: romanodanilo <[email protected]>

Signed-off-by: romanodanilo <[email protected]>
  • Loading branch information
romanodanilo authored May 30, 2024
1 parent e6af694 commit 6922c51
Show file tree
Hide file tree
Showing 15 changed files with 52 additions and 788 deletions.
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

0 comments on commit 6922c51

Please sign in to comment.