Changeset 125 in tspsg-svn
- Timestamp:
- Aug 30, 2010, 7:48:47 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/install.pri
r122 r125 14 14 #l10n.files = l10n/*.qm 15 15 #share.files = 16 docs.files = COPYING README.txt16 docs.files = COPYING ChangeLog.txt README.txt INSTALL.txt 17 17 INSTALLS += target share docs # l10n 18 18 -
trunk/src/mainwindow.cpp
r124 r125 257 257 QString html = solutionText->document()->toHtml("UTF-8"), 258 258 img = fi.completeBaseName() + "." + format; 259 html.replace(QRegExp("<img\\s+src=\"tspsg://graph.pic\""), QString("<img src=\"%1\" width=\"%2\" height=\"%3\" alt=\"%4\"").arg(img).arg(graph.width() + 2).arg(graph.height() + 2).arg(tr("Solution Graph")));259 html.replace(QRegExp("<img\\s+src=\"tspsg://graph.pic\""), QString("<img src=\"%1\" alt=\"%2\"").arg(img, tr("Solution Graph"))); 260 260 261 261 // Saving solution text as HTML … … 280 280 } else { 281 281 #endif // NOSVG && QT_VERSION >= 0x040500 282 QImage i(graph.width() + 2, graph.height() + 2, QImage::Format_ARGB32);282 QImage i(graph.width(), graph.height(), QImage::Format_ARGB32); 283 283 i.fill(0x00FFFFFF); 284 284 QPainter p; … … 735 735 if (settings->value("Output/ShowGraph", DEF_SHOW_GRAPH).toBool()) { 736 736 pic.begin(&graph); 737 pic.setRenderHint(QPainter::Antialiasing); 738 pic.setFont(settings->value("Output/Font", QFont(getDefaultFont(), 9)).value<QFont>()); 737 pic.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); 738 QFont font = settings->value("Output/Font", QFont(getDefaultFont(), 9)).value<QFont>(); 739 // font.setBold(true); 740 font.setPointSizeF(font.pointSizeF() * 2); 741 pic.setFont(font); 739 742 pic.setBrush(QBrush(QColor(Qt::white))); 743 QPen pen = pic.pen(); 744 pen.setWidth(2); 745 pic.setPen(pen); 740 746 pic.setBackgroundMode(Qt::OpaqueMode); 741 747 } … … 878 884 QTextImageFormat img; 879 885 img.setName("tspsg://graph.pic"); 886 img.setWidth(i.width() / 2); 887 img.setHeight(i.height() / 2); 880 888 881 889 cur.setPosition(imgpos); … … 1041 1049 void MainWindow::drawNode(QPainter &pic, int nstep, bool left, SStep *step) 1042 1050 { 1043 const int r = 35;1051 const int r = 70; 1044 1052 qreal x, y; 1045 1053 if (step != NULL)
Note: See TracChangeset
for help on using the changeset viewer.