From 3541224f0fb3d5b7b531eef45318d7e41cb51915 Mon Sep 17 00:00:00 2001 From: deva Date: Fri, 19 Sep 2008 12:07:48 +0000 Subject: First working version of the collapser-pracro view. --- client/pracro.cc | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'client/pracro.cc') 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 #include -#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; } -- cgit v1.2.3