Provides some basic UIs to access resources. More...
#include <klflibview.h>
Classes | |
struct | LocalFileType |
A known local file type for KLFLibBasicWidgetFactory-created widgets. More... | |
Public Member Functions | |
KLFLibBasicWidgetFactory (QObject *parent=NULL) | |
virtual | ~KLFLibBasicWidgetFactory () |
virtual QStringList | supportedTypes () const |
virtual QString | widgetTypeTitle (const QString &wtype) const |
virtual QWidget * | createPromptUrlWidget (QWidget *parent, const QString &scheme, QUrl defaultlocation=QUrl()) |
virtual QUrl | retrieveUrlFromWidget (const QString &scheme, QWidget *widget) |
virtual bool | hasCreateWidget (const QString &) const |
virtual QWidget * | createPromptCreateParametersWidget (QWidget *parent, const QString &scheme, const Parameters &defaultparameters=Parameters()) |
virtual Parameters | retrieveCreateParametersFromWidget (const QString &wtype, QWidget *widget) |
![]() | |
KLFLibWidgetFactory (QObject *parent) | |
virtual bool | hasSaveToWidget (const QString &wtype) const |
virtual QWidget * | createPromptSaveToWidget (QWidget *wparent, const QString &wtype, KLFLibResourceEngine *resource, const QUrl &defaultUrl) |
virtual QUrl | retrieveSaveToUrlFromWidget (const QString &wtype, QWidget *widget) |
![]() | |
QObject (QObject *parent=0) | |
blockSignals (bool block) | |
childEvent (QChildEvent *event) | |
children () | |
connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type=Qt::AutoCompatConnection) | |
connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type=Qt::AutoCompatConnection) | |
connectNotify (const char *signal) | |
customEvent (QEvent *event) | |
deleteLater () | |
destroyed (QObject *obj=0) | |
disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) | |
disconnect (const char *signal=0, const QObject *receiver=0, const char *method=0) | |
disconnect (const QObject *receiver, const char *method=0) | |
disconnectNotify (const char *signal) | |
dumpObjectInfo () | |
dumpObjectTree () | |
dynamicPropertyNames () | |
event (QEvent *e) | |
eventFilter (QObject *watched, QEvent *event) | |
findChild (const QString &name=QString() | |
findChildren (const QString &name=QString() | |
findChildren (const QRegExp ®Exp) | |
inherits (const char *className) | |
installEventFilter (QObject *filterObj) | |
isWidgetType () | |
killTimer (int id) | |
metaObject () | |
moveToThread (QThread *targetThread) | |
parent () | |
property (const char *name) | |
receivers (const char *signal) | |
removeEventFilter (QObject *obj) | |
sender () | |
setParent (QObject *parent) | |
setProperty (const char *name, const QVariant &value) | |
signalsBlocked () | |
startTimer (int interval) | |
thread () | |
timerEvent (QTimerEvent *event) | |
tr (const char *sourceText, const char *comment=0, int n=-1) | |
trUtf8 (const char *sourceText, const char *comment=0, int n=-1) | |
staticMetaObject | |
QObject (QObject *parent, const char *name) | |
checkConnectArgs (const char *signal, const QObject *object, const char *method) | |
child (const char *objName, const char *inheritsClass=0, bool recursiveSearch=true) | |
className () | |
insertChild (QObject *object) | |
isA (const char *className) | |
name () | |
name (const char *defaultName) | |
normalizeSignalSlot (const char *signalSlot) | |
removeChild (QObject *object) | |
setName (const char *name) | |
![]() | |
KLFFactoryBase (KLFFactoryManager *factoryManager) | |
virtual | ~KLFFactoryBase () |
Static Public Member Functions | |
static void | addLocalFileType (const LocalFileType &fileType) |
static QList< LocalFileType > | localFileTypes () |
static QString | guessLocalFileScheme (const QString &fileName) |
![]() | |
static KLFLibWidgetFactory * | findFactoryFor (const QString &wtype) |
static QStringList | allSupportedWTypes () |
Static Protected Member Functions | |
static void | addLocalFileSchemeGuesser (KLFLibLocalFileSchemeGuesser *schemeguesser) |
static void | removeLocalFileSchemeGuesser (KLFLibLocalFileSchemeGuesser *schemeguesser) |
Static Protected Attributes | |
static QList< LocalFileType > | pLocalFileTypes |
static QList < KLFLibLocalFileSchemeGuesser * > | pSchemeGuessers |
Additional Inherited Members | |
![]() | |
typedef KLFLibEngineFactory::Parameters | Parameters |
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 1136 of file klflibview.h.
KLFLibBasicWidgetFactory::KLFLibBasicWidgetFactory | ( | QObject * | parent = NULL | ) |
Definition at line 4783 of file klflibview.cpp.
|
virtual |
Definition at line 4787 of file klflibview.cpp.
|
staticprotected |
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 4912 of file klflibview.cpp.
References pSchemeGuessers.
Referenced by KLFLibLocalFileSchemeGuesser::KLFLibLocalFileSchemeGuesser().
|
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 4887 of file klflibview.cpp.
References pLocalFileTypes.
Referenced by KLFLibDBEngineFactory::KLFLibDBEngineFactory(), and KLFLibLegacyEngineFactory::KLFLibLegacyEngineFactory().
|
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 4833 of file klflibview.cpp.
References pLocalFileTypes, and KLFLibLocalFileOpenWidget::setUrl().
|
virtual |
Implements KLFLibWidgetFactory.
Definition at line 4807 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 4900 of file klflibview.cpp.
References QString::isEmpty(), pSchemeGuessers, and QList::size().
Referenced by KLFBasicDataOpener::canOpenFile(), KLFMainWin::loadLibrary(), KLFMainWin::openLibFile(), KLFLibLocalFileOpenWidget::selectedScheme(), and KLFLibBrowser::slotOpenAll().
|
inlinevirtual |
Reimplemented from KLFLibWidgetFactory.
Definition at line 1158 of file klflibview.h.
|
static |
Definition at line 4893 of file klflibview.cpp.
References pLocalFileTypes.
Referenced by KLFLibBrowser::slotOpenAll().
|
staticprotected |
Definition at line 4918 of file klflibview.cpp.
References pSchemeGuessers, and QList::removeAll().
Referenced by KLFLibLocalFileSchemeGuesser::~KLFLibLocalFileSchemeGuesser().
|
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 4846 of file klflibview.cpp.
References KLFLibLocalFileCreateWidget::confirmedOverwrite(), QMessageBox::critical(), QFile::exists(), QFile::remove(), KLFLibLocalFileOpenWidget::selectedFName(), KLFLibLocalFileOpenWidget::selectedScheme(), QObject::tr(), and QMessageBox::warning().
|
virtual |
Implements KLFLibWidgetFactory.
Definition at line 4818 of file klflibview.cpp.
|
virtual |
Implements KLFLibWidgetFactory.
Definition at line 4792 of file klflibview.cpp.
Implements KLFLibWidgetFactory.
Definition at line 4798 of file klflibview.cpp.
References QObject::tr().
|
staticprotected |
Definition at line 1192 of file klflibview.h.
Referenced by addLocalFileType(), createPromptCreateParametersWidget(), createPromptUrlWidget(), and localFileTypes().
|
staticprotected |
Definition at line 1193 of file klflibview.h.
Referenced by addLocalFileSchemeGuesser(), guessLocalFileScheme(), and removeLocalFileSchemeGuesser().