2015-08-28 14:34:26 +02:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2014-2015, Claudio Lapilli and the newRPL Team
|
|
|
|
* All rights reserved.
|
|
|
|
* This file is released under the 3-clause BSD license.
|
|
|
|
* See the file LICENSE.txt that shipped with this distribution.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2015-03-05 20:35:35 +01:00
|
|
|
#ifndef QEMUSCREEN_H
|
|
|
|
#define QEMUSCREEN_H
|
|
|
|
|
|
|
|
#include <QGraphicsView>
|
|
|
|
|
|
|
|
class QEmuScreen : public QGraphicsView
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
// SIZE OF THE SCREEN TO EMULATE
|
|
|
|
int screen_width;
|
|
|
|
int screen_height;
|
|
|
|
// MAIN COLORS, ALL GRAYS WILL BE INTERPOLATED
|
|
|
|
QColor BkgndColor;
|
|
|
|
QColor MainColor;
|
|
|
|
|
|
|
|
QColor Grays[16]; // ARRAY WITH ALL THE DIFFERENT GRAY LEVELS
|
|
|
|
QBrush GrayBrush[16];
|
2018-01-30 23:47:52 +01:00
|
|
|
QPen BkgndPen;
|
2015-03-05 20:35:35 +01:00
|
|
|
QPixmap annHourglass,annComms,annAlpha,annBattery,annLShift,annRShift;
|
|
|
|
|
|
|
|
|
|
|
|
QGraphicsScene scr;
|
|
|
|
|
|
|
|
QGraphicsRectItem **Pixels;
|
|
|
|
QGraphicsPixmapItem *Annunciators[6];
|
|
|
|
|
|
|
|
void setPixel(int offset,int color);
|
|
|
|
void setWord(int offset,unsigned int color);
|
|
|
|
void setMode(int _mode,unsigned int *_buffer);
|
|
|
|
explicit QEmuScreen(QWidget *parent = 0);
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void update();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // QSCREEN_H
|