Options

The Options object manages the user preferences for the entire application. More...

Publicly inherits QObject.

Public Methods

Options( int argc, char* argv[] );
boolautoLoad( );
QStringbookmarksUrl( );
QStringcatalogFile( );
booldebugging( );
QStringhomeUrl( );
boolmenuFontItalic( );
QStringmenuFontName( );
intmenuFontSize( );
intmenuFontWeight( );
voidsetAutoLoad( bool b );
voidsetBookmarksUrl( QString url );
voidsetCatalogFile( QString url );
voidsetDebugging( bool b );
voidsetHomeUrl( QString url );
voidsetMenuFontItalic( bool italic );
voidsetMenuFontName( QString name );
voidsetMenuFontSize( int size );
voidsetMenuFontWeight( int weight );

Public Slots

voidsave( );

Private Methods

QStringgetToken( FILE* fp );
voidload( );

Signals

voidupdateAutoLoad( );
voidupdateBookmarksUrl( );
voidupdateCatalogFile( );
voidupdateDebugging( );
voidupdateHomeUrl( );
voidupdateMenuFontItalic( );
voidupdateMenuFontName( );
voidupdateMenuFontSize( );
voidupdateMenuFontWeight( );

Private Data Members

bool_autoLoad;
QString_bookmarksUrl;
QString_catalogFile;
bool_debugging;
QString_homeUrl;
bool_menuFontItalic;
QString_menuFontName;
int_menuFontSize;
int_menuFontWeight;

Detailed Documentation

The Options object manages the user preferences for the entire application.

The Options object is responsible for reading user preferences from the $HOME/.qwebrc file and the command line. Whenever any option is changed, a signal is emitted. Upon request, the current user preferences can be written back out to $HOME/.qwebrc.

Public Methods Documentation

Options ( int argc, char* argv[] );

Create a new Options object. Set some reasonable default for all the options. Read any settings from $HOME/.qwebrc. Override these settings with anything specified on the command line.

bool autoLoad ( );

Return the value of the auto load option.

QString bookmarksUrl ( );

Return the value of the bookmarks URL option.

QString catalogFile ( );

Return the value of the catalog file option.

bool debugging ( );

Return the value of the debugging option.

QString homeUrl ( );

Return the value of the home URL option.

void setAutoLoad ( bool b );

Change the auto load option.

void setBookmarksUrl ( QString url );

Change the bookmarks file option.

void setCatalogFile ( QString url );

Change the catalog file option.

void setDebugging ( bool b );

Change the debugging option.

void setHomeUrl ( QString url );

Change the home URL option.

Public Slots Documentation

void save ( );

Save the current options to the file $HOME/.qwebrc.

Private Methods Documentation

QString getToken ( FILE* fp );

Return a single token from the preferences file. A tokens are delimited by spaces only.

void load ( );

Read in the user preferences from $HOME/.qwebrc.

Signals Documentation

void updateAutoLoad ( );

Emitted when the auto load options is changed.

void updateBookmarksUrl ( );

Emitted when the bookmarks URL option is changed.

void updateCatalogFile ( );

Emitted when the catalog file option is changed.

void updateDebugging ( );

Emitted when the debugging option is changed.

void updateHomeUrl ( );

Emitted when the home URL options is changed.


Return to Index.
Automatically generated on Aug 11 23:32