FlightGear next
LaunchConfig Class Reference

#include <LaunchConfig.hxx>

Inherits QObject.

Classes

class  Arg
 

Public Types

enum  Origin { Launcher = 0 , ExtraArgs }
 

Signals

void collect ()
 
void save ()
 
void restore ()
 
void postRestore ()
 

Public Member Functions

 Q_ENUMS (Origin)
 
 LaunchConfig (QObject *parent=nullptr)
 
 ~LaunchConfig ()
 
void reset ()
 
void applyToOptions () const
 
std::vector< Argvalues () const
 
Q_INVOKABLE void setArg (QString name, QString value=QString(), Origin origin=Launcher)
 
Q_INVOKABLE void setArg (const std::string &name, const std::string &value=std::string())
 
Q_INVOKABLE void setProperty (QString path, QVariant value, Origin origin=Launcher)
 
Q_INVOKABLE void setEnableDisableOption (QString name, bool value)
 
Q_INVOKABLE QString htmlForCommandLine ()
 
Q_INVOKABLE void copyCommandLine ()
 
bool saveConfigToINI ()
 
bool loadConfigFromINI ()
 
Q_INVOKABLE bool saveConfigToFile (QString path)
 
Q_INVOKABLE bool loadConfigFromFile (QString path)
 
Q_INVOKABLE QVariant getValueForKey (QString group, QString key, QVariant defaultValue=QVariant()) const
 
Q_INVOKABLE void setValueForKey (QString group, QString key, QVariant var)
 
QString defaultDownloadDir () const
 
bool enableDownloadDirUI () const
 
std::vector< ArgvaluesFromLauncher () const
 
std::vector< ArgvaluesFromExtraArgs () const
 

Static Public Member Functions

static void setEnableDownloadDirUI (bool enableDownloadDirUI)
 

Properties

QString defaultDownloadDir
 
bool enableDownloadDirUI
 

Detailed Description

Definition at line 14 of file LaunchConfig.hxx.

Member Enumeration Documentation

◆ Origin

Enumerator
Launcher 
ExtraArgs 

Definition at line 21 of file LaunchConfig.hxx.

Constructor & Destructor Documentation

◆ LaunchConfig()

LaunchConfig::LaunchConfig ( QObject * parent = nullptr)

Definition at line 45 of file LaunchConfig.cxx.

◆ ~LaunchConfig()

LaunchConfig::~LaunchConfig ( )

Definition at line 55 of file LaunchConfig.cxx.

Member Function Documentation

◆ applyToOptions()

void LaunchConfig::applyToOptions ( ) const

Definition at line 65 of file LaunchConfig.cxx.

◆ collect

void LaunchConfig::collect ( )
signal

◆ copyCommandLine()

void LaunchConfig::copyCommandLine ( )

Definition at line 191 of file LaunchConfig.cxx.

◆ defaultDownloadDir()

QString LaunchConfig::defaultDownloadDir ( ) const

Definition at line 290 of file LaunchConfig.cxx.

◆ enableDownloadDirUI()

bool LaunchConfig::enableDownloadDirUI ( ) const

Definition at line 295 of file LaunchConfig.cxx.

◆ getValueForKey()

QVariant LaunchConfig::getValueForKey ( QString group,
QString key,
QVariant defaultValue = QVariant() ) const

Definition at line 262 of file LaunchConfig.cxx.

◆ htmlForCommandLine()

QString LaunchConfig::htmlForCommandLine ( )

Definition at line 123 of file LaunchConfig.cxx.

◆ loadConfigFromFile()

bool LaunchConfig::loadConfigFromFile ( QString path)

Definition at line 251 of file LaunchConfig.cxx.

◆ loadConfigFromINI()

bool LaunchConfig::loadConfigFromINI ( )

Definition at line 232 of file LaunchConfig.cxx.

◆ postRestore

void LaunchConfig::postRestore ( )
signal

◆ Q_ENUMS()

LaunchConfig::Q_ENUMS ( Origin )

◆ reset()

void LaunchConfig::reset ( )

Definition at line 60 of file LaunchConfig.cxx.

◆ restore

void LaunchConfig::restore ( )
signal

◆ save

void LaunchConfig::save ( )
signal

◆ saveConfigToFile()

bool LaunchConfig::saveConfigToFile ( QString path)

Definition at line 243 of file LaunchConfig.cxx.

◆ saveConfigToINI()

bool LaunchConfig::saveConfigToINI ( )

Definition at line 220 of file LaunchConfig.cxx.

◆ setArg() [1/2]

void LaunchConfig::setArg ( const std::string & name,
const std::string & value = std::string() )

Definition at line 108 of file LaunchConfig.cxx.

◆ setArg() [2/2]

void LaunchConfig::setArg ( QString name,
QString value = QString(),
Origin origin = Launcher )

Definition at line 103 of file LaunchConfig.cxx.

◆ setEnableDisableOption()

void LaunchConfig::setEnableDisableOption ( QString name,
bool value )

Definition at line 118 of file LaunchConfig.cxx.

◆ setEnableDownloadDirUI()

void LaunchConfig::setEnableDownloadDirUI ( bool enableDownloadDirUI)
static

Definition at line 300 of file LaunchConfig.cxx.

◆ setProperty()

void LaunchConfig::setProperty ( QString path,
QVariant value,
Origin origin = Launcher )

Definition at line 113 of file LaunchConfig.cxx.

◆ setValueForKey()

void LaunchConfig::setValueForKey ( QString group,
QString key,
QVariant var )

Definition at line 281 of file LaunchConfig.cxx.

◆ values()

auto LaunchConfig::values ( ) const

Definition at line 305 of file LaunchConfig.cxx.

◆ valuesFromExtraArgs()

auto LaunchConfig::valuesFromExtraArgs ( ) const

Definition at line 318 of file LaunchConfig.cxx.

◆ valuesFromLauncher()

auto LaunchConfig::valuesFromLauncher ( ) const

Definition at line 310 of file LaunchConfig.cxx.

Property Documentation

◆ defaultDownloadDir

QString LaunchConfig::defaultDownloadDir
read

Definition at line 18 of file LaunchConfig.hxx.

◆ enableDownloadDirUI

bool LaunchConfig::enableDownloadDirUI
read

Definition at line 19 of file LaunchConfig.hxx.


The documentation for this class was generated from the following files: