2015-08-31 19:28:14 -05:00
|
|
|
#include <QDebug>
|
|
|
|
#include "../wrapper/wrapper.h"
|
|
|
|
#include "../wimp/wimp.h"
|
|
|
|
|
2015-08-31 21:00:46 -05:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <pthread.h>
|
|
|
|
|
|
|
|
struct Wimp* t;
|
|
|
|
|
|
|
|
|
|
|
|
int i=0;
|
|
|
|
|
|
|
|
void *initGui(void *arg)
|
|
|
|
{
|
|
|
|
char **arguments = (char**)arg;
|
|
|
|
t = ctrWimp(i,arguments);
|
|
|
|
CreateMainWindow(t); //-->uncomment this to open the QT gui
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-08-31 19:28:14 -05:00
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
2015-08-31 21:00:46 -05:00
|
|
|
i = argc;
|
2015-08-31 19:28:14 -05:00
|
|
|
|
2015-08-31 21:00:46 -05:00
|
|
|
pthread_t gui;
|
|
|
|
int rc;
|
|
|
|
rc=pthread_create(&gui, NULL, initGui, (void *)argv);
|
|
|
|
if(rc!=0)
|
|
|
|
{
|
|
|
|
printf("failed");
|
|
|
|
exit(1);
|
|
|
|
}
|
2015-08-31 19:28:14 -05:00
|
|
|
|
2015-08-31 21:00:46 -05:00
|
|
|
for(int j=0;j<100;j++)
|
|
|
|
{
|
|
|
|
Sleep(1000);
|
|
|
|
printf("test = %d\n",i);
|
|
|
|
i++;
|
|
|
|
if(j < 2)
|
|
|
|
t->SetTitle("test");
|
|
|
|
}
|
2015-08-31 19:28:14 -05:00
|
|
|
|
2015-08-31 21:00:46 -05:00
|
|
|
pthread_join(gui,NULL);
|
|
|
|
return 0;
|
2015-08-31 19:28:14 -05:00
|
|
|
}
|
|
|
|
|