mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-27 13:34:33 -04:00
Version 0.12.0
- bug with wrong file tail creation solved - "Replace" and "Replace body" actions added - "Change compression" menu and actions removed, will be returned later - minor refactoring and bugfixes done
This commit is contained in:
parent
5e1b476c86
commit
862fc6b242
12 changed files with 652 additions and 439 deletions
32
treeitem.cpp
32
treeitem.cpp
|
@ -172,12 +172,16 @@ QVariant TreeItem::data(int column) const
|
|||
case 0: //Name
|
||||
return itemName;
|
||||
case 1: //Action
|
||||
if (itemAction == TreeItem::Modify)
|
||||
return "M";
|
||||
if (itemAction == TreeItem::Create)
|
||||
return QObject::tr("Create");
|
||||
if (itemAction == TreeItem::Insert)
|
||||
return QObject::tr("Insert");
|
||||
if (itemAction == TreeItem::Replace)
|
||||
return QObject::tr("Replace");
|
||||
if (itemAction == TreeItem::Remove)
|
||||
return "X";
|
||||
return QObject::tr("Remove");
|
||||
if (itemAction == TreeItem::Rebuild)
|
||||
return "R";
|
||||
return QObject::tr("Rebuild");
|
||||
return QVariant();
|
||||
case 2: //Type
|
||||
return itemTypeName;
|
||||
|
@ -220,11 +224,6 @@ QString TreeItem::info() const
|
|||
return itemInfo;
|
||||
}
|
||||
|
||||
void TreeItem::setInfo(const QString &text)
|
||||
{
|
||||
itemInfo = text;
|
||||
}
|
||||
|
||||
int TreeItem::row() const
|
||||
{
|
||||
if (parentItem)
|
||||
|
@ -287,12 +286,13 @@ void TreeItem::setAction(const UINT8 action)
|
|||
{
|
||||
itemAction = action;
|
||||
|
||||
// Set rebuild action for parent
|
||||
if (parentItem)
|
||||
parentItem->setAction(TreeItem::Rebuild);
|
||||
// On insert action, set insert action for children
|
||||
if (action == TreeItem::Insert)
|
||||
for(int i = 0; i < childCount(); i++)
|
||||
child(i)->setAction(TreeItem::Insert);
|
||||
|
||||
// Set rebuild action for parent, if it has no action now
|
||||
if (parentItem && parentItem->type() != TreeItem::Root && parentItem->action() == TreeItem::NoAction)
|
||||
parentItem->setAction(TreeItem::Rebuild);
|
||||
}
|
||||
|
||||
void TreeItem::setCompression(const UINT8 algorithm)
|
||||
{
|
||||
itemCompression = algorithm;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue