LibEngsas
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
EFileService Class Reference

Service which uses EFileServicePlugin's to handle files. More...

#include <efileservice.h>

+ Inheritance diagram for EFileService:
+ Collaboration diagram for EFileService:

Public Member Functions

 EFileService (QObject *parent=NULL)
 
 EFileService (QString serviceId, QObject *parent=NULL)
 
bool serviceLoaded () const
 Returns true, if a service is loaded and false if not. More...
 
EFileInfo info (QString uniqueId) const
 
EFileInfo add (QFileInfo info, bool create=false) const
 Adds file described by info to the handled files. More...
 
bool move (EFileInfo source, QString target) const
 Moves the file from source to target. More...
 
bool copy (EFileInfo source, QString target) const
 Copies the file from source to target. More...
 
bool deleteFile (EFileInfo file) const
 
bool open (EFileInfo file)
 
bool switchService (QString newServiceId)
 Switches all files from current service to newServiceId. More...
 
- Public Member Functions inherited from EObject
 EObject (QObject *parent=0)
 
virtual ~EObject ()
 
void connectByPass (QObject *object)
 

Static Public Member Functions

static QList
< EFileServicePlugin * > 
services ()
 A list with all EFileServicePlugins. More...
 
static ESettingsModelItemsettings ()
 The settings page for the EFileService module. More...
 
- Static Public Member Functions inherited from EObject
static void connectByPass (QObject *parent, QObject *child)
 

Private Member Functions

EFileServicePluginloadService (QString serviceId)
 

Private Attributes

EFileServicePluginservice
 

Additional Inherited Members

- Public Slots inherited from EObject
virtual void reloadSettings ()
 Used to reload the settings. More...
 
- Signals inherited from EObject
void error (const QString &message)
 
void warning (const QString &message)
 
void information (const QString &message)
 
void reloadEnableActions ()
 Request reloading of enabled actions in EMainWindow. More...
 
void addMenu (QMenu *newMenu, const QString &parent, QString before=QString())
 
void addAction (QAction *newAction, const QString &parent, QString before=QString())
 
void addToolBar (QToolBar *newToolBar, Qt::ToolBarArea area=Qt::TopToolBarArea)
 
void addNewDockWidget (QDockWidget *widget, const Qt::DockWidgetArea &area)
 
void setCentralWidget (QWidget *centralWidget)
 
void showSettings ()
 
void showHelp (const QString &page)
 
void showStatusWidget (QWidget *widget)
 
void reloadSettingsRequest ()
 Indicates, that a reload of the settings is needed. More...
 
void doReloadSettings ()
 Emitted to bring the reload request back to the farest child. More...
 
- Protected Slots inherited from EObject
virtual void errorByPass (const QString &message)
 
virtual void warningByPass (const QString &message)
 
virtual void informationByPass (const QString &message)
 
virtual void reloadEnableActionsByPass ()
 
virtual void addMenuByPass (QMenu *newMenu, const QString &parent, QString before=QString())
 
virtual void addActionByPass (QAction *newAction, const QString &parent, QString before=QString())
 
virtual void addToolBarByPass (QToolBar *newToolBar, Qt::ToolBarArea area=Qt::TopToolBarArea)
 
virtual void addNewDockWidgetByPass (QDockWidget *widget, const Qt::DockWidgetArea &area)
 
virtual void setCentralWidgetByPass (QWidget *centralWidget)
 
virtual void showSettingsByPass ()
 
virtual void showHelpByPass (const QString &page)
 
virtual void showStatusWidgetByPass (QWidget *widget)
 
virtual void reloadSettingsRequestByPass ()
 
- Protected Member Functions inherited from EObject
void addManagedDockWidget (QDockWidget *widget, const Qt::DockWidgetArea &area, QString actionLabel=QString(), QString actionParent=QString())
 Adds an dock widget via addNewDockWidget() and adds widget to the list of managed dock widgets. More...
 

Detailed Description

Service which uses EFileServicePlugin's to handle files.

If you want to provide file handling in your application, use this class. To let the user choose, which file service plugin he wants to use, append the ESettingsModelItem from settings() to your list of settings. After the user has chosen a service, just use this class to act on a file. Normally you walk through these steps:

Constructor & Destructor Documentation

EFileService::EFileService ( QObject *  parent = NULL)

+ Here is the call graph for this function:

EFileService::EFileService ( QString  serviceId,
QObject *  parent = NULL 
)

Ignores the chosen file service at the settings and loads the one given by serviceId.

+ Here is the call graph for this function:

Member Function Documentation

EFileInfo EFileService::add ( QFileInfo  info,
bool  create = false 
) const

Adds file described by info to the handled files.

If create is set to true, the file should be created, if it does not exists already.

Adding as is can mean, add a local file to an repository or to a remote file system or something else. In the case of the EFileSystemPlugin, this functions only converts the QFileInfo into an EFileInfo, because the files are the physically the same.

+ Here is the call graph for this function:

bool EFileService::copy ( EFileInfo  source,
QString  target 
) const

Copies the file from source to target.

target should be an absolute file path.

See also
move() to move source.

+ Here is the call graph for this function:

bool EFileService::deleteFile ( EFileInfo  file) const

+ Here is the call graph for this function:

EFileInfo EFileService::info ( QString  uniqueId) const

+ Here is the call graph for this function:

EFileServicePlugin * EFileService::loadService ( QString  serviceId)
private

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool EFileService::move ( EFileInfo  source,
QString  target 
) const

Moves the file from source to target.

target should be an absolute file path.

See also
copy() to copy source.

+ Here is the call graph for this function:

bool EFileService::open ( EFileInfo  file)

+ Here is the call graph for this function:

bool EFileService::serviceLoaded ( ) const

Returns true, if a service is loaded and false if not.

+ Here is the caller graph for this function:

QList< EFileServicePlugin * > EFileService::services ( )
static

A list with all EFileServicePlugins.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ESettingsModelItem * EFileService::settings ( )
static

The settings page for the EFileService module.

Does also contain the page for the currently selected EFileServicePlugin.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool EFileService::switchService ( QString  newServiceId)

Switches all files from current service to newServiceId.

Todo:
Must be implemented!

+ Here is the call graph for this function:

Member Data Documentation

EFileServicePlugin* EFileService::service
private

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