1
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
3
* Copyright (C) 1997 Josef Wilgen
4
* Copyright (C) 2002 Uwe Rathmann
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the Qwt License, Version 1.0
8
*****************************************************************************/
10
#ifndef QWT_TEXT_LABEL_H
11
#define QWT_TEXT_LABEL_H
14
#include "qwt_global.h"
22
\brief A Widget which displays a QwtText
25
class QWT_EXPORT QwtTextLabel : public QFrame
29
Q_PROPERTY( int indent READ indent WRITE setIndent )
30
Q_PROPERTY( int margin READ margin WRITE setMargin )
33
explicit QwtTextLabel(QWidget *parent = NULL);
34
#if QT_VERSION < 0x040000
35
explicit QwtTextLabel(QWidget *parent, const char *name);
37
explicit QwtTextLabel(const QwtText &, QWidget *parent = NULL);
38
virtual ~QwtTextLabel();
41
void setText(const QString &,
42
QwtText::TextFormat textFormat = QwtText::AutoText);
43
virtual void setText(const QwtText &);
48
const QwtText &text() const;
56
virtual QSize sizeHint() const;
57
virtual QSize minimumSizeHint() const;
58
virtual int heightForWidth(int) const;
60
QRect textRect() const;
63
virtual void paintEvent(QPaintEvent *e);
64
virtual void drawContents(QPainter *);
65
virtual void drawText(QPainter *, const QRect &);
69
int defaultIndent() const;