[KLF Application][KLF Tools][KLF Backend][KLF Home]
KLatexFormula Project
Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
KLFLibLegacyFileDataPrivate Class Reference

#include <klfliblegacyengine_p.h>

Inheritance diagram for KLFLibLegacyFileDataPrivate:
Inheritance graph
[legend]
Collaboration diagram for KLFLibLegacyFileDataPrivate:
Collaboration graph
[legend]

Public Types

enum  LegacyLibType { LocalHistoryType = 1, LocalLibraryType, ExportLibraryType }
 

Public Slots

bool load (const QString &fname=QString())
 
bool save (const QString &fname=QString())
 
void emitResourcePropertyChanged (int propId)
 

Signals

void resourcePropertyChanged (int propId)
 

Public Member Functions

 ~KLFLibLegacyFileDataPrivate ()
 
void ref ()
 
int deref ()
 
QString fileName () const
 
int findResourceName (const QString &resname)
 
int getReservedResourceId (const QString &resourceName, int defaultId)
 
- Public Member Functions inherited from QObject
 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 &regExp)
 
 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)
 

Static Public Member Functions

static
KLFLibLegacyFileDataPrivate
instanceFor (const QString fname, bool starttimer)
 
static QString canonicalFilePath (const QString &fname)
 
static KLFLibEntry toLibEntry (const KLFLegacyData::KLFLibraryItem &item)
 
static
KLFLegacyData::KLFLibraryItem 
toLegacyLibItem (const KLFLibEntry &entry)
 
static KLFLegacyData::KLFStyle toLegacyStyle (const KLFStyle &style)
 
static KLFStyle toStyle (const KLFLegacyData::KLFStyle &oldstyle)
 

Public Attributes

bool haschanges
 
KLFLegacyData::KLFLibrary library
 
KLFLegacyData::KLFLibraryResourceList resources
 
QVariantMap metadata
 
LegacyLibType legacyLibType
 
QTimerautoSaveTimer
 

Detailed Description

Definition at line 39 of file klfliblegacyengine_p.h.

Member Enumeration Documentation

Enumerator
LocalHistoryType 
LocalLibraryType 
ExportLibraryType 

Definition at line 118 of file klfliblegacyengine_p.h.

Constructor & Destructor Documentation

KLFLibLegacyFileDataPrivate::~KLFLibLegacyFileDataPrivate ( )
inline

Saves the file, removes this instance from the static instance list and deletes the timer.

Definition at line 99 of file klfliblegacyengine_p.h.

References autoSaveTimer, haschanges, klfDbg, QMap::remove(), and save().

Member Function Documentation

static QString KLFLibLegacyFileDataPrivate::canonicalFilePath ( const QString fname)
inlinestatic

Returns a path that will be "canonicalized", ie. two (string-wise) different paths pointing to the same file will have the same canonical path (eg. '..' entries simplified, symlinks resolved).

Works for both existing and non-existing files. However for non-existing files the containing directory must exist.

An empty string is returned to indicate an error (eg. containing directory does not exist).

Definition at line 74 of file klfliblegacyengine_p.h.

References QFileInfo::absolutePath(), QFileInfo::canonicalFilePath(), QString::endsWith(), QFileInfo::exists(), QFileInfo::fileName(), QFileInfo::isDir(), QString::isEmpty(), KLF_FUNC_NAME, and klfDbg.

Referenced by KLFLibLegacyEngine::createDotKLF(), instanceFor(), and save().

int KLFLibLegacyFileDataPrivate::deref ( )
inline

Dereferences, and returns the remaining number of references to this object. The caller should delete the object if the return value is zero.

Definition at line 113 of file klfliblegacyengine_p.h.

Referenced by KLFLibLegacyEngine::~KLFLibLegacyEngine().

void KLFLibLegacyFileDataPrivate::emitResourcePropertyChanged ( int  propId)
inlineslot
QString KLFLibLegacyFileDataPrivate::fileName ( ) const
inline
int KLFLibLegacyFileDataPrivate::findResourceName ( const QString resname)
int KLFLibLegacyFileDataPrivate::getReservedResourceId ( const QString resourceName,
int  defaultId 
)
static KLFLibLegacyFileDataPrivate* KLFLibLegacyFileDataPrivate::instanceFor ( const QString  fname,
bool  starttimer 
)
inlinestatic

Get the KLFLibLegacyFileDataPrivate instance assigned to file fname. The file data is already loaded, ie. don't call load().

Don't forget to call ref() to reference the returned object.

autoSaveTimer is instantiated and started; however you must

Definition at line 50 of file klfliblegacyengine_p.h.

References autoSaveTimer, canonicalFilePath(), QMap::contains(), QString::isEmpty(), KLF_FUNC_NAME, klfDbg, and QTimer::start().

bool KLFLibLegacyFileDataPrivate::load ( const QString fname = QString())
slot
void KLFLibLegacyFileDataPrivate::ref ( )
inline

Should be called explicitely by any class that wishes to use this instance. See also deref()

Definition at line 110 of file klfliblegacyengine_p.h.

void KLFLibLegacyFileDataPrivate::resourcePropertyChanged ( int  propId)
signal
bool KLFLibLegacyFileDataPrivate::save ( const QString fname = QString())
slot
static KLFLegacyData::KLFLibraryItem KLFLibLegacyFileDataPrivate::toLegacyLibItem ( const KLFLibEntry entry)
inlinestatic
static KLFLegacyData::KLFStyle KLFLibLegacyFileDataPrivate::toLegacyStyle ( const KLFStyle style)
inlinestatic
static KLFLibEntry KLFLibLegacyFileDataPrivate::toLibEntry ( const KLFLegacyData::KLFLibraryItem item)
inlinestatic
static KLFStyle KLFLibLegacyFileDataPrivate::toStyle ( const KLFLegacyData::KLFStyle oldstyle)
inlinestatic

Member Data Documentation

QTimer* KLFLibLegacyFileDataPrivate::autoSaveTimer
bool KLFLibLegacyFileDataPrivate::haschanges
LegacyLibType KLFLibLegacyFileDataPrivate::legacyLibType

Definition at line 138 of file klfliblegacyengine_p.h.

Referenced by load(), and save().

KLFLegacyData::KLFLibrary KLFLibLegacyFileDataPrivate::library
QVariantMap KLFLibLegacyFileDataPrivate::metadata

Metadata, may be used for any purpose.

upon modification, DON'T FORGET to set haschanges !

List of properties:

  • "ResProps" : a QVariantMap with all resource properties as { 'name' => value }
Todo:
In the future, this will be how resource and sub-resource properties will be supported.

Definition at line 136 of file klfliblegacyengine_p.h.

Referenced by load(), save(), KLFLibLegacyEngine::saveResourceProperty(), and KLFLibLegacyEngine::updateResourceProperty().

KLFLegacyData::KLFLibraryResourceList KLFLibLegacyFileDataPrivate::resources

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

Generated by doxygen 1.8.6