[KLF Application][KLF Tools][KLF Backend][KLF Home]
KLatexFormula Project
Classes | Defines | Functions | Variables

src/klfmain.h File Reference

#include <QCoreApplication>
#include <QString>
#include <QList>
#include <QMap>
#include <QStringList>
#include <QDataStream>
#include <QTranslator>
#include <QDir>
#include <klfdefs.h>
Include dependency graph for klfmain.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  KLFAddOnInfo
struct  KLFAddOnInfo::PluginSysInfo
struct  KLFAddOnInfo::Private
struct  KLFPluginInfo
struct  KLFTranslationInfo
 Small minimalist structure to store basic information about available translations. More...
class  KLFI18nFile
 Small structure to store information for a translation file (.qm) More...

Defines

#define KLF_DLL_EXT_LIST   (QStringList()<<"*.so")
#define KLF_DATA_STREAM_APP_VERSION   "3.2"
 Current datastream compatibility klatexformula version.
#define KLF_DATA_STREAM_APP_VERSION_MAJ   3
 'Major' version part of KLF_DATA_STREAM_APP_VERSION.
#define KLF_DATA_STREAM_APP_VERSION_MIN   2
 'Minor' version part of KLF_DATA_STREAM_APP_VERSION.

Functions

KLF_EXPORT QDebug & operator<< (QDebug &str, const KLFAddOnInfo::PluginSysInfo &i)
KLF_EXPORT void klf_add_avail_translation (KLFI18nFile i18nfile)
KLF_EXPORT void klf_reload_translations (QCoreApplication *app, const QString &currentlocale)
KLF_EXPORT QString klfFindTranslatedDataFile (const QString &baseFileName, const QString &extension)
QString klfDataStreamAppVersion (const QDataStream &d)
 Obtain the KLF version stream operations on d have to be compatible with.
KLF_EXPORT void klfDataStreamWriteHeader (QDataStream &stream, const QString headermagic)
KLF_EXPORT bool klfDataStreamReadHeader (QDataStream &stream, const QStringList possibleHeaders, QString *readHeader=NULL, QString *readCompatKLFVersion=NULL)

Variables

KLF_EXPORT QList< KLFAddOnInfoklf_addons
KLF_EXPORT bool klf_addons_canimport
KLF_EXPORT QList< KLFPluginInfoklf_plugins
KLF_EXPORT QList
< KLFTranslationInfo
klf_avail_translations
KLF_EXPORT QList< QTranslator * > klf_translators

Define Documentation

#define KLF_DATA_STREAM_APP_VERSION   "3.2"

Current datastream compatibility klatexformula version.

This value is updated to the new version of KLF whenever a change in the format of the QDataStream's occur.

This is used notably in local styles list and symbols cache.

Note:
This does NOT affect legacy ".klf" library files

Definition at line 280 of file klfmain.h.

Referenced by klfDataStreamWriteHeader(), KLFMainWin::loadStyles(), relcachefile(), and KLFMainWin::saveStyles().

#define KLF_DATA_STREAM_APP_VERSION_MAJ   3

'Major' version part of KLF_DATA_STREAM_APP_VERSION.

Definition at line 284 of file klfmain.h.

Referenced by klfDataStreamWriteHeader().

#define KLF_DATA_STREAM_APP_VERSION_MIN   2

'Minor' version part of KLF_DATA_STREAM_APP_VERSION.

Definition at line 286 of file klfmain.h.

Referenced by klfDataStreamWriteHeader().

#define KLF_DLL_EXT_LIST   (QStringList()<<"*.so")

Definition at line 48 of file klfmain.h.

Referenced by main_load_plugins().


Function Documentation

KLF_EXPORT void klf_add_avail_translation ( KLFI18nFile  i18nfile)
KLF_EXPORT void klf_reload_translations ( QCoreApplication app,
const QString currentlocale 
)
QString klfDataStreamAppVersion ( const QDataStream d) [inline]

Obtain the KLF version stream operations on d have to be compatible with.

Returns:
the KLatexFormula verison as a QString, eg. "2.1"

Definition at line 293 of file klfmain.h.

References QDataStream::device().

KLF_EXPORT bool klfDataStreamReadHeader ( QDataStream stream,
const QStringList  possibleHeaders,
QString readHeader = NULL,
QString readCompatKLFVersion = NULL 
)
KLF_EXPORT void klfDataStreamWriteHeader ( QDataStream stream,
const QString  headermagic 
)

This function sets up the stream for writing data (for internal storage, eg. styles list)

This function will set the klfDataStreamAppVersion property on the QIODevice associated with the given stream, in order that objects that are sent into the stream can know their compatibility version by querying the stream with klfDataStreamAppVersion().

Definition at line 529 of file klfmain.cpp.

References QDataStream::device(), KLF_DATA_STREAM_APP_VERSION, KLF_DATA_STREAM_APP_VERSION_MAJ, KLF_DATA_STREAM_APP_VERSION_MIN, and QDataStream::setVersion().

Referenced by KLFMainWin::saveStyles().

KLF_EXPORT QString klfFindTranslatedDataFile ( const QString baseFileName,
const QString extension 
)
KLF_EXPORT QDebug& operator<< ( QDebug &  str,
const KLFAddOnInfo::PluginSysInfo i 
)

Variable Documentation

KLF_EXPORT bool klf_addons_canimport

Definition at line 55 of file klfmain.cpp.

Referenced by KLFSettings::KLFSettings(), and main_load_extra_resources().

a list of locale names available for KLatexFormula

Definition at line 42 of file klfmain.cpp.

Referenced by KLFSettings::importAddOn(), klf_add_avail_translation(), and KLFSettings::populateLocaleCombo().

A list of instances of currently installed translators.

Definition at line 44 of file klfmain.cpp.

Referenced by klf_reload_translations().


Generated by doxygen 1.7.3