24 #ifndef KLFLIBLEGACYENGINE_H
25 #define KLFLIBLEGACYENGINE_H
30 #include <QDataStream>
51 unsigned long bgcol = qRgba(255,255,255,0),
55 : name(nm), fg_color(fgcol), bg_color(bgcol), mathmode(mmode), preamble(pre),
67 LibResource_History = 0,
68 LibResource_Archive = 1,
70 LibResourceUSERMIN = 100,
71 LibResourceUSERMAX = 99999
163 virtual uint
compareUrlTo(
const QUrl& other, uint interestFlags = 0xfffffff)
const;
186 virtual void setAutoSaveInterval(
int intervalms);
199 void updateResourceProperty(
int propId);
virtual bool saveTo(const QUrl &newPath)
virtual uint schemeFunctions(const QString &scheme) const
What this factory is capable of doing.
QList< KLFLibraryResource > KLFLibraryResourceList
virtual bool canRenameSubResource(const QString &subResource) const
virtual bool createSubResource(const QString &subResource, const QString &subResourceTitle)
Create a new sub-resource.
KLF_EXPORT bool operator==(const KLFLegacyData::KLFStyle &a, const KLFLegacyData::KLFStyle &b)
virtual uint compareUrlTo(const QUrl &other, uint interestFlags=0xfffffff) const =0
Compare this resource's URL with another's.
virtual bool canRegisterProperty(const QString &propName) const
virtual KLFLibResourceEngine * openResource(const QUrl &location, QObject *parent=NULL)=0
virtual KLFLibEntry entry(const QString &subResource, entryId id)=0
query an entry in this resource
KLFLegacyData::KLFStyle style
virtual bool deleteSubResource(const QString &subResource)
KLFStyle(QString nm=QString(), unsigned long fgcol=qRgba(0, 0, 0, 255), unsigned long bgcol=qRgba(255, 255, 255, 0), const QString &mmode=QString(), const QString &pre=QString(), int dotsperinch=-1)
virtual QStringList supportedTypes() const =0
A list of supported URL schemes this factory can open.
virtual bool renameSubResource(const QString &oldSubResourceName, const QString &newSubResourceName)
virtual ~KLFLibLegacyEngineFactory()
The Legacy Library support for the KLFLib framework.
KLF_EXPORT bool operator<(const KLFLegacyData::KLFLibraryResource a, const KLFLegacyData::KLFLibraryResource b)
virtual bool saveResourceProperty(int propId, const QVariant &value)=0
Save a resource property to the backend resource data.
virtual KLFLibResourceEngine * createResource(const QString &scheme, const Parameters ¶meters, QObject *parent=NULL)
Create a new resource of given type and parameters.
virtual bool canCreateSubResource() const
virtual bool deleteEntries(const QString &subResource, const QList< entryId > &idlist)=0
Delete some entries in this resource.
KLF_EXPORT QDataStream & operator>>(QDataStream &stream, KLFLegacyData::KLFStyle &style)
KLF_EXPORT bool resources_equal_for_import(const KLFLegacyData::KLFLibraryResource a, const KLFLegacyData::KLFLibraryResource b)
virtual bool canModifyData(const QString &subResource, ModifyType modifytype) const
virtual QList< entryId > insertEntries(const QString &subResource, const KLFLibEntryList &entrylist)=0
Insert new entries in this resource.
virtual QStringList subResourceList() const
Provides a simple API for reading library resources.
QMap< KLFLibraryResource, KLFLibraryList > KLFLibrary
Interface for guessing file schemes.
virtual QString correspondingWidgetType(const QString &scheme) const =0
An entry (single formula) in the library.
virtual bool changeEntries(const QString &subResource, const QList< entryId > &idlist, const QList< int > &properties, const QList< QVariant > &values)=0
Change some entries in this resource.
virtual QList< KLFLibEntryWithId > allEntries(const QString &subResource, const QList< int > &wantedEntryProperties=QList< int >())=0
query all entries in this resource
KLF_EXPORT QDataStream & operator<<(QDataStream &stream, const KLFLegacyData::KLFStyle &style)
An abstract resource engine.
virtual bool canDeleteSubResource(const QString &subResource) const
QList< KLFLibraryItem > KLFLibraryList
virtual bool canModifyProp(int propId) const
virtual QString guessScheme(const QString &fileName) const =0
Guess the appropriate scheme for handling the given file.
KLFLibLegacyLocalFileSchemeGuesser(QObject *parent)
virtual QString schemeTitle(const QString &scheme) const =0