forked from donaloconnor/automon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
menuitem.h
49 lines (41 loc) · 2.14 KB
/
menuitem.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef MENUITEM_H
#define MENUITEM_H
/*
==================================================================================================
| menuitem.h |
| Part of the Automon application. |
| |
| Final Year Project - "An Embedded Automotive Monitoring Device" |
| |
| By Donal O' Connor for completion of B.Sc (Hons) Software Development and Computer Networking |
| Email: [email protected] |
| Website/Blog: http://automon.killarneyonline.eu |
| |
| Cork Institute of Technology, Cork, Ireland - http://www.cit.ie/ |
| |
| Copyright © 2009 Donal O'Connor <[email protected]> |
==================================================================================================
This is a class that inherits from QPushButton. It forms the button that is screen in the menu widget
on top of the Automon screen.
*/
#include <QPushButton>
#include <QIcon>
#include <QWidget>
#include <QString>
class MenuItem : public QPushButton
{
Q_OBJECT
public:
MenuItem(const QIcon & icon, const QString & name, const QSize & size, QWidget *parent = 0);
~MenuItem();
void setPanelIndex(int index);
QString getName();
signals:
void displayPanel(int stackedWidgetIndex); /* Signal that is used in the AutomonApp to change the widget shown */
public slots:
void changePanel();
private:
QString m_name;
int m_stackedWidgetIndex;
};
#endif // MENUITEM_H