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 MAINWINDOW_H
|
|
|
|
#define MAINWINDOW_H
|
|
|
|
|
|
|
|
#include <QMainWindow>
|
2015-08-19 21:58:24 +02:00
|
|
|
#include <QFile>
|
2015-03-05 20:35:35 +01:00
|
|
|
#include "rplthread.h"
|
|
|
|
namespace Ui {
|
|
|
|
class MainWindow;
|
|
|
|
}
|
|
|
|
|
|
|
|
class MainWindow : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
QTimer *screentmr,*maintmr;
|
2015-08-24 20:05:37 +02:00
|
|
|
QString currentfile;
|
2015-03-05 20:35:35 +01:00
|
|
|
RPLThread rpl;
|
2015-08-19 21:58:24 +02:00
|
|
|
|
2015-03-05 20:35:35 +01:00
|
|
|
public:
|
2015-08-19 21:58:24 +02:00
|
|
|
QFile *fileptr;
|
|
|
|
|
|
|
|
static void WriteWord(unsigned int word);
|
2015-08-24 06:13:11 +02:00
|
|
|
static unsigned int ReadWord();
|
2015-08-19 21:58:24 +02:00
|
|
|
|
2015-03-05 20:35:35 +01:00
|
|
|
explicit MainWindow(QWidget *parent = 0);
|
|
|
|
~MainWindow();
|
|
|
|
protected:
|
|
|
|
virtual void keyPressEvent(QKeyEvent *ev);
|
|
|
|
virtual void keyReleaseEvent(QKeyEvent *ev);
|
2015-08-18 16:02:33 +02:00
|
|
|
void closeEvent(QCloseEvent *event);
|
2015-03-05 20:35:35 +01:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void on_EmuScreen_destroyed();
|
2015-08-18 16:02:33 +02:00
|
|
|
void on_actionExit_triggered();
|
|
|
|
|
|
|
|
void on_actionSave_triggered();
|
|
|
|
|
2015-08-24 06:13:11 +02:00
|
|
|
void on_actionOpen_triggered();
|
|
|
|
|
2015-08-24 20:05:37 +02:00
|
|
|
void on_actionSaveAs_triggered();
|
|
|
|
|
|
|
|
void on_actionNew_triggered();
|
|
|
|
|
2016-07-11 20:13:57 +02:00
|
|
|
void on_actionInsert_SD_Card_Image_triggered();
|
|
|
|
|
|
|
|
void on_actionEject_SD_Card_Image_triggered();
|
|
|
|
|
2015-03-05 20:35:35 +01:00
|
|
|
public slots:
|
|
|
|
void domaintimer();
|
|
|
|
private:
|
|
|
|
Ui::MainWindow *ui;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MAINWINDOW_H
|