diff --git a/lib/jkqtplotter/graphs/jkqtpimage.cpp b/lib/jkqtplotter/graphs/jkqtpimage.cpp index ad428389ae..490a7287c1 100644 --- a/lib/jkqtplotter/graphs/jkqtpimage.cpp +++ b/lib/jkqtplotter/graphs/jkqtpimage.cpp @@ -777,8 +777,8 @@ void JKQTPMathImage::setParent(JKQTBasePlotter* parent) { if (parent) { parent->registerAdditionalAction(tr("Save Image Plot Images ..."), actSaveImage); parent->registerAdditionalAction(tr("Copy Image Plot Images ..."), actCopyImage); - parent->registerAdditionalAction(tr("Save Image Plot Images ..."), actSavePalette); - parent->registerAdditionalAction(tr("Copy Image Plot Images ..."), actCopyPalette); + parent->registerAdditionalAction(tr("Save Image Plot Palettes ..."), actSavePalette); + parent->registerAdditionalAction(tr("Copy Image Plot Palettes ..."), actCopyPalette); } actSaveImage->setEnabled(parent); actCopyImage->setEnabled(parent); @@ -860,7 +860,7 @@ void JKQTPMathImage::saveColorbarPlotAsImage(const QString &filename, const QByt QString selFormat; if (fn.isEmpty()) { selFormat=currentFileFormat; - fn = QFileDialog::getSaveFileName(nullptr, tr("Save Image Plot As Image ..."), + fn = QFileDialog::getSaveFileName(nullptr, tr("Save Palette Plot As Image ..."), currentSaveDirectory, filt.join(";;"), &selFormat); if (!fn.isEmpty()) currentSaveDirectory=QFileInfo(fn).absolutePath(); @@ -905,12 +905,12 @@ void JKQTPMathImage::draw(JKQTPEnhancedPainter& painter) { void JKQTPMathImage::getOutsideSize(JKQTPEnhancedPainter& painter, int& leftSpace, int& rightSpace, int& topSpace, int& bottomSpace) { - JKQTPGraph::getOutsideSize(painter, leftSpace, rightSpace, topSpace, bottomSpace); + JKQTPMathImageBase::getOutsideSize(painter, leftSpace, rightSpace, topSpace, bottomSpace); cbGetOutsideSize(painter, leftSpace, rightSpace, topSpace, bottomSpace); } void JKQTPMathImage::drawOutside(JKQTPEnhancedPainter& painter, QRect leftSpace, QRect rightSpace, QRect topSpace, QRect bottomSpace) { - JKQTPGraph::drawOutside(painter, leftSpace, rightSpace, topSpace, bottomSpace); + JKQTPMathImageBase::drawOutside(painter, leftSpace, rightSpace, topSpace, bottomSpace); if (showColorBar) cbDrawOutside(painter, leftSpace, rightSpace, topSpace, bottomSpace); } diff --git a/lib/jkqtplotter/graphs/jkqtpimagergb.cpp b/lib/jkqtplotter/graphs/jkqtpimagergb.cpp index ca1ccf47b9..86b8ae8f8b 100644 --- a/lib/jkqtplotter/graphs/jkqtpimagergb.cpp +++ b/lib/jkqtplotter/graphs/jkqtpimagergb.cpp @@ -42,61 +42,19 @@ void JKQTPRGBMathImage::initObject() rgbMode=JKQTPRGBMathImageModeRGBMode; colorBarRightAxis=new JKQTPVerticalIndependentAxis(0, 100, 0, 100, parent); - colorBarRightAxis->setDrawMode1(JKQTPCADMLine); - colorBarRightAxis->setDrawMode2(JKQTPCADMcomplete); colorBarRightAxis->setAxisLabel(""); - colorBarRightAxis->setMinTicks(5); - colorBarRightAxis->setMinorTicks(0); - colorBarRightAxis->setTickOutsideLength(0); - colorBarRightAxis->setMinorTickOutsideLength(0); - colorBarRightAxis->setShowZeroAxis(false); colorBarTopAxis=new JKQTPHorizontalIndependentAxis(0, 100, 0, 100, parent); - colorBarTopAxis->setDrawMode1(JKQTPCADMLine); - colorBarTopAxis->setDrawMode2(JKQTPCADMcomplete); colorBarTopAxis->setAxisLabel(""); - colorBarTopAxis->setMinTicks(3); - colorBarTopAxis->setMinorTicks(0); - colorBarTopAxis->setTickOutsideLength(0); - colorBarTopAxis->setMinorTickOutsideLength(0); - colorBarTopAxis->setShowZeroAxis(false); colorBarRightAxisG=new JKQTPVerticalIndependentAxis(0, 100, 0, 100, parent); - colorBarRightAxisG->setDrawMode1(JKQTPCADMLine); - colorBarRightAxisG->setDrawMode2(JKQTPCADMcomplete); colorBarRightAxisG->setAxisLabel(""); - colorBarRightAxisG->setMinTicks(5); - colorBarRightAxisG->setShowZeroAxis(false); - colorBarRightAxisG->setMinorTicks(0); - colorBarRightAxisG->setTickOutsideLength(0); - colorBarRightAxisG->setMinorTickOutsideLength(0); colorBarTopAxisG=new JKQTPHorizontalIndependentAxis(0, 100, 0, 100, parent); - colorBarTopAxisG->setDrawMode1(JKQTPCADMLine); - colorBarTopAxisG->setDrawMode2(JKQTPCADMcomplete); colorBarTopAxisG->setAxisLabel(""); - colorBarTopAxisG->setMinTicks(3); - colorBarTopAxisG->setShowZeroAxis(false); - colorBarTopAxisG->setMinorTicks(0); - colorBarTopAxisG->setTickOutsideLength(0); - colorBarTopAxisG->setMinorTickOutsideLength(0); colorBarRightAxisB=new JKQTPVerticalIndependentAxis(0, 100, 0, 100, parent); - colorBarRightAxisB->setDrawMode1(JKQTPCADMLine); - colorBarRightAxisB->setDrawMode2(JKQTPCADMcomplete); colorBarRightAxisB->setAxisLabel(""); - colorBarRightAxisB->setMinTicks(5); - colorBarRightAxisB->setShowZeroAxis(false); - colorBarRightAxisB->setMinorTicks(0); - colorBarRightAxisB->setTickOutsideLength(0); - colorBarRightAxisB->setMinorTickOutsideLength(0); colorBarTopAxisB=new JKQTPHorizontalIndependentAxis(0, 100, 0, 100, parent); - colorBarTopAxisB->setDrawMode1(JKQTPCADMLine); - colorBarTopAxisB->setDrawMode2(JKQTPCADMcomplete); colorBarTopAxisB->setAxisLabel(""); - colorBarTopAxisB->setMinTicks(3); - colorBarTopAxisB->setShowZeroAxis(false); - colorBarTopAxisB->setMinorTicks(0); - colorBarTopAxisB->setTickOutsideLength(0); - colorBarTopAxisB->setMinorTickOutsideLength(0); this->colorBarTopVisible=true; diff --git a/lib/jkqtplotter/jkqtpbaseplotterstyle.h b/lib/jkqtplotter/jkqtpbaseplotterstyle.h index 8eab90e945..9aa463888d 100644 --- a/lib/jkqtplotter/jkqtpbaseplotterstyle.h +++ b/lib/jkqtplotter/jkqtpbaseplotterstyle.h @@ -148,9 +148,9 @@ class JKQTPLOTTER_LIB_EXPORT JKQTBasePlotterStyle { /** \brief style of the y-axis of the main coordinate system */ JKQTPCoordinateAxisStyle yAxisStyle; /** \brief style of the coordinate axes used to display colorbars in the right */ - JKQTPCoordinateAxisStyle rightColorbarAxisStyle; + JKQTPColorbarCoordinateAxisStyle rightColorbarAxisStyle; /** \brief style of the coordinate axes used to display colorbars at the top */ - JKQTPCoordinateAxisStyle topColorbarAxisStyle; + JKQTPColorbarCoordinateAxisStyle topColorbarAxisStyle; /** \brief style of the graphs */ JKQTGraphsBaseStyle graphsStyle; diff --git a/lib/jkqtplotter/jkqtpcoordinateaxes.cpp b/lib/jkqtplotter/jkqtpcoordinateaxes.cpp index f2fd5985f2..c18d0eeeb3 100644 --- a/lib/jkqtplotter/jkqtpcoordinateaxes.cpp +++ b/lib/jkqtplotter/jkqtpcoordinateaxes.cpp @@ -1327,6 +1327,12 @@ void JKQTPVerticalAxis::drawAxes(JKQTPEnhancedPainter& painter) { //qDebug()<<" offset="<0)) { @@ -1424,6 +1431,7 @@ void JKQTPVerticalAxis::drawAxes(JKQTPEnhancedPainter& painter) { if (mx<=axismax && mx>=axismin) { QLineF l(xleft=left-parent->pt2px(painter, axisStyle.minorTickOutsideLength), mxx, left+parent->pt2px(painter, axisStyle.minorTickInsideLength), mxx); if (l.length()>0) lines_pmtick.append(l);//painter.drawLine(l); + //qDebug()<<"minortick: "<=axismin) { QLineF l(right-parent->pt2px(painter, axisStyle.tickInsideLength), xx, right+parent->pt2px(painter, axisStyle.tickOutsideLength), xx); if (l.length()>0) lines_ptick2.append(l);//painter.drawLine(l); + //qDebug()<<"tick2: "<0)) { @@ -1462,6 +1472,8 @@ void JKQTPVerticalAxis::drawAxes(JKQTPEnhancedPainter& painter) { if (mx<=axismax && mx>=axismin) { QLineF l(right-parent->pt2px(painter, axisStyle.minorTickInsideLength), mxx, xleft=(right+parent->pt2px(painter, axisStyle.minorTickOutsideLength)), mxx); if (l.length()>0) lines_pmtick2.append(l);//painter.drawLine(l); + //qDebug()<<"minortick2: "<setDrawMode1(JKQTPCADMLine); - colorBarRightAxis->setDrawMode2(JKQTPCADMcomplete); colorBarRightAxis->setAxisLabel(""); - colorBarRightAxis->setMinTicks(3); - colorBarRightAxis->setShowZeroAxis(false); - colorBarRightAxis->setMinorTicks(0); - colorBarRightAxis->setTickOutsideLength(0); - colorBarRightAxis->setMinorTickOutsideLength(0); colorBarTopAxis=new JKQTPHorizontalIndependentAxis(0, 100, 0, 100, parent); - colorBarTopAxis->setDrawMode1(JKQTPCADMLine); - colorBarTopAxis->setDrawMode2(JKQTPCADMcomplete); colorBarTopAxis->setAxisLabel(""); - colorBarTopAxis->setMinTicks(3); - colorBarTopAxis->setShowZeroAxis(false); - colorBarTopAxis->setMinorTicks(0); - colorBarTopAxis->setTickOutsideLength(0); - colorBarTopAxis->setMinorTickOutsideLength(0); this->palette=JKQTPMathImageMATLAB; @@ -147,13 +133,11 @@ void JKQTPColorPaletteStyleAndToolsMixin::cbDrawOutside(JKQTPEnhancedPainter& pa //qDebug()<<"r: "<(rightSpace.x()+cbParent->pt2px(painter, colorBarOffset)), rightSpace.top()+(rightSpace.height()-barHeight)/2, static_cast(cbParent->pt2px(painter, colorBarWidth)), barHeight); + QRectF cb(static_cast(rightSpace.x()+cbParent->pt2px(painter, colorBarOffset)), rightSpace.top()+(rightSpace.height()-barHeight)/2, static_cast(cbParent->pt2px(painter, colorBarWidth)), barHeight); painter.drawImage(cb, b.mirrored(true, false)); QPen p=painter.pen(); p.setColor(colorBarRightAxis->getAxisColor()); p.setWidthF(qMax(JKQTPlotterDrawingTools::ABS_MIN_LINEWIDTH, cbParent->pt2px(painter, colorBarRightAxis->getLineWidth()*cbParent->getLineWidthMultiplier()))); - painter.setPen(p); - painter.drawRect(cb); colorBarRightAxis->setRange(internalDataMin, internalDataMax); colorBarRightAxis->setAxisWidth(cb.height()); @@ -162,12 +146,17 @@ void JKQTPColorPaletteStyleAndToolsMixin::cbDrawOutside(JKQTPEnhancedPainter& pa colorBarRightAxis->setOtherAxisWidth(cb.width()); colorBarRightAxis->drawAxes(painter); + if ( JKQTPCADrawModeHasLine(colorBarRightAxis->getDrawMode1()) && JKQTPCADrawModeHasLine(colorBarRightAxis->getDrawMode2())) { + painter.setPen(p); + painter.drawLine(QLineF(cb.topLeft(), cb.topRight())); + painter.drawLine(QLineF(cb.bottomLeft(), cb.bottomRight())); + } cbParent->getMathText()->setFontSize(imageNameFontSize*cbParent->getFontSizeMultiplier()); cbParent->getMathText()->setFontRomanOrSpecial(imageNameFontName); cbParent->getMathText()->parse(imageName); - cbParent->getMathText()->draw(painter, Qt::AlignHCenter|Qt::AlignVCenter, QRect(rightSpace.x(), rightSpace.y(), rightSpace.width(), (rightSpace.height()-barHeight)/2)); + cbParent->getMathText()->draw(painter, Qt::AlignHCenter|Qt::AlignVCenter, QRectF(rightSpace.x(), rightSpace.y(), rightSpace.width(), (rightSpace.height()-barHeight)/2)); } @@ -197,7 +186,7 @@ void JKQTPColorPaletteStyleAndToolsMixin::cbDrawOutside(JKQTPEnhancedPainter& pa } - QRect cb(topSpace.x()+(topSpace.width()-barWidth)/2, static_cast(topSpace.bottom()-cbParent->pt2px(painter, colorBarOffset+(colorBarWidth))), barWidth, static_cast(cbParent->pt2px(painter, colorBarWidth))); + QRectF cb(topSpace.x()+(topSpace.width()-barWidth)/2, static_cast(topSpace.bottom()-cbParent->pt2px(painter, colorBarOffset+(colorBarWidth))), barWidth, static_cast(cbParent->pt2px(painter, colorBarWidth))); //qDebug()<<"t: "<getAxisColor()); p.setWidthF(qMax(JKQTPlotterDrawingTools::ABS_MIN_LINEWIDTH, cbParent->pt2px(painter, colorBarTopAxis->getLineWidth()*cbParent->getLineWidthMultiplier()))); painter.setPen(p); - painter.drawRect(cb); + //painter.drawRect(cb); colorBarTopAxis->setRange(internalDataMin, internalDataMax); @@ -216,12 +205,17 @@ void JKQTPColorPaletteStyleAndToolsMixin::cbDrawOutside(JKQTPEnhancedPainter& pa colorBarTopAxis->setOtherAxisWidth(cb.height()); colorBarTopAxis->drawAxes(painter); + if ( JKQTPCADrawModeHasLine(colorBarTopAxis->getDrawMode1()) && JKQTPCADrawModeHasLine(colorBarTopAxis->getDrawMode2())) { + painter.setPen(p); + painter.drawLine(QLineF(cb.topLeft(), cb.bottomLeft())); + painter.drawLine(QLineF(cb.topRight(), cb.bottomRight())); + } cbParent->getMathText()->setFontSize(imageNameFontSize*cbParent->getFontSizeMultiplier()); cbParent->getMathText()->setFontRomanOrSpecial(imageNameFontName); cbParent->getMathText()->parse(imageName); - cbParent->getMathText()->draw(painter, Qt::AlignHCenter|Qt::AlignVCenter, QRect(topSpace.right()-(topSpace.width()-barWidth)/2, topSpace.y(), (topSpace.width()-barWidth)/2, topSpace.height())); + cbParent->getMathText()->draw(painter, Qt::AlignHCenter|Qt::AlignVCenter, QRectF(topSpace.right()-(topSpace.width()-barWidth)/2, topSpace.y(), (topSpace.width()-barWidth)/2, topSpace.height())); } @@ -241,7 +235,7 @@ int JKQTPColorPaletteStyleAndToolsMixin::getPalettesCount() QIcon JKQTPColorPaletteStyleAndToolsMixin::getPaletteIcon(int i) { QImage img=getPaletteImage(i, static_cast(JKQTPImageTools::PALETTE_ICON_WIDTH)); QPixmap pix(JKQTPImageTools::PALETTE_ICON_WIDTH,8); - QRect r(0,0,JKQTPImageTools::PALETTE_ICON_WIDTH-1,7); + QRectF r(0,0,JKQTPImageTools::PALETTE_ICON_WIDTH-1,7); QPainter p(&pix); p.drawImage(r, img); p.setPen(QPen(QColor("black"))); @@ -275,7 +269,7 @@ QIcon JKQTPColorPaletteStyleAndToolsMixin::getPaletteKeyIcon(int i) { QImage img=getPaletteKeyImage(i, static_cast(JKQTPImageTools::PALETTE_ICON_WIDTH), static_cast(JKQTPImageTools::PALETTE_IMAGEICON_HEIGHT)); QPixmap pix(JKQTPImageTools::PALETTE_ICON_WIDTH,JKQTPImageTools::PALETTE_IMAGEICON_HEIGHT); - QRect r(0,0,JKQTPImageTools::PALETTE_ICON_WIDTH-1,JKQTPImageTools::PALETTE_IMAGEICON_HEIGHT-1); + QRectF r(0,0,JKQTPImageTools::PALETTE_ICON_WIDTH-1,JKQTPImageTools::PALETTE_IMAGEICON_HEIGHT-1); QPainter p(&pix); p.drawImage(r, img); p.setPen(QPen(QColor("black"))); @@ -542,23 +536,9 @@ JKQTPColorPaletteWithModifierStyleAndToolsMixin::JKQTPColorPaletteWithModifierSt JKQTPColorPaletteStyleAndToolsMixin(parent) { modifierColorBarTopAxis=new JKQTPVerticalIndependentAxis(0, 100, 0, 100, parent); - modifierColorBarTopAxis->setDrawMode1(JKQTPCADMLine); - modifierColorBarTopAxis->setDrawMode2(JKQTPCADMcomplete); modifierColorBarTopAxis->setAxisLabel(""); - modifierColorBarTopAxis->setMinTicks(3); - modifierColorBarTopAxis->setShowZeroAxis(false); - modifierColorBarTopAxis->setMinorTicks(0); - modifierColorBarTopAxis->setTickOutsideLength(0); - modifierColorBarTopAxis->setMinorTickOutsideLength(0); modifierColorBarRightAxis=new JKQTPHorizontalIndependentAxis (0, 100, 0, 100, parent); - modifierColorBarRightAxis->setDrawMode1(JKQTPCADMLine); - modifierColorBarRightAxis->setDrawMode2(JKQTPCADMcomplete); modifierColorBarRightAxis->setAxisLabel(""); - modifierColorBarRightAxis->setMinTicks(5); - modifierColorBarRightAxis->setShowZeroAxis(false); - modifierColorBarRightAxis->setMinorTicks(0); - modifierColorBarRightAxis->setTickOutsideLength(0); - modifierColorBarRightAxis->setMinorTickOutsideLength(0); this->colorBarModifiedWidth=80; modifierMode=JKQTPMathImageModifierMode::ModifyNone; } @@ -652,19 +632,18 @@ void JKQTPColorPaletteWithModifierStyleAndToolsMixin::cbDrawOutside(JKQTPEnhance //qDebug()<<"r: "<(rightSpace.x()+cbParent->pt2px(painter, colorBarOffset)), rightSpace.top()+(rightSpace.height()-barHeight)/2, static_cast(cbParent->pt2px(painter, (modifierMode==JKQTPMathImageModifierMode::ModifyNone)?colorBarWidth:colorBarModifiedWidth)), barHeight); + QRectF cb(static_cast(rightSpace.x()+cbParent->pt2px(painter, colorBarOffset)), rightSpace.top()+(rightSpace.height()-barHeight)/2, static_cast(cbParent->pt2px(painter, (modifierMode==JKQTPMathImageModifierMode::ModifyNone)?colorBarWidth:colorBarModifiedWidth)), barHeight); painter.drawImage(cb, b.mirrored(true, false)); QPen p=painter.pen(); p.setColor(colorBarRightAxis->getAxisColor()); p.setWidthF(qMax(JKQTPlotterDrawingTools::ABS_MIN_LINEWIDTH, cbParent->pt2px(painter, colorBarRightAxis->getLineWidth()*cbParent->getLineWidthMultiplier()))); - painter.setPen(p); - painter.drawRect(cb); colorBarRightAxis->setRange(internalDataMin, internalDataMax); colorBarRightAxis->setAxisWidth(cb.height()); colorBarRightAxis->setAxisOffset(cb.top()); colorBarRightAxis->setOtherAxisOffset(cb.left()); colorBarRightAxis->setOtherAxisWidth(cb.width()); + //qDebug()<<"=================================================================\ncolorBarRightAxis:"; colorBarRightAxis->drawAxes(painter); if (modifierMode!=JKQTPMathImageModifierMode::ModifyNone) { @@ -674,12 +653,18 @@ void JKQTPColorPaletteWithModifierStyleAndToolsMixin::cbDrawOutside(JKQTPEnhance modifierColorBarRightAxis->setOtherAxisOffset(cb.top()); modifierColorBarRightAxis->setOtherAxisWidth(cb.height()); modifierColorBarRightAxis->drawAxes(painter); + } else { + if ( JKQTPCADrawModeHasLine(colorBarRightAxis->getDrawMode1()) && JKQTPCADrawModeHasLine(colorBarRightAxis->getDrawMode2())) { + painter.setPen(p); + painter.drawLine(QLineF(cb.topLeft(), cb.topRight())); + painter.drawLine(QLineF(cb.bottomLeft(), cb.bottomRight())); + } } cbParent->getMathText()->setFontSize(imageNameFontSize*cbParent->getFontSizeMultiplier()); cbParent->getMathText()->setFontRomanOrSpecial(cbParent->getCurrentPlotterStyle().defaultFontName); cbParent->getMathText()->parse(imageName); - cbParent->getMathText()->draw(painter, Qt::AlignHCenter|Qt::AlignVCenter, QRect(rightSpace.x(), rightSpace.y(), rightSpace.width(), (rightSpace.height()-barHeight)/2)); + cbParent->getMathText()->draw(painter, Qt::AlignHCenter|Qt::AlignVCenter, QRectF(rightSpace.x(), rightSpace.y(), rightSpace.width(), (rightSpace.height()-barHeight)/2)); } @@ -697,7 +682,7 @@ void JKQTPColorPaletteWithModifierStyleAndToolsMixin::cbDrawOutside(JKQTPEnhance } - QRect cb(topSpace.x()+(topSpace.width()-barWidth)/2, topSpace.bottom()-cbParent->pt2px(painter, colorBarOffset+((modifierMode==JKQTPMathImageModifierMode::ModifyNone)?colorBarWidth:colorBarModifiedWidth)), barWidth, cbParent->pt2px(painter, (modifierMode==JKQTPMathImageModifierMode::ModifyNone)?colorBarWidth:colorBarModifiedWidth)); + QRectF cb(topSpace.x()+(topSpace.width()-barWidth)/2, topSpace.bottom()-cbParent->pt2px(painter, colorBarOffset+((modifierMode==JKQTPMathImageModifierMode::ModifyNone)?colorBarWidth:colorBarModifiedWidth)), barWidth, cbParent->pt2px(painter, (modifierMode==JKQTPMathImageModifierMode::ModifyNone)?colorBarWidth:colorBarModifiedWidth)); //qDebug()<<"t: "<getAxisColor()); p.setWidthF(qMax(JKQTPlotterDrawingTools::ABS_MIN_LINEWIDTH, cbParent->pt2px(painter, colorBarTopAxis->getLineWidth()*cbParent->getLineWidthMultiplier()))); - painter.setPen(p); - painter.drawRect(cb); colorBarTopAxis->setRange(internalDataMin, internalDataMax); @@ -723,12 +706,18 @@ void JKQTPColorPaletteWithModifierStyleAndToolsMixin::cbDrawOutside(JKQTPEnhance modifierColorBarTopAxis->setOtherAxisOffset(cb.left()); modifierColorBarTopAxis->setOtherAxisWidth(cb.width()); modifierColorBarTopAxis->drawAxes(painter); + } else { + if ( JKQTPCADrawModeHasLine(colorBarTopAxis->getDrawMode1()) && JKQTPCADrawModeHasLine(colorBarTopAxis->getDrawMode2())) { + painter.setPen(p); + painter.drawLine(QLineF(cb.topLeft(), cb.bottomLeft())); + painter.drawLine(QLineF(cb.topRight(), cb.bottomRight())); + } } cbParent->getMathText()->setFontSize(imageNameFontSize*cbParent->getFontSizeMultiplier()); cbParent->getMathText()->setFontRomanOrSpecial(cbParent->getCurrentPlotterStyle().defaultFontName); cbParent->getMathText()->parse(imageName); - cbParent->getMathText()->draw(painter, Qt::AlignHCenter|Qt::AlignVCenter, QRect(topSpace.right()-(topSpace.width()-barWidth)/2, topSpace.y(), (topSpace.width()-barWidth)/2, topSpace.height())); + cbParent->getMathText()->draw(painter, Qt::AlignHCenter|Qt::AlignVCenter, QRectF(topSpace.right()-(topSpace.width()-barWidth)/2, topSpace.y(), (topSpace.width()-barWidth)/2, topSpace.height())); } diff --git a/lib/jkqtplotter/resources/styles/blackandwhite.ini b/lib/jkqtplotter/resources/styles/blackandwhite.ini index 18a93cc5d5..5912a40428 100644 --- a/lib/jkqtplotter/resources/styles/blackandwhite.ini +++ b/lib/jkqtplotter/resources/styles/blackandwhite.ini @@ -45,11 +45,11 @@ axis_colorbar_right\grid\color=black axis_colorbar_right\grid\width=0.5 axis_colorbar_right\minor_grid\color=black axis_colorbar_right\minor_grid\width=0.25 -axis_colorbar_right\minor_tick\inside_length=2 +axis_colorbar_right\minor_tick\inside_length=0 axis_colorbar_right\minor_tick\label_font_size=7 -axis_colorbar_right\minor_tick\outside_length=0 -axis_colorbar_right\ticks\inside_length=4 -axis_colorbar_right\ticks\outside_length=0 +axis_colorbar_right\minor_tick\outside_length=2 +axis_colorbar_right\ticks\inside_length=0 +axis_colorbar_right\ticks\outside_length=4 axis_colorbar_right\ticks\width=1 axis_colorbar_right\zero_line\line_width=1 axis_colorbar_top\line_width=1 @@ -57,11 +57,11 @@ axis_colorbar_top\grid\color=black axis_colorbar_top\grid\width=0.5 axis_colorbar_top\minor_grid\color=black axis_colorbar_top\minor_grid\width=0.25 -axis_colorbar_top\minor_tick\inside_length=2 +axis_colorbar_top\minor_tick\inside_length=0 axis_colorbar_top\minor_tick\label_font_size=7 -axis_colorbar_top\minor_tick\outside_length=0 -axis_colorbar_top\ticks\inside_length=4 -axis_colorbar_top\ticks\outside_length=0 +axis_colorbar_top\minor_tick\outside_length=2 +axis_colorbar_top\ticks\inside_length=0 +axis_colorbar_top\ticks\outside_length=4 axis_colorbar_top\ticks\width=1 axis_colorbar_top\zero_line\line_width=1 graphs\auto_styles\color0=black diff --git a/lib/jkqtplotter/resources/styles/default.ini b/lib/jkqtplotter/resources/styles/default.ini index eac68f3816..81fda23e78 100644 --- a/lib/jkqtplotter/resources/styles/default.ini +++ b/lib/jkqtplotter/resources/styles/default.ini @@ -156,8 +156,8 @@ axis_y\minor_grid\color=gray axis_y\minor_grid\width=0.5 axis_y\minor_grid\style=dot axis_colorbar_right\color=black -axis_colorbar_right\draw_mode1=all -axis_colorbar_right\draw_mode2=line+ticks +axis_colorbar_right\draw_mode1=line +axis_colorbar_right\draw_mode2=all axis_colorbar_right\line_width=1.5 axis_colorbar_right\axis_lines_offset=0 axis_colorbar_right\min_ticks=5 @@ -169,19 +169,19 @@ axis_colorbar_right\minor_tick\labels_enabled=false axis_colorbar_right\minor_tick\inside_length=1.5 axis_colorbar_right\minor_tick\label_font_size=6.4 axis_colorbar_right\minor_tick\label_full_number=true -axis_colorbar_right\minor_tick\outside_length=1.5 +axis_colorbar_right\minor_tick\outside_length=0 axis_colorbar_right\minor_tick\width=1 -axis_colorbar_right\minor_tick\count=1 +axis_colorbar_right\minor_tick\count=0 axis_colorbar_right\ticks\date_format=dd.MM.yyyy axis_colorbar_right\ticks\datetime_format=dd.MM.yyyy HH:mm axis_colorbar_right\ticks\inside_length=3 axis_colorbar_right\ticks\label_distance=3 axis_colorbar_right\ticks\label_font_size=8 axis_colorbar_right\ticks\mode=lin_or_power -axis_colorbar_right\ticks\outside_length=3 +axis_colorbar_right\ticks\outside_length=0 axis_colorbar_right\ticks\time_format=HH:mm axis_colorbar_right\ticks\width=1.5 -axis_colorbar_right\zero_line\enabled=true +axis_colorbar_right\zero_line\enabled=false axis_colorbar_right\zero_line\line_width=1.5 axis_colorbar_right\zero_line\color=black axis_colorbar_right\zero_line\style=solid @@ -194,8 +194,8 @@ axis_colorbar_right\minor_grid\color=gray axis_colorbar_right\minor_grid\width=0.5 axis_colorbar_right\minor_grid\style=dot axis_colorbar_top\color=black -axis_colorbar_top\draw_mode1=all -axis_colorbar_top\draw_mode2=line+ticks +axis_colorbar_top\draw_mode1=line +axis_colorbar_top\draw_mode2=all axis_colorbar_top\line_width=1.5 axis_colorbar_top\axis_lines_offset=0 axis_colorbar_top\min_ticks=5 @@ -207,19 +207,19 @@ axis_colorbar_top\minor_tick\labels_enabled=false axis_colorbar_top\minor_tick\inside_length=1.5 axis_colorbar_top\minor_tick\label_font_size=6.4 axis_colorbar_top\minor_tick\label_full_number=true -axis_colorbar_top\minor_tick\outside_length=1.5 +axis_colorbar_top\minor_tick\outside_length=0 axis_colorbar_top\minor_tick\width=1 -axis_colorbar_top\minor_tick\count=1 +axis_colorbar_top\minor_tick\count=0 axis_colorbar_top\ticks\date_format=dd.MM.yyyy axis_colorbar_top\ticks\datetime_format=dd.MM.yyyy HH:mm axis_colorbar_top\ticks\inside_length=3 axis_colorbar_top\ticks\label_distance=3 axis_colorbar_top\ticks\label_font_size=8 axis_colorbar_top\ticks\mode=lin_or_power -axis_colorbar_top\ticks\outside_length=3 +axis_colorbar_top\ticks\outside_length=0 axis_colorbar_top\ticks\time_format=HH:mm axis_colorbar_top\ticks\width=1.5 -axis_colorbar_top\zero_line\enabled=true +axis_colorbar_top\zero_line\enabled=false axis_colorbar_top\zero_line\line_width=1.5 axis_colorbar_top\zero_line\color=black axis_colorbar_top\zero_line\style=solid diff --git a/lib/jkqtplotter/resources/styles/simple_axesoffset.ini b/lib/jkqtplotter/resources/styles/simple_axesoffset.ini index fc8899e26e..a4e447fb2b 100644 --- a/lib/jkqtplotter/resources/styles/simple_axesoffset.ini +++ b/lib/jkqtplotter/resources/styles/simple_axesoffset.ini @@ -25,5 +25,3 @@ axis_y\ticks\label_distance=5 axis_y\ticks\width=1 axis_y\zero_line\line_width=1 axis_y\zero_line\color=black -axis_colorbar_right\zero_line\color=black -axis_colorbar_top\zero_line\color=black \ No newline at end of file