File: dialognandsecurity.h

package info (click to toggle)
imsprog 1.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 17,984 kB
  • sloc: cpp: 8,301; ansic: 6,111; xml: 677; sh: 265; makefile: 5
file content (46 lines) | stat: -rw-r--r-- 1,097 bytes parent folder | download | duplicates (2)
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
#ifndef DIALOGNANDSECURITY_H
#define DIALOGNANDSECURITY_H
#include "qhexedit.h"
#include <QDialog>

namespace Ui {
class DialogNandSecurity;
}

class DialogNandSecurity : public QDialog
{
    Q_OBJECT

public:
    explicit DialogNandSecurity(QWidget *parent = nullptr);
    void setAlgorithm(unsigned int currentAlg);
    void setSectorSize(uint32_t sectorSize);
    void setPath(QString lastPath);
    void closeEvent(QCloseEvent* event);
    ~DialogNandSecurity();

private slots:
    void on_toolButton_read_clicked();
    void on_toolButton_write_clicked();
    void on_toolButton_open_clicked();
    void on_toolButton_save_clicked();

signals:
    void closeRequestHasArrived();

private:
    Ui::DialogNandSecurity *ui;
    QString curPath;
    uint32_t currentSector;
    uint8_t startSector, endSector;
    QByteArray regData;
    QHexEdit *hexEdit;
    struct algSettings
    {
        uint8_t id;          // Algorithm number
        uint8_t  secStart;  // Start security sector number
        uint8_t  secEnd;    // End security sector number
    };
};

#endif // DIALOGNANDSECURITY_H