qwt_legend_label.h
Go to the documentation of this file.
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_LEGEND_LABEL_H
00011 #define QWT_LEGEND_LABEL_H
00012 
00013 #include "qwt_global.h"
00014 #include "qwt_legend_data.h"
00015 #include "qwt_text.h"
00016 #include "qwt_text_label.h"
00017 #include <qpixmap.h>
00018 
00019 class QwtLegendData;
00020 
00024 class QWT_EXPORT QwtLegendLabel: public QwtTextLabel
00025 {
00026     Q_OBJECT
00027 public:
00028     explicit QwtLegendLabel( QWidget *parent = 0 );
00029     virtual ~QwtLegendLabel();
00030 
00031     void setData( const QwtLegendData & );
00032     const QwtLegendData &data() const;
00033 
00034     void setItemMode( QwtLegendData::Mode );
00035     QwtLegendData::Mode itemMode() const;
00036 
00037     void setSpacing( int spacing );
00038     int spacing() const;
00039 
00040     virtual void setText( const QwtText & );
00041 
00042     void setIcon( const QPixmap & );
00043     QPixmap icon() const;
00044 
00045     virtual QSize sizeHint() const;
00046 
00047     bool isChecked() const;
00048 
00049 public Q_SLOTS:
00050     void setChecked( bool on );
00051 
00052 Q_SIGNALS:
00054     void clicked();
00055 
00057     void pressed();
00058 
00060     void released();
00061 
00063     void checked( bool );
00064 
00065 protected:
00066     void setDown( bool );
00067     bool isDown() const;
00068 
00069     virtual void paintEvent( QPaintEvent * );
00070     virtual void mousePressEvent( QMouseEvent * );
00071     virtual void mouseReleaseEvent( QMouseEvent * );
00072     virtual void keyPressEvent( QKeyEvent * );
00073     virtual void keyReleaseEvent( QKeyEvent * );
00074 
00075 private:
00076     class PrivateData;
00077     PrivateData *d_data;
00078 };
00079 
00080 #endif 


plotjuggler
Author(s): Davide Faconti
autogenerated on Fri Sep 1 2017 02:41:56