Changeset e26679937d in tspsg for src
- Timestamp:
- Sep 1, 2010, 8:31:16 PM (14 years ago)
- Branches:
- 0.1.3.145-beta1-symbian, 0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
- Children:
- ac76a6a753
- Parents:
- 672e522ba2
- git-author:
- Oleksii Serdiuk <contacts@…> (09/01/10 20:31:16)
- git-committer:
- Oleksii Serdiuk <contacts@…> (06/29/12 19:45:57)
- Location:
- src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/defaults.h
r672e522ba2 re26679937d 69 69 //! Default for "Save solution graph as" 70 70 #define DEF_GRAPH_IMAGE_FORMAT "png" 71 //! Default for "Draw solution graph in higher quality" 72 #define DEF_HQ_GRAPH false 71 73 //! Default for "Show solution steps' matrices for every solution step" 72 74 #define DEF_SHOW_MATRIX true -
src/mainwindow.cpp
r672e522ba2 re26679937d 480 480 481 481 QString 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 framework</b> licensed " 483 "under the terms of the GNU Lesser General Public License,<br>\n" 483 484 "see <a href=\"http://qt.nokia.com/\">qt.nokia.com</a><br>\n" 484 485 "<br>\n" 485 "Most icons used in this software are part of <b>OxygenIcons</b> project "486 "Most icons used in %1 are part of <b>Oxygen Icons</b> project " 486 487 "licensed according to the GNU Lesser General Public License,<br>\n" 487 488 "see <a href=\"http://www.oxygen-icons.org/\">www.oxygen-icons.org</a><br>\n" 488 489 "<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 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()); 492 494 493 495 QFile f(":/files/COPYING"); … … 736 738 pic.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); 737 739 QFont 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 } 740 744 pic.setFont(font); 741 745 pic.setBrush(QBrush(QColor(Qt::white))); 746 if (settings->value("Output/HQGraph", DEF_HQ_GRAPH).toBool()) { 742 747 QPen pen = pic.pen(); 743 pen.setWidth(2); 744 pic.setPen(pen); 748 pen.setWidth(2); 749 pic.setPen(pen); 750 } 745 751 pic.setBackgroundMode(Qt::OpaqueMode); 746 752 } … … 874 880 pic.end(); 875 881 876 QImage i(graph.width() + 2, graph.height() + 2, QImage::Format_ARGB32);877 i.fill(0 );882 QImage i(graph.width() + 1, graph.height() + 1, QImage::Format_RGB32); 883 i.fill(0xFFFFFF); 878 884 pic.begin(&i); 879 885 pic.drawPicture(1, 1, graph); … … 883 889 QTextImageFormat img; 884 890 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 } 887 898 888 899 cur.setPosition(imgpos); … … 1048 1059 void MainWindow::drawNode(QPainter &pic, int nstep, bool left, SStep *step) 1049 1060 { 1050 const int r = 70; 1061 int r; 1062 if (settings->value("Output/HQGraph", DEF_HQ_GRAPH).toBool()) 1063 r = 70; 1064 else 1065 r = 35; 1051 1066 qreal x, y; 1052 1067 if (step != NULL) -
src/settingsdialog.cpp
r672e522ba2 re26679937d 55 55 p.setColor(QPalette::Window, p.color(QPalette::Text)); 56 56 lineHorizontal->setPalette(p); 57 58 #ifndef QT_NO_PRINTER 59 cbHQGraph = new QCheckBox(bgWhite); 60 cbHQGraph->setObjectName("cbHQGraph"); 61 #ifndef QT_NO_STATUSTIP 62 cbHQGraph->setStatusTip(tr("Higher quality graph looks much better when printing but uglier on the screen")); 63 #endif // QT_NO_STATUSTIP 64 cbHQGraph->setText(tr("Draw solution graph in higher quality")); 65 cbHQGraph->setCursor(QCursor(Qt::PointingHandCursor)); 66 67 QBoxLayout *box = static_cast<QBoxLayout *>(tabOutput->layout()); 68 QHBoxLayout *hbox1 = new QHBoxLayout(); 69 hbox1->addSpacing(10); 70 hbox1->addWidget(cbHQGraph); 71 box->insertLayout(box->indexOf(cbShowGraph) + 1, hbox1); 72 connect(cbShowGraph, SIGNAL(toggled(bool)), cbHQGraph, SLOT(setEnabled(bool))); 73 #endif 57 74 58 75 #ifdef HANDHELD … … 87 104 #else // HANDHELD 88 105 // Layout helper elements 89 QVBoxLayout *vbox 1, *vbox2;90 QHBoxLayout *hbox 1;106 QVBoxLayout *vbox; 107 QHBoxLayout *hbox; 91 108 92 109 #ifdef Q_OS_WIN32 … … 139 156 140 157 // Top line 141 hbox1 = new QHBoxLayout(); 142 hbox1->addWidget(imgIcon); 143 hbox1->addWidget(lineVertical); 144 hbox1->addWidget(bgWhite); 145 146 vbox1 = static_cast<QVBoxLayout *>(tabGeneral->layout()); 147 vbox1->insertWidget(vbox1->indexOf(cbUseNativeDialogs) + 1, cbSaveState); 158 hbox = new QHBoxLayout(); 159 hbox->addWidget(imgIcon); 160 hbox->addWidget(lineVertical); 161 hbox->addWidget(bgWhite); 162 163 #ifdef QT_NO_PRINTER 164 QBoxLayout *box; 165 #endif 166 box = static_cast<QBoxLayout *>(tabGeneral->layout()); 167 box->insertWidget(box->indexOf(cbUseNativeDialogs) + 1, cbSaveState); 148 168 #ifdef Q_OS_WIN32 149 169 if (QtWin::isCompositionEnabled()) 150 vbox1->insertWidget(vbox1->indexOf(cbUseNativeDialogs) + 1, cbUseTranslucency);170 box->insertWidget(box->indexOf(cbUseNativeDialogs) + 1, cbUseTranslucency); 151 171 #endif // Q_OS_WIN32 152 172 … … 155 175 156 176 // Central layout 157 vbox 2= new QVBoxLayout(this);158 vbox 2->setMargin(0);159 vbox 2->setSpacing(0);160 vbox 2->addLayout(hbox1);161 vbox 2->addWidget(bgGrey);162 setLayout(vbox 2);177 vbox = new QVBoxLayout(this); 178 vbox->setMargin(0); 179 vbox->setSpacing(0); 180 vbox->addLayout(hbox); 181 vbox->addWidget(bgGrey); 182 setLayout(vbox); 163 183 #endif // HANDHELD 164 184 … … 167 187 connect(QApplication::desktop(), SIGNAL(workAreaResized(int)), SLOT(desktopResized(int))); 168 188 #endif // Q_OS_WINCE_WM 169 connect(spinRandMin, SIGNAL(valueChanged(int)),this,SLOT(spinRandMinValueChanged(int)));170 connect(buttonFont, SIGNAL(clicked()),this,SLOT(buttonFontClicked()));171 connect(buttonColor, SIGNAL(clicked()),this,SLOT(buttonColorClicked()));189 connect(spinRandMin, SIGNAL(valueChanged(int)), SLOT(spinRandMinValueChanged(int))); 190 connect(buttonFont, SIGNAL(clicked()), SLOT(buttonFontClicked())); 191 connect(buttonColor, SIGNAL(clicked()), SLOT(buttonColorClicked())); 172 192 setWindowFlags(windowFlags() ^ Qt::WindowContextHelpButtonHint); 173 193 #ifndef HANDHELD … … 201 221 settings->beginGroup("Output"); 202 222 cbShowGraph->setChecked(settings->value("ShowGraph", DEF_SHOW_GRAPH).toBool()); 223 224 #ifndef QT_NO_PRINTER 225 cbHQGraph->setEnabled(cbShowGraph->isChecked()); 226 cbHQGraph->setChecked(settings->value("HQGraph", DEF_HQ_GRAPH && cbShowGraph->isChecked()).toBool()); 227 #endif 203 228 204 229 #if !defined(NOSVG) && (QT_VERSION >= 0x040500) … … 311 336 settings->beginGroup("Output"); 312 337 settings->setValue("ShowGraph", cbShowGraph->isChecked()); 338 #ifndef QT_NO_PRINTER 339 settings->setValue("HQGraph", cbShowGraph->isChecked() && cbHQGraph->isChecked()); 340 #endif 313 341 if (cbShowGraph->isChecked()) { 314 342 if (comboGraphImageFormat->currentIndex() >= 0) -
src/settingsdialog.h
r672e522ba2 re26679937d 59 59 QCheckBox *cbUseTranslucency; 60 60 #endif // Q_OS_WIN32 61 #ifndef QT_NO_PRINTER 62 QCheckBox *cbHQGraph; 63 #endif 61 64 #ifdef Q_OS_WINCE_WM 62 65 QRect currentGeometry;
Note: See TracChangeset
for help on using the changeset viewer.