12int main(
int argc,
char *argv[])
16 QApplication a(argc, argv);
22 if (options.
check(
"help"))
25 yInfo(
"yarpframegrabbergui --local <localportname> --remote <grabberport> [--width <gui width>] [--height <gui height>] [--x <gui x pos>] [--y <gui y pos>]");
35 if (Network->
isNull()) { Network = &options; }
36 if (Window->
isNull()) { Window = &options; }
40 std::string localPortName =
"/yarpframegrabbergui/rpc";
41 std::string remotePortName;
42 if (Network->
check(
"local",val)){
45 if (Network->
check(
"remote",val)){
51 window =
new MainWindow(localPortName, remotePortName);
54 width = window->width();
55 height = window->height();
57 if (Window->
check(
"PosX",val)||Window->
check(
"x",val)){
60 if (Window->
check(
"PosY",val)||Window->
check(
"y",val)){
63 if (Window->
check(
"width",val)){
66 if (Window->
check(
"height",val)){
70 window->resize(width,height);
71 window->move(posX,posY);
Utilities for manipulating the YARP network, including initialization and shutdown.
A class for storing options and configuration information.
std::string toString() const override
Return a standard text representation of the content of the object.
bool check(const std::string &key) const override
Check if there exists a property of the given name.
Bottle & findGroup(const std::string &key) const override
Gets a list corresponding to a given keyword.
void fromCommand(int argc, char *argv[], bool skipFirst=true, bool wipe=true)
Interprets a list of command arguments as a list of properties.
A base class for nested structures that can be searched.
virtual bool isNull() const
Checks if the object is invalid.
virtual bool check(const std::string &key) const =0
Check if there exists a property of the given name.
A single value (typically within a Bottle).
virtual std::int32_t asInt32() const
Get 32-bit integer value.
virtual std::string asString() const
Get string value.
int main(int argc, char *argv[])
The main, catch-all namespace for YARP.