diff --git a/lib/jkqtmathtext/jkqtmathtext.cpp b/lib/jkqtmathtext/jkqtmathtext.cpp index 0c8731611d..88b637c88b 100644 --- a/lib/jkqtmathtext/jkqtmathtext.cpp +++ b/lib/jkqtmathtext/jkqtmathtext.cpp @@ -3065,7 +3065,7 @@ bool JKQTmathText::MTsymbolNode::toHtml(QString &html, JKQTmathText::MTenvironme JKQTmathText::JKQTmathText(QObject* parent): QObject(parent) { - + Q_INIT_RESOURCE(xits); QFontDatabase fontdb; QString serifFont="Serif"; @@ -4270,3 +4270,8 @@ QString JKQTmathText::MTplainTextNode::textTransform(const QString &text, JKQTma { return text; } + +void initJKQtMathTextResources() +{ + Q_INIT_RESOURCE(xits); +} diff --git a/lib/jkqtmathtext/jkqtmathtext.h b/lib/jkqtmathtext/jkqtmathtext.h index 09108fa75f..5b96e905bc 100644 --- a/lib/jkqtmathtext/jkqtmathtext.h +++ b/lib/jkqtmathtext/jkqtmathtext.h @@ -72,6 +72,10 @@ */ #define JKQTMTPROPERTYload(settings, group, var, varname, varconvert) \ var=settings.value(group+varname, var).varconvert; + +/** \brief initialized Qt-ressources necessary for JKQtMathText */ +LIB_EXPORT void initJKQtMathTextResources(); + /*! \brief this class manages an enhanced text message (containing a subset of LaTeX markups) and allows to draw a representation \ingroup jkqtmathtext diff --git a/lib/jkqtplotter/jkqtpbaseplotter.cpp b/lib/jkqtplotter/jkqtpbaseplotter.cpp index 97e345f6cc..978b3f88e9 100644 --- a/lib/jkqtplotter/jkqtpbaseplotter.cpp +++ b/lib/jkqtplotter/jkqtpbaseplotter.cpp @@ -59,6 +59,18 @@ static QString globalUserSettigsPrefix=""; static QList jkqtpPaintDeviceAdapters; static QList jkqtpSaveDataAdapters; + +void initJKQtBasePlotterResources() +{ + Q_INIT_RESOURCE(jkqtpbaseplotter); + initJKQtMathTextResources(); +} + +JKQtBasePlotter::JKQtBasePlotter() +{ + initJKQtBasePlotterResources(); +} + void JKQtBasePlotter::setDefaultJKQtBasePrinterUserSettings(QString userSettigsFilename, QString userSettigsPrefix) { globalUserSettigsFilename=userSettigsFilename; @@ -420,6 +432,7 @@ void JKQtBasePlotter::initSettings() { + void JKQtBasePlotter::zoomIn(double factor) { //std::cout<<(double)event->delta()/120.0<<": "<(round(static_cast(plotWidth)/2.0-static_cast(plotWidth)/(2.0*factor)))); diff --git a/lib/jkqtplotter/jkqtpbaseplotter.h b/lib/jkqtplotter/jkqtpbaseplotter.h index 95b875e9e3..8c721a3068 100644 --- a/lib/jkqtplotter/jkqtpbaseplotter.h +++ b/lib/jkqtplotter/jkqtpbaseplotter.h @@ -70,6 +70,9 @@ class JKQTPPlotsModel; // forward +/** \brief initialized Qt-ressources necessary for JKQtBasePlotter */ +LIB_EXPORT void initJKQtBasePlotterResources(); + /** \brief base class for 2D plotter classes * \ingroup jkqtplotter @@ -445,7 +448,7 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { /** \brief hidden default constructor */ - JKQtBasePlotter() {} + JKQtBasePlotter(); diff --git a/lib/jkqtplotter/jkqtplotter.cpp b/lib/jkqtplotter/jkqtplotter.cpp index d49e599730..0f3fd7e161 100644 --- a/lib/jkqtplotter/jkqtplotter.cpp +++ b/lib/jkqtplotter/jkqtplotter.cpp @@ -47,14 +47,15 @@ **************************************************************************************************************************/ JKQtPlotter::JKQtPlotter(bool datastore_internal, QWidget* parent, JKQTPdatastore* datast): QWidget(parent, Qt::Widget) -{ +{ + initJKQtPlotterResources(); init(datastore_internal, parent, datast); - } JKQtPlotter::JKQtPlotter(QWidget *parent): QWidget(parent, Qt::Widget) { + initJKQtPlotterResources(); init(true, parent, nullptr); } @@ -910,3 +911,8 @@ void JKQtPlotter::set_doDrawing(bool enable) //qDebug()<