-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhexfilesmenager.h
67 lines (50 loc) · 1.56 KB
/
hexfilesmenager.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef HEXFILESMENAGER_H
#define HEXFILESMENAGER_H
#include <QObject>
#include <QTabWidget>
#include <QFileInfo>
#include "hexeditorwidget.h"
#include "memorypagerinterface.h"
#include "intelHexProvider/intelhexprovider.h"
#include "motorolaSRecordProvider/motorolasrecordprovider.h"
class HexFilesMenager : public QObject,public MemoryPagerInterface
{
Q_OBJECT
public:
explicit HexFilesMenager(QObject *parent = 0);
void addPage(QByteArray arr,QString text);
void setCurrentPage(QByteArray * arr);
QByteArray getCurrentPage();
void deleteCurrentPage();
bool loadFromBinary(QString fileName);
bool saveToBinary(QString fileName);
bool loadFromHex(QString fileName);
bool saveToHex(QString fileName);
bool loadFromMot(QString fileName);
bool saveToMot(QString fileName);
void setTabWidget(QTabWidget * atw);
void setInfoLine(QLabel * il);
int pageCount();
QString currentPageName();
private:
QTabWidget * tw;
QLabel * infoline;
signals:
void saveCurrentFile();
void enableFilePrcessing(bool);
void sig_addPage(QByteArray arr,QString text);
void sig_setCurrentPage(QByteArray * arr);
void sig_deleteCurrentPage();
public slots:
void lockEditor();
void unLockEditor();
bool currentTabCloseRequested();
bool tabCloseRequested(int i);
bool allTabCloseRequested();
void on_addPage(QByteArray arr,QString text);
void on_setCurrentPage(QByteArray * arr);
void on_deleteCurrentPage();
void on_dataChanged();
void on_dataSaved();
};
#endif // HEXFILESMENAGER_H