source: pacpusframework/branches/2.0-beta1/include/extlib/qwt-5.2.1/qwt_text_label.h@ 89

Last change on this file since 89 was 89, checked in by morasjul, 11 years ago

PACPUS 2.0 Beta deployed in new branch

Major changes:
-Add communication interface between components
-Add examples for communications interface (TestComponents)
-Move to Qt5 support

  • Property svn:executable set to *
File size: 1.8 KB
Line 
1/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
2 * Qwt Widget Library
3 * Copyright (C) 1997 Josef Wilgen
4 * Copyright (C) 2002 Uwe Rathmann
5 *
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 *****************************************************************************/
9
10#ifndef QWT_TEXT_LABEL_H
11#define QWT_TEXT_LABEL_H
12
13#include <qframe.h>
14#include "qwt_global.h"
15#include "qwt_text.h"
16
17class QString;
18class QPaintEvent;
19class QPainter;
20
21/*!
22 \brief A Widget which displays a QwtText
23*/
24
25class QWT_EXPORT QwtTextLabel : public QFrame
26{
27 Q_OBJECT
28
29 Q_PROPERTY( int indent READ indent WRITE setIndent )
30 Q_PROPERTY( int margin READ margin WRITE setMargin )
31
32public:
33 explicit QwtTextLabel(QWidget *parent = NULL);
34#if QT_VERSION < 0x040000
35 explicit QwtTextLabel(QWidget *parent, const char *name);
36#endif
37 explicit QwtTextLabel(const QwtText &, QWidget *parent = NULL);
38 virtual ~QwtTextLabel();
39
40public slots:
41 void setText(const QString &,
42 QwtText::TextFormat textFormat = QwtText::AutoText);
43 virtual void setText(const QwtText &);
44
45 void clear();
46
47public:
48 const QwtText &text() const;
49
50 int indent() const;
51 void setIndent(int);
52
53 int margin() const;
54 void setMargin(int);
55
56 virtual QSize sizeHint() const;
57 virtual QSize minimumSizeHint() const;
58 virtual int heightForWidth(int) const;
59
60 QRect textRect() const;
61
62protected:
63 virtual void paintEvent(QPaintEvent *e);
64 virtual void drawContents(QPainter *);
65 virtual void drawText(QPainter *, const QRect &);
66
67private:
68 void init();
69 int defaultIndent() const;
70
71 class PrivateData;
72 PrivateData *d_data;
73};
74
75#endif
Note: See TracBrowser for help on using the repository browser.