Provides some basic UIs to access resources. More...
#include <klflibview.h>
Provides some basic UIs to access resources.
Provides the following widget types for opening/creating/saving resources:
"LocalFile"
). Don't forget to add new file types with addLocalFileType() (this can be done e.g. in other engine factories' constructor)."RemoteHostUserPass"
).Definition at line 1132 of file klflibview.h.
KLFLibBasicWidgetFactory::KLFLibBasicWidgetFactory | ( | QObject * | parent = NULL | ) |
Definition at line 4757 of file klflibview.cpp.
KLFLibBasicWidgetFactory::~KLFLibBasicWidgetFactory | ( | ) | [virtual] |
Definition at line 4761 of file klflibview.cpp.
void KLFLibBasicWidgetFactory::addLocalFileSchemeGuesser | ( | KLFLibLocalFileSchemeGuesser * | schemeguesser | ) | [static, protected] |
This function adds a scheme guesser, ie. a functional sub-class of KLFLibLocalFileSchemeGuesser. The instance is NOT deleted after use. schemeguesser
could for example also sub-class QObject and set qApp
as parent.
Definition at line 4886 of file klflibview.cpp.
References pSchemeGuessers.
Referenced by KLFLibLocalFileSchemeGuesser::KLFLibLocalFileSchemeGuesser().
void KLFLibBasicWidgetFactory::addLocalFileType | ( | const LocalFileType & | fileType | ) | [static] |
This function should be called for example in KLFLibEngineFactory subclasses' constructor to inform this widget factory of local file types that are known by the various engine factories. This is then eg. used to provide a useful filter choice in file dialogs.
Definition at line 4861 of file klflibview.cpp.
References pLocalFileTypes.
Referenced by KLFLibDBEngineFactory::KLFLibDBEngineFactory(), and KLFLibLegacyEngineFactory::KLFLibLegacyEngineFactory().
QWidget * KLFLibBasicWidgetFactory::createPromptCreateParametersWidget | ( | QWidget * | parent, |
const QString & | scheme, | ||
const Parameters & | defaultparameters = Parameters() |
||
) | [virtual] |
See KLFLibWidgetFactory.
Default parameters that can be given in defaultparameters:
"Url"
(type QUrl): the URL to start with Reimplemented from KLFLibWidgetFactory.
Definition at line 4807 of file klflibview.cpp.
References pLocalFileTypes, and KLFLibLocalFileOpenWidget::setUrl().
QWidget * KLFLibBasicWidgetFactory::createPromptUrlWidget | ( | QWidget * | parent, |
const QString & | scheme, | ||
QUrl | defaultlocation = QUrl() |
||
) | [virtual] |
Implements KLFLibWidgetFactory.
Definition at line 4781 of file klflibview.cpp.
References pLocalFileTypes, and KLFLibLocalFileOpenWidget::setUrl().
Queries all the instantiated KLFLibLocalFileSchemeGuesser objects to see if one can recognize the file fileName
. The first scheme match found is returned. An empty QString is returned if no guesser succeeded to recognize fileName
.
Definition at line 4874 of file klflibview.cpp.
References QString::isEmpty(), pSchemeGuessers, and QList::size().
Referenced by KLFBasicDataOpener::canOpenFile(), KLFMainWin::loadLibrary(), KLFMainWin::openLibFile(), KLFLibLocalFileOpenWidget::selectedScheme(), and KLFLibBrowser::slotOpenAll().
virtual bool KLFLibBasicWidgetFactory::hasCreateWidget | ( | const QString & | ) | const [inline, virtual] |
Reimplemented from KLFLibWidgetFactory.
Definition at line 1154 of file klflibview.h.
QList< KLFLibBasicWidgetFactory::LocalFileType > KLFLibBasicWidgetFactory::localFileTypes | ( | ) | [static] |
Definition at line 4867 of file klflibview.cpp.
References pLocalFileTypes.
Referenced by KLFLibBrowser::slotOpenAll().
void KLFLibBasicWidgetFactory::removeLocalFileSchemeGuesser | ( | KLFLibLocalFileSchemeGuesser * | schemeguesser | ) | [static, protected] |
Definition at line 4892 of file klflibview.cpp.
References pSchemeGuessers, and QList::removeAll().
Referenced by KLFLibLocalFileSchemeGuesser::~KLFLibLocalFileSchemeGuesser().
KLFLibWidgetFactory::Parameters KLFLibBasicWidgetFactory::retrieveCreateParametersFromWidget | ( | const QString & | wtype, |
QWidget * | widget | ||
) | [virtual] |
The parameters returned by this function depends on the wtype
.
Widget-type "LocalFile"
"Filename"
: the selected local file name"klfRetry"
, "klfScheme"
as documented in KLFLibWidgetFactory::retrieveCreateParametersFromWidget(). Reimplemented from KLFLibWidgetFactory.
Definition at line 4820 of file klflibview.cpp.
References KLFLibLocalFileCreateWidget::confirmedOverwrite(), QMessageBox::critical(), QFile::exists(), QFile::remove(), KLFLibLocalFileOpenWidget::selectedFName(), KLFLibLocalFileOpenWidget::selectedScheme(), QObject::tr(), and QMessageBox::warning().
QUrl KLFLibBasicWidgetFactory::retrieveUrlFromWidget | ( | const QString & | scheme, |
QWidget * | widget | ||
) | [virtual] |
Implements KLFLibWidgetFactory.
Definition at line 4792 of file klflibview.cpp.
QStringList KLFLibBasicWidgetFactory::supportedTypes | ( | ) | const [virtual] |
Implements KLFLibWidgetFactory.
Definition at line 4766 of file klflibview.cpp.
Implements KLFLibWidgetFactory.
Definition at line 4772 of file klflibview.cpp.
References QObject::tr().
QList< KLFLibBasicWidgetFactory::LocalFileType > KLFLibBasicWidgetFactory::pLocalFileTypes [static, protected] |
Definition at line 1188 of file klflibview.h.
Referenced by addLocalFileType(), createPromptCreateParametersWidget(), createPromptUrlWidget(), and localFileTypes().
QList< KLFLibLocalFileSchemeGuesser * > KLFLibBasicWidgetFactory::pSchemeGuessers [static, protected] |
Definition at line 1189 of file klflibview.h.
Referenced by addLocalFileSchemeGuesser(), guessLocalFileScheme(), and removeLocalFileSchemeGuesser().