Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
Executable
+64
@@ -0,0 +1,64 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Implements a QLedMatrix to display a single character
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Florian Schult, SLSE, 2016-03-18
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QLedMatrix/qledmatrix.h>
|
||||
|
||||
class QImage;
|
||||
|
||||
class QLedChar : public QLedMatrix
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QLedChar(int height, QWidget *parent, const QChar &letter);
|
||||
~QLedChar();
|
||||
|
||||
QChar letter() const;
|
||||
void setLetter(const QChar &letter);
|
||||
|
||||
QColor bgColor() const;
|
||||
void setBgColor(const QColor &bgColor);
|
||||
|
||||
QColor color() const;
|
||||
void setColor(const QColor &color);
|
||||
|
||||
bool isTransparent() const;
|
||||
void setTransparent(bool isTransparent);
|
||||
|
||||
bool letterVisible() const;
|
||||
void setLetterVisible(bool visible = true);
|
||||
|
||||
int charHeight() const;
|
||||
void setCharHeight(int height);
|
||||
|
||||
QSize charSize() const;
|
||||
|
||||
QImage image() const;
|
||||
void setImage(const QImage &image);
|
||||
|
||||
public slots:
|
||||
void onFlashTimerTimeout();
|
||||
void drawImage();
|
||||
|
||||
private:
|
||||
void init();
|
||||
int findPtHeight(int height);
|
||||
|
||||
int m_ptHeight;
|
||||
QFont m_font;
|
||||
QColor m_color;
|
||||
QColor m_bgColor;
|
||||
QImage m_image;
|
||||
QSize m_size;
|
||||
QChar m_letter;
|
||||
bool m_isTransparent;
|
||||
bool m_isLetterVisible;
|
||||
};
|
||||
Reference in new issue
Block a user