hydrogen
1.2.3
PixmapWidget.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 PIXMAP_WIDGET_H
24
#define PIXMAP_WIDGET_H
25
26
#include <QtGui>
27
#include <QtWidgets>
28
29
#include <
core/Object.h
>
30
32
class
PixmapWidget
:
public
H2Core::Object
<PixmapWidget>,
public
QWidget
33
{
34
H2_OBJECT
(
PixmapWidget
)
35
public
:
36
PixmapWidget
( QWidget *pParent );
37
~PixmapWidget
();
38
39
void
setPixmap
( QString sPixmapPath,
bool
expand_horiz =
false
);
40
void
setColor
(
const
QColor& color );
41
42
protected
:
43
QString
m_sPixmapPath
;
44
QColor
__color
;
45
QPixmap
m_pixmap
;
46
bool
__expand_horiz
;
47
48
virtual
void
paintEvent
( QPaintEvent* ev)
override
;
49
};
50
51
#endif
Object.h
H2_OBJECT
#define H2_OBJECT(name)
Definition
Object.h:224
H2Core::Object
Definition
Object.h:178
PixmapWidget
Definition
PixmapWidget.h:33
PixmapWidget::m_pixmap
QPixmap m_pixmap
Definition
PixmapWidget.h:45
PixmapWidget::m_sPixmapPath
QString m_sPixmapPath
Definition
PixmapWidget.h:43
PixmapWidget::~PixmapWidget
~PixmapWidget()
Definition
PixmapWidget.cpp:41
PixmapWidget::__expand_horiz
bool __expand_horiz
Definition
PixmapWidget.h:46
PixmapWidget::setColor
void setColor(const QColor &color)
Definition
PixmapWidget.cpp:48
PixmapWidget::__color
QColor __color
Definition
PixmapWidget.h:44
PixmapWidget::paintEvent
virtual void paintEvent(QPaintEvent *ev) override
Definition
PixmapWidget.cpp:78
PixmapWidget::setPixmap
void setPixmap(QString sPixmapPath, bool expand_horiz=false)
Definition
PixmapWidget.cpp:59
PixmapWidget::PixmapWidget
PixmapWidget(QWidget *pParent)
Definition
PixmapWidget.cpp:29
src
gui
src
Widgets
PixmapWidget.h
Generated by
1.10.0