Changeset 127 in tspsg-svn for trunk/src/mainwindow.cpp


Ignore:
Timestamp:
Sep 1, 2010, 8:31:16 PM (14 years ago)
Author:
laleppa
Message:

Added an option to select graph quality, because higher graph quality looked uglier on the screen while looked nicer when printing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/mainwindow.cpp

    r126 r127  
    480480
    481481QString credits;
    482         credits += tr("This software was created using LGPL version of <b>Qt framework</b>,<br>\n"
     482        credits += tr("%1 was created using <b>Qt&nbsp;framework</b> licensed "
     483                "under the terms of the GNU Lesser General Public License,<br>\n"
    483484                "see <a href=\"http://qt.nokia.com/\">qt.nokia.com</a><br>\n"
    484485                "<br>\n"
    485                 "Most icons used in this software are part of <b>Oxygen Icons</b> project "
     486                "Most icons used in %1 are part of <b>Oxygen&nbsp;Icons</b> project "
    486487                "licensed according to the GNU Lesser General Public License,<br>\n"
    487488                "see <a href=\"http://www.oxygen-icons.org/\">www.oxygen-icons.org</a><br>\n"
    488489                "<br>\n"
    489                 "Country flag icons used in this software are part of the free "
    490                 "<b>Flag Icons</b> collection created by <b>IconDrawer</b>,<br>\n"
    491                 "see <a href=\"http://www.icondrawer.com/\">www.icondrawer.com</a>");
     490                "Country flag icons used in %1 are part of the free "
     491                "<b>Flag&nbsp;Icons</b> collection created by <b>IconDrawer</b>,<br>\n"
     492                "see <a href=\"http://www.icondrawer.com/\">www.icondrawer.com</a>")
     493                        .arg(QApplication::applicationName());
    492494
    493495QFile f(":/files/COPYING");
     
    736738                pic.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
    737739QFont font = settings->value("Output/Font", QFont(getDefaultFont(), 9)).value<QFont>();
    738 //              font.setBold(true);
    739                 font.setPointSizeF(font.pointSizeF() * 2);
     740                if (settings->value("Output/HQGraph", DEF_HQ_GRAPH).toBool()) {
     741                        font.setWeight(QFont::DemiBold);
     742                        font.setPointSizeF(font.pointSizeF() * 2);
     743                }
    740744                pic.setFont(font);
    741745                pic.setBrush(QBrush(QColor(Qt::white)));
     746                if (settings->value("Output/HQGraph", DEF_HQ_GRAPH).toBool()) {
    742747QPen pen = pic.pen();
    743                 pen.setWidth(2);
    744                 pic.setPen(pen);
     748                        pen.setWidth(2);
     749                        pic.setPen(pen);
     750                }
    745751                pic.setBackgroundMode(Qt::OpaqueMode);
    746752        }
     
    874880                pic.end();
    875881
    876 QImage i(graph.width() + 2, graph.height() + 2, QImage::Format_ARGB32);
    877                 i.fill(0);
     882QImage i(graph.width() + 1, graph.height() + 1, QImage::Format_RGB32);
     883                i.fill(0xFFFFFF);
    878884                pic.begin(&i);
    879885                pic.drawPicture(1, 1, graph);
     
    883889QTextImageFormat img;
    884890                img.setName("tspsg://graph.pic");
    885                 img.setWidth(i.width() / 2);
    886                 img.setHeight(i.height() / 2);
     891                if (settings->value("Output/HQGraph", DEF_HQ_GRAPH).toBool()) {
     892                        img.setWidth(i.width() / 2);
     893                        img.setHeight(i.height() / 2);
     894                } else {
     895                        img.setWidth(i.width());
     896                        img.setHeight(i.height());
     897                }
    887898
    888899                cur.setPosition(imgpos);
     
    10481059void MainWindow::drawNode(QPainter &pic, int nstep, bool left, SStep *step)
    10491060{
    1050 const int r = 70;
     1061int r;
     1062        if (settings->value("Output/HQGraph", DEF_HQ_GRAPH).toBool())
     1063                r = 70;
     1064        else
     1065                r = 35;
    10511066qreal x, y;
    10521067        if (step != NULL)
Note: See TracChangeset for help on using the changeset viewer.