AMDetectorSetDarkCurrentValidStateActionInfo::AMDetectorSetDarkCurrentValidStateActionInfo(bool newState, const AMDetectorInfo &detectorInfo, QObject *parent) :
    AMActionInfo3(QString(), QString(), QString(), parent)
{
	darkCurrentState_ = newState;
	detectorInfo_.setValuesFrom(detectorInfo);

	setShortDescription(typeDescription());
	setLongDescription(typeDescription());
}
Пример #2
0
AMActionInfo3::AMActionInfo3(const AMActionInfo3& other)
	: AMDbObject(),
	  longDescription_(other.longDescription_),
	  iconFileName_(other.iconFileName_)
{
	setName(other.name());
	setShortDescription(other.shortDescription());
	expectedDuration_ = other.expectedDuration_;
	canCopy_ = other.canCopy();
}
Пример #3
0
AMActionInfo3::AMActionInfo3(const QString &shortDescription, const QString & longDescription, const QString &iconFileName, QObject *parent)
	: AMDbObject(parent),
	  longDescription_(longDescription),
	  iconFileName_(iconFileName)
{
	setName(shortDescription);
	setShortDescription(shortDescription);
	expectedDuration_ = -1;
	canCopy_ = true;
}
Пример #4
0
DiHdfRasterPager::DiHdfRasterPager()
{
   setName("DiHdfRasterPager");
   setCopyright(IMPORTERS_COPYRIGHT);
   setCreator("Ball Aerospace & Technologies Corp.");
   setDescription("Provides access to on-disk DI HDF data");
   setDescriptorId("{b6ebb6b8-c37d-4d2c-9472-80b6474ce6f6}");
   setVersion(IMPORTERS_VERSION_NUMBER);
   setProductionStatus(IMPORTERS_IS_PRODUCTION_RELEASE);
   setShortDescription("DI HDF pager");
}
LandsatGeotiffImporter::LandsatGeotiffImporter()
{
   setDescriptorId("{A8E57295-9A8-44FD-96D8-26A4FA13298F}");
   setName("Landsat GeoTIFF Importer");
   setCreator("Ball Aerospace & Technologies Corp.");
   setShortDescription("Importer for Landsat data in GeoTIFF format.");
   setCopyright(SPECTRAL_COPYRIGHT);
   setVersion(SPECTRAL_VERSION_NUMBER);
   setProductionStatus(SPECTRAL_IS_PRODUCTION_RELEASE);
   setExtensions("Landsat 5 Files (*_MTL.txt *_mtl.txt *.tif *.TIF);;"
      "Landsat 7 Files (*_MTL.txt *_mtl.txt *.tif *.TIF)");
}
Пример #6
0
MessageLogTestPlugin::MessageLogTestPlugin()
{
   setCreator("Opticks Community");
   setVersion("Sample");
   setCopyright("Copyright (C) 2008, Ball Aerospace & Technologies Corp.");
   setProductionStatus(false);
   setName("Message Log Test");
   setShortDescription( "MessageLogTest" );
   setDescription("MessageLogTest");
   setMenuLocation("[Tests]\\Message Log Test");
   setDescriptorId("{4E1D4266-D816-49a8-AAC5-ECCCF8FF2A50}");
   setWizardSupported(false);
}
void AMSamplePlateMoveActionInfo::updateDescriptionText(){
	QString description;

	if(samplePlateId_ == -1)
		description = samplePlateName();
	else if(samplePositionIndex_ == -1)
		description = QString("%1 on plate %2").arg(samplePositionName()).arg(samplePlateName());
	else
		description = QString("Moving to %1 on plate %2").arg(samplePositionName()).arg(samplePlateName());

	setShortDescription(description);
	setLongDescription(description);
}
Пример #8
0
DicomRasterPager::DicomRasterPager() : mpImage(NULL), mConvertRgb(false)
{
   setName("DicomRasterPager");
   setCopyright(IMPORTERS_COPYRIGHT);
   setCreator("Ball Aerospace & Technologies Corp.");
   setDescription("Provides access to on-disk DICOM data");
   setDescriptorId("{27C35133-CBA7-41a6-AEBE-3B570FFC2E9F}");
   setVersion(IMPORTERS_VERSION_NUMBER);
   setProductionStatus(IMPORTERS_IS_PRODUCTION_RELEASE);
   setShortDescription("DICOM pager");
   DJDecoderRegistration::registerCodecs();
   DcmRLEDecoderRegistration::registerCodecs();
}
Пример #9
0
seqan::ArgumentParser::ParseResult
parseArgs(FxSamCoverageOptions & options,
          int argc,
          char const ** argv)
{
    seqan::ArgumentParser parser("fx_sam_coverage");
    setShortDescription(parser, "Read Coverage Computation.");
    setVersion(parser, "0.1");
    setDate(parser, "August 2012");
    
    addUsageLine(parser, "[\\fIOPTIONS\\fP] \\fB-o\\fP \\fIOUT.tsv\\fP \\fIGENOME.fa\\fP \\fIMAPPING.sam\\fP");
    addDescription(parser, "Compute read coverage and C+G content for a genome.");

    // Two input files: Genome, and mapping.
    addArgument(parser, seqan::ArgParseArgument(seqan::ArgParseArgument::INPUTFILE));
    setValidValues(parser, 0, "fasta fa");
    addArgument(parser, seqan::ArgParseArgument(seqan::ArgParseArgument::INPUTFILE));
    setValidValues(parser, 1, "sam");

    // TODO(holtgrew): I want a custom help text!
    // addOption(parser, seqan::ArgParseOption("h", "help", "This helpful screen."));
    addOption(parser, seqan::ArgParseOption("v", "verbose", "Verbose, log to STDERR."));
    hideOption(parser, "verbose");
    addOption(parser, seqan::ArgParseOption("vv", "very-verbose", "Very verbose, log to STDERR."));
    hideOption(parser, "very-verbose");

    addSection(parser, "Main Options");
    addOption(parser, seqan::ArgParseOption("w", "window-size", "Set the size of the non-overlapping windows in base pairs.", seqan::ArgParseArgument::INTEGER, "NUM"));
    setDefaultValue(parser, "window-size", "10000");

    addSection(parser, "Output Options");
    addOption(parser, seqan::ArgParseOption("o", "out-path", "Path to the resulting file.  If omitted, result is printed to stdout.", seqan::ArgParseArgument::OUTPUTFILE, "TSV"));
    setRequired(parser, "out-path");
    setValidValues(parser, "out-path", "sam.coverage.tsv");

    seqan::ArgumentParser::ParseResult res = parse(parser, argc, argv);

    if (res == seqan::ArgumentParser::PARSE_OK)
    {
        getArgumentValue(options.inGenomePath, parser, 0);
        getArgumentValue(options.inSamPath, parser, 1);
        getOptionValue(options.outPath, parser, "out-path");

        if (isSet(parser, "verbose"))
            options.verbosity = 2;
        if (isSet(parser, "very-verbose"))
            options.verbosity = 3;
    }

    return res;
}
Пример #10
0
void REIXSSampleMoveActionInfo::updateDescriptions()
{
	// Working off a stored sample plate?
	if(samplePlateId_ > 0) {
		AMSamplePlate plate;
		if(!plate.loadFromDb(AMDatabase::database("user"), samplePlateId_) || sampleIndex_ >= plate.count() || sampleIndex_ < 0) {
			setShortDescription("Sample Move to [Invalid Sample Plate]");
			setLongDescription("Sample Move to [Invalid Sample Plate]");
			return;
		}
//		AMControlInfoList positions = plate.at(sampleIndex_).position();
		QString sampleName = AMSample::sampleNameForId(plate.database(), plate.at(sampleIndex_).sampleId());
		QString shortDesc = QString("Move to sample '%1' on plate '%2'.").arg(sampleName).arg(plate.name());
		// Problem with appending the positions: currently we don't update the description when that sample is re-marked, so this position string could be misleading in that situation. Just leave it out.
//		QStringList posString;
//		for(int i=0, cc=positions.count(); i<cc; ++i) {
//			const AMControlInfo& pos = positions.at(i);
//			posString << QString("%1: %2 %3  ").arg(pos.contextKnownDescription()).arg(pos.value()).arg(pos.units());
//		}
//		shortDesc.append(" (").append(posString.join(QString())).append(")");

		setShortDescription(shortDesc);
		setLongDescription(shortDesc);
	}

	// working off a fixed position.
	else {

		QString shortDesc = QString("Sample Move: X: %1 mm  Y: %2 mm  Z: %3 mm  Theta: %4 deg")
				.arg(x_)
				.arg(y_)
				.arg(z_)
				.arg(theta_);

		setShortDescription(shortDesc);
		setLongDescription(shortDesc);
	}
}
Пример #11
0
ChangeUpDirection::ChangeUpDirection() : mAbort(false)
{
   setName("Change Up Direction");
   setCreator(APP_COPYRIGHT);
   setVersion(APP_VERSION_NUMBER);
   setShortDescription("Rotate a data set so there is a new up direction.");
   setDescription("Rotate a data set so there is a new up direction.\n"
                  "A new window will be created when running in interactive mode.\n"
                  "If run in plug-in batch mode, the destination element is created but a window is not created.");
   setDescriptorId("{2e9c4c05-c7c6-4644-b6a7-9ef75e22ccb6}");
   setMenuLocation("[General Algorithms]/Change Up Direction");
   setProductionStatus(APP_IS_PRODUCTION_RELEASE);
   setAbortSupported(true);
}
SpectralLibraryMatchResults::SpectralLibraryMatchResults() :
   mpExplorer(SIGNAL_NAME(SessionExplorer, AboutToShowSessionItemContextMenu),
      Slot(this, &SpectralLibraryMatchResults::updateContextMenu))
{
   DockWindowShell::setName(SpectralLibraryMatch::getNameLibraryMatchResultsPlugIn());
   setSubtype("Results");
   setVersion(SPECTRAL_VERSION_NUMBER);
   setCreator("Ball Aerospace & Technologies Corp.");
   setCopyright(SPECTRAL_COPYRIGHT);
   setShortDescription("Display results from matching in-scene spectra with a spectral library.");
   setDescription("Display results from matching in-scene spectra with signatures in a spectral library.");
   setDescriptorId("{0BD9C61F-1D1D-406f-B4F1-90AD1BB1BAA2}");
   setProductionStatus(SPECTRAL_IS_PRODUCTION_RELEASE);
}
ResamplerPlugIn::ResamplerPlugIn()
{
   setName("Spectral Resampler");
   setDescriptorId("{D20D4C10-B9B8-4ADB-85FA-105446430966}");
   setSubtype("Algorithm");
   setShortDescription("Run Spectral Resampler");
   setDescription("Resample spectral signatures to a set of wavelengths.");
   setMenuLocation("[Spectral]/Support Tools/Spectral Resampler");
   setAbortSupported(true);
   setCopyright(SPECTRAL_COPYRIGHT);
   setVersion(SPECTRAL_VERSION_NUMBER);
   setProductionStatus(SPECTRAL_IS_PRODUCTION_RELEASE);
   setWizardSupported(true);
}
Пример #14
0
MagnatuneStore::MagnatuneStore( MagnatuneServiceFactory* parent, const char *name )
        : ServiceBase( name, parent )
        , m_downloadHandler( 0 )
        , m_redownloadHandler( 0 )
        , m_needUpdateWidget( 0 )
        , m_downloadInProgress( 0 )
        , m_currentAlbum( 0 )
        , m_streamType( MagnatuneMetaFactory::OGG )
        , m_magnatuneTimestamp( 0 )
        , m_registry( 0 )
        , m_signupInfoWidget( 0 )
{
    setObjectName(name);
    DEBUG_BLOCK
    //initTopPanel( );

    setShortDescription( i18n( "\"Fair trade\" online music store" ) );
    setIcon( KIcon( "view-services-magnatune-amarok" ) );

    // xgettext: no-c-format
    setLongDescription( i18n( "Magnatune.com is a different kind of record company with the motto \"We are not evil!\" 50% of every purchase goes directly to the artist and if you purchase an album through Amarok, the Amarok project receives a 10% commission. Magnatune.com also offers \"all you can eat\" memberships that lets you download as much of their music as you like." ) );
    setImagePath( KStandardDirs::locate( "data", "amarok/images/hover_info_magnatune.png" ) );


    //initBottomPanel();
//    m_currentlySelectedItem = 0;

    m_polished = false;
    //polish( );  //FIXME not happening when shown for some reason


    //do this stuff now to make us function properly as a track provider on startup. The expensive stuff will
    //not happen untill the model is added to the view anyway.
    MagnatuneMetaFactory * metaFactory = new MagnatuneMetaFactory( "magnatune", this );
    
    MagnatuneConfig config;
    if ( config.isMember() ) {
        setMembership( config.membershipType(), config.username(), config.password() );
        metaFactory->setMembershipInfo( config.membershipPrefix(), m_username, m_password );
    }

    setStreamType( config.streamType() );

    metaFactory->setStreamType( m_streamType );
    m_registry = new ServiceSqlRegistry( metaFactory );
    m_collection = new Collections::MagnatuneSqlCollection( "magnatune", "Magnatune.com", metaFactory, m_registry );
    CollectionManager::instance()->addUnmanagedCollection( m_collection, CollectionManager::CollectionDisabled );
    setServiceReady( true );
}
Пример #15
0
Jpeg2000Pager::Jpeg2000Pager() :
   CachedPager(msMaxCacheSize),
   mpFile(NULL),
   mOffset(0),
   mSize(0)
{
   setName("JPEG2000 Pager");
   setCopyright(APP_COPYRIGHT);
   setCreator("Ball Aerospace & Technologies Corp.");
   setDescription("Provides access to on-disk JPEG2000 data");
   setDescriptorId("{CC0E8FBD-13AB-4b58-A8AC-4B27269C6E11}");
   setVersion(APP_VERSION_NUMBER);
   setProductionStatus(APP_IS_PRODUCTION_RELEASE);
   setShortDescription("JPEG2000");
}
Пример #16
0
AMScanActionInfo::AMScanActionInfo(AMScanConfiguration *config, const QString &iconFileName, QObject *parent)
    : AMActionInfo3(config->userScanName(), config->description(), iconFileName, parent)
{
    config_ = config;
    scanID_ = -1;

    connect(config_, SIGNAL(expectedDurationChanged(double)), this, SLOT(setExpectedDuration(double)));
    connect(config_, SIGNAL(configurationChanged()), this, SLOT(onConfigChanged()));
    setExpectedDuration(config_->expectedDuration());

    if(!config_->detailedDescription().isEmpty()) {
        setShortDescription(config_->userScanName()%"\n"%config_->description());
        setLongDescription(config_->detailedDescription());
    }
}
AmpacheService::AmpacheService( AmpacheServiceFactory* parent, const QString & name, const QString &url, const QString &username, const QString &password )
    : ServiceBase( name,  parent )
    , m_infoParser( 0 )
    , m_collection( 0 )
    , m_ampacheLogin(new AmpacheAccountLogin(url, username, password, this))
{
    DEBUG_BLOCK
    connect(m_ampacheLogin, SIGNAL(loginSuccessful()), this, SLOT(onLoginSuccessful()));
    setShortDescription( i18n( "Amarok frontend for your Ampache server" ) );
    setIcon( KIcon( "view-services-ampache-amarok" ) );
    setLongDescription( i18n( "Use Amarok as a seamless frontend to your Ampache server. This lets you browse and play all the Ampache contents from within Amarok." ) );
    setImagePath( KStandardDirs::locate( "data", "amarok/images/hover_info_ampache.png" ) );
#ifdef HAVE_LIBLASTFM
    m_infoParser = new LastfmInfoParser();
#endif
}
Пример #18
0
seqan::ArgumentParser buildParser(void)
{
    seqan::ArgumentParser parser;

    setCategory(parser, "5-prime end counter");
    setShortDescription(parser, "Preprocessing Pipeline for Chip-Nexus and Chip-Exo data");
    addUsageLine(parser, " \\fI<READ_FILE1> \\fP \\fI[OPTIONS]\\fP");
    addDescription(parser,
        "");

    addDescription(parser, "");

    seqan::setVersion(parser, SEQAN_APP_VERSION " [" SEQAN_REVISION "]");
    setDate(parser, SEQAN_DATE);

    seqan::ArgParseArgument fileArg(seqan::ArgParseArgument::INPUT_FILE, "positions in bed-format", true);
    setValidValues(fileArg, ".bed");
    addArgument(parser, fileArg);
    setHelpText(parser, 0, "bed file");

    seqan::ArgParseOption readsOpt = seqan::ArgParseOption(
        "i", "input", "Name of the reads file.",
        seqan::ArgParseOption::INPUT_FILE, "INPUT");
    setValidValues(readsOpt, seqan::BamFileIn::getFileExtensions());
    addOption(parser, readsOpt);

    seqan::ArgParseOption outputOpt = seqan::ArgParseOption(
        "o", "output", "Name of output file.",
        seqan::ArgParseOption::INPUT_FILE, "INPUT");
    addOption(parser, outputOpt);

    seqan::ArgParseOption radiusOpt = seqan::ArgParseOption(
        "r", "radius", "radius around peaks to scan ",
        seqan::ArgParseOption::INTEGER, "VALUE");
    setDefaultValue(radiusOpt, 1000);
    setMinValue(radiusOpt, "1");
    addOption(parser, radiusOpt);

    seqan::ArgParseOption filterChromosomesOpt = seqan::ArgParseOption(
        "fc", "filterChromosomes", "Regular expression to remove chromosomes",
        seqan::ArgParseOption::STRING, "REGEX");
    addOption(parser, filterChromosomesOpt);

    return parser;
}
Пример #19
0
AmpacheService::AmpacheService( AmpacheServiceFactory* parent, const QString & name, const QString &url, const QString &username, const QString &password )
    : ServiceBase( name,  parent )
    , m_authenticated( false )
    , m_server ( QString() )
    , m_sessionId ( QString() )
    , m_collection( 0 )
{
    DEBUG_BLOCK


    setShortDescription( i18n( "Use Amarok as a seamless frontend to your Ampache server." ) );
    setIcon( KIcon( "view-services-ampache-amarok" ) );

    //we are using http queries later on, so we require
    KUrl kurl;
    if( url.contains( "//" ) )
    {
        kurl.setUrl( url, KUrl::TolerantMode );
        if( kurl.protocol() != "http" && kurl.protocol() != "https" )
        {
            kurl.setProtocol( "http" );
        }
    }
    else
    {
        kurl.setProtocol( "http" );
        kurl.setAuthority( url );
    }

    m_server = kurl.url();

    // We need to check the version of Ampache we are attempting to authenticate against, as this changes how we deal with it

    QString versionString = "<server>/server/xml.server.php?action=ping";

    versionString.replace(QString("<server>"), m_server);

    debug() << "Verifying Ampache Version Using: " << versionString;

    m_username = username;
    m_password = password;

    m_xmlVersionJob = KIO::storedGet( versionString, KIO::Reload, KIO::HideProgressInfo );
    connect( m_xmlVersionJob, SIGNAL(result(KJob *)), this, SLOT( authenticate(KJob *) ) );
}
Пример #20
0
AMScanActionInfo::AMScanActionInfo(const AMScanActionInfo &other)
    : AMActionInfo3(other)
{
    config_ = other.config_ ? other.config_->createCopy() : 0;
    scanID_ = -1;

    connect(config_, SIGNAL(expectedDurationChanged(double)), this, SLOT(setExpectedDuration(double)));
    connect(config_, SIGNAL(configurationChanged()), this, SLOT(onConfigChanged()));
    setExpectedDuration(config_->expectedDuration());

    if(!config_->detailedDescription().isEmpty()) {
        QString scanName = config_->userScanName();
        if(scanName.isEmpty())
            scanName = other.shortDescription();
        setShortDescription(scanName);
        setLongDescription(config_->detailedDescription());
    }
}
Пример #21
0
seqan::ArgumentParser::ParseResult
parseCommandLine(AppOptions & options, int argc, char const ** argv)
{
    // Setup ArgumentParser.
    seqan::ArgumentParser parser("%(NAME)s");
    // Set short description, version, and date.
    setShortDescription(parser, "Put a Short Description Here");
    setVersion(parser, "0.1");
    setDate(parser, "July 2012");

    // Define usage line and long description.
    addUsageLine(parser, "[\\fIOPTIONS\\fP] \"\\fITEXT\\fP\"");
    addDescription(parser, "This is the application skelleton and you should modify this string.");

    // We require one argument.
    addArgument(parser, seqan::ArgParseArgument(seqan::ArgParseArgument::STRING, "TEXT"));

    addOption(parser, seqan::ArgParseOption("q", "quiet", "Set verbosity to a minimum."));
    addOption(parser, seqan::ArgParseOption("v", "verbose", "Enable verbose output."));
    addOption(parser, seqan::ArgParseOption("vv", "very-verbose", "Enable very verbose output."));

    // Add Examples Section.
    addTextSection(parser, "Examples");
    addListItem(parser, "\\fB%(NAME)s\\fP \\fB-v\\fP \\fItext\\fP",
                "Call with \\fITEXT\\fP set to \"text\" with verbose output.");

    // Parse command line.
    seqan::ArgumentParser::ParseResult res = seqan::parse(parser, argc, argv);

    // Only extract  options if the program will continue after parseCommandLine()
    if (res != seqan::ArgumentParser::PARSE_OK)
        return res;

    // Extract option values.
    if (isSet(parser, "quiet"))
        options.verbosity = 0;
    if (isSet(parser, "verbose"))
        options.verbosity = 2;
    if (isSet(parser, "very-verbose"))
        options.verbosity = 3;
    seqan::getArgumentValue(options.text, parser, 0);

    return seqan::ArgumentParser::PARSE_OK;
}
SpectralLibraryManager::SpectralLibraryManager() :
    mpProgress(NULL),
    mpEditSpectralLibraryAction(NULL)
{
    ExecutableShell::setName(SpectralLibraryMatch::getNameLibraryManagerPlugIn());
    setType("Manager");
    setSubtype("SpectralLibrary");
    setVersion(SPECTRAL_VERSION_NUMBER);
    setCreator("Ball Aerospace & Technologies Corp.");
    setCopyright(SPECTRAL_COPYRIGHT);
    setShortDescription("Manages a spectral library.");
    setDescription("Controls populating and editing a spectral library for use in matching in-scene spectra.");
    setDescriptorId("{72116B2A-0A82-46b6-B0D0-CE168C73CA7E}");
    allowMultipleInstances(false);
    executeOnStartup(true);
    destroyAfterExecute(false);
    setWizardSupported(false);
    setProductionStatus(SPECTRAL_IS_PRODUCTION_RELEASE);
}
Пример #23
0
//--------------------------
void pngBrush::setupCustom(){

	//we are a raster brush
	isVector = false;

	//we are color
	isColor	 		= true;
	imageNumBytes 	= 3;	
	
	//our name and description
	setName("pngBrush");
	setShortDescription("multi color - make your own png brushes");
	
	//our previous points
	oldX			= 0;
	oldY			= 0;
	
	//other vars
	numBrushes  	= 0;
	brushNumber		= -1;
	numSteps		= 40;
	brushWidth		= 18;
	
	//default to white
	red				= 255;
	green			= 255;
	blue			= 255;	
	
	//our default drip settings
	dripsSettings(false, 8, 0.05, 0);

	//setup up our image buffer
	pixels = new unsigned char[width * height * imageNumBytes];
	clear();
	
	DRIPS.setup(width, height);
	
	//load brushes
	loadbrushes(ofToDataPath("brushes/"));
}
Пример #24
0
seqan::ArgumentParser::ParseResult
parseCommandLine(MasonFragmentSequencingOptions & options, int argc, char const ** argv)
{
    // Setup ArgumentParser.
    seqan::ArgumentParser parser("mason_frag_seqencing");
    // Set short description, version, and date.
    setShortDescription(parser, "Fragment Sequencing Simulation");
    setVersion(parser, "2.1");
    setDate(parser, "March 2013");
    setCategory(parser, "Simulators");

    // Define usage line and long description.
    addUsageLine(parser, "[\\fIOPTIONS\\fP] \\fB-i\\fP \\fIIN.fa\\fP \\fB-o\\fP \\fIOUT.{fa,fq}\\fP "
                 "[\\fB-or\\fP \\fIOUT2.{fa,fq}\\fP]");
    addDescription(parser,
                   "Given a FASTA file with fragments, simulate sequencing thereof.");
    addDescription(parser,
                   "This program is a more lightweight version of mason_sequencing without support for the "
                   "application of VCF and fragment sampling.  Output of SAM is also not available.  However, "
                   "it uses the same code for the simulation of the reads as the more powerful mason_simulator.");
    addDescription(parser,
                   "You can use mason_frag_sequencing if you want to implement you rown fragmentation behaviour, e.g. "
                   "if you have implemented your own bias models.");

    // Add option and text sections.
    options.addOptions(parser);
    options.addTextSections(parser);

    // Parse command line.
    seqan::ArgumentParser::ParseResult res = seqan::parse(parser, argc, argv);

    // Only extract  options if the program will continue after parseCommandLine()
    if (res != seqan::ArgumentParser::PARSE_OK)
        return res;

    options.getOptionValues(parser);

    return seqan::ArgumentParser::PARSE_OK;
}
KPAboutData::KPAboutData(const KLocalizedString& pluginName,
                         const QByteArray& /*pluginVersion*/,
                         enum  LicenseKey licenseType,
                         const KLocalizedString& pluginDescription,
                         const KLocalizedString& copyrightStatement)
           : KAboutData (QByteArray("kipiplugins"),  // Name without minus separator for KDE bug report.
                         QByteArray(),
                         pluginName,
                         kipipluginsVersion().toAscii(),
                         KLocalizedString(),
                         licenseType,
                         copyrightStatement,
                         pluginDescription,
                         QByteArray("http://www.digikam.org"))
{
    if (KGlobal::hasMainComponent())
    {
        // setProgramLogo is defined from kde 3.4.0 on
        QString directory = KStandardDirs::locate("data", "kipi/data/kipi-plugins_logo.png");

        // set the kipiplugins logo inside the about dialog
        setProgramLogo(QImage(directory));
    }

    // set the plugin description into long text description
    setOtherText(pluginDescription);

    // put the plugin name and version with kipi-plugins and kipi-plugins version
    KLocalizedString shortDesc = additionalInformation();

    if (KGlobal::hasMainComponent())
    {
        kDebug(AREA_CODE_LOADING) << shortDesc.toString().constData() ;
    }

    // and set the string into the short description
    setShortDescription(shortDesc);
}
Пример #26
0
seqan::ArgumentParser::ParseResult
parseCommandLine(ModifyStringOptions & options, int argc, char const ** argv)
{
    // Setup ArgumentParser.
    seqan::ArgumentParser parser("modify_string");
    // Set short description, version, and date.
    setShortDescription(parser, "String Modifier");
    setVersion(parser, "1.0");
    setDate(parser, "July 2012");

    // Define usage line and long description.
    addUsageLine(parser,
                 "[\\fIOPTIONS\\fP] \"\\fITEXT\\fP\"");
    addDescription(parser,
                   "This program allows simple character modifications to "
                           "each i-th character.");

    // We require one argument.
    addArgument(parser, seqan::ArgParseArgument(
            seqan::ArgParseArgument::STRING, "TEXT"));

    // Define Options -- Section Modification Options
    addSection(parser, "Modification Options");
    addOption(parser, seqan::ArgParseOption(
            "i", "period", "Period to use for the index.",
            seqan::ArgParseArgument::INTEGER, "INT"));
    setDefaultValue(parser, "period", "1");
    addOption(parser, seqan::ArgParseOption(
            "U", "uppercase", "Select to-uppercase as operation."));
    addOption(parser, seqan::ArgParseOption(
            "L", "lowercase", "Select to-lowercase as operation."));

    // Add Examples Section.
    addTextSection(parser, "Examples");
    addListItem(parser,
                "\\fBmodify_string\\fP \\fB-U\\fP \\fIveryverylongword\\fP",
                "Print upper case version of \"veryverylongword\"");
    addListItem(parser,
                "\\fBmodify_string\\fP \\fB-L\\fP \\fB-i\\fP \\fI3\\fP "
                        "\\fIveryverylongword\\fP",
                "Print \"veryverylongword\" with every third character "
                        "converted to upper case.");

    // Parse command line.
    seqan::ArgumentParser::ParseResult res = seqan::parse(parser, argc, argv);

    // Only extract  options if the program will continue after parseCommandLine()
    if (res != seqan::ArgumentParser::PARSE_OK)
        return res;

    // Extract option values.
    getOptionValue(options.period, parser, "period");
    options.toUppercase = isSet(parser, "uppercase");
    options.toLowercase = isSet(parser, "lowercase");
    seqan::getArgumentValue(options.text, parser, 0);

    // If both to-uppercase and to-lowercase were selected then this is an error.
    if (options.toUppercase && options.toLowercase)
    {
        std::cerr << "ERROR: You cannot specify both to-uppercase and to-lowercase!\n";
        return seqan::ArgumentParser::PARSE_ERROR;
    }

    return seqan::ArgumentParser::PARSE_OK;
}
Пример #27
0
ModelItems::ModelItems()
{
   setShortDescription("Wizard Model Item");
}
Пример #28
0
void REIXSXASScanActionInfo::onConfigurationChanged()
{
	QString description = XASConfig()->description();
	setShortDescription(description);
	setLongDescription(description);
}
Пример #29
0
PlaylistBrowserNS::APGCategory::APGCategory( QWidget* )
    : BrowserCategory ( "APG", 0 )
{
    m_qualityFactor = AmarokConfig::qualityFactorAPG();

    setPrettyName( i18n( "Automated Playlist Generator" ) );
    setShortDescription( i18n("Create playlists by specifying criteria") );
    setIcon( KIcon( "playlist-generator" ) );

    // set background
    if( AmarokConfig::showBrowserBackgroundImage() )
        setBackgroundImage( imagePath() );

    setLongDescription( i18n("Create playlists by specifying criteria") );

    setContentsMargins( 0, 0, 0, 0 );

    APG::PresetModel* presetmodel = APG::PresetModel::instance();
    connect( presetmodel, SIGNAL(lock(bool)), this, SLOT(setDisabled(bool)) );

    /* Create the toolbar -- Qt's Designer doesn't let us put a toolbar
     * anywhere except in a MainWindow, so we've got to create it by hand here. */
    QToolBar* toolBar_Actions = new QToolBar( this );
    toolBar_Actions->setMovable( false );
    toolBar_Actions->setFloatable( false );
    toolBar_Actions->setIconSize( QSize( 22, 22 ) );
    toolBar_Actions->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred );

    QAction* a;
    a = toolBar_Actions->addAction( KIcon( "list-add-amarok" ), i18n("Add new preset") );
    connect( a, SIGNAL(triggered(bool)), presetmodel, SLOT(addNew()) );

    a = toolBar_Actions->addAction( KIcon( "document-properties-amarok" ), i18n("Edit selected preset") );
    a->setEnabled( false );
    connect( a, SIGNAL(triggered(bool)), presetmodel, SLOT(edit()) );
    connect( this, SIGNAL(validIndexSelected(bool)), a, SLOT(setEnabled(bool)) );

    a = toolBar_Actions->addAction( KIcon( "list-remove-amarok" ), i18n("Delete selected preset") );
    a->setEnabled( false );
    connect( a, SIGNAL(triggered(bool)), presetmodel, SLOT(removeActive()) );
    connect( this, SIGNAL(validIndexSelected(bool)), a, SLOT(setEnabled(bool)) );

    a = toolBar_Actions->addAction( KIcon( "document-import-amarok" ), i18n("Import a new preset") );
    a->setEnabled( true );
    connect( a, SIGNAL(triggered(bool)), presetmodel, SLOT(import()) );

    a = toolBar_Actions->addAction( KIcon( "document-export-amarok" ), i18n("Export the selected preset") );
    a->setEnabled( false );
    connect( a, SIGNAL(triggered(bool)), presetmodel, SLOT(exportActive()) );
    connect( this, SIGNAL(validIndexSelected(bool)), a, SLOT(setEnabled(bool)) );

    toolBar_Actions->addSeparator();

    a = toolBar_Actions->addAction( KIcon( "go-next-amarok" ), i18n("Run APG with selected preset") );
    a->setEnabled( false );
    connect( a, SIGNAL(triggered(bool)), this, SLOT(runGenerator()) );
    connect( this, SIGNAL(validIndexSelected(bool)), a, SLOT(setEnabled(bool)) );

    /* Create the preset list view */
    QLabel* label_Title = new QLabel( i18n("APG Presets"), this );
    label_Title->setAlignment( Qt::AlignCenter );

    Amarok::PrettyTreeView* listView = new Amarok::PrettyTreeView( this );
    listView->setHeaderHidden( true );
    listView->setRootIsDecorated( false );
    listView->setModel( presetmodel );
    listView->setSelectionMode( QAbstractItemView::SingleSelection );
    listView->setFrameShape( QFrame::NoFrame );
    listView->setAutoFillBackground( false );
    connect( listView->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(activeChanged(QModelIndex)) );
    connect( listView, SIGNAL(doubleClicked(QModelIndex)), presetmodel, SLOT(editPreset(QModelIndex)) );

    // Speed/Quality tradeoff slider
    QLabel* label_Tradeoff = new QLabel( i18n("Generator Optimization"), this );
    label_Tradeoff->setAlignment( Qt::AlignCenter );

    QFrame* qual_Frame = new QFrame( this );
    QLabel* label_Speed = new QLabel( i18n("Speed"), qual_Frame );
    QSlider* qual_Slider = new QSlider( Qt::Horizontal, qual_Frame );
    qual_Slider->setRange( 0, APG::ConstraintSolver::QUALITY_RANGE );
    qual_Slider->setValue( m_qualityFactor );
    connect( qual_Slider, SIGNAL(sliderMoved(int)), this, SLOT (setQualityFactor(int)) );
    QLabel* label_Quality = new QLabel( i18n("Accuracy"), qual_Frame );

    QLayout* qf_Layout = new QHBoxLayout( qual_Frame );
    qf_Layout->addWidget( label_Speed );
    qf_Layout->addWidget( qual_Slider );
    qf_Layout->addWidget( label_Quality );
    qual_Frame->setLayout( qf_Layout );

    QMetaObject::connectSlotsByName( this );
}
Пример #30
0
void AMScanActionInfo::onConfigChanged()
{
    setShortDescription(config_->userScanName()%"\n"%config_->description());
    setLongDescription(config_->detailedDescription());
}