Parser::Parser() : m_helpOption(addHelpOption()) { setSingleDashWordOptionMode(QCommandLineParser::ParseAsLongOptions); addOption(launchColorCubeDemo); addOption(launchTextureCubeDemo); addOption(launchMonoWebcamDemo); addOption(launchStereoWebcamDemo); addOption(launchClientDemo); addOption(launchServerDemo); addOption(launchFirstPersonViewDemo); }
CommandLineParser::CommandLineParser() : QCommandLineParser() { setApplicationDescription( Alexandra::appDescription ); // "-h" and "--help" addHelpOption(); // "-v" and "--version" addVersionOption(); // Adding films from the command line arguments addPositionalArgument( "films", "Add films to the database.", "[<file1> [<file2> ...]]" ); // "-c" and "--config" configLocationOption = new QCommandLineOption( QStringList() << "c" << "config", "Specify the location of the configuration file.", "/path/to/config" ); addOption( *configLocationOption ); }
/*===========================================================================*/ Argument::Argument( int argc, char** argv ): kvs::CommandLine( argc, argv, kvsview::CommandName ) { addHelpOption(); addOption( "help", "Output help message for each process. (ex. -help Isosurface)", 1 ); addOption( kvsview::PointRenderer::CommandName, kvsview::PointRenderer::Description, 0 ); addOption( kvsview::LineRenderer::CommandName, kvsview::LineRenderer::Description, 0 ); addOption( kvsview::PolygonRenderer::CommandName, kvsview::PolygonRenderer::Description, 0 ); addOption( kvsview::Isosurface::CommandName, kvsview::Isosurface::Description, 0 ); addOption( kvsview::SlicePlane::CommandName, kvsview::SlicePlane::Description, 0 ); addOption( kvsview::OrthoSlice::CommandName, kvsview::OrthoSlice::Description, 0 ); addOption( kvsview::TransferFunction::CommandName, kvsview::TransferFunction::Description, 0 ); addOption( kvsview::ExtractEdges::CommandName, kvsview::ExtractEdges::Description, 0 ); addOption( kvsview::ExtractVertices::CommandName, kvsview::ExtractVertices::Description, 0 ); addOption( kvsview::ExternalFaces::CommandName, kvsview::ExternalFaces::Description, 0 ); addOption( kvsview::RayCastingRenderer::CommandName, kvsview::RayCastingRenderer::Description, 0 ); addOption( kvsview::ParticleBasedRenderer::CommandName, kvsview::ParticleBasedRenderer::Description, 0 ); addOption( kvsview::Histogram::CommandName, kvsview::Histogram::Description, 0 ); addValue( "input data file", false ); }
/*===========================================================================*/ void Argument::Common::set_options() { addHelpOption("help"); addOption("antialiasing", "Enable anti-aliasing. (optional)", 0, false ); addOption("axis", "Show axis. (optional)", 0, false ); addOption("axis_color", "Set axis color. (default: 0 0 0)", 3, false ); addOption("axis_label_color", "Set axis label color. (default: 0 0 0)", 3, false ); addOption("axis_line_width", "Set axis line width. (default: 2)", 1, false ); addOption("axis_gridline_width", "Set axis gridline width. (default: 1)", 1, false ); addOption("axis_x_label", "Set label for the x-axis. (default: X)", 1, false ); addOption("axis_y_label", "Set label for the y-axis. (default: Y)", 1, false ); addOption("axis_z_label", "Set label for the z-axis. (default: Z)", 1, false ); addOption("axis_gridlines", "Set number of gridlines for each axis. (default: 5 5 5)", 3, false ); addOption("background_color", "Set background color. (default: 212 221 229)", 3, false ); addOption("background_color2", "Set top and bottom side color on the background. (optional: <top: r g b> <bottom: r g b>)", 6, false ); addOption("bounds", "Show bounding box. (optional)", 0, false ); addOption("bounds_color", "Set bounding box color. (default: 0 0 0)", 3, false ); addOption("screen_position", "Set screen position. (default: 0 0)", 2, false ); addOption("screen_size", "Set screen size. (default: 512 512)", 2, false ); addOption("output", "Output filename. (optional: <filename>)", 1, false ); addOption("verbose", "Enable additional output message. (optional)", 0, false); addValue("input data file"); }