FlightGear next
flightgear::GraphicsPresets Class Reference

#include <GraphicsPresets.hxx>

Inherits SGSubsystem.

Classes

class  GraphicsConfigChangeListener
 
struct  GraphicsPresetInfo
 
class  RequiredPropertyListener
 monitor a collection of properties, and set a flag property to true when any of them are modified. More...
 

Public Types

using GraphicsPresetVec = std::vector<GraphicsPresetInfo>
 

Public Member Functions

 GraphicsPresets ()
 
 ~GraphicsPresets ()
 
void init () override
 
void shutdown () override
 
void update (double delta_time_sec) override
 
void applyInitialPreset ()
 init() is called too late (after fgOSInit), so we call this method early, to load the initial preset if set, at that time.
 
bool applyCurrentPreset ()
 Apply the settings defined in the current graphics preset, to the property tree.
 
bool applyCustomPreset (const SGPath &path)
 
bool applyPresetByName (const std::string &name)
 apply a preset identified by its (localized) name.
 
GraphicsPresetVec listPresets ()
 retrieve all standard presets which are defined
 
bool saveToXML (const SGPath &path, const std::string &name, const std::string &desc)
 

Static Public Member Functions

static const char * staticSubsystemClassId ()
 

Detailed Description

Definition at line 16 of file GraphicsPresets.hxx.

Member Typedef Documentation

◆ GraphicsPresetVec

Constructor & Destructor Documentation

◆ GraphicsPresets()

flightgear::GraphicsPresets::GraphicsPresets ( )

Definition at line 254 of file GraphicsPresets.cxx.

◆ ~GraphicsPresets()

flightgear::GraphicsPresets::~GraphicsPresets ( )

Definition at line 261 of file GraphicsPresets.cxx.

Member Function Documentation

◆ applyCurrentPreset()

bool flightgear::GraphicsPresets::applyCurrentPreset ( )

Apply the settings defined in the current graphics preset, to the property tree.

Definition at line 323 of file GraphicsPresets.cxx.

◆ applyCustomPreset()

bool flightgear::GraphicsPresets::applyCustomPreset ( const SGPath & path)

Definition at line 376 of file GraphicsPresets.cxx.

◆ applyInitialPreset()

void flightgear::GraphicsPresets::applyInitialPreset ( )

init() is called too late (after fgOSInit), so we call this method early, to load the initial preset if set, at that time.

Definition at line 265 of file GraphicsPresets.cxx.

◆ applyPresetByName()

bool flightgear::GraphicsPresets::applyPresetByName ( const std::string & name)

apply a preset identified by its (localized) name.

This is helpful for the rnedering dialog since PUI combo-boxes only record the name of items and no other data.

Definition at line 388 of file GraphicsPresets.cxx.

◆ init()

void flightgear::GraphicsPresets::init ( )
override

Definition at line 276 of file GraphicsPresets.cxx.

◆ listPresets()

auto flightgear::GraphicsPresets::listPresets ( )

retrieve all standard presets which are defined

Definition at line 351 of file GraphicsPresets.cxx.

◆ saveToXML()

bool flightgear::GraphicsPresets::saveToXML ( const SGPath & path,
const std::string & name,
const std::string & desc )

Definition at line 521 of file GraphicsPresets.cxx.

◆ shutdown()

void flightgear::GraphicsPresets::shutdown ( )
override

Definition at line 313 of file GraphicsPresets.cxx.

◆ staticSubsystemClassId()

static const char * flightgear::GraphicsPresets::staticSubsystemClassId ( )
inlinestatic

Definition at line 22 of file GraphicsPresets.hxx.

◆ update()

void flightgear::GraphicsPresets::update ( double delta_time_sec)
override

Definition at line 308 of file GraphicsPresets.cxx.


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