some bug-fixes (ressources from library were not loaded, compile order in projects was wrong)

This commit is contained in:
jkriege2 2018-12-02 18:30:12 +01:00
parent ca4065dae9
commit 4680106734
20 changed files with 67 additions and 33 deletions

View File

@ -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);
}

View File

@ -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

View File

@ -59,6 +59,18 @@ static QString globalUserSettigsPrefix="";
static QList<JKQtBasePlotter::JKQTPPaintDeviceAdapter*> jkqtpPaintDeviceAdapters;
static QList<JKQtBasePlotter::JKQTPSaveDataAdapter*> 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<<": "<<factor<<std::endl;
double xmin=p2x(static_cast<long>(round(static_cast<double>(plotWidth)/2.0-static_cast<double>(plotWidth)/(2.0*factor))));

View File

@ -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();

View File

@ -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()<<objectName()<<" doDrawing="<<doDrawing;
}
void initJKQtPlotterResources()
{
initJKQtBasePlotterResources();
}

View File

@ -60,6 +60,9 @@
#ifndef JKQTPLOTTER_H
#define JKQTPLOTTER_H
/** \brief initialized Qt-ressources necessary for JKQtPlotter */
LIB_EXPORT void initJKQtPlotterResources();
/** \brief class to plot function graphs in linear or (semi-)logarithmic scale
* \ingroup jkqtplotter
@ -599,7 +602,7 @@ class LIB_EXPORT JKQtPlotter: public QWidget {
bool displayMousePosition;
/** \brief this string is used to generate the position output above the graph */
JKQTPPROPERTY(QString, mousePositionTemplate)
/** \brief if set \c true and displayMousePosition is \c true, the mouse position is not automaticallz determined, but the text given to setMousePositionLabel() is used */
/** \brief if set \c true and displayMousePosition is \c true, the mouse position is not automatically determined, but the text given to setMousePositionLabel() is used */
bool displayCustomMousePosition;
QString customMousePositiontext;

View File

@ -2,7 +2,7 @@ TEMPLATE = subdirs
SUBDIRS += jkqtplotterlib jkqtmathtext_simpletest
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro
jkqtmathtext_simpletest.file=$$PWD/jkqtmathtext_simpletest.pro
jkqtmathtext_simpletest.depends = jkqtplotterlib
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro

View File

@ -2,7 +2,7 @@ TEMPLATE = subdirs
SUBDIRS += jkqtplotterlib jkqtmathtext_test
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro
jkqtmathtext_test.file=$$PWD/jkqtmathtext_test.pro
jkqtmathtext_test.depends = jkqtplotterlib
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro

View File

@ -2,7 +2,7 @@ TEMPLATE = subdirs
SUBDIRS += jkqtplotterlib jkqtplot_test
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro
jkqtplot_test.file=$$PWD/jkqtplot_test.pro
jkqtplot_test.depends = jkqtplotterlib
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro

View File

@ -2,7 +2,7 @@ TEMPLATE = subdirs
SUBDIRS += jkqtplotterlib jkqtplotter_simpletest
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro
jkqtplotter_simpletest.file=$$PWD/jkqtplotter_simpletest.pro
jkqtplotter_simpletest.depends = jkqtplotterlib
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro

View File

@ -2,7 +2,7 @@ TEMPLATE = subdirs
SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_barchart
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro
jkqtplotter_simpletest_barchart.file=$$PWD/jkqtplotter_simpletest_barchart.pro
jkqtplotter_simpletest_barchart.depends = jkqtplotterlib
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro

View File

@ -2,7 +2,7 @@ TEMPLATE = subdirs
SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_dateaxes
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro
jkqtplotter_simpletest_dateaxes.file=$$PWD/jkqtplotter_simpletest_dateaxes.pro
jkqtplotter_simpletest_dateaxes.depends = jkqtplotterlib
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro

View File

@ -2,7 +2,7 @@ TEMPLATE = subdirs
SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_errorbarstyles
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro
jkqtplotter_simpletest_errorbarstyles.file=$$PWD/jkqtplotter_simpletest_errorbarstyles.pro
jkqtplotter_simpletest_errorbarstyles.depends = jkqtplotterlib
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro

View File

@ -2,7 +2,7 @@ TEMPLATE = subdirs
SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_imageplot
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro
jkqtplotter_simpletest_imageplot.file=$$PWD/jkqtplotter_simpletest_imageplot.pro
jkqtplotter_simpletest_imageplot.depends = jkqtplotterlib
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro

View File

@ -2,7 +2,7 @@ TEMPLATE = subdirs
SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_imageplot_modifier
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro
jkqtplotter_simpletest_imageplot_modifier.file=$$PWD/jkqtplotter_simpletest_imageplot_modifier.pro
jkqtplotter_simpletest_imageplot_modifier.depends = jkqtplotterlib
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro

View File

@ -2,7 +2,7 @@ TEMPLATE = subdirs
SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_imageplot_nodatastore
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro
jkqtplotter_simpletest_imageplot_nodatastore.file=$$PWD/jkqtplotter_simpletest_imageplot_nodatastore.pro
jkqtplotter_simpletest_imageplot_nodatastore.depends = jkqtplotterlib
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro

View File

@ -2,7 +2,7 @@ TEMPLATE = subdirs
SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_logaxes
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro
jkqtplotter_simpletest_logaxes.file=$$PWD/jkqtplotter_simpletest_logaxes.pro
jkqtplotter_simpletest_logaxes.depends = jkqtplotterlib
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro

View File

@ -2,7 +2,7 @@ TEMPLATE = subdirs
SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_stackedbars
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro
jkqtplotter_simpletest_stackedbars.file=$$PWD/jkqtplotter_simpletest_stackedbars.pro
jkqtplotter_simpletest_stackedbars.depends = jkqtplotterlib
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro

View File

@ -2,7 +2,7 @@ TEMPLATE = subdirs
SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_symbols_and_errors
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro
jkqtplotter_simpletest_symbols_and_errors.file=$$PWD/jkqtplotter_simpletest_symbols_and_errors.pro
jkqtplotter_simpletest_symbols_and_errors.depends = jkqtplotterlib
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro

View File

@ -2,7 +2,7 @@ TEMPLATE = subdirs
SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_symbols_and_styles
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro
jkqtplotter_simpletest_symbols_and_styles.file=$$PWD/jkqtplotter_simpletest_symbols_and_styles.pro
jkqtplotter_simpletest_symbols_and_styles.depends = jkqtplotterlib
jkqtplotterlib.file = ../../lib/jkqtplotterlib.pro