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 )
{
abort = false;
fatNames = false;
itemToExtract = NULL;
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" ) );
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()

View File

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

View File

@ -456,3 +456,8 @@ void NandWindow::on_actionBoot2_triggered()
Boot2InfoDialog d( this, b, boot1 );
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();
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_actionShow_Usage_triggered();
void on_actionOpen_Nand_triggered();

View File

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>NandWindow</string>
<string>NAND Extract</string>
</property>
<widget class="QWidget" name="centralWidget">
<layout class="QVBoxLayout" name="verticalLayout">
@ -126,6 +126,7 @@
</property>
<addaction name="actionShow_Usage"/>
<addaction name="actionBoot2"/>
<addaction name="actionFix_Names_For_FAT"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuInfo"/>
@ -169,6 +170,14 @@
<string>Ctrl+B</string>
</property>
</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>
<layoutdefault spacing="6" margin="11"/>
<resources/>