Tulip  4.6.0
Better Visualization Through Research
library/tulip-gui/include/tulip/ScrollPopupButton.h
00001 /*
00002  *
00003  * This file is part of Tulip (www.tulip-software.org)
00004  *
00005  * Authors: David Auber and the Tulip development Team
00006  * from LaBRI, University of Bordeaux
00007  *
00008  * Tulip is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation, either version 3
00011  * of the License, or (at your option) any later version.
00012  *
00013  * Tulip is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00016  * See the GNU General Public License for more details.
00017  *
00018  */
00019 ///@cond DOXYGEN_HIDDEN
00020 
00021 
00022 #ifndef SCROLLPOPUPBUTTON_H
00023 #define SCROLLPOPUPBUTTON_H
00024 
00025 #include <QPushButton>
00026 
00027 
00028 #include <tulip/tulipconf.h>
00029 
00030 class QSlider;
00031 
00032 class TLP_QT_SCOPE ScrollPopupButton : public QPushButton {
00033   Q_OBJECT
00034   Q_PROPERTY(int value READ value WRITE setValue)
00035   Q_PROPERTY(int minimum READ minimum WRITE setMinimum)
00036   Q_PROPERTY(int maximum READ maximum WRITE setMaximum)
00037 
00038   QSlider* _slider;
00039 
00040 public:
00041   explicit ScrollPopupButton(QWidget *parent = 0);
00042   int value() const;
00043   int maximum() const;
00044   int minimum() const;
00045 
00046 public slots:
00047   virtual void showPopup();
00048   virtual void hidePopup();
00049   void setPopupVisible(bool);
00050   void setValue(int);
00051   void setMinimum(int);
00052   void setMaximum(int);
00053 
00054 signals:
00055   void valueChanged(int);
00056 
00057 protected:
00058   bool eventFilter(QObject *, QEvent *);
00059 };
00060 
00061 #endif // SCROLLPOPUPBUTTON_H
00062 ///@endcond
 All Classes Files Functions Variables Enumerations Enumerator Properties