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 
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     // The second technology preview release of Qt-4 needs Qt::TextFormat
00040     // but moc accepts only TextFormat
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

Generated on Sun Nov 21 11:12:44 2004 for Qwt User's Guide by doxygen 1.3.5