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
00021 class QWT_EXPORT QwtPushButton: public QPushButton
00022 {
00023 Q_OBJECT
00024
00025 Q_PROPERTY(TextFormat textFormat READ textFormat WRITE setTextFormat)
00026 Q_PROPERTY(Alignment alignment READ alignment WRITE setAlignment)
00027 Q_PROPERTY(int indent READ indent WRITE setIndent)
00028
00029 public:
00030 QwtPushButton(QWidget * = NULL, const char * name = NULL);
00031 QwtPushButton(const QString &text,
00032 QWidget * = NULL, const char *name = NULL);
00033 QwtPushButton(const QIconSet &, const QString &,
00034 QWidget * = NULL, const char *name = NULL);
00035
00036 Qt::TextFormat textFormat() const;
00037 void setTextFormat(Qt::TextFormat);
00038
00039 virtual Qt::TextFormat usedTextFormat() const;
00040
00041 int alignment() const;
00042 virtual void setAlignment(int alignment);
00043
00044 void setIndent(int);
00045 int indent() const;
00046
00047 virtual QSize sizeHint() const;
00048 virtual int heightForWidth(int) const;
00049
00050 protected:
00051 virtual void drawButtonLabel(QPainter *);
00052
00053 private:
00054 void init();
00055
00056 Qt::TextFormat d_textFormat;
00057 int d_alignment;
00058 int d_indent;
00059 };
00060
00061 #endif