YourDefrag  SVN
Public Member Functions | Public Attributes
YDConfigFile Class Reference

Defragmenter work thread configuration. More...

#include <YDConfigFile.h>

List of all members.

Public Member Functions

 YDConfigFile (QString diskName, QObject *parent=NULL)
 Defragmenter config file constructor.
 YDConfigFile (const YDConfigFile &configFile)
 Defragmenter config file copy constructor.
 ~YDConfigFile ()
 Defragmenter config file destructor.
bool load (QString fileName=QString::null)
 Load config file.
bool save (QString fileName=QString::null, bool hidden=true)
 Save config file.
QString getDefaultFileName ()
 Get default file name.

Public Attributes

QString m_diskName
 Disk name string.
QStringList m_excludes
 File excludes list.
QStringList m_spaceHogs
 File space hogs list.
int m_mode
 Defragmenter mode.
int m_speed
 Defragmenter speed in percents.
int m_freeSpace
 Free space in percents.
bool m_startFlag
 Defragmenter start flag.

Detailed Description

Defragmenter work thread configuration.

This class holds defragmenter configuration parameters and makes load/store operations.


Constructor & Destructor Documentation

YDConfigFile::YDConfigFile ( QString  diskName,
QObject *  parent = NULL 
)

Defragmenter config file constructor.

This function initializes defragmenter data.

Parameters:
[in]diskNameName of disk/path to defragment.
[in]parentParent object.
YDConfigFile::YDConfigFile ( const YDConfigFile configFile)

Defragmenter config file copy constructor.

This function initializes makes a copy of defragmenter data.

Parameters:
[in]configFileReference config file variable.
YDConfigFile::~YDConfigFile ( )

Defragmenter config file destructor.


Member Function Documentation

QString YDConfigFile::getDefaultFileName ( )

Get default file name.

This function forms a default file name for configuration file.

Returns:
  • QString::null if no file name can be build;
  • valid string for file name.
bool YDConfigFile::load ( QString  fileName = QString::null)

Load config file.

This function loads defragmenter configuration data out from a file.

Returns:
  • false if configuration failed be loaded;
  • true if configuration is loaded successfully.
Parameters:
[in]fileNameFile name to load data from.
bool YDConfigFile::save ( QString  fileName = QString::null,
bool  hidden = true 
)

Save config file.

This function stores defragmenter configuration data in to a file.

Returns:
  • false if configuration failed be saved;
  • true if configuration is saved successfully.
Parameters:
[in]fileNameFile name to store data to.
[in]hiddenMark the file as hidden one.

Member Data Documentation

Disk name string.

File excludes list.

Free space in percents.

Defragmenter mode.

File space hogs list.

Defragmenter speed in percents.

Defragmenter start flag.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines