00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
#ifndef QWT_PUSH_BUTTON_H
00011
#define QWT_PUSH_BUTTON_H
00012
00013
#include <qpushbutton.h>
00014
#include "qwt_global.h"
00015
00024 class QWT_EXPORT QwtPushButton:
public QPushButton
00025 {
00026 Q_OBJECT
00027
00028 Q_PROPERTY(TextFormat textFormat READ textFormat WRITE setTextFormat)
00029 Q_PROPERTY(Alignment alignment READ alignment WRITE setAlignment)
00030 Q_PROPERTY(
int indent READ indent WRITE setIndent)
00031
00032
public:
00033 QwtPushButton(QWidget * = NULL,
const char * name = NULL);
00034 QwtPushButton(
const QString &text,
00035 QWidget * = NULL,
const char *name = NULL);
00036 QwtPushButton(
const QIconSet &,
const QString &,
00037 QWidget * = NULL,
const char *name = NULL);
00038
00039
00040
00041 TextFormat textFormat()
const;
00042
void setTextFormat(TextFormat);
00043
00044
virtual Qt::TextFormat usedTextFormat()
const;
00045
00046
int alignment()
const;
00047
virtual void setAlignment(
int alignment);
00048
00049
void setIndent(
int);
00050
int indent()
const;
00051
00052
virtual QSize sizeHint()
const;
00053
virtual int heightForWidth(
int)
const;
00054
00055
protected:
00056
virtual void drawButtonLabel(QPainter *);
00057
00058
private:
00059
void init();
00060
00061 Qt::TextFormat d_textFormat;
00062
int d_alignment;
00063
int d_indent;
00064 };
00065
00066
#endif