git-svn-id: http://wiiqt.googlecode.com/svn/trunk@75 389f4c8b-5dfe-645f-db0e-df882bc27289

This commit is contained in:
giantpune@gmail.com 2011-03-24 08:57:59 +00:00
parent 45ab760616
commit bb4f9e1653
5 changed files with 31 additions and 3 deletions

View File

@ -3,6 +3,7 @@
NandThread::NandThread( QObject *parent ) : QThread( parent ) NandThread::NandThread( QObject *parent ) : QThread( parent )
{ {
abort = false; abort = false;
fatNames = false;
itemToExtract = NULL; itemToExtract = NULL;
connect( &nandBin, SIGNAL( SendError( QString ) ), this, SLOT( GetError( QString ) ) ); connect( &nandBin, SIGNAL( SendError( QString ) ), this, SLOT( GetError( QString ) ) );
@ -40,7 +41,16 @@ bool NandThread::SetPath( const QString &path )
emit SendError( tr( "Wait till the current job is done" ) ); emit SendError( tr( "Wait till the current job is done" ) );
return false; return false;
} }
return nandBin.SetPath( path ); if( !nandBin.SetPath( path ) )
return false;
nandBin.SetFixNamesForFAT( fatNames );
return true;
}
void NandThread::SetFixNamesForFat( bool fix )
{
nandBin.SetFixNamesForFAT( fix );
} }
const Blocks0to7 NandThread::BootBlocks() const Blocks0to7 NandThread::BootBlocks()

View File

@ -34,6 +34,8 @@ public:
const QList<Boot2Info> Boot2Infos(); const QList<Boot2Info> Boot2Infos();
quint8 Boot1Version(); quint8 Boot1Version();
void SetFixNamesForFat( bool fix = true );
protected: protected:
void run(); void run();
@ -56,6 +58,7 @@ private:
quint32 idx; quint32 idx;
bool abort; bool abort;
bool fatNames;
//count the number of files in a given folder //count the number of files in a given folder
quint32 FileCount( QTreeWidgetItem *item ); quint32 FileCount( QTreeWidgetItem *item );

View File

@ -456,3 +456,8 @@ void NandWindow::on_actionBoot2_triggered()
Boot2InfoDialog d( this, b, boot1 ); Boot2InfoDialog d( this, b, boot1 );
d.exec(); d.exec();
} }
void NandWindow::on_actionFix_Names_For_FAT_triggered( bool checked )
{
nThread.SetFixNamesForFat( checked );
}

View File

@ -48,7 +48,8 @@ public slots:
void ThreadIsDone(); void ThreadIsDone();
private slots: private slots:
void on_actionBoot2_triggered(); void on_actionFix_Names_For_FAT_triggered(bool checked);
void on_actionBoot2_triggered();
void on_treeWidget_currentItemChanged(QTreeWidgetItem* current, QTreeWidgetItem* previous); void on_treeWidget_currentItemChanged(QTreeWidgetItem* current, QTreeWidgetItem* previous);
void on_actionShow_Usage_triggered(); void on_actionShow_Usage_triggered();
void on_actionOpen_Nand_triggered(); void on_actionOpen_Nand_triggered();

View File

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>NandWindow</string> <string>NAND Extract</string>
</property> </property>
<widget class="QWidget" name="centralWidget"> <widget class="QWidget" name="centralWidget">
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
@ -126,6 +126,7 @@
</property> </property>
<addaction name="actionShow_Usage"/> <addaction name="actionShow_Usage"/>
<addaction name="actionBoot2"/> <addaction name="actionBoot2"/>
<addaction name="actionFix_Names_For_FAT"/>
</widget> </widget>
<addaction name="menuFile"/> <addaction name="menuFile"/>
<addaction name="menuInfo"/> <addaction name="menuInfo"/>
@ -169,6 +170,14 @@
<string>Ctrl+B</string> <string>Ctrl+B</string>
</property> </property>
</action> </action>
<action name="actionFix_Names_For_FAT">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Fix Names For FAT</string>
</property>
</action>
</widget> </widget>
<layoutdefault spacing="6" margin="11"/> <layoutdefault spacing="6" margin="11"/>
<resources/> <resources/>