Changeset 138 in tspsg-svn


Ignore:
Timestamp:
Sep 24, 2010, 4:27:46 PM (14 years ago)
Author:
laleppa
Message:

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

  • Graph was slightly cut on export.
Location:
trunk
Files:
1 added
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/resources/common.qrc

    r136 r138  
    22    <qresource prefix="/images">
    33        <file>tspsg.png</file>
    4         <file>icons/qtlogo-64.png</file>
    54    </qresource>
    65    <qresource prefix="/files">
  • trunk/resources/desktop.qrc

    r136 r138  
    2424        <file>icons/128x128/preferences-desktop-theme.png</file>
    2525        <file>icons/128x128/preferences-system.png</file>
     26        <file>icons/128x128/qtlogo.png</file>
    2627        <file>icons/128x128/roll.png</file>
    2728        <file>icons/128x128/system-software-update.png</file>
  • trunk/src/mainwindow.cpp

    r135 r138  
    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
  • trunk/tspsg.pro

    r137 r138  
    7070CONFIG(release, debug|release) {
    7171        OBJECTS_DIR = release
    72         DESTDIR = release
    7372        D =
    7473} else {
    7574        OBJECTS_DIR = debug
    76         DESTDIR = debug
    7775        DEFINES += DEBUG
    7876#       CONFIG += console
    7977        D = d
    8078}
     79DESTDIR = bin
    8180TARGET = tspsg$${D}
    8281
    8382# Saving all intermediate files to tmp directory.
    84 MOC_DIR = ./tmp
    85 RCC_DIR = ./tmp
    86 UI_DIR = ./tmp
     83MOC_DIR = tmp
     84RCC_DIR = tmp
     85UI_DIR = tmp
    8786
    8887# Include 3rd party libraries
  • trunk/ui/mainwindow.ui

    r123 r138  
    481481  </action>
    482482  <action name="actionHelpAboutQt">
    483    <property name="icon">
    484     <iconset resource="../resources/common.qrc">
    485      <normaloff>:/images/icons/qtlogo-64.png</normaloff>:/images/icons/qtlogo-64.png</iconset>
    486    </property>
    487483   <property name="text">
    488484    <string>About &amp;Qt...</string>
Note: See TracChangeset for help on using the changeset viewer.