2010-12-08 08:26:18 +01:00
|
|
|
#ifndef NANDWINDOW_H
|
|
|
|
#define NANDWINDOW_H
|
|
|
|
|
2010-12-11 11:12:50 +01:00
|
|
|
#include "../WiiQt/includes.h"
|
|
|
|
#include "nandthread.h"
|
2010-12-08 08:26:18 +01:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class NandWindow;
|
|
|
|
}
|
|
|
|
|
|
|
|
class NandWindow : public QMainWindow {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
NandWindow(QWidget *parent = 0);
|
|
|
|
~NandWindow();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void changeEvent(QEvent *e);
|
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::NandWindow *ui;
|
|
|
|
|
2010-12-11 11:12:50 +01:00
|
|
|
NandThread nThread;
|
|
|
|
|
2010-12-12 12:48:51 +01:00
|
|
|
void SetUpBlockMap();
|
|
|
|
|
2010-12-11 11:12:50 +01:00
|
|
|
//changes the blocks in the blockmap with different colors
|
|
|
|
void DrawBlockMap( QList<quint16> newFile = QList<quint16>() );
|
2010-12-12 12:48:51 +01:00
|
|
|
QGraphicsScene gv; //scene to hold the blockmap images
|
|
|
|
QGraphicsPixmapItem *pmi[ 0x1000 ]; //pointers to all the blocks in the display
|
|
|
|
|
|
|
|
QGraphicsTextItem *nandSize; //pointers to the items to show info under the blockmap
|
|
|
|
QGraphicsTextItem *fileSize;
|
2010-12-11 11:12:50 +01:00
|
|
|
|
2010-12-12 12:48:51 +01:00
|
|
|
QList<quint16> blocks; //hold a list of what the blocks in the nand are used for
|
2010-12-11 11:12:50 +01:00
|
|
|
void GetBlocksfromNand();
|
|
|
|
|
|
|
|
QList<quint16> ToBlocks( QList<quint16> clusters );
|
|
|
|
|
2011-01-08 20:14:47 +01:00
|
|
|
void SaveSettings();
|
|
|
|
void LoadSettings();
|
|
|
|
|
2010-12-08 08:26:18 +01:00
|
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void GetError( QString );
|
|
|
|
void GetStatusUpdate( QString );
|
2010-12-11 11:12:50 +01:00
|
|
|
void ThreadIsDone();
|
2010-12-08 08:26:18 +01:00
|
|
|
|
|
|
|
private slots:
|
2011-03-24 09:57:59 +01:00
|
|
|
void on_actionFix_Names_For_FAT_triggered(bool checked);
|
|
|
|
void on_actionBoot2_triggered();
|
2010-12-11 11:12:50 +01:00
|
|
|
void on_treeWidget_currentItemChanged(QTreeWidgetItem* current, QTreeWidgetItem* previous);
|
|
|
|
void on_actionShow_Usage_triggered();
|
2010-12-08 08:26:18 +01:00
|
|
|
void on_actionOpen_Nand_triggered();
|
|
|
|
void on_treeWidget_customContextMenuRequested(QPoint pos);
|
2010-12-12 12:48:51 +01:00
|
|
|
//void ScaleBlockMap();
|
|
|
|
|
|
|
|
protected:
|
2011-01-02 07:15:26 +01:00
|
|
|
//void resizeEvent( QResizeEvent* event );
|
2010-12-08 08:26:18 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // NANDWINDOW_H
|