hydrogen 1.2.3
StatusMessageDisplay.h
Go to the documentation of this file.
1/*
2 * Hydrogen
3 * Copyright(c) 2002-2008 by Alex >Comix< Cominu [comix@users.sourceforge.net]
4 * Copyright(c) 2008-2024 The hydrogen development team [hydrogen-devel@lists.sourceforge.net]
5 *
6 * http://www.hydrogen-music.org
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY, without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see https://www.gnu.org/licenses
20 *
21 */
22
23#ifndef STATUS_MESSAGE_Display_H
24#define STATUS_MESSAGE_Display_H
25
26
27#include "LCDDisplay.h"
28
32class StatusMessageDisplay : public LCDDisplay, public H2Core::Object<StatusMessageDisplay>
33{
35 Q_OBJECT
36
37public:
38 StatusMessageDisplay( QWidget* pParent, QSize size );
40
41 void showMessage( const QString& sMessage, const QString& sCaller = "" );
42
43public slots:
45
46private slots:
47 void onStatusTimerEvent();
48 void onScrollTimerEvent();
49
50private:
51 void updateStyleSheet();
52 void reset();
53 void updateMaxLength();
54 void displayMessage( const QString& sMessage );
55
56 QStringList m_statusMessages;
58
76
79
82
84
85 virtual void paintEvent( QPaintEvent *ev ) override;
86 virtual void enterEvent( QEvent *ev ) override;
87 virtual void leaveEvent( QEvent *ev ) override;
88 virtual void mousePressEvent( QMouseEvent* ev ) override;
89};
90
91#endif
#define H2_OBJECT(name)
Definition Object.h:224
Changes
Bitwise or-able options showing which part of the Preferences were altered using the PreferencesDialo...
Non-interactive display used for both numerical values and the status display.
Definition LCDDisplay.h:40
Non-interactive display for status messages in the PlayerControl.
virtual void mousePressEvent(QMouseEvent *ev) override
void onPreferencesChanged(H2Core::Preferences::Changes changes)
virtual void leaveEvent(QEvent *ev) override
int m_nScrollTimeout
Amount of time in milliseconds that pass between chopping characters for messages to long to display ...
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.