Debian Codegraph @

HercStudio/MainPanelModern.h

raw symbols SCIP
1 /*
2 * File: MainPanelModern.h
3 *
4 * Author: Jacob Dekel
5 * Created on: Oct 28, 2010
6 *
7 * Copyright (c) 2009-2013 Jacob Dekel
8 * $Id: MainPanel.h 67 2010-09-13 14:06:31Z dekeljacob $
9 *
10 * This object presents the main panel in "modern" mode
11 *
12 * This program is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation, either version 3 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 *
25 */
26
27 #ifndef MAINPANELMODERN_H_
28 #define MAINPANELMODERN_H_
29
30 #include "MainPanel.h"
31 #include "StatusUpdateCollector.h"
32 #include "Mips.h"
33
34 #include <QtWidgets/QWidget>
35 #include "ui_Devices.h"
36 #include <QToolButton>
37 #include <QLCDNumber>
38 #include <QMouseEvent>
39
40 class MainPanelModern : public MainPanel
41 {
42 Q_OBJECT
43
44 public:
45 MainPanelModern(QWidget *parent = 0);
46 virtual ~MainPanelModern();
47 void standby();
48 void setDormant();
49 bool notify(const QByteArray& statusLine);
50 void switchMips();
51 bool isStopped() const { return mStopped; };
52 virtual void updateLcd(QLCDNumber * , int ){} // null function in this context
53 virtual void animate();
54
55 protected:
56 virtual void resizeEvent(QResizeEvent * event);
57 virtual QSize sizeHint() const;
58 virtual void setupUi(QWidget * parent);
59 virtual QAbstractButton * powerOnButton() { return mPowerOnButton; };
60 virtual QAbstractButton * powerOffButton() { return mPowerOffButton; };
61 virtual QAbstractButton* interruptButton() {return mInterruptButton;};
62 virtual QAbstractButton* stopButton() {return mStopButton;};
63 virtual QAbstractButton* loadButton() {return mLoadButton;};
64
65 void setButton(QToolButton*& button, QString text, QIcon icon);
66
67 private slots:
68 void stopClickedSlot();
69
70 private:
71
72 template<class T> void animateOne(int x, int y, T* button, int step);
73
74 QToolButton *mPowerOnButton;
75 QToolButton *mPowerOffButton;
76 QToolButton *mInterruptButton;
77 QToolButton *mStopButton;
78 QToolButton *mLoadButton;
79
80 QLabel *mPSW;
81
82 Mips *mMips;
83 };
84
85 #endif /* MAINPANELMODERN_H_ */