7int main(
int argc,
char *argv[])
9 yarp::os::Network
yarp;
11 QApplication a(argc, argv);
19 printf(
"%s --local <localportname> --remote <grabberport> [--width <gui width>] [--height <gui height>] [--x <gui x pos>] [--y <gui y pos>]\n",argv[0]);
23 yarp::os::Property options;
24 options.fromCommand(argc,argv);
26 printf(
"%s\n",options.toString().c_str());
29 yarp::os::Searchable *Network = &options.findGroup(
"NETWORK");
30 yarp::os::Searchable *Window = &options.findGroup(
"WINDOW");
33 if (Network->isNull()) { Network = &options; }
34 if (Window->isNull()) { Window = &options; }
39 char portName[256]=
"",outPortName[256]=
"";
41 if (Network->check(
"PortName",val)||Network->check(
"local",val)){
42 strcpy(portName, val->asString().c_str());
45 if (Network->check(
"OutPortName",val)||Network->check(
"remote",val)){
46 strcpy(outPortName, val->asString().c_str());
55 width = window->width();
56 height = window->height();
58 if (Window->check(
"PosX",val)||Window->check(
"x",val)){
59 posX = val->asInt32();
61 if (Window->check(
"PosY",val)||Window->check(
"y",val)){
62 posY = val->asInt32();
64 if (Window->check(
"width",val)){
65 width = val->asInt32();
67 if (Window->check(
"height",val)){
68 height = val->asInt32();
71 window->resize(width,height);
72 window->move(posX,posY);