Qwt User's Guide: qwt_arrow_button.h Source File

Qwt User's Guide 6.0.1

- 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 "qwt_global.h"
    00014 #include <qpushbutton.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     virtual void paintEvent( QPaintEvent *event );
    00037
    00038     virtual void drawButtonLabel( QPainter *p );
    00039     virtual void drawArrow( QPainter *,
    00040         const QRect &, Qt::ArrowType ) const;
    00041     virtual QRect labelRect() const;
    00042     virtual QSize arrowSize( Qt::ArrowType,
    00043         const QSize &boundingSize ) const;
    00044
    00045     virtual void keyPressEvent( QKeyEvent * );
    00046
    00047 private:
    00048     class PrivateData;
    00049     PrivateData *d_data;
    00050 };
    00051
    00052 #endif