Qwt User's Guide: qwt_arrow_button.h Source File

- Main Page
- Related Pages
- Classes
- Files

- File List

# qwt_arrow_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_ARROW_BUTTON_H
    00011 #define QWT_ARROW_BUTTON_H
    00012
    00013 #include <qpushbutton.h>
    00014 #include "qwt_global.h"
    00015
    00023 class QWT_EXPORT QwtArrowButton : public QPushButton
    00024 {
    00025 public:
    00026     explicit QwtArrowButton (int num, Qt::ArrowType, QWidget *parent = NULL);
    00027     virtual ~QwtArrowButton();
    00028
    00029     Qt::ArrowType arrowType() const;
    00030     int num() const;
    00031
    00032     virtual QSize sizeHint() const;
    00033     virtual QSize minimumSizeHint() const;
    00034
    00035 protected:
    00036 #if QT_VERSION >= 0x040000
    00037     virtual void paintEvent(QPaintEvent *event);
    00038 #endif
    00039
    00040     virtual void drawButtonLabel(QPainter *p);
    00041     virtual void drawArrow(QPainter *,
    00042         const QRect &, Qt::ArrowType) const;
    00043     virtual QRect labelRect() const;
    00044     virtual QSize arrowSize(Qt::ArrowType,
    00045         const QSize &boundingSize) const;
    00046
    00047     virtual void keyPressEvent(QKeyEvent *);
    00048
    00049 private:
    00050     class PrivateData;
    00051     PrivateData *d_data;
    00052 };
    00053
    00054 #endif