Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

qwt_push_button.h

00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
00002  * Qwt Widget Library
00003  * Copyright (C) 1997   Josef Wilgen
00004  * Copyright (C) 2002   Uwe Rathmann
00005  * 
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the Qwt License, Version 1.0
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

Generated on Sun Sep 26 23:24:37 2004 for Qwt User's Guide by doxygen 1.3.6