2010-12-08 08:26:18 +01:00
|
|
|
#ifndef MAINWINDOW_H
|
|
|
|
#define MAINWINDOW_H
|
|
|
|
|
|
|
|
#include "saveloadthread.h"
|
|
|
|
#include "savelistitem.h"
|
2011-01-02 07:15:26 +01:00
|
|
|
#include "../WiiQt/savebanner.h"
|
|
|
|
#include "../WiiQt/includes.h"
|
2010-12-08 08:26:18 +01:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class MainWindow;
|
|
|
|
}
|
|
|
|
|
|
|
|
class MainWindow : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit MainWindow(QWidget *parent = 0);
|
|
|
|
~MainWindow();
|
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::MainWindow *ui;
|
|
|
|
QProgressBar progressBar;
|
|
|
|
void GetSavesFromSneek( const QString &path );
|
2011-01-02 07:15:26 +01:00
|
|
|
void GetSavesFromPC( const QString &path );
|
2010-12-08 08:26:18 +01:00
|
|
|
|
|
|
|
SaveLoadThread bannerthread;
|
|
|
|
|
2011-01-02 07:15:26 +01:00
|
|
|
int currentSneekIcon;
|
|
|
|
QTimer sneekIconTimer;
|
|
|
|
QList<QPixmap>sneekIcon;
|
|
|
|
|
|
|
|
int currentPcIcon;
|
|
|
|
QTimer pcIconTimer;
|
|
|
|
QList<QPixmap>pcIcon;
|
|
|
|
quint32 currentPcSave;
|
|
|
|
|
|
|
|
//basepath used for local save backups
|
|
|
|
QString pcPath;
|
|
|
|
|
|
|
|
//get available filename for backup save inside pcPath
|
|
|
|
QString GetSaveName( quint64 tid );
|
|
|
|
|
|
|
|
//variables used for creating the data.bins on extraction
|
|
|
|
quint32 ngID;
|
|
|
|
quint32 ngKeyID;
|
|
|
|
QByteArray ngSig;
|
|
|
|
QByteArray ngMac;
|
|
|
|
QByteArray ngPriv;
|
|
|
|
|
|
|
|
//for remembering PC saves' TID and the descriptions of each save
|
|
|
|
QList< PcSaveInfo > pcInfos;
|
|
|
|
|
|
|
|
bool NG_Ok();
|
|
|
|
|
|
|
|
bool WriteZipFile( const QByteArray &dataBin, const QByteArray &desc, const QString &path );
|
|
|
|
void AddNewPCSave( const QString &desc, const QString &tid, quint32 size, const QString &path, SaveBanner banner );
|
2010-12-08 08:26:18 +01:00
|
|
|
|
2011-01-02 09:18:00 +01:00
|
|
|
//clear the data on teh right of the screen
|
|
|
|
void ClearSneekGuiInfo();
|
|
|
|
void ClearPcGuiInfo();
|
|
|
|
|
2010-12-08 08:26:18 +01:00
|
|
|
|
|
|
|
private slots:
|
2011-01-02 09:18:00 +01:00
|
|
|
void on_actionSet_Local_Path_triggered();
|
|
|
|
void on_pushButton_pcDelete_clicked();
|
2011-01-02 07:15:26 +01:00
|
|
|
void on_comboBox_pcSelect_currentIndexChanged(int index);
|
|
|
|
void on_listWidget_pcSaves_currentItemChanged(QListWidgetItem* current, QListWidgetItem* previous);
|
|
|
|
void on_actionSet_NG_Keys_triggered();
|
|
|
|
void on_pushButton_sneekExtract_clicked();
|
|
|
|
void on_pushButton_sneekDelete_clicked();
|
2010-12-08 08:26:18 +01:00
|
|
|
void on_actionSet_Sneek_Path_triggered();
|
2011-01-02 07:15:26 +01:00
|
|
|
void on_listWidget_sneekSaves_currentItemChanged( QListWidgetItem* current, QListWidgetItem* previous );
|
2010-12-08 08:26:18 +01:00
|
|
|
|
2011-01-02 07:15:26 +01:00
|
|
|
void ReceiveSneekBanner( QByteArray, const QString&, int );
|
|
|
|
void ReceivePcItem( PcSaveInfo );
|
2010-12-08 08:26:18 +01:00
|
|
|
void GetProgressUpdate( int );
|
|
|
|
void LoadThreadIsDone( int );
|
|
|
|
|
2011-01-02 07:15:26 +01:00
|
|
|
void ShowSneekSaveDetails( SaveListItem *item );
|
|
|
|
void ShowPCSaveDetails( SaveListItem *item );
|
|
|
|
void ShowNextSneekIcon();
|
|
|
|
void ShowNextPcIcon();
|
2010-12-08 08:26:18 +01:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MAINWINDOW_H
|