| 1 | /* |
| 2 | Copyright (C) 2014 Mario Stephan <[email protected]> |
| 3 | |
| 4 | This library is free software; you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as published |
| 6 | by the Free Software Foundation; either version 2.1 of the License, or |
| 7 | (at your option) any later version. |
| 8 | |
| 9 | This program is distributed in the hope that it will be useful, |
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | GNU General Public License for more details. |
| 13 | |
| 14 | You should have received a copy of the GNU Lesser General Public License |
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ |
| 17 | |
| 18 | #ifndef STACKDISPLAY_H |
| 19 | #define STACKDISPLAY_H |
| 20 | |
| 21 | #include <QWidget> |
| 22 | |
| 23 | class StackDisplay : public QWidget { |
| 24 | Q_OBJECT |
| 25 | public: |
| 26 | explicit StackDisplay(QWidget* parent = 0); |
| 27 | ~StackDisplay(); |
| 28 | |
| 29 | void setCount(int value); |
| 30 | void setSelected(int value); |
| 31 | void setMargin(int value); |
| 32 | void setBarColor(QColor color); |
| 33 | |
| 34 | signals: |
| 35 | |
| 36 | public slots: |
| 37 | |
| 38 | private: |
| 39 | void resizeEvent(QResizeEvent* e); |
| 40 | void paintEvent(QPaintEvent*); |
| 41 | void drawBars(); |
| 42 | class StackDisplayPrivate* p; |
| 43 | }; |
| 44 | |
| 45 | #endif // STACKDISPLAY_H |