QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
qgspixmaplabel.h
Go to the documentation of this file.
1
/***************************************************************************
2
3
----------------------------------------------------
4
date : 7.9.2015
5
copyright : (C) 2015 by Matthias Kuhn
6
email : matthias (at) opengis.ch
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSPIXMAPLABEL_H
17
#define QGSPIXMAPLABEL_H
18
19
#include "qgis_gui.h"
20
#include "
qgis_sip.h
"
21
22
#include <QLabel>
23
29
class
GUI_EXPORT
QgsPixmapLabel
:
public
QLabel
30
{
31
Q_OBJECT
32
33
public
:
35
explicit
QgsPixmapLabel
( QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
);
36
43
int
heightForWidth
(
int
width )
const override
;
44
50
QSize
sizeHint
()
const override
;
51
52
public
slots:
53
54
void
setPixmap
(
const
QPixmap & );
55
void
resizeEvent
( QResizeEvent * )
override
;
56
58
void
clear
();
59
60
private
:
61
static
const
int
PIXMAP_MINIMUM_HEIGHT = 20;
62
63
QPixmap mPixmap;
64
};
65
66
#endif
// QGSPIXMAPLABEL_H
QgsPixmapLabel::clear
void clear()
Clears any label contents.
Definition
qgspixmaplabel.cpp:69
QgsPixmapLabel::heightForWidth
int heightForWidth(int width) const override
Calculates the height for the given width.
Definition
qgspixmaplabel.cpp:42
QgsPixmapLabel::sizeHint
QSize sizeHint() const override
An optimal size for the widget.
Definition
qgspixmaplabel.cpp:50
QgsPixmapLabel::resizeEvent
void resizeEvent(QResizeEvent *) override
Definition
qgspixmaplabel.cpp:59
QgsPixmapLabel::setPixmap
void setPixmap(const QPixmap &)
Definition
qgspixmaplabel.cpp:24
QgsPixmapLabel::QgsPixmapLabel
QgsPixmapLabel(QWidget *parent=nullptr)
Constructor for QgsPixmapLabel.
Definition
qgspixmaplabel.cpp:20
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
Generated on
for QGIS API Documentation by
1.17.0