summaryrefslogtreecommitdiff
path: root/client/pracro.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/pracro.cc')
-rw-r--r--client/pracro.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/client/pracro.cc b/client/pracro.cc
index fdb0d7d..e33ebfc 100644
--- a/client/pracro.cc
+++ b/client/pracro.cc
@@ -31,8 +31,8 @@
#include <QStringList>
#include <QSettings>
-#include "macro.h"
#include "netcom.h"
+#include "mainwindow.h"
#define VERSION "1.0"
@@ -54,8 +54,10 @@ static void print_usage()
printf("Executes the requested Pracro MACRO using supplied CPR and USER.\n");
printf("\n");
printf(" -h, --help Displays this help text.\n");
+ /*
printf(" -m, --macro MACRO Requests macro MACRO from the Pracro \n"
" Server, defaults to \""MACRO_DEFAULT"\".\n");
+ */
printf(" -c, --course COURSE Requests course COURSE from the Pracro \n"
" Server, defaults to \""COURSE_DEFAULT"\".\n");
printf(" -C, --cpr CPR Defines the cpr for use with the macro,\n"
@@ -107,10 +109,12 @@ int main(int argc, char *argv[])
*arg == "-u") {
user = getParam(args,arg);
}
+ /*
else if(*arg == "--macro" ||
*arg == "-m") {
macro = getParam(args, arg);
}
+ */
else if(*arg == "--course" ||
*arg == "-c") {
course = getParam(args, arg);
@@ -138,16 +142,10 @@ int main(int argc, char *argv[])
port = settings.value("port").toInt();
settings.endGroup();
- Global::netcom = new NetCom(host, port, user, cpr);
+ MainWindow mainwindow(cpr, course, host, port, user);
+ mainwindow.show();
- new_macro(course, macro);
-
- //app.setQuitOnLastWindowClosed(false);
int ret = app.exec();
- cleanup_macros();
-
- delete Global::netcom;
-
return ret;
}