Krita Source Code Documentation
Loading...
Searching...
No Matches
RecorderConfig Class Reference

#include <recorder_config.h>

Public Member Functions

double captureInterval () const
 
int compression () const
 
RecorderFormat format () const
 
int quality () const
 
bool realTimeCaptureMode () const
 
bool recordAutomatically () const
 
 RecorderConfig (bool readOnly)
 
bool recordIsolateLayerMode () const
 
int resolution () const
 
void setCaptureInterval (double value)
 
void setCompression (int value)
 
void setFormat (RecorderFormat value)
 
void setQuality (int value)
 
void setRealTimeCaptureMode (bool value)
 
void setRecordAutomatically (bool value)
 
void setRecordIsolateLayerMode (bool value)
 
void setResolution (int value)
 
void setSnapshotDirectory (const QString &value)
 
void setThreads (int value)
 
QString snapshotDirectory () const
 
int threads () const
 
 ~RecorderConfig ()
 

Private Attributes

KisConfigconfig
 

Detailed Description

Definition at line 16 of file recorder_config.h.

Constructor & Destructor Documentation

◆ RecorderConfig()

RecorderConfig::RecorderConfig ( bool readOnly)

Definition at line 29 of file recorder_config.cpp.

30 : config(new KisConfig(readOnly))
31{
32}
KisConfig * config

◆ ~RecorderConfig()

RecorderConfig::~RecorderConfig ( )

Definition at line 34 of file recorder_config.cpp.

35{
36 delete config;
37}

References config.

Member Function Documentation

◆ captureInterval()

double RecorderConfig::captureInterval ( ) const

Definition at line 58 of file recorder_config.cpp.

59{
60 return config->readEntry(keyCaptureInterval, 1.);
61}
T readEntry(const QString &name, const T &defaultValue=T())
Definition kis_config.h:832

References config, and KisConfig::readEntry().

◆ compression()

int RecorderConfig::compression ( ) const

Definition at line 91 of file recorder_config.cpp.

92{
93 return config->readEntry(keyCompression, 1);
94}

References config, and KisConfig::readEntry().

◆ format()

RecorderFormat RecorderConfig::format ( ) const

Definition at line 69 of file recorder_config.cpp.

70{
71 return static_cast<RecorderFormat>(config->readEntry(keyFormat, static_cast<int>(RecorderFormat::JPEG)));
72}
RecorderFormat

References config, JPEG, and KisConfig::readEntry().

◆ quality()

int RecorderConfig::quality ( ) const

Definition at line 80 of file recorder_config.cpp.

81{
82 return config->readEntry(keyQuality, 80);
83}

References config, and KisConfig::readEntry().

◆ realTimeCaptureMode()

bool RecorderConfig::realTimeCaptureMode ( ) const

Definition at line 122 of file recorder_config.cpp.

123{
124 return config->readEntry(keyRealTimeCaptureMode, false);
125}

References config, and KisConfig::readEntry().

◆ recordAutomatically()

bool RecorderConfig::recordAutomatically ( ) const

Definition at line 141 of file recorder_config.cpp.

142{
143 return config->readEntry(keyRecordAutomatically, false);
144}

References config, and KisConfig::readEntry().

◆ recordIsolateLayerMode()

bool RecorderConfig::recordIsolateLayerMode ( ) const

Definition at line 131 of file recorder_config.cpp.

132{
133 return config->readEntry(keyRecordIsolateLayerMode, false);
134}

References config, and KisConfig::readEntry().

◆ resolution()

int RecorderConfig::resolution ( ) const

Definition at line 102 of file recorder_config.cpp.

103{
104 return config->readEntry(keyResolution, 0);
105}

References config, and KisConfig::readEntry().

◆ setCaptureInterval()

void RecorderConfig::setCaptureInterval ( double value)

Definition at line 63 of file recorder_config.cpp.

64{
65 config->writeEntry(keyCaptureInterval, value);
66}
float value(const T *src, size_t ch)
void writeEntry(const QString &name, const T &value)
Definition kis_config.h:822

References config, value(), and KisConfig::writeEntry().

◆ setCompression()

void RecorderConfig::setCompression ( int value)

Definition at line 96 of file recorder_config.cpp.

97{
98 config->writeEntry(keyCompression, value);
99}

References config, value(), and KisConfig::writeEntry().

◆ setFormat()

void RecorderConfig::setFormat ( RecorderFormat value)

Definition at line 74 of file recorder_config.cpp.

75{
76 return config->writeEntry(keyFormat, static_cast<int>(value));
77}

References config, value(), and KisConfig::writeEntry().

◆ setQuality()

void RecorderConfig::setQuality ( int value)

Definition at line 85 of file recorder_config.cpp.

86{
87 config->writeEntry(keyQuality, value);
88}

References config, value(), and KisConfig::writeEntry().

◆ setRealTimeCaptureMode()

void RecorderConfig::setRealTimeCaptureMode ( bool value)

Definition at line 126 of file recorder_config.cpp.

127{
128 config->writeEntry(keyRealTimeCaptureMode, value);
129}

References config, value(), and KisConfig::writeEntry().

◆ setRecordAutomatically()

void RecorderConfig::setRecordAutomatically ( bool value)

Definition at line 146 of file recorder_config.cpp.

147{
148 config->writeEntry(keyRecordAutomatically, value);
149}

References config, value(), and KisConfig::writeEntry().

◆ setRecordIsolateLayerMode()

void RecorderConfig::setRecordIsolateLayerMode ( bool value)

Definition at line 136 of file recorder_config.cpp.

137{
138 config->writeEntry(keyRecordIsolateLayerMode, value);
139}

References config, value(), and KisConfig::writeEntry().

◆ setResolution()

void RecorderConfig::setResolution ( int value)

Definition at line 107 of file recorder_config.cpp.

108{
109 config->writeEntry(keyResolution, value);
110}

References config, value(), and KisConfig::writeEntry().

◆ setSnapshotDirectory()

void RecorderConfig::setSnapshotDirectory ( const QString & value)

Definition at line 52 of file recorder_config.cpp.

53{
54 config->writeEntry(keySnapshotDirectory, value);
55}

References config, value(), and KisConfig::writeEntry().

◆ setThreads()

void RecorderConfig::setThreads ( int value)

Definition at line 117 of file recorder_config.cpp.

118{
119 config->writeEntry(keyThreads, value);
120}

References config, value(), and KisConfig::writeEntry().

◆ snapshotDirectory()

QString RecorderConfig::snapshotDirectory ( ) const

Definition at line 40 of file recorder_config.cpp.

41{
42 // On Android, there's no user-visible directory we can write to, so we
43 // default to nothing here.
44#ifdef Q_OS_ANDROID
45 const QString defaultValue;
46#else
47 const QString &defaultValue = defaultSnapshotDirectory;
48#endif
49 return config->readEntry(keySnapshotDirectory, defaultValue);
50}

References config, and KisConfig::readEntry().

◆ threads()

int RecorderConfig::threads ( ) const

Definition at line 112 of file recorder_config.cpp.

113{
114 return config->readEntry(keyThreads, 1);
115}

References config, and KisConfig::readEntry().

Member Data Documentation

◆ config

KisConfig* RecorderConfig::config
mutableprivate

Definition at line 65 of file recorder_config.h.


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