Merge pull request #799 from KLayout/issue-778

Fixed #778 (monospace font selection generalized)
This commit is contained in:
Matthias Köfferlein 2021-05-21 00:51:21 +02:00 committed by GitHub
commit 99f6beef54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 172 additions and 123 deletions

View File

@ -23,7 +23,16 @@
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<property name="margin"> <property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item row="0" column="1"> <item row="0" column="1">
@ -93,11 +102,6 @@
</item> </item>
<item> <item>
<widget class="QPlainTextEdit" name="text"> <widget class="QPlainTextEdit" name="text">
<property name="font">
<font>
<family>Monospace</family>
</font>
</property>
<property name="lineWrapMode"> <property name="lineWrapMode">
<enum>QPlainTextEdit::NoWrap</enum> <enum>QPlainTextEdit::NoWrap</enum>
</property> </property>

View File

@ -1350,12 +1350,7 @@ p, li { white-space: pre-wrap; }
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QFrame" name="consoleTextFrame"> <widget class="QFrame" name="console_text_frame">
<property name="font">
<font>
<family>Monospace</family>
</font>
</property>
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::NoFrame</enum> <enum>QFrame::NoFrame</enum>
</property> </property>
@ -1366,11 +1361,6 @@ p, li { white-space: pre-wrap; }
</item> </item>
<item> <item>
<widget class="QComboBox" name="input_field"> <widget class="QComboBox" name="input_field">
<property name="font">
<font>
<family>Monospace</family>
</font>
</property>
<property name="editable"> <property name="editable">
<bool>true</bool> <bool>true</bool>
</property> </property>

View File

@ -1,48 +1,67 @@
<ui version="4.0" > <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>RuntimeErrorForm</class> <class>RuntimeErrorForm</class>
<widget class="QDialog" name="RuntimeErrorForm" > <widget class="QDialog" name="RuntimeErrorForm">
<property name="geometry" > <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>480</width> <width>496</width>
<height>297</height> <height>297</height>
</rect> </rect>
</property> </property>
<property name="windowTitle" > <property name="windowTitle">
<string>Script Error</string> <string>Script Error</string>
</property> </property>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout">
<property name="margin" > <property name="spacing">
<number>9</number>
</property>
<property name="spacing" >
<number>6</number> <number>6</number>
</property> </property>
<property name="leftMargin">
<number>9</number>
</property>
<property name="topMargin">
<number>9</number>
</property>
<property name="rightMargin">
<number>9</number>
</property>
<property name="bottomMargin">
<number>9</number>
</property>
<item> <item>
<widget class="QFrame" name="frame_2" > <widget class="QFrame" name="frame_2">
<property name="frameShape" > <property name="frameShape">
<enum>QFrame::NoFrame</enum> <enum>QFrame::NoFrame</enum>
</property> </property>
<property name="frameShadow" > <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QGridLayout" > <layout class="QGridLayout">
<property name="margin" > <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
<property name="spacing" > <property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<item row="2" column="3" > <item row="2" column="3">
<spacer> <spacer>
<property name="orientation" > <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeType" > <property name="sizeType">
<enum>QSizePolicy::Fixed</enum> <enum>QSizePolicy::Fixed</enum>
</property> </property>
<property name="sizeHint" > <property name="sizeHint" stdset="0">
<size> <size>
<width>411</width> <width>411</width>
<height>20</height> <height>20</height>
@ -50,15 +69,15 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="0" column="3" > <item row="0" column="3">
<spacer> <spacer>
<property name="orientation" > <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeType" > <property name="sizeType">
<enum>QSizePolicy::Fixed</enum> <enum>QSizePolicy::Fixed</enum>
</property> </property>
<property name="sizeHint" > <property name="sizeHint" stdset="0">
<size> <size>
<width>411</width> <width>411</width>
<height>20</height> <height>20</height>
@ -66,22 +85,22 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="1" column="3" > <item row="1" column="3">
<widget class="QLabel" name="msg_label" > <widget class="QLabel" name="msg_label">
<property name="text" > <property name="text">
<string>TextLabel</string> <string>TextLabel</string>
</property> </property>
</widget> </widget>
</item> </item>
<item rowspan="3" row="0" column="2" > <item row="0" column="2" rowspan="3">
<spacer> <spacer>
<property name="orientation" > <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType" > <property name="sizeType">
<enum>QSizePolicy::Fixed</enum> <enum>QSizePolicy::Fixed</enum>
</property> </property>
<property name="sizeHint" > <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>71</height> <height>71</height>
@ -89,36 +108,34 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item rowspan="3" row="0" column="1" > <item row="0" column="1" rowspan="3">
<widget class="QLabel" name="icon_label" > <widget class="QLabel" name="icon_label">
<property name="sizePolicy" > <property name="sizePolicy">
<sizepolicy> <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<hsizetype>0</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="frameShape" > <property name="frameShape">
<enum>QFrame::NoFrame</enum> <enum>QFrame::NoFrame</enum>
</property> </property>
<property name="lineWidth" > <property name="lineWidth">
<number>0</number> <number>0</number>
</property> </property>
<property name="text" > <property name="text">
<string>X</string> <string>X</string>
</property> </property>
</widget> </widget>
</item> </item>
<item rowspan="3" row="0" column="0" > <item row="0" column="0" rowspan="3">
<spacer> <spacer>
<property name="orientation" > <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType" > <property name="sizeType">
<enum>QSizePolicy::Fixed</enum> <enum>QSizePolicy::Fixed</enum>
</property> </property>
<property name="sizeHint" > <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>71</height> <height>71</height>
@ -130,35 +147,40 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QFrame" name="details_frame" > <widget class="QFrame" name="details_frame">
<property name="frameShape" > <property name="frameShape">
<enum>QFrame::NoFrame</enum> <enum>QFrame::NoFrame</enum>
</property> </property>
<property name="frameShadow" > <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout">
<property name="margin" > <property name="spacing">
<number>0</number>
</property>
<property name="spacing" >
<number>6</number> <number>6</number>
</property> </property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item> <item>
<widget class="QTextBrowser" name="details_text" > <widget class="QTextBrowser" name="details_text">
<property name="font" > <property name="lineWrapMode">
<font>
<family>Liberation Mono</family>
</font>
</property>
<property name="lineWrapMode" >
<enum>QTextEdit::NoWrap</enum> <enum>QTextEdit::NoWrap</enum>
</property> </property>
<property name="html" > <property name="html">
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css"> <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Liberation Mono'; font-size:11pt; font-weight:400; font-style:normal; text-decoration:none;"> &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Liberation Sans';">&lt;/p>&lt;/body>&lt;/html></string> &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Liberation Mono';&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -166,44 +188,51 @@ p, li { white-space: pre-wrap; }
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QFrame" name="frame" > <widget class="QFrame" name="frame">
<property name="frameShape" > <property name="frameShape">
<enum>QFrame::NoFrame</enum> <enum>QFrame::NoFrame</enum>
</property> </property>
<property name="frameShadow" > <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout">
<property name="margin" > <property name="spacing">
<number>0</number>
</property>
<property name="spacing" >
<number>6</number> <number>6</number>
</property> </property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item> <item>
<widget class="QPushButton" name="details_pb" > <widget class="QPushButton" name="details_pb">
<property name="sizePolicy" > <property name="sizePolicy">
<sizepolicy> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text" > <property name="text">
<string> Details >> </string> <string> Details &gt;&gt; </string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer> <spacer>
<property name="orientation" > <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType" > <property name="sizeType">
<enum>QSizePolicy::Expanding</enum> <enum>QSizePolicy::Expanding</enum>
</property> </property>
<property name="sizeHint" > <property name="sizeHint" stdset="0">
<size> <size>
<width>341</width> <width>341</width>
<height>16</height> <height>16</height>
@ -212,11 +241,11 @@ p, li { white-space: pre-wrap; }
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QPushButton" name="ok_button" > <widget class="QPushButton" name="ok_button">
<property name="text" > <property name="text">
<string>OK</string> <string>OK</string>
</property> </property>
<property name="default" > <property name="default">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
@ -226,7 +255,7 @@ p, li { white-space: pre-wrap; }
</item> </item>
</layout> </layout>
</widget> </widget>
<layoutdefault spacing="6" margin="11" /> <layoutdefault spacing="6" margin="11"/>
<resources/> <resources/>
<connections> <connections>
<connection> <connection>
@ -235,11 +264,11 @@ p, li { white-space: pre-wrap; }
<receiver>RuntimeErrorForm</receiver> <receiver>RuntimeErrorForm</receiver>
<slot>accept()</slot> <slot>accept()</slot>
<hints> <hints>
<hint type="sourcelabel" > <hint type="sourcelabel">
<x>457</x> <x>457</x>
<y>330</y> <y>330</y>
</hint> </hint>
<hint type="destinationlabel" > <hint type="destinationlabel">
<x>271</x> <x>271</x>
<y>177</y> <y>177</y>
</hint> </hint>

View File

@ -22,6 +22,7 @@
#include "layCrashMessage.h" #include "layCrashMessage.h"
#include "layQtTools.h"
#include <QPushButton> #include <QPushButton>
@ -34,6 +35,7 @@ CrashMessage::CrashMessage (QWidget *parent, bool can_resume, const QString &t)
setupUi (this); setupUi (this);
m_cancel_pressed = false; m_cancel_pressed = false;
text->setFont (monospace_font ());
text->setPlainText (t); text->setPlainText (t);
set_can_resume (can_resume); set_can_resume (can_resume);

View File

@ -270,6 +270,9 @@ MacroEditorDialog::MacroEditorDialog (lay::Dispatcher *pr, lym::MacroCollection
Ui::MacroEditorDialog::setupUi (this); Ui::MacroEditorDialog::setupUi (this);
input_field->setFont (monospace_font ());
console_text_frame->setFont (monospace_font ());
connect (mp_root, SIGNAL (macro_changed (lym::Macro *)), this, SLOT (macro_changed (lym::Macro *))); connect (mp_root, SIGNAL (macro_changed (lym::Macro *)), this, SLOT (macro_changed (lym::Macro *)));
connect (mp_root, SIGNAL (macro_deleted (lym::Macro *)), this, SLOT (macro_deleted (lym::Macro *))); connect (mp_root, SIGNAL (macro_deleted (lym::Macro *)), this, SLOT (macro_deleted (lym::Macro *)));
connect (mp_root, SIGNAL (macro_collection_deleted (lym::MacroCollection *)), this, SLOT (macro_collection_deleted (lym::MacroCollection *))); connect (mp_root, SIGNAL (macro_collection_deleted (lym::MacroCollection *)), this, SLOT (macro_collection_deleted (lym::MacroCollection *)));
@ -332,16 +335,16 @@ MacroEditorDialog::MacroEditorDialog (lay::Dispatcher *pr, lym::MacroCollection
setObjectName (QString::fromUtf8 ("MacroEditorDialog")); setObjectName (QString::fromUtf8 ("MacroEditorDialog"));
QHBoxLayout *layout = new QHBoxLayout(consoleTextFrame); QHBoxLayout *layout = new QHBoxLayout (console_text_frame);
layout->setMargin (0); layout->setMargin (0);
consoleTextFrame->setLayout(layout); console_text_frame->setLayout (layout);
mp_console_text = new TextEditWidget(consoleTextFrame); mp_console_text = new TextEditWidget (console_text_frame);
mp_console_text->setReadOnly(true); mp_console_text->setReadOnly (true);
mp_console_text->setFont(consoleTextFrame->font()); mp_console_text->setFont (monospace_font ());
mp_console_text->setWordWrapMode(QTextOption::NoWrap); mp_console_text->setWordWrapMode (QTextOption::NoWrap);
layout->addWidget(mp_console_text); layout->addWidget (mp_console_text);
m_stdout_format = mp_console_text->currentCharFormat(); m_stdout_format = mp_console_text->currentCharFormat ();
m_echo_format = m_stdout_format; m_echo_format = m_stdout_format;
m_echo_format.setForeground (QColor (0, 0, 255)); m_echo_format.setForeground (QColor (0, 0, 255));
m_stderr_format = m_stdout_format; m_stderr_format = m_stdout_format;

View File

@ -929,7 +929,7 @@ void MacroEditorPage::set_font (const std::string &family, int size)
if (! family.empty ()) { if (! family.empty ()) {
f.setFamily (tl::to_qstring (family)); f.setFamily (tl::to_qstring (family));
} else { } else {
f.setFamily (QString::fromUtf8 ("Monospace")); f.setFamily (lay::monospace_font ().family ());
} }
f.setFixedPitch (true); f.setFixedPitch (true);
if (size > 0) { if (size > 0) {

View File

@ -26,6 +26,7 @@
#include "layMacroEditorDialog.h" #include "layMacroEditorDialog.h"
#include "layGenericSyntaxHighlighter.h" #include "layGenericSyntaxHighlighter.h"
#include "layDispatcher.h" #include "layDispatcher.h"
#include "layQtTools.h"
#include "lymMacro.h" #include "lymMacro.h"
@ -218,7 +219,7 @@ MacroEditorSetupPage::setup (Dispatcher *root)
if (mp_data->font_size <= 0) { if (mp_data->font_size <= 0) {
mp_data->font_size = font ().pointSize (); mp_data->font_size = font ().pointSize ();
mp_data->font_family = "Monospace"; mp_data->font_family = tl::to_string (monospace_font ().family ());
} }
QFont f; QFont f;

View File

@ -22,6 +22,7 @@
#include "layRuntimeErrorForm.h" #include "layRuntimeErrorForm.h"
#include "layQtTools.h"
#include "tlScriptError.h" #include "tlScriptError.h"
#include <QMessageBox> #include <QMessageBox>
@ -40,6 +41,7 @@ RuntimeErrorForm::RuntimeErrorForm (QWidget *parent, const char *name, const tl:
msg_label->setText (tl::to_qstring (error->basic_msg ())); msg_label->setText (tl::to_qstring (error->basic_msg ()));
details_text->setText (tl::to_qstring (error->msg ())); details_text->setText (tl::to_qstring (error->msg ()));
details_text->setFont (lay::monospace_font ());
details_frame->hide (); details_frame->hide ();
// "borrow" the error pixmap from the message box // "borrow" the error pixmap from the message box

View File

@ -32,6 +32,7 @@
#include "layMacroEditorTree.h" #include "layMacroEditorTree.h"
#include "layMacroController.h" #include "layMacroController.h"
#include "layTechnologyController.h" #include "layTechnologyController.h"
#include "layQtTools.h"
#include "lymMacro.h" #include "lymMacro.h"
#include "tlAssert.h" #include "tlAssert.h"
#include "tlStream.h" #include "tlStream.h"
@ -408,7 +409,7 @@ TechMacrosPage::TechMacrosPage (QWidget *parent, const std::string &cat, const s
QFont f = mp_ui->macro_text->font (); QFont f = mp_ui->macro_text->font ();
f.setFixedPitch (true); f.setFixedPitch (true);
f.setFamily (tl::to_qstring ("Monospace")); f.setFamily (monospace_font ().family ());
mp_ui->macro_text->setFont (f); mp_ui->macro_text->setFont (f);
connect (mp_ui->create_folder_button, SIGNAL (clicked ()), this, SLOT (create_folder_clicked ())); connect (mp_ui->create_folder_button, SIGNAL (clicked ()), this, SLOT (create_folder_clicked ()));

View File

@ -17,7 +17,7 @@
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">
<string>2.5d Vertical Stack Information</string> <string>&lt;html&gt;2.5d Vertical stack information (see &lt;a href=&quot;int:/about/25d_view.xml&quot;&gt;here&lt;/a&gt; for details)&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -39,11 +39,6 @@
</item> </item>
<item row="1" column="0" colspan="2"> <item row="1" column="0" colspan="2">
<widget class="QTextEdit" name="src_te"> <widget class="QTextEdit" name="src_te">
<property name="font">
<font>
<family>Monospace</family>
</font>
</property>
<property name="lineWrapMode"> <property name="lineWrapMode">
<enum>QTextEdit::NoWrap</enum> <enum>QTextEdit::NoWrap</enum>
</property> </property>

View File

@ -24,6 +24,7 @@
#include "laybasicConfig.h" #include "laybasicConfig.h"
#include "dbD25TechnologyComponent.h" #include "dbD25TechnologyComponent.h"
#include "layD25TechnologyComponent.h" #include "layD25TechnologyComponent.h"
#include "layQtTools.h"
#include <QResource> #include <QResource>
#include <QBuffer> #include <QBuffer>
@ -36,7 +37,9 @@ D25TechnologyComponentEditor::D25TechnologyComponentEditor (QWidget *parent)
{ {
setupUi (this); setupUi (this);
// TODO: activate_help_links (mp_ui->help_label); src_te->setFont (monospace_font ());
activate_help_links (label);
QResource res (tl::to_qstring (":/syntax/d25_text.xml")); QResource res (tl::to_qstring (":/syntax/d25_text.xml"));
QByteArray data ((const char *) res.data (), int (res.size ())); QByteArray data ((const char *) res.data (), int (res.size ()));

View File

@ -1062,7 +1062,7 @@ UserPropertiesForm::UserPropertiesForm (QWidget *parent)
mp_ui = new Ui::UserPropertiesForm (); mp_ui = new Ui::UserPropertiesForm ();
mp_ui->setupUi (this); mp_ui->setupUi (this);
mp_ui->text_edit->setFont (QFont ("Monospace")); mp_ui->text_edit->setFont (monospace_font ());
mp_ui->text_edit->setAcceptRichText (false); mp_ui->text_edit->setAcceptRichText (false);
connect (mp_ui->add_pb, SIGNAL (clicked ()), this, SLOT (add ())); connect (mp_ui->add_pb, SIGNAL (clicked ()), this, SLOT (add ()));

View File

@ -32,6 +32,7 @@
#include <QWidget> #include <QWidget>
#include <QLabel> #include <QLabel>
#include <QPalette> #include <QPalette>
#include <QFontDatabase>
#include <stdio.h> #include <stdio.h>
@ -189,6 +190,17 @@ indicate_error (QWidget *le, bool f)
le->setPalette (pl); le->setPalette (pl);
} }
QFont monospace_font ()
{
#if QT_VERSION >= 0x050200
return QFont (QFontDatabase::systemFont (QFontDatabase::FixedFont).family ());
#else
QFont f = QFont (QString::fromUtf8 ("Monospace"));
f.setStyleHint (QFont::TypeWriter);
return f;
#endif
}
#if QT_VERSION < 0x050000 #if QT_VERSION < 0x050000
SignalBlocker::SignalBlocker (QWidget *w) SignalBlocker::SignalBlocker (QWidget *w)

View File

@ -27,6 +27,7 @@
#include "laybasicCommon.h" #include "laybasicCommon.h"
#include <string> #include <string>
#include <QFont>
class QLabel; class QLabel;
class QWidget; class QWidget;
@ -82,6 +83,12 @@ LAYBASIC_PUBLIC void indicate_error (QWidget *le, const tl::Exception *ex);
*/ */
LAYBASIC_PUBLIC void indicate_error (QWidget *le, bool error); LAYBASIC_PUBLIC void indicate_error (QWidget *le, bool error);
/**
* @brief Gets the system monospace font
*/
LAYBASIC_PUBLIC QFont monospace_font ();
#if QT_VERSION < 0x050000 #if QT_VERSION < 0x050000
// Provide missing QSignalBlocker for Qt4 // Provide missing QSignalBlocker for Qt4