Changeset 131c5fc3ba in tspsg for src


Ignore:
Timestamp:
Sep 24, 2010, 4:27:46 PM (14 years ago)
Author:
Oleksii Serdiuk
Branches:
0.1.3.145-beta1-symbian, 0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
Children:
f5c945d7ac
Parents:
f29549ec20
git-author:
Oleksii Serdiuk <contacts@…> (09/24/10 16:27:46)
git-committer:
Oleksii Serdiuk <contacts@…> (06/29/12 19:45:57)
Message:

+ Added more fonts to font-family css property on export.

  • Graph was slightly cut on export.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mainwindow.cpp

    rf29549ec20 r131c5fc3ba  
    266266QString html = solutionText->document()->toHtml("UTF-8"),
    267267                img =  fi.completeBaseName() + "." + format;
     268                html.replace(QRegExp("font-family:([^;]*);"), "font-family:\\1, 'DejaVu Sans Mono', 'Courier New', Courier, monospace;");
    268269                html.replace(QRegExp("<img\\s+src=\"tspsg://graph.pic\""), QString("<img src=\"%1\" alt=\"%2\"").arg(img, tr("Solution Graph")));
    269270
     
    278279                if (format == "svg") {
    279280QSvgGenerator svg;
    280                         svg.setSize(QSize(graph.width(), graph.height()));
     281                        svg.setSize(QSize(graph.width() + 2, graph.height() + 2));
    281282                        svg.setResolution(graph.logicalDpiX());
    282283                        svg.setFileName(fi.path() + "/" + img);
     
    289290                } else {
    290291#endif // NOSVG
    291 QImage i(graph.width(), graph.height(), QImage::Format_ARGB32);
     292QImage i(graph.width() + 2, graph.height() + 2, QImage::Format_ARGB32);
    292293                        i.fill(0x00FFFFFF);
    293294QPainter p;
     
    893894                pic.end();
    894895
    895 QImage i(graph.width() + 1, graph.height() + 1, QImage::Format_RGB32);
     896QImage i(graph.width() + 2, graph.height() + 2, QImage::Format_RGB32);
    896897                i.fill(0xFFFFFF);
    897898                pic.begin(&i);
     
    15141515        actionHelpContextual->setIcon(GET_ICON("help-contextual"));
    15151516        actionHelpAbout->setIcon(GET_ICON("help-about"));
     1517        actionHelpAboutQt->setIcon(QIcon(":/images/icons/"ICON_SIZE"/qtlogo."ICON_FORMAT));
    15161518#endif
    15171519        // Buttons
Note: See TracChangeset for help on using the changeset viewer.