#include <configuration.h>
Public Types | |
enum | MessageType { Normal, Debug, Short } |
enum | ScaleMode { ScalePercent, ScalePixel } |
enum | CaptureMode { FullScreen = 0, WindowUnderCursor = 1 } |
enum | CaptionPosition { PosTopLeft, PosTopCenter, PosTopRight, PosLeftCenter, PosCenter, PosRightCenter, PosBottomLeft, PosBottomCenter, PosBottomRight } |
Public Member Functions | |
void | read () |
void | write () const |
bool | validate (QString &error) |
Public Attributes | |
CaptureConfig | Capture |
The capture settings. | |
FileConfig | File |
The file settings. | |
FtpConfig | Ftp |
The ftp settings. | |
LogConfig | Log |
The log settings. | |
CaptionConfig | Caption |
The caption settings. | |
WWWConfig | WWW |
The WWW settings. | |
Static Public Attributes | |
const DefaultConfig | Default |
all the defaults | |
Friends | |
Configuration & | Config () |
Configuration class holds all the options for the application. It has a private constructor and destructor, and is accessible though the friend function Config() which returns a static reference object. This way we have only one Configuration object for the whole application and it is created at start of the app, before the dialog or anything else that may depend on the config settings. The member functions read() and write() can be used to load and save the properties to the application configuration file.
Definition at line 126 of file configuration.h.
|
public constants for caption position
Definition at line 172 of file configuration.h. |
|
Definition at line 163 of file configuration.h. Referenced by ConfigDialog::updateDialog(). |
|
Message Types Definition at line 147 of file configuration.h. |
|
public constants for scaling mode Definition at line 157 of file configuration.h. Referenced by ConfigDialog::updateDialog(). |
|
Reads the configuration data from the application config file. If a property does not already exist in the config file it will be set to a default value. Definition at line 57 of file configuration.cpp. References Caption, Capture, CaptureConfig::CaptureDelay, CaptureConfig::CaptureMode, CaptionConfig::Color, CaptionConfig::CustomPos, Default, File, WWWConfig::Files, CaptionConfig::Font, Ftp, FtpConfig::Host, CaptureConfig::IncludeWD, Log, LogConfig::Path, FileConfig::PathMain, FileConfig::PathOffline, FileConfig::PathThumb, CaptureConfig::PictureQuality, WWWConfig::Port, FtpConfig::Port, CaptionConfig::Position, CaptionConfig::PositionX, CaptionConfig::PositionY, CaptureConfig::ScaleMain, CaptureConfig::ScaleMode, CaptureConfig::ScaleThumb, CaptionConfig::Text, FtpConfig::TransferPath, CaptionConfig::UseCaption, FtpConfig::UseFtp, LogConfig::UseLog, FtpConfig::UseOffline, FtpConfig::User, FtpConfig::UseThumb, WWWConfig::UseWWW, and WWW. |
|
validates if the object has valid data.
Definition at line 167 of file configuration.cpp. References File, Ftp, FtpConfig::Host, FileConfig::PathMain, WWWConfig::Port, FtpConfig::UseFtp, FtpConfig::User, WWWConfig::UseWWW, and WWW. Referenced by KWebSnap::slotSnapSend(), and KWebSnap::slotStart(). |
|
Writes the configuration data to the application config file. Definition at line 111 of file configuration.cpp. References Caption, Capture, CaptureConfig::CaptureDelay, CaptureConfig::CaptureMode, CaptionConfig::Color, CaptionConfig::CustomPos, File, WWWConfig::Files, CaptionConfig::Font, Ftp, FtpConfig::Host, CaptureConfig::IncludeWD, Log, LogConfig::Path, FileConfig::PathMain, FileConfig::PathOffline, FileConfig::PathThumb, CaptureConfig::PictureQuality, WWWConfig::Port, FtpConfig::Port, CaptionConfig::Position, CaptionConfig::PositionX, CaptionConfig::PositionY, CaptureConfig::ScaleMain, CaptureConfig::ScaleMode, CaptureConfig::ScaleThumb, CaptionConfig::Text, FtpConfig::TransferPath, CaptionConfig::UseCaption, FtpConfig::UseFtp, LogConfig::UseLog, FtpConfig::UseOffline, FtpConfig::User, FtpConfig::UseThumb, WWWConfig::UseWWW, and WWW. |
|
This function is used to create one instance of a Configuration object, and access the object and the Configuration settings Definition at line 195 of file configuration.cpp. |
|
Initial value: { { FullScreen, 4500, -1, 100, 30, ScalePercent, true }, { "", "", "" }, { true, false, true, "", 21, "", "", "" }, { false, "" }, { false, false, Qt::AlignLeft | Qt::AlignTop, 0, 0, "", Qt::black, QFont() }, { false, 8080, QStringList() }, }
Definition at line 38 of file configuration.cpp. Referenced by read(), and ConfigDialog::slotDefault(). |