nvemSettings Class Reference

Configuration object for nvemFTP. More...

#include <nvemsettings.h>


Public Member Functions

QString getSetting (const QString &key, const QString &setting, const QString &def="")
 Retrieve the string associated with setting within the key namespace.

int getSetting (const QString &key, const QString &setting, const int &def)
 Retrieve the integer associated with setting within the key namespace.

void setSetting (const QString &key, const QString &setting, const QString &val)
 Set the string associated with setting within the key namespace to val.

void setSetting (const QString &key, const QString &setting, const int &val)
 Set the integer associated with setting within the key namespace to val.

int saveSettings ()
 Save all settings to disk.

int loadSettings ()
 Loads all settings from disk.

void setMainWidget (nvemFTP *widget)
 Set the pointer to our main widget.

nvemFTPmainWidget () const
 Retrieve a pointer to our main widget.

void setStartUrl (NHostInfo newurl)
 Set the starting URL for our session.

NHostInfo getStartUrl () const
 Retrieve the starting URL for our session.


Static Public Member Functions

nvemSettings & instance ()
 Returns a reference to the configuration object.

const nvemSettings & const_instance ()
 Returns a const reference to the configuration object.


Protected Member Functions

 nvemSettings ()
 Instantiate a configurations object.

 ~nvemSettings ()
 Destroy the object.


Friends

class std::auto_ptr< nvemSettings >
 Gives auto_ptr<nvemSettings> access to our destructor.


Detailed Description

Configuration object for nvemFTP.


Constructor & Destructor Documentation

nvemSettings::nvemSettings  )  [protected]
 

Instantiate a configurations object.

nvemSettings::~nvemSettings  )  [protected]
 

Destroy the object.


Member Function Documentation

const nvemSettings& nvemSettings::const_instance  )  [inline, static]
 

Returns a const reference to the configuration object.

int nvemSettings::getSetting const QString &  key,
const QString &  setting,
const int &  def
 

Retrieve the integer associated with setting within the key namespace.

Overloaded function for the above.

Parameters:
key Namespace of requested setting.
setting Requested setting.
def Default integer to return if not already set.
Returns:
Associated integer if it exists, or def if not found.

QString nvemSettings::getSetting const QString &  key,
const QString &  setting,
const QString &  def = ""
 

Retrieve the string associated with setting within the key namespace.

Parameters:
key Namespace of requested setting.
setting Requested setting.
def Default setting to return if not already set.
Returns:
Associated string if it exists, or def if not found.

NHostInfo nvemSettings::getStartUrl  )  const [inline]
 

Retrieve the starting URL for our session.

nvemSettings& nvemSettings::instance  )  [inline, static]
 

Returns a reference to the configuration object.

int nvemSettings::loadSettings  ) 
 

Loads all settings from disk.

Loads settings from a set of files with names based on their respective namespaces. Directory for loading is QDir::homeDirPath()/.nvemftp/config/ File format is simply a set of "Setting=Value" strings.

nvemFTP* nvemSettings::mainWidget  )  const [inline]
 

Retrieve a pointer to our main widget.

int nvemSettings::saveSettings  ) 
 

Save all settings to disk.

Saves settings in a set of files with names based on available setting namespaces. Directory for storage is QDir::homeDirPath()/.nvemftp/config/ File format is simply a set of "Setting=Value" strings.

void nvemSettings::setMainWidget nvemFTP widget  )  [inline]
 

Set the pointer to our main widget.

void nvemSettings::setSetting const QString &  key,
const QString &  setting,
const int &  val
 

Set the integer associated with setting within the key namespace to val.

Overloaded function for the above.

Parameters:
key Namespace of requested setting.
setting Setting to be set.
val New value to associate with setting

void nvemSettings::setSetting const QString &  key,
const QString &  setting,
const QString &  val
 

Set the string associated with setting within the key namespace to val.

Parameters:
key Namespace of requested setting.
setting Setting to be set.
val New value to associate with setting

void nvemSettings::setStartUrl NHostInfo  newurl  )  [inline]
 

Set the starting URL for our session.


Friends And Related Function Documentation

friend class std::auto_ptr< nvemSettings > [friend]
 

Gives auto_ptr<nvemSettings> access to our destructor.


The documentation for this class was generated from the following files:
Generated on Wed Oct 22 20:32:05 2003 for nvemftp by doxygen1.3