Changeset 129 in tspsg-svn
- Timestamp:
- Sep 3, 2010, 5:06:43 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/docs/tspsg.tag
r124 r129 29 29 <member kind="define"> 30 30 <type>#define</type> 31 <name>DEF_SAVE_LAST_USED</name> 32 <anchorfile>defaults_8h.html</anchorfile> 33 <anchor>a02da61748796e418a0919b08a513eaed</anchor> 34 <arglist></arglist> 35 </member> 36 <member kind="define"> 37 <type>#define</type> 31 38 <name>DEF_USE_NATIVE_DIALOGS</name> 32 39 <anchorfile>defaults_8h.html</anchorfile> … … 99 106 <member kind="define"> 100 107 <type>#define</type> 108 <name>DEF_HQ_GRAPH</name> 109 <anchorfile>defaults_8h.html</anchorfile> 110 <anchor>a351e58750bbb3904d900734fb5ab1ca8</anchor> 111 <arglist></arglist> 112 </member> 113 <member kind="define"> 114 <type>#define</type> 101 115 <name>DEF_SHOW_MATRIX</name> 102 116 <anchorfile>defaults_8h.html</anchorfile> … … 123 137 <anchorfile>defaults_8h.html</anchorfile> 124 138 <anchor>a6831bc2c2f11c3a14382c8fbe8d87efe</anchor> 139 <arglist></arglist> 140 </member> 141 <member kind="define"> 142 <type>#define</type> 143 <name>DEF_FONT_FACE</name> 144 <anchorfile>defaults_8h.html</anchorfile> 145 <anchor>afdd3c568d87924da83cb8bfcedb3722d</anchor> 125 146 <arglist></arglist> 126 147 </member> … … 246 267 <anchor>a594842d2fcaf774c3c42b944f3f031d2</anchor> 247 268 <arglist>(double x)</arglist> 248 </member>249 <member kind="function">250 <type>QString</type>251 <name>getDefaultFont</name>252 <anchorfile>globals_8h.html</anchorfile>253 <anchor>a0b35409ae9db3b8db49ca9937447fc5b</anchor>254 <arglist>()</arglist>255 269 </member> 256 270 <member kind="function"> -
trunk/resources/common.qrc
r124 r129 20 20 <qresource prefix="/files"> 21 21 <file>COPYING</file> 22 <file>DejaVuLGCSansMono.ttf</file> 22 23 </qresource> 23 24 </RCC> -
trunk/src/defaults.h
r128 r129 81 81 //! Default for "Scroll to the end of output after solving" 82 82 #define DEF_SCROLL_TO_END false 83 //! Default font face 84 #define DEF_FONT_FACE "DejaVu LGC Sans Mono" 83 85 /*! 84 86 * \def DEF_FONT_SIZE -
trunk/src/globals.h
r121 r129 108 108 } 109 109 110 /*!111 * \brief Returns the default font for solution output.112 * \return The family name of the default font.113 */114 inline QString getDefaultFont()115 {116 QFont f;117 #ifdef HANDHELD118 f.setStyleHint(QFont::SansSerif);119 #else // HANDHELD120 f.setStyleHint(QFont::TypeWriter);121 #endif // HANDHELD122 return f.defaultFamily();123 }124 125 110 #ifdef Q_OS_WIN32 126 111 /*! -
trunk/src/main.cpp
r121 r129 53 53 qsrand(QDateTime::currentDateTime().toTime_t() ^ QCursor::pos().x() ^ QCursor::pos().y()); 54 54 55 QFontDatabase::addApplicationFont(":/files/DejaVuLGCSansMono.ttf"); 56 55 57 QTranslator en; 56 58 if (en.load("tspsg_en", PATH_L10N)) -
trunk/src/mainwindow.cpp
r128 r129 748 748 pic.begin(&graph); 749 749 pic.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); 750 QFont font = settings->value("Output/Font", QFont( getDefaultFont(), 9)).value<QFont>();750 QFont font = settings->value("Output/Font", QFont(DEF_FONT_FACE, 9)).value<QFont>(); 751 751 if (settings->value("Output/HQGraph", DEF_HQ_GRAPH).toBool()) { 752 752 font.setWeight(QFont::DemiBold); … … 1145 1145 void MainWindow::initDocStyleSheet() 1146 1146 { 1147 solutionText->document()->setDefaultFont(settings->value("Output/Font", QFont( getDefaultFont(), DEF_FONT_SIZE)).value<QFont>());1147 solutionText->document()->setDefaultFont(settings->value("Output/Font", QFont(DEF_FONT_FACE, DEF_FONT_SIZE)).value<QFont>()); 1148 1148 1149 1149 fmt_paragraph.setTopMargin(0); -
trunk/src/settingsdialog.cpp
r128 r129 255 255 cbScrollToEnd->setChecked(settings->value("ScrollToEnd", DEF_SCROLL_TO_END).toBool()); 256 256 257 font = settings->value("Font", QFont( getDefaultFont(), DEF_FONT_SIZE)).value<QFont>();257 font = settings->value("Font", QFont(DEF_FONT_FACE, DEF_FONT_SIZE)).value<QFont>(); 258 258 color = settings->value("Colors/Text", DEF_TEXT_COLOR).value<QColor>(); 259 259 settings->endGroup(); … … 301 301 if (QApplication::keyboardModifiers() & Qt::ShiftModifier) { 302 302 if (QMessageBox::question(this, tr("Settings Reset"), tr("Do you really want to <b>reset all application settings to their defaults</b>?"), QMessageBox::RestoreDefaults | QMessageBox::Cancel) == QMessageBox::RestoreDefaults) { 303 _newFont = (font != QFont( getDefaultFont(), DEF_FONT_SIZE));303 _newFont = (font != QFont(DEF_FONT_FACE, DEF_FONT_SIZE)); 304 304 _newColor = (color != DEF_TEXT_COLOR); 305 305 settings->remove("");
Note: See TracChangeset
for help on using the changeset viewer.