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

Tries to open a given url or file in an external Application. More...

#include <eopenfileexternal.h>

+ Inheritance diagram for EOpenFileExternal:
+ Collaboration diagram for EOpenFileExternal:

Public Member Functions

 EOpenFileExternal (QObject *parent=0)
 
 ~EOpenFileExternal ()
 
void setFile (QString file, QString mimeType="")
 
void setFile (QFileInfo file, QString mimeType="")
 
bool openFile (QString file, QString mimeType="")
 
bool openFile (QFileInfo file, QString mimeType="")
 
bool open ()
 
- Public Member Functions inherited from EObject
 EObject (QObject *parent=0)
 
virtual ~EObject ()
 
void connectByPass (QObject *object)
 

Static Public Member Functions

static EMimeTypeModelmimeTypes ()
 
static QString group ()
 Returns the settings group. More...
 
static bool openFile (QString file, QString mimeType, QObject *parent)
 
static bool openFile (QFileInfo file, QString mimeType, QObject *parent)
 
- Static Public Member Functions inherited from EObject
static void connectByPass (QObject *parent, QObject *child)
 

Private Member Functions

EMimeTypedetectType ()
 
QString searchApp (EMimeType *mimeType)
 

Private Attributes

QString myFile
 
EMimeTypemyType
 
EMimeTypeModelmodel
 
bool isStream
 

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

Tries to open a given url or file in an external Application.

It can detect the filetype with help of the extension or the file type can be given. In last case the file is opened with the related application without checking, if it is a file of that type. To open a file use openFile(QString, QString, QObject*) or openFile(QFileInfo, QString, QObject*) It uses the KDE MimeType system, if BINDINGS_KDE is activated and the main application is an KApplication.

Constructor & Destructor Documentation

EOpenFileExternal::EOpenFileExternal ( QObject *  parent = 0)

+ Here is the call graph for this function:

EOpenFileExternal::~EOpenFileExternal ( )

Member Function Documentation

EMimeType * EOpenFileExternal::detectType ( )
private

trys to detect the mimetype autometically (or returns myType, if set) right now it uses the suffix

Todo:

detect mimetype by opening it and reading the header of the file

it should create a new one if it detects an unknown MimeType

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

QString EOpenFileExternal::group ( )
static

Returns the settings group.

+ Here is the caller graph for this function:

EMimeTypeModel * EOpenFileExternal::mimeTypes ( )
static

returns a list of known MimeTypes

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool EOpenFileExternal::open ( )

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool EOpenFileExternal::openFile ( QString  file,
QString  mimeType,
QObject *  parent 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool EOpenFileExternal::openFile ( QFileInfo  file,
QString  mimeType,
QObject *  parent 
)
static

+ Here is the call graph for this function:

bool EOpenFileExternal::openFile ( QString  file,
QString  mimeType = "" 
)

+ Here is the call graph for this function:

bool EOpenFileExternal::openFile ( QFileInfo  file,
QString  mimeType = "" 
)

+ Here is the call graph for this function:

QString EOpenFileExternal::searchApp ( EMimeType mimeType)
private

Opens the SearchExternalApp dialog to let the user add other applications and choose one of the listed applications

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void EOpenFileExternal::setFile ( QString  file,
QString  mimeType = "" 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void EOpenFileExternal::setFile ( QFileInfo  file,
QString  mimeType = "" 
)

+ Here is the call graph for this function:

Member Data Documentation

bool EOpenFileExternal::isStream
private
EMimeTypeModel* EOpenFileExternal::model
private
QString EOpenFileExternal::myFile
private
EMimeType* EOpenFileExternal::myType
private

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