aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/profilewidget2.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-09 13:09:52 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-09 13:12:29 -0700
commit76a8e83a541febe9b94ec84d3fd8320c86999265 (patch)
treeaa64d0b6de2e28c73026653479cab60f0b6f3d10 /qt-ui/profile/profilewidget2.cpp
parent2d77788cb2fe293b72cff7f51a200d90c928dcea (diff)
downloadsubsurface-76a8e83a541febe9b94ec84d3fd8320c86999265.tar.gz
Printing: scale fonts when printing
This seem to work better, but it misses a couple of items at times (for example the highest label on some of the axis). Needs lots more testing. See #590 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/profilewidget2.cpp')
-rw-r--r--qt-ui/profile/profilewidget2.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index 5b190dfba..ee80d59bd 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -90,7 +90,8 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) : QGraphicsView(parent),
isGrayscale(false),
printMode(false),
shouldCalculateMaxTime(true),
- shouldCalculateMaxDepth(true)
+ shouldCalculateMaxDepth(true),
+ fontPrintScale(1.0)
{
memset(&plotInfo, 0, sizeof(plotInfo));
@@ -1054,12 +1055,30 @@ void ProfileWidget2::changeGas()
replot();
}
+bool ProfileWidget2::getPrintMode()
+{
+ return printMode;
+}
+
void ProfileWidget2::setPrintMode(bool mode, bool grayscale)
{
printMode = mode;
isGrayscale = mode ? grayscale : false;
}
+void ProfileWidget2::setFontPrintScale(double scale)
+{
+ fontPrintScale = scale;
+}
+
+double ProfileWidget2::getFontPrintScale()
+{
+ if (printMode)
+ return fontPrintScale;
+ else
+ return 1.0;
+}
+
void ProfileWidget2::editName()
{
QAction *action = qobject_cast<QAction *>(sender());