33 , m_nShowTimeout( 5500 )
34 , m_nScrollTimeout( 150 )
35 , m_nPreScrollTimeout( 1500 )
36 , m_nHistorySize( 100 )
37 , m_bPreScroll( true )
76 QColor textColor = pPref->getColorTheme()->m_windowTextColor;
77 QColor backgroundColor = pPref->getColorTheme()->m_windowColor;
79 QString sStyleSheet = QString(
"\
82 background-color: %2; \
84 .arg( textColor.name() )
85 .arg( backgroundColor.name() );
87 setStyleSheet( sStyleSheet );
97 QPainter painter(
this);
99 QColor colorHighlightActive = pPref->getColorTheme()->m_highlightColor;
104 if ( ! hasFocus() ) {
105 colorHighlightActive.setAlpha( 150 );
109 pen.setColor( colorHighlightActive );
111 painter.setPen( pen );
112 painter.drawRoundedRect( QRect( 0, 0,
m_size.width() - 1,
m_size.height() - 1 ), 3, 3 );
117 LCDDisplay::enterEvent( ev );
123 LCDDisplay::leaveEvent( ev );
129 QMenu* messageMenu =
new QMenu(
this );
132 messageMenu->addAction( sMessage );
135 messageMenu->popup( ev->globalPos() );
170 if ( sMessage.length() >= maxLength() ) {
208 QString sLongString(
"ThisIsALongOneThatShouldNotFitInTheLCDDisplayEvenWithVeryNarrowFonts" );
211 while ( fontMetrics().size( Qt::TextSingleLine, sLongString ).width() >
212 width() && ! sLongString.isEmpty() ) {
213 sLongString.chop( 1 );
216 setMaxLength( sLongString.length() );
static Preferences * get_instance()
Returns a pointer to the current Preferences singleton stored in __instance.
Changes
Bitwise or-able options showing which part of the Preferences were altered using the PreferencesDialo...
@ Font
Either the font size or font family have changed.
static HydrogenApp * get_instance()
Returns the instance of HydrogenApp class.
void preferencesChanged(H2Core::Preferences::Changes changes)
Propagates a change in the Preferences through the GUI.
Non-interactive display used for both numerical values and the status display.
void onPreferencesChanged(H2Core::Preferences::Changes changes)
virtual void paintEvent(QPaintEvent *ev) override
virtual void mousePressEvent(QMouseEvent *ev) override
void onScrollTimerEvent()
void onPreferencesChanged(H2Core::Preferences::Changes changes)
virtual void leaveEvent(QEvent *ev) override
void onStatusTimerEvent()
int m_nScrollTimeout
Amount of time in milliseconds that pass between chopping characters for messages to long to display ...
QStringList m_statusMessages
int m_nPreScrollTimeout
Amount of time in milliseconds that pass before a message is being scrolled.
virtual void paintEvent(QPaintEvent *ev) override
void showMessage(const QString &sMessage, const QString &sCaller="")
StatusMessageDisplay(QWidget *pParent, QSize size)
virtual void enterEvent(QEvent *ev) override
void displayMessage(const QString &sMessage)
int m_nShowTimeout
Amount of time in milliseconds for which the status message will be displayed.