1
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
3
* Copyright (C) 1997 Josef Wilgen
4
* Copyright (C) 2002 Uwe Rathmann
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the Qwt License, Version 1.0
8
*****************************************************************************/
10
#ifndef QWT_ARROW_BUTTON_H
11
#define QWT_ARROW_BUTTON_H
13
#include <qpushbutton.h>
14
#include "qwt_global.h"
19
A push button with one or more filled triangles on its front.
20
An Arrow button can have 1 to 3 arrows in a row, pointing
21
up, down, left or right.
23
class QWT_EXPORT QwtArrowButton : public QPushButton
26
explicit QwtArrowButton (int num, Qt::ArrowType, QWidget *parent = NULL);
27
virtual ~QwtArrowButton();
29
Qt::ArrowType arrowType() const;
32
virtual QSize sizeHint() const;
33
virtual QSize minimumSizeHint() const;
36
#if QT_VERSION >= 0x040000
37
virtual void paintEvent(QPaintEvent *event);
40
virtual void drawButtonLabel(QPainter *p);
41
virtual void drawArrow(QPainter *,
42
const QRect &, Qt::ArrowType) const;
43
virtual QRect labelRect() const;
44
virtual QSize arrowSize(Qt::ArrowType,
45
const QSize &boundingSize) const;
47
virtual void keyPressEvent(QKeyEvent *);