hydrogen 1.2.6
LCDDisplay.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-2025 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 LCDDisplay_H
24#define LCDDisplay_H
25
26
27#include <QtGui>
28#include <QtWidgets>
29#include <QLineEdit>
30
31#include <core/Object.h>
33
34#include <vector>
35
39class LCDDisplay : public QLineEdit, public H2Core::Object<LCDDisplay>
40{
42 Q_OBJECT
43
44public:
45 LCDDisplay( QWidget* pParent, QSize size = QSize( 0, 0 ), bool bFixedFont = false, bool bIsActive = true );
47
48 void setUseRedFont( bool bUseRedFont );
49
50 bool getIsActive() const;
51 void setIsActive( bool bIsActive );
52
53public slots:
55
56protected:
57 QSize m_size;
58 virtual void paintEvent( QPaintEvent *ev ) override;
59
60private:
61 void updateFont();
62 void updateStyleSheet();
63
67
68 std::vector<int> m_fontPointSizes;
69};
70inline bool LCDDisplay::getIsActive() const {
71 return m_bIsActive;
72}
73
74#endif
#define H2_OBJECT(name)
Definition Object.h:227
Changes
Bitwise or-able options showing which part of the Preferences were altered using the PreferencesDialo...
QSize m_size
Definition LCDDisplay.h:57
std::vector< int > m_fontPointSizes
Definition LCDDisplay.h:68
bool m_bFixedFont
Definition LCDDisplay.h:64
void onPreferencesChanged(H2Core::Preferences::Changes changes)
bool m_bUseRedFont
Definition LCDDisplay.h:65
bool getIsActive() const
Definition LCDDisplay.h:70
void updateStyleSheet()
void setUseRedFont(bool bUseRedFont)
bool m_bIsActive
Definition LCDDisplay.h:66
virtual void paintEvent(QPaintEvent *ev) override
void setIsActive(bool bIsActive)
LCDDisplay(QWidget *pParent, QSize size=QSize(0, 0), bool bFixedFont=false, bool bIsActive=true)
void updateFont()