1
0
Fork 0

Allow themes to customize the icons

Thanks to https://twitter.com/Trancestorm for the dark theme icons!
This commit is contained in:
Duncan Ogilvie 2022-07-10 03:28:26 +02:00
parent fae816cc3c
commit fdf8052d67
420 changed files with 1215 additions and 1187 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1,9 @@
[Icon Theme]
Name=Dark
Comment=Dark icon theme
Directories=icons
Inherits=Default
[icons]
Size=16
Type=Scalable

View File

@ -13,13 +13,13 @@ AbstractStdTable::AbstractStdTable(QWidget* parent) : AbstractTableView(parent)
Initialize();
// Set up copy menu
mCopyLine = makeShortcutAction(DIcon("copy_table_line.png"), tr("&Line"), SLOT(copyLineSlot()), "ActionCopy");
mCopyTable = makeShortcutAction(DIcon("copy_cropped_table.png"), tr("Cropped &Table"), SLOT(copyTableSlot()), "ActionCopyCroppedTable");
mCopyTableResize = makeShortcutAction(DIcon("copy_full_table.png"), tr("&Full Table"), SLOT(copyTableResizeSlot()), "ActionCopyTable");
mCopyLineToLog = makeShortcutAction(DIcon("copy_table_line.png"), tr("Line, To Log"), SLOT(copyLineToLogSlot()), "ActionCopyLineToLog");
mCopyTableToLog = makeShortcutAction(DIcon("copy_cropped_table.png"), tr("Cropped Table, To Log"), SLOT(copyTableToLogSlot()), "ActionCopyCroppedTableToLog");
mCopyTableResizeToLog = makeShortcutAction(DIcon("copy_full_table.png"), tr("Full Table, To Log"), SLOT(copyTableResizeToLogSlot()), "ActionCopyTableToLog");
mExportTableCSV = makeShortcutAction(DIcon("database-export.png"), tr("&Export Table"), SLOT(exportTableSlot()), "ActionExport");
mCopyLine = makeShortcutAction(DIcon("copy_table_line"), tr("&Line"), SLOT(copyLineSlot()), "ActionCopy");
mCopyTable = makeShortcutAction(DIcon("copy_cropped_table"), tr("Cropped &Table"), SLOT(copyTableSlot()), "ActionCopyCroppedTable");
mCopyTableResize = makeShortcutAction(DIcon("copy_full_table"), tr("&Full Table"), SLOT(copyTableResizeSlot()), "ActionCopyTable");
mCopyLineToLog = makeShortcutAction(DIcon("copy_table_line"), tr("Line, To Log"), SLOT(copyLineToLogSlot()), "ActionCopyLineToLog");
mCopyTableToLog = makeShortcutAction(DIcon("copy_cropped_table"), tr("Cropped Table, To Log"), SLOT(copyTableToLogSlot()), "ActionCopyCroppedTableToLog");
mCopyTableResizeToLog = makeShortcutAction(DIcon("copy_full_table"), tr("Full Table, To Log"), SLOT(copyTableResizeToLogSlot()), "ActionCopyTableToLog");
mExportTableCSV = makeShortcutAction(DIcon("database-export"), tr("&Export Table"), SLOT(exportTableSlot()), "ActionExport");
}
QString AbstractStdTable::paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h)
@ -901,7 +901,7 @@ void AbstractStdTable::setupCopyMenu(QMenu* copyMenu)
{
if(!getColumnCount())
return;
copyMenu->setIcon(DIcon("copy.png"));
copyMenu->setIcon(DIcon("copy"));
//Copy->Whole Line
copyMenu->addAction(mCopyLine);
//Copy->Cropped Table
@ -933,7 +933,7 @@ void AbstractStdTable::setupCopyColumnMenu(QMenu* copyMenu)
QString title = mCopyTitles.at(i);
if(!title.length()) //skip empty copy titles
continue;
QAction* mCopyAction = new QAction(DIcon("copy_item.png"), title, copyMenu);
QAction* mCopyAction = new QAction(DIcon("copy_item"), title, copyMenu);
mCopyAction->setObjectName(QString::number(i));
connect(mCopyAction, SIGNAL(triggered()), this, SLOT(copyEntrySlot()));
copyMenu->addAction(mCopyAction);
@ -977,7 +977,7 @@ void AbstractStdTable::setupCopyColumnMenu(MenuBuilder* copyMenu)
QString title = mCopyTitles.at(i);
if(!title.length()) //skip empty copy titles
continue;
QAction* action = new QAction(DIcon("copy_item.png"), title, menu);
QAction* action = new QAction(DIcon("copy_item"), title, menu);
action->setObjectName(QString::number(i));
connect(action, SIGNAL(triggered()), this, SLOT(copyEntrySlot()));
menu->addAction(action);

View File

@ -295,19 +295,19 @@ QString HexDump::makeCopyText()
void HexDump::setupCopyMenu()
{
// Copy -> Data
mCopySelection = new QAction(DIcon("copy_selection.png"), tr("&Selected lines"), this);
mCopySelection = new QAction(DIcon("copy_selection"), tr("&Selected lines"), this);
connect(mCopySelection, SIGNAL(triggered(bool)), this, SLOT(copySelectionSlot()));
mCopySelection->setShortcutContext(Qt::WidgetShortcut);
addAction(mCopySelection);
// Copy -> Address
mCopyAddress = new QAction(DIcon("copy_address.png"), tr("&Address"), this);
mCopyAddress = new QAction(DIcon("copy_address"), tr("&Address"), this);
connect(mCopyAddress, SIGNAL(triggered()), this, SLOT(copyAddressSlot()));
mCopyAddress->setShortcutContext(Qt::WidgetShortcut);
addAction(mCopyAddress);
// Copy -> RVA
mCopyRva = new QAction(DIcon("copy_address.png"), "&RVA", this);
mCopyRva = new QAction(DIcon("copy_address"), "&RVA", this);
connect(mCopyRva, SIGNAL(triggered()), this, SLOT(copyRvaSlot()));
mCopyRva->setShortcutContext(Qt::WidgetShortcut);
addAction(mCopyRva);

View File

@ -57,32 +57,32 @@ ReferenceView::ReferenceView(bool sourceView, QWidget* parent) : StdSearchListVi
void ReferenceView::setupContextMenu()
{
QIcon disassembler = DIcon(ArchValue("processor32.png", "processor64.png"));
QIcon disassembler = DIcon(ArchValue("processor32", "processor64"));
mFollowAddress = new QAction(disassembler, tr("&Follow in Disassembler"), this);
connect(mFollowAddress, SIGNAL(triggered()), this, SLOT(followAddress()));
mFollowDumpAddress = new QAction(DIcon("dump.png"), tr("Follow in &Dump"), this);
mFollowDumpAddress = new QAction(DIcon("dump"), tr("Follow in &Dump"), this);
connect(mFollowDumpAddress, SIGNAL(triggered()), this, SLOT(followDumpAddress()));
mFollowApiAddress = new QAction(tr("Follow &API Address"), this);
connect(mFollowApiAddress, SIGNAL(triggered()), this, SLOT(followApiAddress()));
mToggleBreakpoint = new QAction(DIcon("breakpoint_toggle.png"), tr("Toggle Breakpoint"), this);
mToggleBreakpoint = new QAction(DIcon("breakpoint_toggle"), tr("Toggle Breakpoint"), this);
mToggleBreakpoint->setShortcutContext(Qt::WidgetWithChildrenShortcut);
addAction(mToggleBreakpoint);
StdSearchListView::addAction(mToggleBreakpoint);
connect(mToggleBreakpoint, SIGNAL(triggered()), this, SLOT(toggleBreakpoint()));
mToggleBookmark = new QAction(DIcon("bookmark_toggle.png"), tr("Toggle Bookmark"), this);
mToggleBookmark = new QAction(DIcon("bookmark_toggle"), tr("Toggle Bookmark"), this);
mToggleBookmark->setShortcutContext(Qt::WidgetWithChildrenShortcut);
addAction(mToggleBookmark);
StdSearchListView::addAction(mToggleBookmark);
connect(mToggleBookmark, SIGNAL(triggered()), this, SLOT(toggleBookmark()));
mSetBreakpointOnAllCommands = new QAction(DIcon("breakpoint_seton_all_commands.png"), tr("Set breakpoint on all commands"), this);
mSetBreakpointOnAllCommands = new QAction(DIcon("breakpoint_seton_all_commands"), tr("Set breakpoint on all commands"), this);
connect(mSetBreakpointOnAllCommands, SIGNAL(triggered()), this, SLOT(setBreakpointOnAllCommands()));
mRemoveBreakpointOnAllCommands = new QAction(DIcon("breakpoint_remove_all_commands.png"), tr("Remove breakpoint on all commands"), this);
mRemoveBreakpointOnAllCommands = new QAction(DIcon("breakpoint_remove_all_commands"), tr("Remove breakpoint on all commands"), this);
connect(mRemoveBreakpointOnAllCommands, SIGNAL(triggered()), this, SLOT(removeBreakpointOnAllCommands()));
mSetBreakpointOnAllApiCalls = new QAction(tr("Set breakpoint on all api calls"), this);

View File

@ -99,7 +99,7 @@ SearchListView::SearchListView(QWidget* parent, AbstractSearchList* abstractSear
mSearchBox->setWindowTitle(parent->metaObject()->className());
// Setup search menu action
mSearchAction = new QAction(DIcon("find.png"), tr("Search..."), this);
mSearchAction = new QAction(DIcon("find"), tr("Search..."), this);
connect(mSearchAction, SIGNAL(triggered()), this, SLOT(searchSlot()));
// https://wiki.qt.io/Delay_action_to_wait_for_user_interaction
@ -300,7 +300,7 @@ void SearchListView::listContextMenu(const QPoint & pos)
wMenu.addSeparator();
wMenu.addAction(mSearchAction);
QMenu wCopyMenu(tr("&Copy"), this);
wCopyMenu.setIcon(DIcon("copy.png"));
wCopyMenu.setIcon(DIcon("copy"));
mCurList->setupCopyMenu(&wCopyMenu);
if(wCopyMenu.actions().length())
wMenu.addMenu(&wCopyMenu);

View File

@ -14,8 +14,8 @@
<string>About x64dbg</string>
</property>
<property name="windowIcon">
<iconset resource="../../resource.qrc">
<normaloff>:/icons/images/information.png</normaloff>:/icons/images/information.png</iconset>
<iconset theme="information" resource="../../resource.qrc">
<normaloff>:/Default/icons/information.png</normaloff>:/Default/icons/information.png</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
@ -51,7 +51,7 @@
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../resource.qrc">:/icons/images/bug.png</pixmap>
<pixmap resource="../../resource.qrc">:/Default/icons/bug.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
@ -477,7 +477,7 @@
<enum>Qt::RichText</enum>
</property>
<property name="pixmap">
<pixmap resource="../../resource.qrc">:/icons/images/donation_qr.png</pixmap>
<pixmap resource="../../resource.qrc">:/Default/icons/donation_qr.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>

View File

@ -14,8 +14,8 @@
<string>Appearance</string>
</property>
<property name="windowIcon">
<iconset resource="../../resource.qrc">
<normaloff>:/icons/images/color-swatches.png</normaloff>:/icons/images/color-swatches.png</iconset>
<iconset theme="color-swatches" resource="../../resource.qrc">
<normaloff>:/Default/icons/color-swatches.png</normaloff>:/Default/icons/color-swatches.png</iconset>
</property>
<property name="styleSheet">
<string notr="true"/>

View File

@ -14,8 +14,8 @@
<string>0</string>
</property>
<property name="windowIcon">
<iconset resource="../../resource.qrc">
<normaloff>:/icons/images/ui-combo-box-edit.png</normaloff>:/icons/images/ui-combo-box-edit.png</iconset>
<iconset theme="ui-combo-box-edit" resource="../../resource.qrc">
<normaloff>:/Default/icons/ui-combo-box-edit.png</normaloff>:/Default/icons/ui-combo-box-edit.png</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="bottomMargin">

View File

@ -14,12 +14,12 @@ AttachDialog::AttachDialog(QWidget* parent) : QDialog(parent), ui(new Ui::Attach
// Setup actions/shortcuts
//
// Enter key as shortcut for "Attach"
mAttachAction = new QAction(DIcon("attach.png"), tr("Attach"), this);
mAttachAction = new QAction(DIcon("attach"), tr("Attach"), this);
mAttachAction->setShortcut(QKeySequence("enter"));
connect(mAttachAction, SIGNAL(triggered()), this, SLOT(on_btnAttach_clicked()));
// F5 as shortcut to refresh view
mRefreshAction = new QAction(DIcon("arrow-restart.png"), tr("Refresh"), this);
mRefreshAction = new QAction(DIcon("arrow-restart"), tr("Refresh"), this);
mRefreshAction->setShortcut(ConfigShortcut("ActionRefresh"));
ui->btnRefresh->setText(tr("Refresh") + QString(" (%1)").arg(mRefreshAction->shortcut().toString()));
connect(mRefreshAction, SIGNAL(triggered()), this, SLOT(refresh()));
@ -100,7 +100,7 @@ retryFindWindow:
if(hWndFound == NULL)
{
QMessageBox retryDialog(QMessageBox::Critical, tr("Find Window"), tr("Cannot find window \"%1\". Retry?").arg(windowText), QMessageBox::Cancel | QMessageBox::Retry, this);
retryDialog.setWindowIcon(DIcon("compile-error.png"));
retryDialog.setWindowIcon(DIcon("compile-error"));
if(retryDialog.exec() == QMessageBox::Retry)
goto retryFindWindow;
}

View File

@ -14,8 +14,8 @@
<string>Attach</string>
</property>
<property name="windowIcon">
<iconset resource="../../resource.qrc">
<normaloff>:/icons/images/attach.png</normaloff>:/icons/images/attach.png</iconset>
<iconset theme="attach" resource="../../resource.qrc">
<normaloff>:/Default/icons/attach.png</normaloff>:/Default/icons/attach.png</iconset>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">

View File

@ -50,7 +50,7 @@ void BreakpointsView::setupContextMenu()
{
return isValidBp();
};
mMenuBuilder->addAction(makeAction(DIcon(ArchValue("processor32.png", "processor64.png")), tr("Follow breakpoint"), SLOT(followBreakpointSlot())), [this](QMenu*)
mMenuBuilder->addAction(makeAction(DIcon(ArchValue("processor32", "processor64")), tr("Follow breakpoint"), SLOT(followBreakpointSlot())), [this](QMenu*)
{
if(!isValidBp())
return false;
@ -58,26 +58,26 @@ void BreakpointsView::setupContextMenu()
return false;
return true;
});
mMenuBuilder->addAction(makeShortcutAction(DIcon("breakpoint_remove.png"), tr("&Remove"), SLOT(removeBreakpointSlot()), "ActionDeleteBreakpoint"), validBp);
QAction* enableDisableBreakpoint = makeShortcutAction(DIcon("breakpoint_disable.png"), tr("Disable"), SLOT(toggleBreakpointSlot()), "ActionEnableDisableBreakpoint");
mMenuBuilder->addAction(makeShortcutAction(DIcon("breakpoint_remove"), tr("&Remove"), SLOT(removeBreakpointSlot()), "ActionDeleteBreakpoint"), validBp);
QAction* enableDisableBreakpoint = makeShortcutAction(DIcon("breakpoint_disable"), tr("Disable"), SLOT(toggleBreakpointSlot()), "ActionEnableDisableBreakpoint");
mMenuBuilder->addAction(enableDisableBreakpoint, [this, enableDisableBreakpoint](QMenu*)
{
if(!isValidBp() || !selectedBp().active)
return false;
if(selectedBp().enabled)
{
enableDisableBreakpoint->setIcon(DIcon("breakpoint_disable.png"));
enableDisableBreakpoint->setIcon(DIcon("breakpoint_disable"));
enableDisableBreakpoint->setText(tr("Disable"));
}
else
{
enableDisableBreakpoint->setIcon(DIcon("breakpoint_enable.png"));
enableDisableBreakpoint->setIcon(DIcon("breakpoint_enable"));
enableDisableBreakpoint->setText(tr("Enable"));
}
return true;
});
mMenuBuilder->addAction(makeShortcutAction(DIcon("breakpoint_edit_alt.png"), tr("&Edit"), SLOT(editBreakpointSlot()), "ActionEditBreakpoint"), validBp);
mMenuBuilder->addAction(makeShortcutAction(DIcon("breakpoint_reset_hitcount.png"), tr("Reset hit count"), SLOT(resetHitCountBreakpointSlot()), "ActionResetHitCountBreakpoint"), [this](QMenu*)
mMenuBuilder->addAction(makeShortcutAction(DIcon("breakpoint_edit_alt"), tr("&Edit"), SLOT(editBreakpointSlot()), "ActionEditBreakpoint"), validBp);
mMenuBuilder->addAction(makeShortcutAction(DIcon("breakpoint_reset_hitcount"), tr("Reset hit count"), SLOT(resetHitCountBreakpointSlot()), "ActionResetHitCountBreakpoint"), [this](QMenu*)
{
if(!isValidBp())
return false;
@ -85,7 +85,7 @@ void BreakpointsView::setupContextMenu()
});
mMenuBuilder->addSeparator();
QAction* enableAll = makeShortcutAction(DIcon("breakpoint_enable_all.png"), QString(), SLOT(enableAllBreakpointsSlot()), "ActionEnableAllBreakpoints");
QAction* enableAll = makeShortcutAction(DIcon("breakpoint_enable_all"), QString(), SLOT(enableAllBreakpointsSlot()), "ActionEnableAllBreakpoints");
mMenuBuilder->addAction(enableAll, [this, enableAll](QMenu*)
{
if(!isValidBp())
@ -93,7 +93,7 @@ void BreakpointsView::setupContextMenu()
enableAll->setText(tr("Enable all (%1)").arg(bpTypeName(selectedBp().type)));
return true;
});
QAction* disableAll = makeShortcutAction(DIcon("breakpoint_disable_all.png"), QString(), SLOT(disableAllBreakpointsSlot()), "ActionDisableAllBreakpoints");
QAction* disableAll = makeShortcutAction(DIcon("breakpoint_disable_all"), QString(), SLOT(disableAllBreakpointsSlot()), "ActionDisableAllBreakpoints");
mMenuBuilder->addAction(disableAll, [this, disableAll](QMenu*)
{
if(!isValidBp())
@ -101,7 +101,7 @@ void BreakpointsView::setupContextMenu()
disableAll->setText(tr("Disable all (%1)").arg(bpTypeName(selectedBp().type)));
return true;
});
QAction* removeAll = makeShortcutAction(DIcon("breakpoint_remove_all.png"), QString(), SLOT(removeAllBreakpointsSlot()), "ActionRemoveAllBreakpoints");
QAction* removeAll = makeShortcutAction(DIcon("breakpoint_remove_all"), QString(), SLOT(removeAllBreakpointsSlot()), "ActionRemoveAllBreakpoints");
mMenuBuilder->addAction(removeAll, [this, removeAll](QMenu*)
{
if(!isValidBp())
@ -111,8 +111,8 @@ void BreakpointsView::setupContextMenu()
});
mMenuBuilder->addSeparator();
mMenuBuilder->addAction(makeAction(DIcon("breakpoint_module_add.png"), tr("Add DLL breakpoint"), SLOT(addDllBreakpointSlot())));
mMenuBuilder->addAction(makeAction(DIcon("breakpoint_exception_add.png"), tr("Add exception breakpoint"), SLOT(addExceptionBreakpointSlot())));
mMenuBuilder->addAction(makeAction(DIcon("breakpoint_module_add"), tr("Add DLL breakpoint"), SLOT(addDllBreakpointSlot())));
mMenuBuilder->addAction(makeAction(DIcon("breakpoint_exception_add"), tr("Add exception breakpoint"), SLOT(addExceptionBreakpointSlot())));
mMenuBuilder->addSeparator();
mMenuBuilder->addAction(makeAction(tr("Copy breakpoint conditions"), SLOT(copyConditionalBreakpointSlot())));
@ -122,7 +122,7 @@ void BreakpointsView::setupContextMenu()
});
MenuBuilder* copyMenu = new MenuBuilder(this);
setupCopyMenu(copyMenu);
mMenuBuilder->addMenu(makeMenu(DIcon("copy.png"), tr("&Copy")), copyMenu);
mMenuBuilder->addMenu(makeMenu(DIcon("copy"), tr("&Copy")), copyMenu);
}
void BreakpointsView::updateColors()
@ -787,14 +787,14 @@ void BreakpointsView::removeAllBreakpointsSlot()
void BreakpointsView::addDllBreakpointSlot()
{
QString fileName;
if(SimpleInputBox(this, tr("Enter the module name"), "", fileName, tr("Example: mydll.dll"), &DIcon("breakpoint.png")) && !fileName.isEmpty())
if(SimpleInputBox(this, tr("Enter the module name"), "", fileName, tr("Example: mydll.dll"), &DIcon("breakpoint")) && !fileName.isEmpty())
DbgCmdExec(QString("bpdll \"%1\"").arg(fileName));
}
void BreakpointsView::addExceptionBreakpointSlot()
{
QString exception;
if(SimpleChoiceBox(this, tr("Enter the exception code"), "", mExceptionList, exception, true, tr("Example: EXCEPTION_ACCESS_VIOLATION"), &DIcon("breakpoint.png"), mExceptionMaxLength) && !exception.isEmpty())
if(SimpleChoiceBox(this, tr("Enter the exception code"), "", mExceptionList, exception, true, tr("Example: EXCEPTION_ACCESS_VIOLATION"), &DIcon("breakpoint"), mExceptionMaxLength) && !exception.isEmpty())
DbgCmdExec((QString("SetExceptionBPX ") + exception));
}

View File

@ -152,20 +152,20 @@ void CPUArgumentWidget::contextMenuSlot(QPoint pos)
return addr >= base && addr < base + size;
};
configAction(wMenu, DIcon(ArchValue("processor32.png", "processor64.png")), mFollowDisasm, valueText, tr("Disassembler"));
configAction(wMenu, DIcon("dump.png"), mFollowDump, valueText, tr("Dump"));
configAction(wMenu, DIcon(ArchValue("processor32", "processor64")), mFollowDisasm, valueText, tr("Disassembler"));
configAction(wMenu, DIcon("dump"), mFollowDump, valueText, tr("Dump"));
if(inStackRange(value))
configAction(wMenu, DIcon("stack.png"), mFollowStack, valueText, tr("Stack"));
configAction(wMenu, DIcon("stack"), mFollowStack, valueText, tr("Stack"));
if(DbgMemIsValidReadPtr(valueAddr))
{
configAction(wMenu, DIcon(ArchValue("processor32.png", "processor64.png")), mFollowAddrDisasm, valueAddrText, tr("Disassembler"));
configAction(wMenu, DIcon("dump.png"), mFollowDump, valueAddrText, tr("Dump"));
configAction(wMenu, DIcon(ArchValue("processor32", "processor64")), mFollowAddrDisasm, valueAddrText, tr("Disassembler"));
configAction(wMenu, DIcon("dump"), mFollowDump, valueAddrText, tr("Dump"));
if(inStackRange(valueAddr))
configAction(wMenu, DIcon("stack.png"), mFollowAddrStack, valueAddrText, tr("Stack"));
configAction(wMenu, DIcon("stack"), mFollowAddrStack, valueAddrText, tr("Stack"));
}
}
QMenu wCopyMenu(tr("&Copy"));
wCopyMenu.setIcon(DIcon("copy.png"));
wCopyMenu.setIcon(DIcon("copy"));
mTable->setupCopyMenu(&wCopyMenu);
if(wCopyMenu.actions().length())
{

View File

@ -272,31 +272,31 @@ void CPUDisassembly::setupRightClickContextMenu()
});
MenuBuilder* binaryMenu = new MenuBuilder(this);
binaryMenu->addAction(makeShortcutAction(DIcon("binary_edit.png"), tr("&Edit"), SLOT(binaryEditSlot()), "ActionBinaryEdit"));
binaryMenu->addAction(makeShortcutAction(DIcon("binary_fill.png"), tr("&Fill..."), SLOT(binaryFillSlot()), "ActionBinaryFill"));
binaryMenu->addAction(makeShortcutAction(DIcon("binary_fill_nop.png"), tr("Fill with &NOPs"), SLOT(binaryFillNopsSlot()), "ActionBinaryFillNops"));
binaryMenu->addAction(makeShortcutAction(DIcon("binary_edit"), tr("&Edit"), SLOT(binaryEditSlot()), "ActionBinaryEdit"));
binaryMenu->addAction(makeShortcutAction(DIcon("binary_fill"), tr("&Fill..."), SLOT(binaryFillSlot()), "ActionBinaryFill"));
binaryMenu->addAction(makeShortcutAction(DIcon("binary_fill_nop"), tr("Fill with &NOPs"), SLOT(binaryFillNopsSlot()), "ActionBinaryFillNops"));
binaryMenu->addSeparator();
binaryMenu->addAction(makeShortcutAction(DIcon("binary_copy.png"), tr("&Copy"), SLOT(binaryCopySlot()), "ActionBinaryCopy"));
binaryMenu->addAction(makeShortcutAction(DIcon("binary_paste.png"), tr("&Paste"), SLOT(binaryPasteSlot()), "ActionBinaryPaste"), [](QMenu*)
binaryMenu->addAction(makeShortcutAction(DIcon("binary_copy"), tr("&Copy"), SLOT(binaryCopySlot()), "ActionBinaryCopy"));
binaryMenu->addAction(makeShortcutAction(DIcon("binary_paste"), tr("&Paste"), SLOT(binaryPasteSlot()), "ActionBinaryPaste"), [](QMenu*)
{
return QApplication::clipboard()->mimeData()->hasText();
});
binaryMenu->addAction(makeShortcutAction(DIcon("binary_paste_ignoresize.png"), tr("Paste (&Ignore Size)"), SLOT(binaryPasteIgnoreSizeSlot()), "ActionBinaryPasteIgnoreSize"), [](QMenu*)
binaryMenu->addAction(makeShortcutAction(DIcon("binary_paste_ignoresize"), tr("Paste (&Ignore Size)"), SLOT(binaryPasteIgnoreSizeSlot()), "ActionBinaryPasteIgnoreSize"), [](QMenu*)
{
return QApplication::clipboard()->mimeData()->hasText();
});
mMenuBuilder->addMenu(makeMenu(DIcon("binary.png"), tr("&Binary")), binaryMenu);
mMenuBuilder->addMenu(makeMenu(DIcon("binary"), tr("&Binary")), binaryMenu);
MenuBuilder* copyMenu = new MenuBuilder(this);
copyMenu->addAction(makeShortcutAction(DIcon("copy_selection.png"), tr("&Selection"), SLOT(copySelectionSlot()), "ActionCopy"));
copyMenu->addAction(makeAction(DIcon("copy_selection.png"), tr("Selection to &File"), SLOT(copySelectionToFileSlot())));
copyMenu->addAction(makeAction(DIcon("copy_selection_no_bytes.png"), tr("Selection (&No Bytes)"), SLOT(copySelectionNoBytesSlot())));
copyMenu->addAction(makeAction(DIcon("copy_selection_no_bytes.png"), tr("Selection to File (No Bytes)"), SLOT(copySelectionToFileNoBytesSlot())));
copyMenu->addAction(makeShortcutAction(DIcon("copy_address.png"), tr("&Address"), SLOT(copyAddressSlot()), "ActionCopyAddress"));
copyMenu->addAction(makeShortcutAction(DIcon("copy_address.png"), tr("&RVA"), SLOT(copyRvaSlot()), "ActionCopyRva"));
copyMenu->addAction(makeShortcutAction(DIcon("fileoffset.png"), tr("&File Offset"), SLOT(copyFileOffsetSlot()), "ActionCopyFileOffset"));
copyMenu->addAction(makeShortcutAction(DIcon("copy_selection"), tr("&Selection"), SLOT(copySelectionSlot()), "ActionCopy"));
copyMenu->addAction(makeAction(DIcon("copy_selection"), tr("Selection to &File"), SLOT(copySelectionToFileSlot())));
copyMenu->addAction(makeAction(DIcon("copy_selection_no_bytes"), tr("Selection (&No Bytes)"), SLOT(copySelectionNoBytesSlot())));
copyMenu->addAction(makeAction(DIcon("copy_selection_no_bytes"), tr("Selection to File (No Bytes)"), SLOT(copySelectionToFileNoBytesSlot())));
copyMenu->addAction(makeShortcutAction(DIcon("copy_address"), tr("&Address"), SLOT(copyAddressSlot()), "ActionCopyAddress"));
copyMenu->addAction(makeShortcutAction(DIcon("copy_address"), tr("&RVA"), SLOT(copyRvaSlot()), "ActionCopyRva"));
copyMenu->addAction(makeShortcutAction(DIcon("fileoffset"), tr("&File Offset"), SLOT(copyFileOffsetSlot()), "ActionCopyFileOffset"));
copyMenu->addAction(makeAction(tr("&Header VA"), SLOT(copyHeaderVaSlot())));
copyMenu->addAction(makeAction(DIcon("copy_disassembly.png"), tr("Disassembly"), SLOT(copyDisassemblySlot())));
copyMenu->addAction(makeAction(DIcon("copy_disassembly"), tr("Disassembly"), SLOT(copyDisassemblySlot())));
copyMenu->addBuilder(new MenuBuilder(this, [this](QMenu * menu)
{
QSet<QString> labels;
@ -307,9 +307,9 @@ void CPUDisassembly::setupRightClickContextMenu()
menu->addAction(makeAction(label, SLOT(labelCopySlot())));
return true;
}));
mMenuBuilder->addMenu(makeMenu(DIcon("copy.png"), tr("&Copy")), copyMenu);
mMenuBuilder->addMenu(makeMenu(DIcon("copy"), tr("&Copy")), copyMenu);
mMenuBuilder->addAction(makeShortcutAction(DIcon("eraser.png"), tr("&Restore selection"), SLOT(undoSelectionSlot()), "ActionUndoSelection"), [this](QMenu*)
mMenuBuilder->addAction(makeShortcutAction(DIcon("eraser"), tr("&Restore selection"), SLOT(undoSelectionSlot()), "ActionUndoSelection"), [this](QMenu*)
{
dsint start = rvaToVa(getSelectionStart());
dsint end = rvaToVa(getSelectionEnd());
@ -322,13 +322,13 @@ void CPUDisassembly::setupRightClickContextMenu()
});
mCommonActions->build(mMenuBuilder, CommonActions::ActionBreakpoint);
mMenuBuilder->addMenu(makeMenu(DIcon("dump.png"), tr("&Follow in Dump")), [this](QMenu * menu)
mMenuBuilder->addMenu(makeMenu(DIcon("dump"), tr("&Follow in Dump")), [this](QMenu * menu)
{
setupFollowReferenceMenu(rvaToVa(getInitialSelection()), menu, false, false);
return true;
});
mMenuBuilder->addMenu(makeMenu(DIcon("processor-cpu.png"), tr("&Follow in Disassembler")), [this](QMenu * menu)
mMenuBuilder->addMenu(makeMenu(DIcon("processor-cpu"), tr("&Follow in Disassembler")), [this](QMenu * menu)
{
setupFollowReferenceMenu(rvaToVa(getInitialSelection()), menu, false, true);
return menu->actions().length() != 0; //only add this menu if there is something to follow
@ -336,12 +336,12 @@ void CPUDisassembly::setupRightClickContextMenu()
mCommonActions->build(mMenuBuilder, CommonActions::ActionMemoryMap | CommonActions::ActionGraph);
mMenuBuilder->addAction(makeShortcutAction(DIcon("source.png"), tr("Open Source File"), SLOT(openSourceSlot()), "ActionOpenSourceFile"), [this](QMenu*)
mMenuBuilder->addAction(makeShortcutAction(DIcon("source"), tr("Open Source File"), SLOT(openSourceSlot()), "ActionOpenSourceFile"), [this](QMenu*)
{
return DbgFunctions()->GetSourceFromAddr(rvaToVa(getInitialSelection()), 0, 0);
});
mMenuBuilder->addMenu(makeMenu(DIcon("help.png"), tr("Help on Symbolic Name")), [this](QMenu * menu)
mMenuBuilder->addMenu(makeMenu(DIcon("help"), tr("Help on Symbolic Name")), [this](QMenu * menu)
{
QSet<QString> labels;
if(!getLabelsFromInstruction(rvaToVa(getInitialSelection()), labels))
@ -350,8 +350,8 @@ void CPUDisassembly::setupRightClickContextMenu()
menu->addAction(makeAction(label, SLOT(labelHelpSlot())));
return true;
});
mMenuBuilder->addAction(makeShortcutAction(DIcon("helpmnemonic.png"), tr("Help on mnemonic"), SLOT(mnemonicHelpSlot()), "ActionHelpOnMnemonic"));
QAction* mnemonicBrief = makeShortcutAction(DIcon("helpbrief.png"), tr("Show mnemonic brief"), SLOT(mnemonicBriefSlot()), "ActionToggleMnemonicBrief");
mMenuBuilder->addAction(makeShortcutAction(DIcon("helpmnemonic"), tr("Help on mnemonic"), SLOT(mnemonicHelpSlot()), "ActionHelpOnMnemonic"));
QAction* mnemonicBrief = makeShortcutAction(DIcon("helpbrief"), tr("Show mnemonic brief"), SLOT(mnemonicBriefSlot()), "ActionToggleMnemonicBrief");
mMenuBuilder->addAction(mnemonicBrief, [this, mnemonicBrief](QMenu*)
{
if(mShowMnemonicBrief)
@ -361,7 +361,7 @@ void CPUDisassembly::setupRightClickContextMenu()
return true;
});
mMenuBuilder->addAction(makeShortcutAction(DIcon("highlight.png"), tr("&Highlighting mode"), SLOT(enableHighlightingModeSlot()), "ActionHighlightingMode"));
mMenuBuilder->addAction(makeShortcutAction(DIcon("highlight"), tr("&Highlighting mode"), SLOT(enableHighlightingModeSlot()), "ActionHighlightingMode"));
MenuBuilder* labelMenu = new MenuBuilder(this);
labelMenu->addAction(makeShortcutAction(tr("Label Current Address"), SLOT(setLabelSlot()), "ActionSetLabel"));
@ -386,15 +386,15 @@ void CPUDisassembly::setupRightClickContextMenu()
return DbgMemIsValidReadPtr(addr);
});
mMenuBuilder->addMenu(makeMenu(DIcon("label.png"), tr("Label")), labelMenu);
mMenuBuilder->addMenu(makeMenu(DIcon("label"), tr("Label")), labelMenu);
mCommonActions->build(mMenuBuilder, CommonActions::ActionComment | CommonActions::ActionBookmark);
QAction* traceRecordDisable = makeAction(DIcon("close-all-tabs.png"), tr("Disable"), SLOT(ActionTraceRecordDisableSlot()));
QAction* traceRecordEnableBit = makeAction(DIcon("bit.png"), tr("Bit"), SLOT(ActionTraceRecordBitSlot()));
QAction* traceRecordEnableByte = makeAction(DIcon("byte.png"), tr("Byte"), SLOT(ActionTraceRecordByteSlot()));
QAction* traceRecordEnableWord = makeAction(DIcon("word.png"), tr("Word"), SLOT(ActionTraceRecordWordSlot()));
QAction* traceRecordDisable = makeAction(DIcon("close-all-tabs"), tr("Disable"), SLOT(ActionTraceRecordDisableSlot()));
QAction* traceRecordEnableBit = makeAction(DIcon("bit"), tr("Bit"), SLOT(ActionTraceRecordBitSlot()));
QAction* traceRecordEnableByte = makeAction(DIcon("byte"), tr("Byte"), SLOT(ActionTraceRecordByteSlot()));
QAction* traceRecordEnableWord = makeAction(DIcon("word"), tr("Word"), SLOT(ActionTraceRecordWordSlot()));
QAction* traceRecordToggleRunTrace = makeShortcutAction(tr("Start Run Trace"), SLOT(ActionTraceRecordToggleRunTraceSlot()), "ActionToggleRunTrace");
mMenuBuilder->addMenu(makeMenu(DIcon("trace.png"), tr("Trace record")), [ = ](QMenu * menu)
mMenuBuilder->addMenu(makeMenu(DIcon("trace"), tr("Trace record")), [ = ](QMenu * menu)
{
if(DbgFunctions()->GetTraceRecordType(rvaToVa(getInitialSelection())) == TRACERECORDTYPE::TraceRecordNone)
{
@ -416,8 +416,8 @@ void CPUDisassembly::setupRightClickContextMenu()
mMenuBuilder->addSeparator();
MenuBuilder* analysisMenu = new MenuBuilder(this);
QAction* toggleFunctionAction = makeShortcutAction(DIcon("functions.png"), tr("Function"), SLOT(toggleFunctionSlot()), "ActionToggleFunction");
analysisMenu->addAction(makeShortcutAction(DIcon("analyzemodule.png"), tr("Analyze module"), SLOT(analyzeModuleSlot()), "ActionAnalyzeModule"));
QAction* toggleFunctionAction = makeShortcutAction(DIcon("functions"), tr("Function"), SLOT(toggleFunctionSlot()), "ActionToggleFunction");
analysisMenu->addAction(makeShortcutAction(DIcon("analyzemodule"), tr("Analyze module"), SLOT(analyzeModuleSlot()), "ActionAnalyzeModule"));
analysisMenu->addAction(toggleFunctionAction, [this, toggleFunctionAction](QMenu*)
{
if(!DbgFunctionOverlaps(rvaToVa(getSelectionStart()), rvaToVa(getSelectionEnd())))
@ -426,7 +426,7 @@ void CPUDisassembly::setupRightClickContextMenu()
toggleFunctionAction->setText(tr("Delete function"));
return true;
});
QAction* toggleArgumentAction = makeShortcutAction(DIcon("arguments.png"), tr("Argument"), SLOT(toggleArgumentSlot()), "ActionToggleArgument");
QAction* toggleArgumentAction = makeShortcutAction(DIcon("arguments"), tr("Argument"), SLOT(toggleArgumentSlot()), "ActionToggleArgument");
analysisMenu->addAction(toggleArgumentAction, [this, toggleArgumentAction](QMenu*)
{
if(!DbgArgumentOverlaps(rvaToVa(getSelectionStart()), rvaToVa(getSelectionEnd())))
@ -440,15 +440,15 @@ void CPUDisassembly::setupRightClickContextMenu()
{
return findDeepestLoopDepth(rvaToVa(getSelectionStart())) >= 0;
});
analysisMenu->addAction(makeShortcutAction(DIcon("analysis_single_function.png"), tr("Analyze single function"), SLOT(analyzeSingleFunctionSlot()), "ActionAnalyzeSingleFunction"));
analysisMenu->addAction(makeShortcutAction(DIcon("analysis_single_function"), tr("Analyze single function"), SLOT(analyzeSingleFunctionSlot()), "ActionAnalyzeSingleFunction"));
analysisMenu->addSeparator();
analysisMenu->addAction(makeShortcutAction(DIcon("remove_analysis_from_module.png"), tr("Remove type analysis from module"), SLOT(removeAnalysisModuleSlot()), "ActionRemoveTypeAnalysisFromModule"));
analysisMenu->addAction(makeShortcutAction(DIcon("remove_analysis_from_selection.png"), tr("Remove type analysis from selection"), SLOT(removeAnalysisSelectionSlot()), "ActionRemoveTypeAnalysisFromSelection"));
analysisMenu->addAction(makeShortcutAction(DIcon("remove_analysis_from_module"), tr("Remove type analysis from module"), SLOT(removeAnalysisModuleSlot()), "ActionRemoveTypeAnalysisFromModule"));
analysisMenu->addAction(makeShortcutAction(DIcon("remove_analysis_from_selection"), tr("Remove type analysis from selection"), SLOT(removeAnalysisSelectionSlot()), "ActionRemoveTypeAnalysisFromSelection"));
analysisMenu->addSeparator();
QMenu* encodeTypeMenu = makeMenu(DIcon("treat_selection_head_as.png"), tr("Treat selection &head as"));
QMenu* encodeTypeRangeMenu = makeMenu(DIcon("treat_from_selection_as.png"), tr("Treat from &selection as"));
QMenu* encodeTypeMenu = makeMenu(DIcon("treat_selection_head_as"), tr("Treat selection &head as"));
QMenu* encodeTypeRangeMenu = makeMenu(DIcon("treat_from_selection_as"), tr("Treat from &selection as"));
const char* strTable[] = {"Code", "Byte", "Word", "Dword", "Fword", "Qword", "Tbyte", "Oword", nullptr,
"Float", "Double", "Long Double", nullptr,
@ -488,7 +488,7 @@ void CPUDisassembly::setupRightClickContextMenu()
QAction* action;
QIcon icon;
if(iconTable[i])
icon = DIcon(QString("treat_selection_as_%1.png").arg(iconTable[i]));
icon = DIcon(QString("treat_selection_as_%1").arg(iconTable[i]));
if(shortcutTable[i])
action = makeShortcutAction(icon, tr(strTable[i]), SLOT(setEncodeTypeRangeSlot()), QString("ActionTreatSelectionAs%1").arg(shortcutTable[i]).toUtf8().constData());
else
@ -507,57 +507,57 @@ void CPUDisassembly::setupRightClickContextMenu()
analysisMenu->addMenu(encodeTypeRangeMenu);
analysisMenu->addMenu(encodeTypeMenu);
mMenuBuilder->addMenu(makeMenu(DIcon("analysis.png"), tr("Analysis")), analysisMenu);
mMenuBuilder->addAction(makeShortcutAction(DIcon("pdb.png"), tr("Download Symbols for This Module"), SLOT(downloadCurrentSymbolsSlot()), "ActionDownloadSymbol"), [this](QMenu*)
mMenuBuilder->addMenu(makeMenu(DIcon("analysis"), tr("Analysis")), analysisMenu);
mMenuBuilder->addAction(makeShortcutAction(DIcon("pdb"), tr("Download Symbols for This Module"), SLOT(downloadCurrentSymbolsSlot()), "ActionDownloadSymbol"), [this](QMenu*)
{
//only show this action in system modules (generally user modules don't have downloadable symbols)
return DbgFunctions()->ModGetParty(rvaToVa(getInitialSelection())) == 1;
});
mMenuBuilder->addSeparator();
mMenuBuilder->addAction(makeShortcutAction(DIcon("compile.png"), tr("Assemble"), SLOT(assembleSlot()), "ActionAssemble"));
removeAction(mMenuBuilder->addAction(makeShortcutAction(DIcon("patch.png"), tr("Patches"), SLOT(showPatchesSlot()), "ViewPatches"))); //prevent conflicting shortcut with the MainWindow
mMenuBuilder->addAction(makeShortcutAction(DIcon("compile"), tr("Assemble"), SLOT(assembleSlot()), "ActionAssemble"));
removeAction(mMenuBuilder->addAction(makeShortcutAction(DIcon("patch"), tr("Patches"), SLOT(showPatchesSlot()), "ViewPatches"))); //prevent conflicting shortcut with the MainWindow
mMenuBuilder->addSeparator();
mCommonActions->build(mMenuBuilder, CommonActions::ActionNewOrigin | CommonActions::ActionNewThread);
MenuBuilder* gotoMenu = new MenuBuilder(this);
gotoMenu->addAction(makeShortcutAction(DIcon("cbp.png"), tr("Origin"), SLOT(gotoOriginSlot()), "ActionGotoOrigin"));
gotoMenu->addAction(makeShortcutAction(DIcon("previous.png"), tr("Previous"), SLOT(gotoPreviousSlot()), "ActionGotoPrevious"), [this](QMenu*)
gotoMenu->addAction(makeShortcutAction(DIcon("cbp"), tr("Origin"), SLOT(gotoOriginSlot()), "ActionGotoOrigin"));
gotoMenu->addAction(makeShortcutAction(DIcon("previous"), tr("Previous"), SLOT(gotoPreviousSlot()), "ActionGotoPrevious"), [this](QMenu*)
{
return historyHasPrevious();
});
gotoMenu->addAction(makeShortcutAction(DIcon("next.png"), tr("Next"), SLOT(gotoNextSlot()), "ActionGotoNext"), [this](QMenu*)
gotoMenu->addAction(makeShortcutAction(DIcon("next"), tr("Next"), SLOT(gotoNextSlot()), "ActionGotoNext"), [this](QMenu*)
{
return historyHasNext();
});
gotoMenu->addAction(makeShortcutAction(DIcon("geolocation-goto.png"), tr("Expression"), SLOT(gotoExpressionSlot()), "ActionGotoExpression"));
gotoMenu->addAction(makeShortcutAction(DIcon("fileoffset.png"), tr("File Offset"), SLOT(gotoFileOffsetSlot()), "ActionGotoFileOffset"), [this](QMenu*)
gotoMenu->addAction(makeShortcutAction(DIcon("geolocation-goto"), tr("Expression"), SLOT(gotoExpressionSlot()), "ActionGotoExpression"));
gotoMenu->addAction(makeShortcutAction(DIcon("fileoffset"), tr("File Offset"), SLOT(gotoFileOffsetSlot()), "ActionGotoFileOffset"), [this](QMenu*)
{
char modname[MAX_MODULE_SIZE] = "";
return DbgGetModuleAt(rvaToVa(getInitialSelection()), modname);
});
gotoMenu->addAction(makeShortcutAction(DIcon("top.png"), tr("Start of Page"), SLOT(gotoStartSlot()), "ActionGotoStart"));
gotoMenu->addAction(makeShortcutAction(DIcon("bottom.png"), tr("End of Page"), SLOT(gotoEndSlot()), "ActionGotoEnd"));
gotoMenu->addAction(makeShortcutAction(DIcon("functionstart.png"), tr("Start of Function"), SLOT(gotoFunctionStartSlot()), "ActionGotoFunctionStart"), [this](QMenu*)
gotoMenu->addAction(makeShortcutAction(DIcon("top"), tr("Start of Page"), SLOT(gotoStartSlot()), "ActionGotoStart"));
gotoMenu->addAction(makeShortcutAction(DIcon("bottom"), tr("End of Page"), SLOT(gotoEndSlot()), "ActionGotoEnd"));
gotoMenu->addAction(makeShortcutAction(DIcon("functionstart"), tr("Start of Function"), SLOT(gotoFunctionStartSlot()), "ActionGotoFunctionStart"), [this](QMenu*)
{
return DbgFunctionGet(rvaToVa(getInitialSelection()), nullptr, nullptr);
});
gotoMenu->addAction(makeShortcutAction(DIcon("functionend.png"), tr("End of Function"), SLOT(gotoFunctionEndSlot()), "ActionGotoFunctionEnd"), [this](QMenu*)
gotoMenu->addAction(makeShortcutAction(DIcon("functionend"), tr("End of Function"), SLOT(gotoFunctionEndSlot()), "ActionGotoFunctionEnd"), [this](QMenu*)
{
return DbgFunctionGet(rvaToVa(getInitialSelection()), nullptr, nullptr);
});
gotoMenu->addAction(makeShortcutAction(DIcon("prevref.png"), tr("Previous Reference"), SLOT(gotoPreviousReferenceSlot()), "ActionGotoPreviousReference"), [](QMenu*)
gotoMenu->addAction(makeShortcutAction(DIcon("prevref"), tr("Previous Reference"), SLOT(gotoPreviousReferenceSlot()), "ActionGotoPreviousReference"), [](QMenu*)
{
return !!DbgEval("refsearch.count() && ($__disasm_refindex > 0 || dis.sel() != refsearch.addr($__disasm_refindex))");
});
gotoMenu->addAction(makeShortcutAction(DIcon("nextref.png"), tr("Next Reference"), SLOT(gotoNextReferenceSlot()), "ActionGotoNextReference"), [](QMenu*)
gotoMenu->addAction(makeShortcutAction(DIcon("nextref"), tr("Next Reference"), SLOT(gotoNextReferenceSlot()), "ActionGotoNextReference"), [](QMenu*)
{
return !!DbgEval("refsearch.count() && ($__disasm_refindex < refsearch.count()|| dis.sel() != refsearch.addr($__disasm_refindex))");
});
mMenuBuilder->addMenu(makeMenu(DIcon("goto.png"), tr("Go to")), gotoMenu);
mMenuBuilder->addMenu(makeMenu(DIcon("goto"), tr("Go to")), gotoMenu);
mMenuBuilder->addSeparator();
mMenuBuilder->addAction(makeShortcutAction(DIcon("xrefs.png"), tr("xrefs..."), SLOT(gotoXrefSlot()), "ActionXrefs"), [this](QMenu*)
mMenuBuilder->addAction(makeShortcutAction(DIcon("xrefs"), tr("xrefs..."), SLOT(gotoXrefSlot()), "ActionXrefs"), [this](QMenu*)
{
return mXrefInfo.refcount > 0;
});
@ -578,12 +578,12 @@ void CPUDisassembly::setupRightClickContextMenu()
MenuBuilder* mSearchAllSystemMenu = new MenuBuilder(this);
// Search in Current Region menu
mFindCommandRegion = makeShortcutAction(DIcon("search_for_command.png"), tr("C&ommand"), SLOT(findCommandSlot()), "ActionFind");
mFindConstantRegion = makeAction(DIcon("search_for_constant.png"), tr("&Constant"), SLOT(findConstantSlot()));
mFindStringsRegion = makeAction(DIcon("search_for_string.png"), tr("&String references"), SLOT(findStringsSlot()));
mFindCallsRegion = makeAction(DIcon("call.png"), tr("&Intermodular calls"), SLOT(findCallsSlot()));
mFindPatternRegion = makeShortcutAction(DIcon("search_for_pattern.png"), tr("&Pattern"), SLOT(findPatternSlot()), "ActionFindPattern");
mFindGUIDRegion = makeAction(DIcon("guid.png"), tr("&GUID"), SLOT(findGUIDSlot()));
mFindCommandRegion = makeShortcutAction(DIcon("search_for_command"), tr("C&ommand"), SLOT(findCommandSlot()), "ActionFind");
mFindConstantRegion = makeAction(DIcon("search_for_constant"), tr("&Constant"), SLOT(findConstantSlot()));
mFindStringsRegion = makeAction(DIcon("search_for_string"), tr("&String references"), SLOT(findStringsSlot()));
mFindCallsRegion = makeAction(DIcon("call"), tr("&Intermodular calls"), SLOT(findCallsSlot()));
mFindPatternRegion = makeShortcutAction(DIcon("search_for_pattern"), tr("&Pattern"), SLOT(findPatternSlot()), "ActionFindPattern");
mFindGUIDRegion = makeAction(DIcon("guid"), tr("&GUID"), SLOT(findGUIDSlot()));
mSearchRegionMenu->addAction(mFindCommandRegion);
mSearchRegionMenu->addAction(mFindConstantRegion);
mSearchRegionMenu->addAction(mFindStringsRegion);
@ -592,13 +592,13 @@ void CPUDisassembly::setupRightClickContextMenu()
mSearchRegionMenu->addAction(mFindGUIDRegion);
// Search in Current Module menu
mFindCommandModule = makeShortcutAction(DIcon("search_for_command.png"), tr("C&ommand"), SLOT(findCommandSlot()), "ActionFindInModule");
mFindConstantModule = makeAction(DIcon("search_for_constant.png"), tr("&Constant"), SLOT(findConstantSlot()));
mFindStringsModule = makeShortcutAction(DIcon("search_for_string.png"), tr("&String references"), SLOT(findStringsSlot()), "ActionFindStringsModule");
mFindCallsModule = makeAction(DIcon("call.png"), tr("&Intermodular calls"), SLOT(findCallsSlot()));
mFindPatternModule = makeShortcutAction(DIcon("search_for_pattern.png"), tr("&Pattern"), SLOT(findPatternSlot()), "ActionFindPatternInModule");
mFindGUIDModule = makeAction(DIcon("guid.png"), tr("&GUID"), SLOT(findGUIDSlot()));
mFindNamesModule = makeShortcutAction(DIcon("names.png"), tr("&Names"), SLOT(findNamesSlot()), "ActionFindNamesInModule");
mFindCommandModule = makeShortcutAction(DIcon("search_for_command"), tr("C&ommand"), SLOT(findCommandSlot()), "ActionFindInModule");
mFindConstantModule = makeAction(DIcon("search_for_constant"), tr("&Constant"), SLOT(findConstantSlot()));
mFindStringsModule = makeShortcutAction(DIcon("search_for_string"), tr("&String references"), SLOT(findStringsSlot()), "ActionFindStringsModule");
mFindCallsModule = makeAction(DIcon("call"), tr("&Intermodular calls"), SLOT(findCallsSlot()));
mFindPatternModule = makeShortcutAction(DIcon("search_for_pattern"), tr("&Pattern"), SLOT(findPatternSlot()), "ActionFindPatternInModule");
mFindGUIDModule = makeAction(DIcon("guid"), tr("&GUID"), SLOT(findGUIDSlot()));
mFindNamesModule = makeShortcutAction(DIcon("names"), tr("&Names"), SLOT(findNamesSlot()), "ActionFindNamesInModule");
mSearchModuleMenu->addAction(mFindCommandModule);
mSearchModuleMenu->addAction(mFindConstantModule);
mSearchModuleMenu->addAction(mFindStringsModule);
@ -608,12 +608,12 @@ void CPUDisassembly::setupRightClickContextMenu()
mSearchModuleMenu->addAction(mFindNamesModule);
// Search in Current Function menu
mFindCommandFunction = makeAction(DIcon("search_for_command.png"), tr("C&ommand"), SLOT(findCommandSlot()));
mFindConstantFunction = makeAction(DIcon("search_for_constant.png"), tr("&Constant"), SLOT(findConstantSlot()));
mFindStringsFunction = makeAction(DIcon("search_for_string.png"), tr("&String references"), SLOT(findStringsSlot()));
mFindCallsFunction = makeAction(DIcon("call.png"), tr("&Intermodular calls"), SLOT(findCallsSlot()));
mFindPatternFunction = makeAction(DIcon("search_for_pattern.png"), tr("&Pattern"), SLOT(findPatternSlot()));
mFindGUIDFunction = makeAction(DIcon("guid.png"), tr("&GUID"), SLOT(findGUIDSlot()));
mFindCommandFunction = makeAction(DIcon("search_for_command"), tr("C&ommand"), SLOT(findCommandSlot()));
mFindConstantFunction = makeAction(DIcon("search_for_constant"), tr("&Constant"), SLOT(findConstantSlot()));
mFindStringsFunction = makeAction(DIcon("search_for_string"), tr("&String references"), SLOT(findStringsSlot()));
mFindCallsFunction = makeAction(DIcon("call"), tr("&Intermodular calls"), SLOT(findCallsSlot()));
mFindPatternFunction = makeAction(DIcon("search_for_pattern"), tr("&Pattern"), SLOT(findPatternSlot()));
mFindGUIDFunction = makeAction(DIcon("guid"), tr("&GUID"), SLOT(findGUIDSlot()));
mSearchFunctionMenu->addAction(mFindCommandFunction);
mSearchFunctionMenu->addAction(mFindConstantFunction);
mSearchFunctionMenu->addAction(mFindStringsFunction);
@ -622,12 +622,12 @@ void CPUDisassembly::setupRightClickContextMenu()
mSearchFunctionMenu->addAction(mFindGUIDFunction);
// Search in All User Modules menu
mFindCommandAllUser = makeAction(DIcon("search_for_command.png"), tr("C&ommand"), SLOT(findCommandSlot()));
mFindConstantAllUser = makeAction(DIcon("search_for_constant.png"), tr("&Constant"), SLOT(findConstantSlot()));
mFindStringsAllUser = makeAction(DIcon("search_for_string.png"), tr("&String references"), SLOT(findStringsSlot()));
mFindCallsAllUser = makeAction(DIcon("call.png"), tr("&Intermodular calls"), SLOT(findCallsSlot()));
mFindPatternAllUser = makeAction(DIcon("search_for_pattern.png"), tr("&Pattern"), SLOT(findPatternSlot()));
mFindGUIDAllUser = makeAction(DIcon("guid.png"), tr("&GUID"), SLOT(findGUIDSlot()));
mFindCommandAllUser = makeAction(DIcon("search_for_command"), tr("C&ommand"), SLOT(findCommandSlot()));
mFindConstantAllUser = makeAction(DIcon("search_for_constant"), tr("&Constant"), SLOT(findConstantSlot()));
mFindStringsAllUser = makeAction(DIcon("search_for_string"), tr("&String references"), SLOT(findStringsSlot()));
mFindCallsAllUser = makeAction(DIcon("call"), tr("&Intermodular calls"), SLOT(findCallsSlot()));
mFindPatternAllUser = makeAction(DIcon("search_for_pattern"), tr("&Pattern"), SLOT(findPatternSlot()));
mFindGUIDAllUser = makeAction(DIcon("guid"), tr("&GUID"), SLOT(findGUIDSlot()));
mSearchAllUserMenu->addAction(mFindCommandAllUser);
mSearchAllUserMenu->addAction(mFindConstantAllUser);
mSearchAllUserMenu->addAction(mFindStringsAllUser);
@ -636,12 +636,12 @@ void CPUDisassembly::setupRightClickContextMenu()
mSearchAllUserMenu->addAction(mFindGUIDAllUser);
// Search in All System Modules menu
mFindCommandAllSystem = makeAction(DIcon("search_for_command.png"), tr("C&ommand"), SLOT(findCommandSlot()));
mFindConstantAllSystem = makeAction(DIcon("search_for_constant.png"), tr("&Constant"), SLOT(findConstantSlot()));
mFindStringsAllSystem = makeAction(DIcon("search_for_string.png"), tr("&String references"), SLOT(findStringsSlot()));
mFindCallsAllSystem = makeAction(DIcon("call.png"), tr("&Intermodular calls"), SLOT(findCallsSlot()));
mFindPatternAllSystem = makeAction(DIcon("search_for_pattern.png"), tr("&Pattern"), SLOT(findPatternSlot()));
mFindGUIDAllSystem = makeAction(DIcon("guid.png"), tr("&GUID"), SLOT(findGUIDSlot()));
mFindCommandAllSystem = makeAction(DIcon("search_for_command"), tr("C&ommand"), SLOT(findCommandSlot()));
mFindConstantAllSystem = makeAction(DIcon("search_for_constant"), tr("&Constant"), SLOT(findConstantSlot()));
mFindStringsAllSystem = makeAction(DIcon("search_for_string"), tr("&String references"), SLOT(findStringsSlot()));
mFindCallsAllSystem = makeAction(DIcon("call"), tr("&Intermodular calls"), SLOT(findCallsSlot()));
mFindPatternAllSystem = makeAction(DIcon("search_for_pattern"), tr("&Pattern"), SLOT(findPatternSlot()));
mFindGUIDAllSystem = makeAction(DIcon("guid"), tr("&GUID"), SLOT(findGUIDSlot()));
mSearchAllSystemMenu->addAction(mFindCommandAllSystem);
mSearchAllSystemMenu->addAction(mFindConstantAllSystem);
mSearchAllSystemMenu->addAction(mFindStringsAllSystem);
@ -650,12 +650,12 @@ void CPUDisassembly::setupRightClickContextMenu()
mSearchAllSystemMenu->addAction(mFindGUIDAllSystem);
// Search in All Modules menu
mFindCommandAll = makeAction(DIcon("search_for_command.png"), tr("C&ommand"), SLOT(findCommandSlot()));
mFindConstantAll = makeAction(DIcon("search_for_constant.png"), tr("&Constant"), SLOT(findConstantSlot()));
mFindStringsAll = makeAction(DIcon("search_for_string.png"), tr("&String references"), SLOT(findStringsSlot()));
mFindCallsAll = makeAction(DIcon("call.png"), tr("&Intermodular calls"), SLOT(findCallsSlot()));
mFindPatternAll = makeAction(DIcon("search_for_pattern.png"), tr("&Pattern"), SLOT(findPatternSlot()));
mFindGUIDAll = makeAction(DIcon("guid.png"), tr("&GUID"), SLOT(findGUIDSlot()));
mFindCommandAll = makeAction(DIcon("search_for_command"), tr("C&ommand"), SLOT(findCommandSlot()));
mFindConstantAll = makeAction(DIcon("search_for_constant"), tr("&Constant"), SLOT(findConstantSlot()));
mFindStringsAll = makeAction(DIcon("search_for_string"), tr("&String references"), SLOT(findStringsSlot()));
mFindCallsAll = makeAction(DIcon("call"), tr("&Intermodular calls"), SLOT(findCallsSlot()));
mFindPatternAll = makeAction(DIcon("search_for_pattern"), tr("&Pattern"), SLOT(findPatternSlot()));
mFindGUIDAll = makeAction(DIcon("guid"), tr("&GUID"), SLOT(findGUIDSlot()));
mSearchAllMenu->addAction(mFindCommandAll);
mSearchAllMenu->addAction(mFindConstantAll);
mSearchAllMenu->addAction(mFindStringsAll);
@ -663,18 +663,18 @@ void CPUDisassembly::setupRightClickContextMenu()
mSearchAllMenu->addAction(mFindPatternAll);
mSearchAllMenu->addAction(mFindGUIDAll);
searchMenu->addMenu(makeMenu(DIcon("search_current_region.png"), tr("Current Region")), mSearchRegionMenu);
searchMenu->addMenu(makeMenu(DIcon("search_current_module.png"), tr("Current Module")), mSearchModuleMenu);
searchMenu->addMenu(makeMenu(DIcon("search_current_region"), tr("Current Region")), mSearchRegionMenu);
searchMenu->addMenu(makeMenu(DIcon("search_current_module"), tr("Current Module")), mSearchModuleMenu);
QMenu* searchFunctionMenu = makeMenu(tr("Current Function"));
searchMenu->addMenu(searchFunctionMenu, mSearchFunctionMenu);
searchMenu->addMenu(makeMenu(DIcon("search_all_modules.png"), tr("All User Modules")), mSearchAllUserMenu);
searchMenu->addMenu(makeMenu(DIcon("search_all_modules.png"), tr("All System Modules")), mSearchAllSystemMenu);
searchMenu->addMenu(makeMenu(DIcon("search_all_modules.png"), tr("All Modules")), mSearchAllMenu);
mMenuBuilder->addMenu(makeMenu(DIcon("search-for.png"), tr("&Search for")), searchMenu);
searchMenu->addMenu(makeMenu(DIcon("search_all_modules"), tr("All User Modules")), mSearchAllUserMenu);
searchMenu->addMenu(makeMenu(DIcon("search_all_modules"), tr("All System Modules")), mSearchAllSystemMenu);
searchMenu->addMenu(makeMenu(DIcon("search_all_modules"), tr("All Modules")), mSearchAllMenu);
mMenuBuilder->addMenu(makeMenu(DIcon("search-for"), tr("&Search for")), searchMenu);
mReferenceSelectedAddressAction = makeShortcutAction(tr("&Selected Address(es)"), SLOT(findReferencesSlot()), "ActionFindReferencesToSelectedAddress");
mMenuBuilder->addMenu(makeMenu(DIcon("find.png"), tr("Find &references to")), [this](QMenu * menu)
mMenuBuilder->addMenu(makeMenu(DIcon("find"), tr("Find &references to")), [this](QMenu * menu)
{
setupFollowReferenceMenu(rvaToVa(getInitialSelection()), menu, true, false);
return true;
@ -701,8 +701,8 @@ void CPUDisassembly::setupRightClickContextMenu()
// Highlight menu
mHighlightMenuBuilder = new MenuBuilder(this);
mHighlightMenuBuilder->addAction(makeAction(DIcon("copy.png"), tr("Copy token &text"), SLOT(copyTokenTextSlot())));
mHighlightMenuBuilder->addAction(makeAction(DIcon("copy_address.png"), tr("Copy token &value"), SLOT(copyTokenValueSlot())), [this](QMenu*)
mHighlightMenuBuilder->addAction(makeAction(DIcon("copy"), tr("Copy token &text"), SLOT(copyTokenTextSlot())));
mHighlightMenuBuilder->addAction(makeAction(DIcon("copy_address"), tr("Copy token &value"), SLOT(copyTokenValueSlot())), [this](QMenu*)
{
QString text;
if(!getTokenValueText(text))
@ -741,7 +741,7 @@ restart:
QMessageBox msg(QMessageBox::Warning, tr("The label may be in use"),
tr("The label \"%1\" may be an existing label or a valid expression. Using such label might have undesired effects. Do you still want to continue?").arg(mLineEdit.editText),
QMessageBox::Yes | QMessageBox::No, this);
msg.setWindowIcon(DIcon("compile-warning.png"));
msg.setWindowIcon(DIcon("compile-warning"));
msg.setParent(this, Qt::Dialog);
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
if(msg.exec() == QMessageBox::No)
@ -787,7 +787,7 @@ restart:
QMessageBox msg(QMessageBox::Warning, tr("The label may be in use"),
tr("The label \"%1\" may be an existing label or a valid expression. Using such label might have undesired effects. Do you still want to continue?").arg(mLineEdit.editText),
QMessageBox::Yes | QMessageBox::No, this);
msg.setWindowIcon(DIcon("compile-warning.png"));
msg.setWindowIcon(DIcon("compile-warning"));
msg.setParent(this, Qt::Dialog);
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
if(msg.exec() == QMessageBox::No)
@ -929,7 +929,7 @@ void CPUDisassembly::assembleSlot()
if(!DbgFunctions()->AssembleAtEx(wVA, expression.toUtf8().constData(), error, assembleDialog.bFillWithNopsChecked))
{
QMessageBox msg(QMessageBox::Critical, tr("Error!"), tr("Failed to assemble instruction \" %1 \" (%2)").arg(expression).arg(error));
msg.setWindowIcon(DIcon("compile-error.png"));
msg.setWindowIcon(DIcon("compile-error"));
msg.setParent(this, Qt::Dialog);
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
msg.exec();

View File

@ -47,20 +47,20 @@ void CPUDump::setupContextMenu()
});
MenuBuilder* wBinaryMenu = new MenuBuilder(this);
wBinaryMenu->addAction(makeShortcutAction(DIcon("binary_edit.png"), tr("&Edit"), SLOT(binaryEditSlot()), "ActionBinaryEdit"));
wBinaryMenu->addAction(makeShortcutAction(DIcon("binary_fill.png"), tr("&Fill..."), SLOT(binaryFillSlot()), "ActionBinaryFill"));
wBinaryMenu->addAction(makeShortcutAction(DIcon("binary_edit"), tr("&Edit"), SLOT(binaryEditSlot()), "ActionBinaryEdit"));
wBinaryMenu->addAction(makeShortcutAction(DIcon("binary_fill"), tr("&Fill..."), SLOT(binaryFillSlot()), "ActionBinaryFill"));
wBinaryMenu->addSeparator();
wBinaryMenu->addAction(makeShortcutAction(DIcon("binary_copy.png"), tr("&Copy"), SLOT(binaryCopySlot()), "ActionBinaryCopy"));
wBinaryMenu->addAction(makeShortcutAction(DIcon("binary_paste.png"), tr("&Paste"), SLOT(binaryPasteSlot()), "ActionBinaryPaste"), [](QMenu*)
wBinaryMenu->addAction(makeShortcutAction(DIcon("binary_copy"), tr("&Copy"), SLOT(binaryCopySlot()), "ActionBinaryCopy"));
wBinaryMenu->addAction(makeShortcutAction(DIcon("binary_paste"), tr("&Paste"), SLOT(binaryPasteSlot()), "ActionBinaryPaste"), [](QMenu*)
{
return QApplication::clipboard()->mimeData()->hasText();
});
wBinaryMenu->addAction(makeShortcutAction(DIcon("binary_paste_ignoresize.png"), tr("Paste (&Ignore Size)"), SLOT(binaryPasteIgnoreSizeSlot()), "ActionBinaryPasteIgnoreSize"), [](QMenu*)
wBinaryMenu->addAction(makeShortcutAction(DIcon("binary_paste_ignoresize"), tr("Paste (&Ignore Size)"), SLOT(binaryPasteIgnoreSizeSlot()), "ActionBinaryPasteIgnoreSize"), [](QMenu*)
{
return QApplication::clipboard()->mimeData()->hasText();
});
wBinaryMenu->addAction(makeShortcutAction(DIcon("binary_save.png"), tr("Save To a File"), SLOT(binarySaveToFileSlot()), "ActionBinarySave"));
mMenuBuilder->addMenu(makeMenu(DIcon("binary.png"), tr("B&inary")), wBinaryMenu);
wBinaryMenu->addAction(makeShortcutAction(DIcon("binary_save"), tr("Save To a File"), SLOT(binarySaveToFileSlot()), "ActionBinarySave"));
mMenuBuilder->addMenu(makeMenu(DIcon("binary"), tr("B&inary")), wBinaryMenu);
MenuBuilder* wCopyMenu = new MenuBuilder(this);
wCopyMenu->addAction(mCopySelection);
@ -69,14 +69,14 @@ void CPUDump::setupContextMenu()
{
return DbgFunctions()->ModBaseFromAddr(rvaToVa(getInitialSelection())) != 0;
});
wCopyMenu->addAction(makeShortcutAction(DIcon("fileoffset.png"), tr("&File Offset"), SLOT(copyFileOffsetSlot()), "ActionCopyFileOffset"), [this](QMenu*)
wCopyMenu->addAction(makeShortcutAction(DIcon("fileoffset"), tr("&File Offset"), SLOT(copyFileOffsetSlot()), "ActionCopyFileOffset"), [this](QMenu*)
{
return DbgFunctions()->VaToFileOffset(rvaToVa(getInitialSelection())) != 0;
});
mMenuBuilder->addMenu(makeMenu(DIcon("copy.png"), tr("&Copy")), wCopyMenu);
mMenuBuilder->addMenu(makeMenu(DIcon("copy"), tr("&Copy")), wCopyMenu);
mMenuBuilder->addAction(makeShortcutAction(DIcon("eraser.png"), tr("&Restore selection"), SLOT(undoSelectionSlot()), "ActionUndoSelection"), [this](QMenu*)
mMenuBuilder->addAction(makeShortcutAction(DIcon("eraser"), tr("&Restore selection"), SLOT(undoSelectionSlot()), "ActionUndoSelection"), [this](QMenu*)
{
return DbgFunctions()->PatchInRange(rvaToVa(getSelectionStart()), rvaToVa(getSelectionEnd()));
});
@ -90,7 +90,7 @@ void CPUDump::setupContextMenu()
return DbgMemIsValidReadPtr(ptr);
};
mMenuBuilder->addAction(makeShortcutAction(DIcon("modify.png"), tr("&Modify Value"), SLOT(modifyValueSlot()), "ActionModifyValue"), [this](QMenu*)
mMenuBuilder->addAction(makeShortcutAction(DIcon("modify"), tr("&Modify Value"), SLOT(modifyValueSlot()), "ActionModifyValue"), [this](QMenu*)
{
auto d = mDescriptor.at(0).data;
return getSizeOf(d.itemSize) <= sizeof(duint) || (d.itemSize == 4 && d.dwordMode == FloatDword || d.itemSize == 8 && d.qwordMode == DoubleQword);
@ -121,84 +121,84 @@ void CPUDump::setupContextMenu()
{
return (DbgGetBpxTypeAt(rvaToVa(getSelectionStart())) & bp_memory) == 0;
});
wHardwareAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_byte.png"), tr("&Byte"), "bphws $, r, 1"));
wHardwareAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_word.png"), tr("&Word"), "bphws $, r, 2"));
wHardwareAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_dword.png"), tr("&Dword"), "bphws $, r, 4"));
wHardwareAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_byte"), tr("&Byte"), "bphws $, r, 1"));
wHardwareAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_word"), tr("&Word"), "bphws $, r, 2"));
wHardwareAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_dword"), tr("&Dword"), "bphws $, r, 4"));
#ifdef _WIN64
wHardwareAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_qword.png"), tr("&Qword"), "bphws $, r, 8"));
wHardwareAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_qword"), tr("&Qword"), "bphws $, r, 8"));
#endif //_WIN64
wHardwareWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_byte.png"), tr("&Byte"), "bphws $, w, 1"));
wHardwareWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_word.png"), tr("&Word"), "bphws $, w, 2"));
wHardwareWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_dword.png"), tr("&Dword"), "bphws $, w, 4"));
wHardwareWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_byte"), tr("&Byte"), "bphws $, w, 1"));
wHardwareWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_word"), tr("&Word"), "bphws $, w, 2"));
wHardwareWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_dword"), tr("&Dword"), "bphws $, w, 4"));
#ifdef _WIN64
wHardwareWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_qword.png"), tr("&Qword"), "bphws $, w, 8"));
wHardwareWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_qword"), tr("&Qword"), "bphws $, w, 8"));
#endif //_WIN64
wBreakpointMenu->addMenu(makeMenu(DIcon("breakpoint_access.png"), tr("Hardware, &Access")), wHardwareAccessMenu);
wBreakpointMenu->addMenu(makeMenu(DIcon("breakpoint_write.png"), tr("Hardware, &Write")), wHardwareWriteMenu);
wBreakpointMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_execute.png"), tr("Hardware, &Execute"), "bphws $, x"), [this](QMenu*)
wBreakpointMenu->addMenu(makeMenu(DIcon("breakpoint_access"), tr("Hardware, &Access")), wHardwareAccessMenu);
wBreakpointMenu->addMenu(makeMenu(DIcon("breakpoint_write"), tr("Hardware, &Write")), wHardwareWriteMenu);
wBreakpointMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_execute"), tr("Hardware, &Execute"), "bphws $, x"), [this](QMenu*)
{
return (DbgGetBpxTypeAt(rvaToVa(getSelectionStart())) & bp_hardware) == 0;
});
wBreakpointMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_remove.png"), tr("Remove &Hardware"), "bphwc $"), [this](QMenu*)
wBreakpointMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_remove"), tr("Remove &Hardware"), "bphwc $"), [this](QMenu*)
{
return (DbgGetBpxTypeAt(rvaToVa(getSelectionStart())) & bp_hardware) != 0;
});
wBreakpointMenu->addSeparator();
wMemoryAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_memory_singleshoot.png"), tr("&Singleshoot"), "bpm $, 0, a"));
wMemoryAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_memory_restore_on_hit.png"), tr("&Restore on hit"), "bpm $, 1, a"));
wMemoryReadMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_memory_singleshoot.png"), tr("&Singleshoot"), "bpm $, 0, r"));
wMemoryReadMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_memory_restore_on_hit.png"), tr("&Restore on hit"), "bpm $, 1, r"));
wMemoryWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_memory_singleshoot.png"), tr("&Singleshoot"), "bpm $, 0, w"));
wMemoryWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_memory_restore_on_hit.png"), tr("&Restore on hit"), "bpm $, 1, w"));
wMemoryExecuteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_memory_singleshoot.png"), tr("&Singleshoot"), "bpm $, 0, x"));
wMemoryExecuteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_memory_restore_on_hit.png"), tr("&Restore on hit"), "bpm $, 1, x"));
wBreakpointMenu->addMenu(makeMenu(DIcon("breakpoint_memory_access.png"), tr("Memory, Access")), wMemoryAccessMenu);
wBreakpointMenu->addMenu(makeMenu(DIcon("breakpoint_memory_read.png"), tr("Memory, Read")), wMemoryReadMenu);
wBreakpointMenu->addMenu(makeMenu(DIcon("breakpoint_memory_write.png"), tr("Memory, Write")), wMemoryWriteMenu);
wBreakpointMenu->addMenu(makeMenu(DIcon("breakpoint_memory_execute.png"), tr("Memory, Execute")), wMemoryExecuteMenu);
wBreakpointMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_remove.png"), tr("Remove &Memory"), "bpmc $"), [this](QMenu*)
wMemoryAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_memory_singleshoot"), tr("&Singleshoot"), "bpm $, 0, a"));
wMemoryAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_memory_restore_on_hit"), tr("&Restore on hit"), "bpm $, 1, a"));
wMemoryReadMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_memory_singleshoot"), tr("&Singleshoot"), "bpm $, 0, r"));
wMemoryReadMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_memory_restore_on_hit"), tr("&Restore on hit"), "bpm $, 1, r"));
wMemoryWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_memory_singleshoot"), tr("&Singleshoot"), "bpm $, 0, w"));
wMemoryWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_memory_restore_on_hit"), tr("&Restore on hit"), "bpm $, 1, w"));
wMemoryExecuteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_memory_singleshoot"), tr("&Singleshoot"), "bpm $, 0, x"));
wMemoryExecuteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_memory_restore_on_hit"), tr("&Restore on hit"), "bpm $, 1, x"));
wBreakpointMenu->addMenu(makeMenu(DIcon("breakpoint_memory_access"), tr("Memory, Access")), wMemoryAccessMenu);
wBreakpointMenu->addMenu(makeMenu(DIcon("breakpoint_memory_read"), tr("Memory, Read")), wMemoryReadMenu);
wBreakpointMenu->addMenu(makeMenu(DIcon("breakpoint_memory_write"), tr("Memory, Write")), wMemoryWriteMenu);
wBreakpointMenu->addMenu(makeMenu(DIcon("breakpoint_memory_execute"), tr("Memory, Execute")), wMemoryExecuteMenu);
wBreakpointMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_remove"), tr("Remove &Memory"), "bpmc $"), [this](QMenu*)
{
return (DbgGetBpxTypeAt(rvaToVa(getSelectionStart())) & bp_memory) != 0;
});
mMenuBuilder->addMenu(makeMenu(DIcon("breakpoint.png"), tr("&Breakpoint")), wBreakpointMenu);
mMenuBuilder->addMenu(makeMenu(DIcon("breakpoint"), tr("&Breakpoint")), wBreakpointMenu);
mMenuBuilder->addAction(makeShortcutAction(DIcon("search-for.png"), tr("&Find Pattern..."), SLOT(findPattern()), "ActionFindPattern"));
mMenuBuilder->addAction(makeShortcutAction(DIcon("find.png"), tr("Find &References"), SLOT(findReferencesSlot()), "ActionFindReferences"));
mMenuBuilder->addAction(makeShortcutAction(DIcon("search-for"), tr("&Find Pattern..."), SLOT(findPattern()), "ActionFindPattern"));
mMenuBuilder->addAction(makeShortcutAction(DIcon("find"), tr("Find &References"), SLOT(findReferencesSlot()), "ActionFindReferences"));
mMenuBuilder->addAction(makeShortcutAction(DIcon("sync.png"), tr("&Sync with expression"), SLOT(syncWithExpressionSlot()), "ActionSyncWithExpression"));
mMenuBuilder->addAction(makeShortcutAction(DIcon("memmap_alloc_memory.png"), tr("Allocate Memory"), SLOT(allocMemorySlot()), "ActionAllocateMemory"));
mMenuBuilder->addAction(makeShortcutAction(DIcon("sync"), tr("&Sync with expression"), SLOT(syncWithExpressionSlot()), "ActionSyncWithExpression"));
mMenuBuilder->addAction(makeShortcutAction(DIcon("memmap_alloc_memory"), tr("Allocate Memory"), SLOT(allocMemorySlot()), "ActionAllocateMemory"));
MenuBuilder* wGotoMenu = new MenuBuilder(this);
wGotoMenu->addAction(makeShortcutAction(DIcon("geolocation-goto.png"), tr("&Expression"), SLOT(gotoExpressionSlot()), "ActionGotoExpression"));
wGotoMenu->addAction(makeShortcutAction(DIcon("fileoffset.png"), tr("File Offset"), SLOT(gotoFileOffsetSlot()), "ActionGotoFileOffset"));
wGotoMenu->addAction(makeShortcutAction(DIcon("top.png"), tr("Start of Page"), SLOT(gotoStartSlot()), "ActionGotoStart"), [this](QMenu*)
wGotoMenu->addAction(makeShortcutAction(DIcon("geolocation-goto"), tr("&Expression"), SLOT(gotoExpressionSlot()), "ActionGotoExpression"));
wGotoMenu->addAction(makeShortcutAction(DIcon("fileoffset"), tr("File Offset"), SLOT(gotoFileOffsetSlot()), "ActionGotoFileOffset"));
wGotoMenu->addAction(makeShortcutAction(DIcon("top"), tr("Start of Page"), SLOT(gotoStartSlot()), "ActionGotoStart"), [this](QMenu*)
{
return getSelectionStart() != 0;
});
wGotoMenu->addAction(makeShortcutAction(DIcon("bottom.png"), tr("End of Page"), SLOT(gotoEndSlot()), "ActionGotoEnd"));
wGotoMenu->addAction(makeShortcutAction(DIcon("previous.png"), tr("Previous"), SLOT(gotoPreviousSlot()), "ActionGotoPrevious"), [this](QMenu*)
wGotoMenu->addAction(makeShortcutAction(DIcon("bottom"), tr("End of Page"), SLOT(gotoEndSlot()), "ActionGotoEnd"));
wGotoMenu->addAction(makeShortcutAction(DIcon("previous"), tr("Previous"), SLOT(gotoPreviousSlot()), "ActionGotoPrevious"), [this](QMenu*)
{
return mHistory.historyHasPrev();
});
wGotoMenu->addAction(makeShortcutAction(DIcon("next.png"), tr("Next"), SLOT(gotoNextSlot()), "ActionGotoNext"), [this](QMenu*)
wGotoMenu->addAction(makeShortcutAction(DIcon("next"), tr("Next"), SLOT(gotoNextSlot()), "ActionGotoNext"), [this](QMenu*)
{
return mHistory.historyHasNext();
});
wGotoMenu->addAction(makeShortcutAction(DIcon("prevref.png"), tr("Previous Reference"), SLOT(gotoPreviousReferenceSlot()), "ActionGotoPreviousReference"), [](QMenu*)
wGotoMenu->addAction(makeShortcutAction(DIcon("prevref"), tr("Previous Reference"), SLOT(gotoPreviousReferenceSlot()), "ActionGotoPreviousReference"), [](QMenu*)
{
return !!DbgEval("refsearch.count() && ($__dump_refindex > 0 || dump.sel() != refsearch.addr($__dump_refindex))");
});
wGotoMenu->addAction(makeShortcutAction(DIcon("nextref.png"), tr("Next Reference"), SLOT(gotoNextReferenceSlot()), "ActionGotoNextReference"), [](QMenu*)
wGotoMenu->addAction(makeShortcutAction(DIcon("nextref"), tr("Next Reference"), SLOT(gotoNextReferenceSlot()), "ActionGotoNextReference"), [](QMenu*)
{
return !!DbgEval("refsearch.count() && ($__dump_refindex < refsearch.count() || dump.sel() != refsearch.addr($__dump_refindex))");
});
mMenuBuilder->addMenu(makeMenu(DIcon("goto.png"), tr("&Go to")), wGotoMenu);
mMenuBuilder->addMenu(makeMenu(DIcon("goto"), tr("&Go to")), wGotoMenu);
mMenuBuilder->addSeparator();
MenuBuilder* wHexMenu = new MenuBuilder(this);
wHexMenu->addAction(makeAction(DIcon("ascii.png"), tr("&ASCII"), SLOT(hexAsciiSlot())));
wHexMenu->addAction(makeAction(DIcon("ascii-extended.png"), tr("&Extended ASCII"), SLOT(hexUnicodeSlot())));
QAction* wHexLastCodepage = makeAction(DIcon("codepage.png"), "?", SLOT(hexLastCodepageSlot()));
wHexMenu->addAction(makeAction(DIcon("ascii"), tr("&ASCII"), SLOT(hexAsciiSlot())));
wHexMenu->addAction(makeAction(DIcon("ascii-extended"), tr("&Extended ASCII"), SLOT(hexUnicodeSlot())));
QAction* wHexLastCodepage = makeAction(DIcon("codepage"), "?", SLOT(hexLastCodepageSlot()));
wHexMenu->addAction(wHexLastCodepage, [wHexLastCodepage](QMenu*)
{
duint lastCodepage;
@ -208,13 +208,13 @@ void CPUDump::setupContextMenu()
wHexLastCodepage->setText(QString::fromLocal8Bit(allCodecs.at(lastCodepage)));
return true;
});
wHexMenu->addAction(makeAction(DIcon("codepage.png"), tr("&Codepage..."), SLOT(hexCodepageSlot())));
mMenuBuilder->addMenu(makeMenu(DIcon("hex.png"), tr("&Hex")), wHexMenu);
wHexMenu->addAction(makeAction(DIcon("codepage"), tr("&Codepage..."), SLOT(hexCodepageSlot())));
mMenuBuilder->addMenu(makeMenu(DIcon("hex"), tr("&Hex")), wHexMenu);
MenuBuilder* wTextMenu = new MenuBuilder(this);
wTextMenu->addAction(makeAction(DIcon("ascii.png"), tr("&ASCII"), SLOT(textAsciiSlot())));
wTextMenu->addAction(makeAction(DIcon("ascii-extended.png"), tr("&Extended ASCII"), SLOT(textUnicodeSlot())));
QAction* wTextLastCodepage = makeAction(DIcon("codepage.png"), "?", SLOT(textLastCodepageSlot()));
wTextMenu->addAction(makeAction(DIcon("ascii"), tr("&ASCII"), SLOT(textAsciiSlot())));
wTextMenu->addAction(makeAction(DIcon("ascii-extended"), tr("&Extended ASCII"), SLOT(textUnicodeSlot())));
QAction* wTextLastCodepage = makeAction(DIcon("codepage"), "?", SLOT(textLastCodepageSlot()));
wTextMenu->addAction(wTextLastCodepage, [wTextLastCodepage](QMenu*)
{
duint lastCodepage;
@ -224,31 +224,31 @@ void CPUDump::setupContextMenu()
wTextLastCodepage->setText(QString::fromLocal8Bit(allCodecs.at(lastCodepage)));
return true;
});
wTextMenu->addAction(makeAction(DIcon("codepage.png"), tr("&Codepage..."), SLOT(textCodepageSlot())));
mMenuBuilder->addMenu(makeMenu(DIcon("strings.png"), tr("&Text")), wTextMenu);
wTextMenu->addAction(makeAction(DIcon("codepage"), tr("&Codepage..."), SLOT(textCodepageSlot())));
mMenuBuilder->addMenu(makeMenu(DIcon("strings"), tr("&Text")), wTextMenu);
MenuBuilder* wIntegerMenu = new MenuBuilder(this);
wIntegerMenu->addAction(makeAction(DIcon("byte.png"), tr("Signed byte (8-bit)"), SLOT(integerSignedByteSlot())));
wIntegerMenu->addAction(makeAction(DIcon("word.png"), tr("Signed short (16-bit)"), SLOT(integerSignedShortSlot())));
wIntegerMenu->addAction(makeAction(DIcon("dword.png"), tr("Signed long (32-bit)"), SLOT(integerSignedLongSlot())));
wIntegerMenu->addAction(makeAction(DIcon("qword.png"), tr("Signed long long (64-bit)"), SLOT(integerSignedLongLongSlot())));
wIntegerMenu->addAction(makeAction(DIcon("byte.png"), tr("Unsigned byte (8-bit)"), SLOT(integerUnsignedByteSlot())));
wIntegerMenu->addAction(makeAction(DIcon("word.png"), tr("Unsigned short (16-bit)"), SLOT(integerUnsignedShortSlot())));
wIntegerMenu->addAction(makeAction(DIcon("dword.png"), tr("Unsigned long (32-bit)"), SLOT(integerUnsignedLongSlot())));
wIntegerMenu->addAction(makeAction(DIcon("qword.png"), tr("Unsigned long long (64-bit)"), SLOT(integerUnsignedLongLongSlot())));
wIntegerMenu->addAction(makeAction(DIcon("word.png"), tr("Hex short (16-bit)"), SLOT(integerHexShortSlot())));
wIntegerMenu->addAction(makeAction(DIcon("dword.png"), tr("Hex long (32-bit)"), SLOT(integerHexLongSlot())));
wIntegerMenu->addAction(makeAction(DIcon("qword.png"), tr("Hex long long (64-bit)"), SLOT(integerHexLongLongSlot())));
mMenuBuilder->addMenu(makeMenu(DIcon("integer.png"), tr("&Integer")), wIntegerMenu);
wIntegerMenu->addAction(makeAction(DIcon("byte"), tr("Signed byte (8-bit)"), SLOT(integerSignedByteSlot())));
wIntegerMenu->addAction(makeAction(DIcon("word"), tr("Signed short (16-bit)"), SLOT(integerSignedShortSlot())));
wIntegerMenu->addAction(makeAction(DIcon("dword"), tr("Signed long (32-bit)"), SLOT(integerSignedLongSlot())));
wIntegerMenu->addAction(makeAction(DIcon("qword"), tr("Signed long long (64-bit)"), SLOT(integerSignedLongLongSlot())));
wIntegerMenu->addAction(makeAction(DIcon("byte"), tr("Unsigned byte (8-bit)"), SLOT(integerUnsignedByteSlot())));
wIntegerMenu->addAction(makeAction(DIcon("word"), tr("Unsigned short (16-bit)"), SLOT(integerUnsignedShortSlot())));
wIntegerMenu->addAction(makeAction(DIcon("dword"), tr("Unsigned long (32-bit)"), SLOT(integerUnsignedLongSlot())));
wIntegerMenu->addAction(makeAction(DIcon("qword"), tr("Unsigned long long (64-bit)"), SLOT(integerUnsignedLongLongSlot())));
wIntegerMenu->addAction(makeAction(DIcon("word"), tr("Hex short (16-bit)"), SLOT(integerHexShortSlot())));
wIntegerMenu->addAction(makeAction(DIcon("dword"), tr("Hex long (32-bit)"), SLOT(integerHexLongSlot())));
wIntegerMenu->addAction(makeAction(DIcon("qword"), tr("Hex long long (64-bit)"), SLOT(integerHexLongLongSlot())));
mMenuBuilder->addMenu(makeMenu(DIcon("integer"), tr("&Integer")), wIntegerMenu);
MenuBuilder* wFloatMenu = new MenuBuilder(this);
wFloatMenu->addAction(makeAction(DIcon("32bit-float.png"), tr("&Float (32-bit)"), SLOT(floatFloatSlot())));
wFloatMenu->addAction(makeAction(DIcon("64bit-float.png"), tr("&Double (64-bit)"), SLOT(floatDoubleSlot())));
wFloatMenu->addAction(makeAction(DIcon("80bit-float.png"), tr("&Long double (80-bit)"), SLOT(floatLongDoubleSlot())));
mMenuBuilder->addMenu(makeMenu(DIcon("float.png"), tr("&Float")), wFloatMenu);
wFloatMenu->addAction(makeAction(DIcon("32bit-float"), tr("&Float (32-bit)"), SLOT(floatFloatSlot())));
wFloatMenu->addAction(makeAction(DIcon("64bit-float"), tr("&Double (64-bit)"), SLOT(floatDoubleSlot())));
wFloatMenu->addAction(makeAction(DIcon("80bit-float"), tr("&Long double (80-bit)"), SLOT(floatLongDoubleSlot())));
mMenuBuilder->addMenu(makeMenu(DIcon("float"), tr("&Float")), wFloatMenu);
mMenuBuilder->addAction(makeAction(DIcon("address.png"), tr("&Address"), SLOT(addressAsciiSlot())));
mMenuBuilder->addAction(makeAction(DIcon("processor-cpu.png"), tr("&Disassembly"), SLOT(disassemblySlot())));
mMenuBuilder->addAction(makeAction(DIcon("address"), tr("&Address"), SLOT(addressAsciiSlot())));
mMenuBuilder->addAction(makeAction(DIcon("processor-cpu"), tr("&Disassembly"), SLOT(disassemblySlot())));
mMenuBuilder->addSeparator();
mMenuBuilder->addBuilder(new MenuBuilder(this, [this](QMenu * menu)

View File

@ -592,7 +592,7 @@ void CPUInfoBox::addModifyValueMenuItem(QMenu* menu, QString name, duint value)
void CPUInfoBox::setupModifyValueMenu(QMenu* menu, duint wVA)
{
menu->setIcon(DIcon("modify.png"));
menu->setIcon(DIcon("modify"));
//add follow actions
DISASM_INSTR instr;
@ -654,7 +654,7 @@ void CPUInfoBox::addFollowMenuItem(QMenu* menu, QString name, duint value)
*/
void CPUInfoBox::setupFollowMenu(QMenu* menu, duint wVA)
{
menu->setIcon(DIcon("dump.png"));
menu->setIcon(DIcon("dump"));
//most basic follow action
addFollowMenuItem(menu, tr("&Selected Address"), wVA);
@ -718,7 +718,7 @@ void CPUInfoBox::addWatchMenuItem(QMenu* menu, QString name, duint value)
*/
void CPUInfoBox::setupWatchMenu(QMenu* menu, duint wVA)
{
menu->setIcon(DIcon("animal-dog.png"));
menu->setIcon(DIcon("animal-dog"));
//most basic follow action
addWatchMenuItem(menu, tr("&Selected Address"), wVA);
@ -817,7 +817,7 @@ void CPUInfoBox::contextMenuSlot(QPoint pos)
setupWatchMenu(&wWatchMenu, curAddr);
wMenu.addMenu(&wWatchMenu);
if(!getInfoLine(2).isEmpty())
wMenu.addAction(makeAction(DIcon("xrefs.png"), tr("&Show References"), SLOT(findXReferencesSlot())));
wMenu.addAction(makeAction(DIcon("xrefs"), tr("&Show References"), SLOT(findXReferencesSlot())));
QMenu wCopyMenu(tr("&Copy"), this);
setupCopyMenu(&wCopyMenu);
if(DbgIsDebugging())

View File

@ -17,7 +17,7 @@ CPUMultiDump::CPUMultiDump(CPUDisassembly* disas, int nbCpuDumpTabs, QWidget* pa
mInitAllDumpTabs = false;
mDumpPluginMenu = new QMenu(this);
mDumpPluginMenu->setIcon(DIcon("plugin.png"));
mDumpPluginMenu->setIcon(DIcon("plugin"));
Bridge::getBridge()->emitMenuAddToList(this, mDumpPluginMenu, GUI_DUMP_MENU);
for(uint i = 0; i < mMaxCPUDumpTabs; i++)
@ -27,7 +27,7 @@ CPUMultiDump::CPUMultiDump(CPUDisassembly* disas, int nbCpuDumpTabs, QWidget* pa
connect(cpuDump, SIGNAL(displayReferencesWidget()), this, SLOT(displayReferencesWidgetSlot()));
connect(cpuDump, SIGNAL(showDisassemblyTab(duint, duint, duint)), this, SLOT(showDisassemblyTabSlot(duint, duint, duint)));
auto nativeTitle = QString("Dump ") + QString::number(i + 1);
this->addTabEx(cpuDump, DIcon("dump.png"), tr("Dump ") + QString::number(i + 1), nativeTitle);
this->addTabEx(cpuDump, DIcon("dump"), tr("Dump ") + QString::number(i + 1), nativeTitle);
cpuDump->setWindowTitle(nativeTitle);
}
@ -37,12 +37,12 @@ CPUMultiDump::CPUMultiDump(CPUDisassembly* disas, int nbCpuDumpTabs, QWidget* pa
//mMaxCPUDumpTabs++;
auto nativeTitle = QString("Watch 1");
this->addTabEx(mWatch, DIcon("animal-dog.png"), tr("Watch ") + QString::number(1), nativeTitle);
this->addTabEx(mWatch, DIcon("animal-dog"), tr("Watch ") + QString::number(1), nativeTitle);
mWatch->setWindowTitle(nativeTitle);
mWatch->loadColumnFromConfig("Watch1");
mLocalVars = new LocalVarsView(this);
this->addTabEx(mLocalVars, DIcon("localvars.png"), tr("Locals"), "Locals");
this->addTabEx(mLocalVars, DIcon("localvars"), tr("Locals"), "Locals");
mStructWidget = new StructWidget(this);
this->addTabEx(mStructWidget, mStructWidget->windowIcon(), mStructWidget->windowTitle(), "Struct");
@ -241,7 +241,7 @@ void CPUMultiDump::showDisassemblyTabSlot(duint selectionStart, duint selectionE
if(!mDisassembly)
{
mDisassembly = new CPUDisassembly(this, false);
this->addTabEx(mDisassembly, DIcon(ArchValue("processor32.png", "processor64.png")), tr("Disassembly"), "DumpDisassembly");
this->addTabEx(mDisassembly, DIcon(ArchValue("processor32", "processor64")), tr("Disassembly"), "DumpDisassembly");
}
// Set CIP
auto clearHistory = mDisassembly->getBase() == 0;

View File

@ -14,19 +14,19 @@
CPURegistersView::CPURegistersView(CPUWidget* parent) : RegistersView(parent), mParent(parent)
{
// precreate ContextMenu Actions
wCM_Modify = new QAction(DIcon("register_edit.png"), tr("Modify value"), this);
wCM_Modify = new QAction(DIcon("register_edit"), tr("Modify value"), this);
wCM_Modify->setShortcut(QKeySequence(Qt::Key_Enter));
wCM_ToggleValue = setupAction(DIcon("register_toggle.png"), tr("Toggle"));
wCM_Undo = setupAction(DIcon("undo.png"), tr("Undo"));
wCM_CopyPrevious = setupAction(DIcon("undo.png"), "");
wCM_FollowInDisassembly = new QAction(DIcon(QString("processor%1.png").arg(ArchValue("32", "64"))), tr("Follow in Disassembler"), this);
wCM_FollowInDump = new QAction(DIcon("dump.png"), tr("Follow in Dump"), this);
wCM_FollowInStack = new QAction(DIcon("stack.png"), tr("Follow in Stack"), this);
wCM_ToggleValue = setupAction(DIcon("register_toggle"), tr("Toggle"));
wCM_Undo = setupAction(DIcon("undo"), tr("Undo"));
wCM_CopyPrevious = setupAction(DIcon("undo"), "");
wCM_FollowInDisassembly = new QAction(DIcon(QString("processor%1").arg(ArchValue("32", "64"))), tr("Follow in Disassembler"), this);
wCM_FollowInDump = new QAction(DIcon("dump"), tr("Follow in Dump"), this);
wCM_FollowInStack = new QAction(DIcon("stack"), tr("Follow in Stack"), this);
wCM_FollowInMemoryMap = new QAction(DIcon("memmap_find_address_page"), tr("Follow in Memory Map"), this);
wCM_RemoveHardware = new QAction(DIcon("breakpoint_remove.png"), tr("&Remove hardware breakpoint"), this);
wCM_Incrementx87Stack = setupAction(DIcon("arrow-small-down.png"), tr("Increment x87 Stack"));
wCM_Decrementx87Stack = setupAction(DIcon("arrow-small-up.png"), tr("Decrement x87 Stack"));
wCM_Highlight = setupAction(DIcon("highlight.png"), tr("Highlight"));
wCM_RemoveHardware = new QAction(DIcon("breakpoint_remove"), tr("&Remove hardware breakpoint"), this);
wCM_Incrementx87Stack = setupAction(DIcon("arrow-small-down"), tr("Increment x87 Stack"));
wCM_Decrementx87Stack = setupAction(DIcon("arrow-small-up"), tr("Decrement x87 Stack"));
wCM_Highlight = setupAction(DIcon("highlight"), tr("Highlight"));
// foreign messages
connect(Bridge::getBridge(), SIGNAL(updateRegisters()), this, SLOT(updateRegistersSlot()));
connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(displayCustomContextMenuSlot(QPoint)));
@ -249,7 +249,7 @@ void CPURegistersView::displayEditDialog()
mLineEdit.setText(GetRegStringValueFromValue(mSelected, registerValue(&wRegDumpStruct, mSelected)));
mLineEdit.setWindowTitle(tr("Edit FPU register"));
mLineEdit.setWindowIcon(DIcon("log.png"));
mLineEdit.setWindowIcon(DIcon("log"));
mLineEdit.setCursorPosition(0);
auto sizeRegister = int(GetSizeRegister(mSelected));
if(sizeRegister == 10)
@ -393,7 +393,7 @@ void CPURegistersView::CreateDumpNMenu(QMenu* dumpMenu)
{
QList<QString> names;
CPUMultiDump* multiDump = mParent->getDumpWidget();
dumpMenu->setIcon(DIcon("dump.png"));
dumpMenu->setIcon(DIcon("dump"));
int maxDumps = multiDump->getMaxCPUTabs();
multiDump->getTabNames(names);
for(int i = 0; i < maxDumps; i++)
@ -633,7 +633,7 @@ void CPURegistersView::displayCustomContextMenuSlot(QPoint pos)
if(mFpuMode != 2)
wMenu.addAction(mDisplayMMX);
wMenu.addSeparator();
QAction* wHwbpCsp = wMenu.addAction(DIcon("breakpoint.png"), tr("Set Hardware Breakpoint on %1").arg(ArchValue("ESP", "RSP")));
QAction* wHwbpCsp = wMenu.addAction(DIcon("breakpoint"), tr("Set Hardware Breakpoint on %1").arg(ArchValue("ESP", "RSP")));
QAction* wAction = wMenu.exec(this->mapToGlobal(pos));
if(wAction == wHwbpCsp)

View File

@ -89,35 +89,35 @@ void CPUStack::setupContextMenu()
});
//Realign
mMenuBuilder->addAction(makeAction(DIcon("align-stack-pointer.png"), tr("Align Stack Pointer"), SLOT(realignSlot())), [this](QMenu*)
mMenuBuilder->addAction(makeAction(DIcon("align-stack-pointer"), tr("Align Stack Pointer"), SLOT(realignSlot())), [this](QMenu*)
{
return (mCsp & (sizeof(duint) - 1)) != 0;
});
// Modify
mMenuBuilder->addAction(makeAction(DIcon("modify.png"), tr("Modify"), SLOT(modifySlot())));
mMenuBuilder->addAction(makeAction(DIcon("modify"), tr("Modify"), SLOT(modifySlot())));
auto binaryMenu = new MenuBuilder(this);
//Binary->Edit
binaryMenu->addAction(makeShortcutAction(DIcon("binary_edit.png"), tr("&Edit"), SLOT(binaryEditSlot()), "ActionBinaryEdit"));
binaryMenu->addAction(makeShortcutAction(DIcon("binary_edit"), tr("&Edit"), SLOT(binaryEditSlot()), "ActionBinaryEdit"));
//Binary->Fill
binaryMenu->addAction(makeShortcutAction(DIcon("binary_fill.png"), tr("&Fill..."), SLOT(binaryFillSlot()), "ActionBinaryFill"));
binaryMenu->addAction(makeShortcutAction(DIcon("binary_fill"), tr("&Fill..."), SLOT(binaryFillSlot()), "ActionBinaryFill"));
//Binary->Separator
binaryMenu->addSeparator();
//Binary->Copy
binaryMenu->addAction(makeShortcutAction(DIcon("binary_copy.png"), tr("&Copy"), SLOT(binaryCopySlot()), "ActionBinaryCopy"));
binaryMenu->addAction(makeShortcutAction(DIcon("binary_copy"), tr("&Copy"), SLOT(binaryCopySlot()), "ActionBinaryCopy"));
//Binary->Paste
binaryMenu->addAction(makeShortcutAction(DIcon("binary_paste.png"), tr("&Paste"), SLOT(binaryPasteSlot()), "ActionBinaryPaste"));
binaryMenu->addAction(makeShortcutAction(DIcon("binary_paste"), tr("&Paste"), SLOT(binaryPasteSlot()), "ActionBinaryPaste"));
//Binary->Paste (Ignore Size)
binaryMenu->addAction(makeShortcutAction(DIcon("binary_paste_ignoresize.png"), tr("Paste (&Ignore Size)"), SLOT(binaryPasteIgnoreSizeSlot()), "ActionBinaryPasteIgnoreSize"));
binaryMenu->addAction(makeShortcutAction(DIcon("binary_paste_ignoresize"), tr("Paste (&Ignore Size)"), SLOT(binaryPasteIgnoreSizeSlot()), "ActionBinaryPasteIgnoreSize"));
mMenuBuilder->addMenu(makeMenu(DIcon("binary.png"), tr("B&inary")), binaryMenu);
mMenuBuilder->addMenu(makeMenu(DIcon("binary"), tr("B&inary")), binaryMenu);
auto copyMenu = new MenuBuilder(this);
copyMenu->addAction(mCopySelection);
@ -126,41 +126,41 @@ void CPUStack::setupContextMenu()
{
return DbgFunctions()->ModBaseFromAddr(rvaToVa(getInitialSelection())) != 0;
});
mMenuBuilder->addMenu(makeMenu(DIcon("copy.png"), tr("&Copy")), copyMenu);
mMenuBuilder->addMenu(makeMenu(DIcon("copy"), tr("&Copy")), copyMenu);
//Breakpoint (hardware access) menu
auto hardwareAccessMenu = makeMenu(DIcon("breakpoint_access.png"), tr("Hardware, Access"));
hardwareAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_byte.png"), tr("&Byte"), "bphws $, r, 1"));
hardwareAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_word.png"), tr("&Word"), "bphws $, r, 2"));
hardwareAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_dword.png"), tr("&Dword"), "bphws $, r, 4"));
auto hardwareAccessMenu = makeMenu(DIcon("breakpoint_access"), tr("Hardware, Access"));
hardwareAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_byte"), tr("&Byte"), "bphws $, r, 1"));
hardwareAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_word"), tr("&Word"), "bphws $, r, 2"));
hardwareAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_dword"), tr("&Dword"), "bphws $, r, 4"));
#ifdef _WIN64
hardwareAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_qword.png"), tr("&Qword"), "bphws $, r, 8"));
hardwareAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_qword"), tr("&Qword"), "bphws $, r, 8"));
#endif //_WIN64
//Breakpoint (hardware write) menu
auto hardwareWriteMenu = makeMenu(DIcon("breakpoint_write.png"), tr("Hardware, Write"));
hardwareWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_byte.png"), tr("&Byte"), "bphws $, w, 1"));
hardwareWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_word.png"), tr("&Word"), "bphws $, w, 2"));
hardwareWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_dword.png"), tr("&Dword"), "bphws $, w, 4"));
auto hardwareWriteMenu = makeMenu(DIcon("breakpoint_write"), tr("Hardware, Write"));
hardwareWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_byte"), tr("&Byte"), "bphws $, w, 1"));
hardwareWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_word"), tr("&Word"), "bphws $, w, 2"));
hardwareWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_dword"), tr("&Dword"), "bphws $, w, 4"));
#ifdef _WIN64
hardwareWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_qword.png"), tr("&Qword"), "bphws $, r, 8"));
hardwareWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_qword"), tr("&Qword"), "bphws $, r, 8"));
#endif //_WIN64
//Breakpoint (remove hardware)
auto hardwareRemove = mCommonActions->makeCommandAction(DIcon("breakpoint_remove.png"), tr("Remove &Hardware"), "bphwc $");
auto hardwareRemove = mCommonActions->makeCommandAction(DIcon("breakpoint_remove"), tr("Remove &Hardware"), "bphwc $");
//Breakpoint (memory access) menu
auto memoryAccessMenu = makeMenu(DIcon("breakpoint_memory_access.png"), tr("Memory, Access"));
memoryAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_memory_singleshoot.png"), tr("&Singleshoot"), "bpm $, 0, a"));
memoryAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_memory_restore_on_hit.png"), tr("&Restore on hit"), "bpm $, 1, a"));
auto memoryAccessMenu = makeMenu(DIcon("breakpoint_memory_access"), tr("Memory, Access"));
memoryAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_memory_singleshoot"), tr("&Singleshoot"), "bpm $, 0, a"));
memoryAccessMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_memory_restore_on_hit"), tr("&Restore on hit"), "bpm $, 1, a"));
//Breakpoint (memory write) menu
auto memoryWriteMenu = makeMenu(DIcon("breakpoint_memory_write.png"), tr("Memory, Write"));
memoryWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_memory_singleshoot.png"), tr("&Singleshoot"), "bpm $, 0, w"));
memoryWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_memory_restore_on_hit.png"), tr("&Restore on hit"), "bpm $, 1, w"));
auto memoryWriteMenu = makeMenu(DIcon("breakpoint_memory_write"), tr("Memory, Write"));
memoryWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_memory_singleshoot"), tr("&Singleshoot"), "bpm $, 0, w"));
memoryWriteMenu->addAction(mCommonActions->makeCommandAction(DIcon("breakpoint_memory_restore_on_hit"), tr("&Restore on hit"), "bpm $, 1, w"));
//Breakpoint (remove memory) menu
auto memoryRemove = mCommonActions->makeCommandAction(DIcon("breakpoint_remove.png"), tr("Remove &Memory"), "bpmc $");
auto memoryRemove = mCommonActions->makeCommandAction(DIcon("breakpoint_remove"), tr("Remove &Memory"), "bpmc $");
//Breakpoint menu
auto breakpointMenu = new MenuBuilder(this);
@ -192,10 +192,10 @@ void CPUStack::setupContextMenu()
}
return true;
}));
mMenuBuilder->addMenu(makeMenu(DIcon("breakpoint.png"), tr("Brea&kpoint")), breakpointMenu);
mMenuBuilder->addMenu(makeMenu(DIcon("breakpoint"), tr("Brea&kpoint")), breakpointMenu);
// Restore Selection
mMenuBuilder->addAction(makeShortcutAction(DIcon("eraser.png"), tr("&Restore selection"), SLOT(undoSelectionSlot()), "ActionUndoSelection"), [this](QMenu*)
mMenuBuilder->addAction(makeShortcutAction(DIcon("eraser"), tr("&Restore selection"), SLOT(undoSelectionSlot()), "ActionUndoSelection"), [this](QMenu*)
{
dsint start = rvaToVa(getSelectionStart());
dsint end = rvaToVa(getSelectionEnd());
@ -203,11 +203,11 @@ void CPUStack::setupContextMenu()
});
//Find Pattern
mMenuBuilder->addAction(makeShortcutAction(DIcon("search-for.png"), tr("&Find Pattern..."), SLOT(findPattern()), "ActionFindPattern"));
mMenuBuilder->addAction(makeShortcutAction(DIcon("search-for"), tr("&Find Pattern..."), SLOT(findPattern()), "ActionFindPattern"));
//Follow CSP
mMenuBuilder->addAction(makeShortcutAction(DIcon("neworigin.png"), ArchValue(tr("Follow E&SP"), tr("Follow R&SP")), SLOT(gotoCspSlot()), "ActionGotoOrigin"));
mMenuBuilder->addAction(makeShortcutAction(DIcon("cbp.png"), ArchValue(tr("Follow E&BP"), tr("Follow R&BP")), SLOT(gotoCbpSlot()), "ActionGotoCBP"), [](QMenu*)
mMenuBuilder->addAction(makeShortcutAction(DIcon("neworigin"), ArchValue(tr("Follow E&SP"), tr("Follow R&SP")), SLOT(gotoCspSlot()), "ActionGotoOrigin"));
mMenuBuilder->addAction(makeShortcutAction(DIcon("cbp"), ArchValue(tr("Follow E&BP"), tr("Follow R&BP")), SLOT(gotoCbpSlot()), "ActionGotoCBP"), [](QMenu*)
{
return DbgMemIsValidReadPtr(DbgValFromString("cbp"));
});
@ -215,33 +215,33 @@ void CPUStack::setupContextMenu()
auto gotoMenu = new MenuBuilder(this);
//Go to Expression
gotoMenu->addAction(makeShortcutAction(DIcon("geolocation-goto.png"), tr("Go to &Expression"), SLOT(gotoExpressionSlot()), "ActionGotoExpression"));
gotoMenu->addAction(makeShortcutAction(DIcon("geolocation-goto"), tr("Go to &Expression"), SLOT(gotoExpressionSlot()), "ActionGotoExpression"));
//Go to Base of Stack Frame
gotoMenu->addAction(makeShortcutAction(DIcon("neworigin.png"), tr("Go to Base of Stack Frame"), SLOT(gotoFrameBaseSlot()), "ActionGotoBaseOfStackFrame"));
gotoMenu->addAction(makeShortcutAction(DIcon("neworigin"), tr("Go to Base of Stack Frame"), SLOT(gotoFrameBaseSlot()), "ActionGotoBaseOfStackFrame"));
//Go to Previous Frame
gotoMenu->addAction(makeShortcutAction(DIcon("previous.png"), tr("Go to Previous Stack Frame"), SLOT(gotoPreviousFrameSlot()), "ActionGotoPrevStackFrame"));
gotoMenu->addAction(makeShortcutAction(DIcon("previous"), tr("Go to Previous Stack Frame"), SLOT(gotoPreviousFrameSlot()), "ActionGotoPrevStackFrame"));
//Go to Next Frame
gotoMenu->addAction(makeShortcutAction(DIcon("next.png"), tr("Go to Next Stack Frame"), SLOT(gotoNextFrameSlot()), "ActionGotoNextStackFrame"));
gotoMenu->addAction(makeShortcutAction(DIcon("next"), tr("Go to Next Stack Frame"), SLOT(gotoNextFrameSlot()), "ActionGotoNextStackFrame"));
//Go to Previous
gotoMenu->addAction(makeShortcutAction(DIcon("previous.png"), tr("Go to Previous"), SLOT(gotoPreviousSlot()), "ActionGotoPrevious"), [this](QMenu*)
gotoMenu->addAction(makeShortcutAction(DIcon("previous"), tr("Go to Previous"), SLOT(gotoPreviousSlot()), "ActionGotoPrevious"), [this](QMenu*)
{
return mHistory.historyHasPrev();
});
//Go to Next
gotoMenu->addAction(makeShortcutAction(DIcon("next.png"), tr("Go to Next"), SLOT(gotoNextSlot()), "ActionGotoNext"), [this](QMenu*)
gotoMenu->addAction(makeShortcutAction(DIcon("next"), tr("Go to Next"), SLOT(gotoNextSlot()), "ActionGotoNext"), [this](QMenu*)
{
return mHistory.historyHasNext();
});
mMenuBuilder->addMenu(makeMenu(DIcon("goto.png"), tr("&Go to")), gotoMenu);
mMenuBuilder->addMenu(makeMenu(DIcon("goto"), tr("&Go to")), gotoMenu);
//Freeze the stack
mMenuBuilder->addAction(mFreezeStack = makeShortcutAction(DIcon("freeze.png"), tr("Freeze the stack"), SLOT(freezeStackSlot()), "ActionFreezeStack"));
mMenuBuilder->addAction(mFreezeStack = makeShortcutAction(DIcon("freeze"), tr("Freeze the stack"), SLOT(freezeStackSlot()), "ActionFreezeStack"));
mFreezeStack->setCheckable(true);
//Follow in Memory Map
@ -249,7 +249,7 @@ void CPUStack::setupContextMenu()
//Follow in Stack
auto followStackName = ArchValue(tr("Follow DWORD in &Stack"), tr("Follow QWORD in &Stack"));
mFollowStack = makeAction(DIcon("stack.png"), followStackName, SLOT(followStackSlot()));
mFollowStack = makeAction(DIcon("stack"), followStackName, SLOT(followStackSlot()));
mFollowStack->setShortcutContext(Qt::WidgetShortcut);
mFollowStack->setShortcut(QKeySequence("enter"));
mMenuBuilder->addAction(mFollowStack, [this](QMenu*)
@ -263,7 +263,7 @@ void CPUStack::setupContextMenu()
});
//Follow in Disassembler
auto disasmIcon = DIcon(ArchValue("processor32.png", "processor64.png"));
auto disasmIcon = DIcon(ArchValue("processor32", "processor64"));
mFollowDisasm = makeAction(disasmIcon, ArchValue(tr("&Follow DWORD in Disassembler"), tr("&Follow QWORD in Disassembler")), SLOT(followDisasmSlot()));
mFollowDisasm->setShortcutContext(Qt::WidgetShortcut);
mFollowDisasm->setShortcut(QKeySequence("enter"));

View File

@ -20,8 +20,8 @@
<string>Calculator</string>
</property>
<property name="windowIcon">
<iconset resource="../../resource.qrc">
<normaloff>:/icons/images/calculator.png</normaloff>:/icons/images/calculator.png</iconset>
<iconset theme="calculator" resource="../../resource.qrc">
<normaloff>:/Default/icons/calculator.png</normaloff>:/Default/icons/calculator.png</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>

View File

@ -32,7 +32,7 @@ void CallStackView::setupContextMenu()
{
return getSelectionVa();
});
QIcon icon = DIcon(ArchValue("processor32.png", "processor64.png"));
QIcon icon = DIcon(ArchValue("processor32", "processor64"));
mMenuBuilder->addAction(makeAction(icon, tr("Follow &Address"), SLOT(followAddress())), [this](QMenu*)
{
return isSelectionValid();
@ -68,7 +68,7 @@ void CallStackView::setupContextMenu()
setupCopyMenu(mCopyMenu);
// Column count cannot be zero
mMenuBuilder->addSeparator();
mMenuBuilder->addMenu(makeMenu(DIcon("copy.png"), tr("&Copy")), mCopyMenu);
mMenuBuilder->addMenu(makeMenu(DIcon("copy"), tr("&Copy")), mCopyMenu);
mMenuBuilder->loadFromConfig();
}

View File

@ -11,7 +11,7 @@ CodepageSelectionDialog::CodepageSelectionDialog(QWidget* parent) :
ui->setupUi(this);
setModal(true);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
setWindowIcon(DIcon("codepage.png"));
setWindowIcon(DIcon("codepage"));
for(auto & name : QTextCodec::availableCodecs())
{
auto codec = QTextCodec::codecForName(name);

View File

@ -46,7 +46,7 @@ void ColumnReorderDialog::on_okButton_clicked()
if(ui->listDisplayed->count() == 0)
{
QMessageBox msg(QMessageBox::Warning, tr("Error"), tr("There isn't anything to display yet!"));
msg.setWindowIcon(DIcon("compile-error.png"));
msg.setWindowIcon(DIcon("compile-error"));
msg.exec();
return;
}

View File

@ -20,8 +20,8 @@
<string>Dialog</string>
</property>
<property name="windowIcon">
<iconset resource="../../resource.qrc">
<normaloff>:/icons/images/ui-combo-box-edit.png</normaloff>:/icons/images/ui-combo-box-edit.png</iconset>
<iconset theme="ui-combo-box-edit" resource="../../resource.qrc">
<normaloff>:/Default/icons/ui-combo-box-edit.png</normaloff>:/Default/icons/ui-combo-box-edit.png</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>

View File

@ -59,7 +59,7 @@ DisassemblerGraphView::DisassemblerGraphView(QWidget* parent)
this->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
this->horizontalScrollBar()->setSingleStep(this->charWidth);
this->verticalScrollBar()->setSingleStep(this->charHeight);
this->setWindowIcon(DIcon("graph.png"));
this->setWindowIcon(DIcon("graph"));
//QSize areaSize = this->viewport()->size(); <-\
//this->adjustSize(areaSize.width(), areaSize.height()); <-- useless at this point (?)
@ -2191,22 +2191,22 @@ void DisassemblerGraphView::setupContextMenu()
{
return zoomActionHelper() != 0;
};
mMenuBuilder->addAction(makeShortcutAction(DIcon(ArchValue("processor32.png", "processor64.png")), tr("Follow in &Disassembler"), SLOT(followDisassemblySlot()), "ActionGraph"), zoomActionHelperNonZero);
mMenuBuilder->addAction(makeShortcutAction(DIcon(ArchValue("processor32", "processor64")), tr("Follow in &Disassembler"), SLOT(followDisassemblySlot()), "ActionGraph"), zoomActionHelperNonZero);
mMenuBuilder->addSeparator();
mCommonActions->build(mMenuBuilder, CommonActions::ActionBreakpoint | CommonActions::ActionMemoryMap | CommonActions::ActionBookmark | CommonActions::ActionLabel |
CommonActions::ActionComment | CommonActions::ActionNewOrigin | CommonActions::ActionNewThread);
mMenuBuilder->addAction(makeShortcutAction(DIcon("xrefs.png"), tr("Xrefs..."), SLOT(xrefSlot()), "ActionXrefs"), zoomActionHelperNonZero);
mMenuBuilder->addAction(makeShortcutAction(DIcon("xrefs"), tr("Xrefs..."), SLOT(xrefSlot()), "ActionXrefs"), zoomActionHelperNonZero);
MenuBuilder* gotoMenu = new MenuBuilder(this);
gotoMenu->addAction(makeShortcutAction(DIcon("geolocation-goto.png"), tr("Expression"), SLOT(gotoExpressionSlot()), "ActionGotoExpression"));
gotoMenu->addAction(makeShortcutAction(DIcon("cbp.png"), tr("Origin"), SLOT(gotoOriginSlot()), "ActionGotoOrigin"));
gotoMenu->addAction(makeShortcutAction(DIcon("previous.png"), tr("Previous"), SLOT(gotoPreviousSlot()), "ActionGotoPrevious"), [this](QMenu*)
gotoMenu->addAction(makeShortcutAction(DIcon("geolocation-goto"), tr("Expression"), SLOT(gotoExpressionSlot()), "ActionGotoExpression"));
gotoMenu->addAction(makeShortcutAction(DIcon("cbp"), tr("Origin"), SLOT(gotoOriginSlot()), "ActionGotoOrigin"));
gotoMenu->addAction(makeShortcutAction(DIcon("previous"), tr("Previous"), SLOT(gotoPreviousSlot()), "ActionGotoPrevious"), [this](QMenu*)
{
return mHistory.historyHasPrev();
});
gotoMenu->addAction(makeShortcutAction(DIcon("next.png"), tr("Next"), SLOT(gotoNextSlot()), "ActionGotoNext"), [this](QMenu*)
gotoMenu->addAction(makeShortcutAction(DIcon("next"), tr("Next"), SLOT(gotoNextSlot()), "ActionGotoNext"), [this](QMenu*)
{
return mHistory.historyHasNext();
});
@ -2281,37 +2281,37 @@ void DisassemblerGraphView::setupContextMenu()
});
gotoMenu->addSeparator();
gotoMenu->addBuilder(childrenAndParentMenu);
mMenuBuilder->addMenu(makeMenu(DIcon("goto.png"), tr("Go to")), gotoMenu);
mMenuBuilder->addAction(makeShortcutAction(DIcon("helpmnemonic.png"), tr("Help on mnemonic"), SLOT(mnemonicHelpSlot()), "ActionHelpOnMnemonic"));
mMenuBuilder->addMenu(makeMenu(DIcon("goto"), tr("Go to")), gotoMenu);
mMenuBuilder->addAction(makeShortcutAction(DIcon("helpmnemonic"), tr("Help on mnemonic"), SLOT(mnemonicHelpSlot()), "ActionHelpOnMnemonic"));
mMenuBuilder->addSeparator();
auto ifgraphZoomMode = [this](QMenu*)
{
return graphZoomMode;
};
mMenuBuilder->addAction(mZoomToCursor = makeShortcutAction(DIcon("zoom.png"), tr("&Zoom 100%"), SLOT(zoomToCursorSlot()), "ActionGraphZoomToCursor"), ifgraphZoomMode);
mMenuBuilder->addAction(mFitToWindow = makeShortcutAction(DIcon("fit.png"), tr("&Fit to window"), SLOT(fitToWindowSlot()), "ActionGraphFitToWindow"), ifgraphZoomMode);
mMenuBuilder->addAction(mToggleOverview = makeShortcutAction(DIcon("graph.png"), tr("&Overview"), SLOT(toggleOverviewSlot()), "ActionGraphToggleOverview"), ifgraphZoomMode);
mMenuBuilder->addAction(mZoomToCursor = makeShortcutAction(DIcon("zoom"), tr("&Zoom 100%"), SLOT(zoomToCursorSlot()), "ActionGraphZoomToCursor"), ifgraphZoomMode);
mMenuBuilder->addAction(mFitToWindow = makeShortcutAction(DIcon("fit"), tr("&Fit to window"), SLOT(fitToWindowSlot()), "ActionGraphFitToWindow"), ifgraphZoomMode);
mMenuBuilder->addAction(mToggleOverview = makeShortcutAction(DIcon("graph"), tr("&Overview"), SLOT(toggleOverviewSlot()), "ActionGraphToggleOverview"), ifgraphZoomMode);
mToggleOverview->setCheckable(true);
mMenuBuilder->addAction(mToggleSummary = makeShortcutAction(DIcon("summary.png"), tr("S&ummary"), SLOT(toggleSummarySlot()), "ActionGraphToggleSummary"));
mMenuBuilder->addAction(mToggleSummary = makeShortcutAction(DIcon("summary"), tr("S&ummary"), SLOT(toggleSummarySlot()), "ActionGraphToggleSummary"));
mToggleSummary->setCheckable(true);
mMenuBuilder->addAction(mToggleSyncOrigin = makeShortcutAction(DIcon("lock.png"), tr("&Sync with origin"), SLOT(toggleSyncOriginSlot()), "ActionGraphSyncOrigin"));
mMenuBuilder->addAction(makeShortcutAction(DIcon("sync.png"), tr("&Refresh"), SLOT(refreshSlot()), "ActionRefresh"));
mMenuBuilder->addAction(makeShortcutAction(DIcon("image.png"), tr("&Save as image"), SLOT(saveImageSlot()), "ActionGraphSaveImage"));
mMenuBuilder->addAction(mToggleSyncOrigin = makeShortcutAction(DIcon("lock"), tr("&Sync with origin"), SLOT(toggleSyncOriginSlot()), "ActionGraphSyncOrigin"));
mMenuBuilder->addAction(makeShortcutAction(DIcon("sync"), tr("&Refresh"), SLOT(refreshSlot()), "ActionRefresh"));
mMenuBuilder->addAction(makeShortcutAction(DIcon("image"), tr("&Save as image"), SLOT(saveImageSlot()), "ActionGraphSaveImage"));
MenuBuilder* layoutMenu = new MenuBuilder(this);
QActionGroup* layoutGroup = new QActionGroup(this);
layoutGroup->addAction(makeAction(DIcon("narrow.png"), tr("Narrow"), [this]() { setGraphLayout(LayoutType::Narrow); }));
layoutGroup->addAction(makeAction(DIcon("narrow"), tr("Narrow"), [this]() { setGraphLayout(LayoutType::Narrow); }));
QAction* mediumLayout =
layoutGroup->addAction(makeAction(DIcon("medium.png"), tr("Medium"), [this]() { setGraphLayout(LayoutType::Medium); }));
layoutGroup->addAction(makeAction(DIcon("wide.png"), tr("Wide"), [this]() { setGraphLayout(LayoutType::Wide); }));
layoutGroup->addAction(makeAction(DIcon("medium"), tr("Medium"), [this]() { setGraphLayout(LayoutType::Medium); }));
layoutGroup->addAction(makeAction(DIcon("wide"), tr("Wide"), [this]() { setGraphLayout(LayoutType::Wide); }));
for(QAction* layoutAction : layoutGroup->actions())
{
layoutAction->setCheckable(true);
layoutMenu->addAction(layoutAction);
}
mediumLayout->setChecked(true);
mMenuBuilder->addMenu(makeMenu(DIcon("layout.png"), tr("Layout")), layoutMenu);
mMenuBuilder->addMenu(makeMenu(DIcon("layout"), tr("Layout")), layoutMenu);
mPluginMenu = new QMenu(this);
Bridge::getBridge()->emitMenuAddToList(this, mPluginMenu, GUI_GRAPH_MENU);

View File

@ -32,7 +32,7 @@ EditBreakpointDialog::EditBreakpointDialog(QWidget* parent, const BRIDGEBP & bp)
setWindowTitle(tr("Edit Breakpoint %1").arg(getSymbolicName(bp.addr)));
break;
}
setWindowIcon(DIcon("breakpoint.png"));
setWindowIcon(DIcon("breakpoint"));
loadFromBp();
Config()->setupWindowPos(this);

View File

@ -23,8 +23,8 @@
<string>Dialog</string>
</property>
<property name="windowIcon">
<iconset resource="../../resource.qrc">
<normaloff>:/icons/images/modify.png</normaloff>:/icons/images/modify.png</iconset>
<iconset theme="modify" resource="../../resource.qrc">
<normaloff>:/Default/icons/modify.png</normaloff>:/Default/icons/modify.png</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">

View File

@ -14,8 +14,8 @@
<string>Favourites</string>
</property>
<property name="windowIcon">
<iconset resource="../../resource.qrc">
<normaloff>:/icons/images/star.png</normaloff>:/icons/images/star.png</iconset>
<iconset theme="star" resource="../../resource.qrc">
<normaloff>:/Default/icons/star.png</normaloff>:/Default/icons/star.png</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>

View File

@ -17,8 +17,8 @@
<string>Enter expression to follow...</string>
</property>
<property name="windowIcon">
<iconset resource="../../resource.qrc">
<normaloff>:/icons/images/geolocation-goto.png</normaloff>:/icons/images/geolocation-goto.png</iconset>
<iconset theme="geolocation-goto" resource="../../resource.qrc">
<normaloff>:/Default/icons/geolocation-goto.png</normaloff>:/Default/icons/geolocation-goto.png</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>

View File

@ -96,31 +96,31 @@ HandlesView::HandlesView(QWidget* parent) : QWidget(parent)
mSplitter->loadFromConfig("HandlesViewSplitter");
// Create the action list for the right click context menu
mActionRefresh = new QAction(DIcon("arrow-restart.png"), tr("&Refresh"), this);
mActionRefresh = new QAction(DIcon("arrow-restart"), tr("&Refresh"), this);
connect(mActionRefresh, SIGNAL(triggered()), this, SLOT(reloadData()));
addAction(mActionRefresh);
mActionCloseHandle = new QAction(DIcon("disable.png"), tr("Close handle"), this);
mActionCloseHandle = new QAction(DIcon("disable"), tr("Close handle"), this);
connect(mActionCloseHandle, SIGNAL(triggered()), this, SLOT(closeHandleSlot()));
mActionDisablePrivilege = new QAction(DIcon("disable.png"), tr("Disable Privilege: "), this);
mActionDisablePrivilege = new QAction(DIcon("disable"), tr("Disable Privilege: "), this);
connect(mActionDisablePrivilege, SIGNAL(triggered()), this, SLOT(disablePrivilegeSlot()));
mActionEnablePrivilege = new QAction(DIcon("enable.png"), tr("Enable Privilege: "), this);
mActionEnablePrivilege = new QAction(DIcon("enable"), tr("Enable Privilege: "), this);
connect(mActionEnablePrivilege, SIGNAL(triggered()), this, SLOT(enablePrivilegeSlot()));
mActionDisableAllPrivileges = new QAction(DIcon("disable.png"), tr("Disable all privileges"), this);
mActionDisableAllPrivileges = new QAction(DIcon("disable"), tr("Disable all privileges"), this);
connect(mActionDisableAllPrivileges, SIGNAL(triggered()), this, SLOT(disableAllPrivilegesSlot()));
mActionEnableAllPrivileges = new QAction(DIcon("enable.png"), tr("Enable all privileges"), this);
mActionEnableAllPrivileges = new QAction(DIcon("enable"), tr("Enable all privileges"), this);
connect(mActionEnableAllPrivileges, SIGNAL(triggered()), this, SLOT(enableAllPrivilegesSlot()));
mActionEnableWindow = new QAction(DIcon("enable.png"), tr("Enable window"), this);
mActionEnableWindow = new QAction(DIcon("enable"), tr("Enable window"), this);
connect(mActionEnableWindow, SIGNAL(triggered()), this, SLOT(enableWindowSlot()));
mActionDisableWindow = new QAction(DIcon("disable.png"), tr("Disable window"), this);
mActionDisableWindow = new QAction(DIcon("disable"), tr("Disable window"), this);
connect(mActionDisableWindow, SIGNAL(triggered()), this, SLOT(disableWindowSlot()));
mActionFollowProc = new QAction(DIcon(ArchValue("processor32.png", "processor64.png")), tr("Follow Proc in Disassembler"), this);
mActionFollowProc = new QAction(DIcon(ArchValue("processor32", "processor64")), tr("Follow Proc in Disassembler"), this);
connect(mActionFollowProc, SIGNAL(triggered()), this, SLOT(followInDisasmSlot()));
mActionFollowProc->setShortcut(Qt::Key_Return);
mWindowsTable->addAction(mActionFollowProc);
mActionToggleProcBP = new QAction(DIcon("breakpoint_toggle.png"), tr("Toggle Breakpoint in Proc"), this);
mActionToggleProcBP = new QAction(DIcon("breakpoint_toggle"), tr("Toggle Breakpoint in Proc"), this);
connect(mActionToggleProcBP, SIGNAL(triggered()), this, SLOT(toggleBPSlot()));
mWindowsTable->addAction(mActionToggleProcBP);
mActionMessageProcBP = new QAction(DIcon("breakpoint_execute.png"), tr("Message Breakpoint"), this);
mActionMessageProcBP = new QAction(DIcon("breakpoint_execute"), tr("Message Breakpoint"), this);
connect(mActionMessageProcBP, SIGNAL(triggered()), this, SLOT(messagesBPSlot()));
connect(mHandlesTable, SIGNAL(listContextMenuSignal(QMenu*)), this, SLOT(handlesTableContextMenuSlot(QMenu*)));
@ -248,7 +248,7 @@ void HandlesView::privilegesTableContextMenuSlot(const QPoint & pos)
wMenu.addAction(mActionEnableAllPrivileges);
QMenu wCopyMenu(tr("&Copy"), this);
wCopyMenu.setIcon(DIcon("copy.png"));
wCopyMenu.setIcon(DIcon("copy"));
table.setupCopyMenu(&wCopyMenu);
if(wCopyMenu.actions().length())
{

View File

@ -14,8 +14,8 @@
<string>HexEdit</string>
</property>
<property name="windowIcon">
<iconset resource="../../resource.qrc">
<normaloff>:/icons/images/document-binary.png</normaloff>:/icons/images/document-binary.png</iconset>
<iconset theme="document-binary" resource="../../resource.qrc">
<normaloff>:/Default/icons/document-binary.png</normaloff>:/Default/icons/document-binary.png</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
@ -53,7 +53,7 @@
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../resource.qrc">:/icons/images/fatal-error.png</pixmap>
<pixmap resource="../../resource.qrc">:/Default/icons/fatal-error.png</pixmap>
</property>
</widget>
</item>
@ -109,7 +109,7 @@
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../resource.qrc">:/icons/images/fatal-error.png</pixmap>
<pixmap resource="../../resource.qrc">:/Default/icons/fatal-error.png</pixmap>
</property>
</widget>
</item>
@ -165,7 +165,7 @@
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../resource.qrc">:/icons/images/fatal-error.png</pixmap>
<pixmap resource="../../resource.qrc">:/Default/icons/fatal-error.png</pixmap>
</property>
</widget>
</item>
@ -281,7 +281,7 @@
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../resource.qrc">:/icons/images/fatal-error.png</pixmap>
<pixmap resource="../../resource.qrc">:/Default/icons/fatal-error.png</pixmap>
</property>
</widget>
</item>

View File

@ -14,8 +14,8 @@
<string>Dialog</string>
</property>
<property name="windowIcon">
<iconset resource="../../resource.qrc">
<normaloff>:/icons/images/ui-combo-box-edit.png</normaloff>:/icons/images/ui-combo-box-edit.png</iconset>
<iconset theme="ui-combo-box-edit" resource="../../resource.qrc">
<normaloff>:/Default/icons/ui-combo-box-edit.png</normaloff>:/Default/icons/ui-combo-box-edit.png</iconset>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>

View File

@ -41,11 +41,11 @@ void LocalVarsView::setupContextMenu()
{
return DbgIsDebugging();
});
mMenu->addAction(makeAction(DIcon("dump.png"), tr("&Follow in Dump"), SLOT(followDumpSlot())), [this](QMenu*)
mMenu->addAction(makeAction(DIcon("dump"), tr("&Follow in Dump"), SLOT(followDumpSlot())), [this](QMenu*)
{
return getCellContent(getInitialSelection(), 2) != "???";
});
mMenu->addAction(makeAction(DIcon("dump.png"), ArchValue(tr("Follow DWORD in Dump"), tr("Follow QWORD in Dump")), SLOT(followWordInDumpSlot())), [this](QMenu*)
mMenu->addAction(makeAction(DIcon("dump"), ArchValue(tr("Follow DWORD in Dump"), tr("Follow QWORD in Dump")), SLOT(followWordInDumpSlot())), [this](QMenu*)
{
duint start;
if(getAddress(getCellContent(getInitialSelection(), 1), start))
@ -56,7 +56,7 @@ void LocalVarsView::setupContextMenu()
else
return false;
});
mMenu->addAction(makeShortcutAction(DIcon("stack.png"), tr("Follow in Stack"), SLOT(followStackSlot()), "ActionFollowStack"), [this](QMenu*)
mMenu->addAction(makeShortcutAction(DIcon("stack"), tr("Follow in Stack"), SLOT(followStackSlot()), "ActionFollowStack"), [this](QMenu*)
{
duint start;
if(getAddress(getCellContent(getInitialSelection(), 1), start))
@ -64,7 +64,7 @@ void LocalVarsView::setupContextMenu()
else
return false;
});
mMenu->addAction(makeAction(DIcon("stack.png"), ArchValue(tr("Follow DWORD in Stack"), tr("Follow QWORD in Stack")), SLOT(followWordInStackSlot())), [this](QMenu*)
mMenu->addAction(makeAction(DIcon("stack"), ArchValue(tr("Follow DWORD in Stack"), tr("Follow QWORD in Stack")), SLOT(followWordInStackSlot())), [this](QMenu*)
{
duint start;
if(getAddress(getCellContent(getInitialSelection(), 1), start))
@ -75,11 +75,11 @@ void LocalVarsView::setupContextMenu()
else
return false;
});
mMenu->addAction(makeShortcutAction(DIcon("memmap_find_address_page.png"), tr("Follow in Memory Map"), SLOT(followMemMapSlot()), "ActionFollowMemMap"), [this](QMenu*)
mMenu->addAction(makeShortcutAction(DIcon("memmap_find_address_page"), tr("Follow in Memory Map"), SLOT(followMemMapSlot()), "ActionFollowMemMap"), [this](QMenu*)
{
return getCellContent(getInitialSelection(), 2) != "???";
});
mMenu->addAction(makeShortcutAction(DIcon("modify.png"), tr("&Modify Value"), SLOT(editSlot()), "ActionModifyValue"), [this](QMenu*)
mMenu->addAction(makeShortcutAction(DIcon("modify"), tr("&Modify Value"), SLOT(editSlot()), "ActionModifyValue"), [this](QMenu*)
{
return getCellContent(getInitialSelection(), 2) != "???";
});
@ -87,7 +87,7 @@ void LocalVarsView::setupContextMenu()
mMenu->addAction(makeAction(tr("&Rename"), SLOT(renameSlot())));
MenuBuilder* copyMenu = new MenuBuilder(this);
setupCopyMenu(copyMenu);
mMenu->addMenu(makeMenu(DIcon("copy.png"), tr("&Copy")), copyMenu);
mMenu->addMenu(makeMenu(DIcon("copy"), tr("&Copy")), copyMenu);
mMenu->addSeparator();
MenuBuilder* mBaseRegisters = new MenuBuilder(this);
#ifdef _WIN64

View File

@ -90,16 +90,16 @@ template<class T> static QAction* setupAction(const QString & text, LogView* thi
void LogView::setupContextMenu()
{
actionClear = setupAction(DIcon("eraser.png"), tr("Clea&r"), this, SLOT(clearLogSlot()));
actionCopy = setupAction(DIcon("copy.png"), tr("&Copy"), this, SLOT(copy()));
actionPaste = setupAction(DIcon("binary_paste.png"), tr("&Paste"), this, SLOT(pasteSlot()));
actionSelectAll = setupAction(DIcon("copy_full_table.png"), tr("Select &All"), this, SLOT(selectAll()));
actionSave = setupAction(DIcon("binary_save.png"), tr("&Save"), this, SLOT(saveSlot()));
actionToggleLogging = setupAction(DIcon("lock.png"), tr("Disable &Logging"), this, SLOT(toggleLoggingSlot()));
actionRedirectLog = setupAction(DIcon("database-export.png"), tr("&Redirect Log..."), this, SLOT(redirectLogSlot()));
actionClear = setupAction(DIcon("eraser"), tr("Clea&r"), this, SLOT(clearLogSlot()));
actionCopy = setupAction(DIcon("copy"), tr("&Copy"), this, SLOT(copy()));
actionPaste = setupAction(DIcon("binary_paste"), tr("&Paste"), this, SLOT(pasteSlot()));
actionSelectAll = setupAction(DIcon("copy_full_table"), tr("Select &All"), this, SLOT(selectAll()));
actionSave = setupAction(DIcon("binary_save"), tr("&Save"), this, SLOT(saveSlot()));
actionToggleLogging = setupAction(DIcon("lock"), tr("Disable &Logging"), this, SLOT(toggleLoggingSlot()));
actionRedirectLog = setupAction(DIcon("database-export"), tr("&Redirect Log..."), this, SLOT(redirectLogSlot()));
actionAutoScroll = setupAction(tr("Auto Scrolling"), this, SLOT(autoScrollSlot()));
menuCopyToNotes = new QMenu(tr("Copy To Notes"), this);
menuCopyToNotes->setIcon(DIcon("notes.png"));
menuCopyToNotes->setIcon(DIcon("notes"));
actionCopyToGlobalNotes = new QAction(tr("&Global"), menuCopyToNotes);
actionCopyToDebuggeeNotes = new QAction(tr("&Debuggee"), menuCopyToNotes);
connect(actionCopyToGlobalNotes, SIGNAL(triggered()), this, SLOT(copyToGlobalNotes()));

View File

@ -143,26 +143,26 @@ MainWindow::MainWindow(QWidget* parent)
// Log view
mLogView = new LogView();
mLogView->setWindowTitle(tr("Log"));
mLogView->setWindowIcon(DIcon("log.png"));
mLogView->setWindowIcon(DIcon("log"));
mLogView->hide();
// Symbol view
mSymbolView = new SymbolView();
Bridge::getBridge()->symbolView = mSymbolView;
mSymbolView->setWindowTitle(tr("Symbols"));
mSymbolView->setWindowIcon(DIcon("pdb.png"));
mSymbolView->setWindowIcon(DIcon("pdb"));
mSymbolView->hide();
// Source view
mSourceViewManager = new SourceViewerManager();
mSourceViewManager->setWindowTitle(tr("Source"));
mSourceViewManager->setWindowIcon(DIcon("source.png"));
mSourceViewManager->setWindowIcon(DIcon("source"));
mSourceViewManager->hide();
// Breakpoints
mBreakpointsView = new BreakpointsView();
mBreakpointsView->setWindowTitle(tr("Breakpoints"));
mBreakpointsView->setWindowIcon(DIcon("breakpoint.png"));
mBreakpointsView->setWindowIcon(DIcon("breakpoint"));
mBreakpointsView->hide();
// Memory map view
@ -170,60 +170,60 @@ MainWindow::MainWindow(QWidget* parent)
connect(mMemMapView, SIGNAL(showReferences()), this, SLOT(displayReferencesWidget()));
mMemMapView->setWindowTitle(tr("Memory Map"));
mMemMapView->setWindowIcon(DIcon("memory-map.png"));
mMemMapView->setWindowIcon(DIcon("memory-map"));
mMemMapView->hide();
// Callstack view
mCallStackView = new CallStackView();
mCallStackView->setWindowTitle(tr("Call Stack"));
mCallStackView->setWindowIcon(DIcon("callstack.png"));
mCallStackView->setWindowIcon(DIcon("callstack"));
// SEH Chain view
mSEHChainView = new SEHChainView();
mSEHChainView->setWindowTitle(tr("SEH"));
mSEHChainView->setWindowIcon(DIcon("seh-chain.png"));
mSEHChainView->setWindowIcon(DIcon("seh-chain"));
// Script view
mScriptView = new ScriptView();
mScriptView->setWindowTitle(tr("Script"));
mScriptView->setWindowIcon(DIcon("script-code.png"));
mScriptView->setWindowIcon(DIcon("script-code"));
mScriptView->hide();
// CPU view
mCpuWidget = new CPUWidget();
mCpuWidget->setWindowTitle(tr("CPU"));
#ifdef _WIN64
mCpuWidget->setWindowIcon(DIcon("processor64.png"));
mCpuWidget->setWindowIcon(DIcon("processor64"));
#else
mCpuWidget->setWindowIcon(DIcon("processor32.png"));
ui->actionCpu->setIcon(DIcon("processor32.png"));
mCpuWidget->setWindowIcon(DIcon("processor32"));
ui->actionCpu->setIcon(DIcon("processor32"));
#endif //_WIN64
// Reference manager
mReferenceManager = new ReferenceManager(this);
Bridge::getBridge()->referenceManager = mReferenceManager;
mReferenceManager->setWindowTitle(tr("References"));
mReferenceManager->setWindowIcon(DIcon("search.png"));
mReferenceManager->setWindowIcon(DIcon("search"));
// Thread view
mThreadView = new ThreadView();
mThreadView->setWindowTitle(tr("Threads"));
mThreadView->setWindowIcon(DIcon("arrow-threads.png"));
mThreadView->setWindowIcon(DIcon("arrow-threads"));
// Notes manager
mNotesManager = new NotesManager(this);
mNotesManager->setWindowTitle(tr("Notes"));
mNotesManager->setWindowIcon(DIcon("notes.png"));
mNotesManager->setWindowIcon(DIcon("notes"));
// Handles view
mHandlesView = new HandlesView(this);
mHandlesView->setWindowTitle(tr("Handles"));
mHandlesView->setWindowIcon(DIcon("handles.png"));
mHandlesView->setWindowIcon(DIcon("handles"));
// Trace view
mTraceWidget = new TraceWidget(this);
mTraceWidget->setWindowTitle(tr("Trace"));
mTraceWidget->setWindowIcon(DIcon("trace.png"));
mTraceWidget->setWindowIcon(DIcon("trace"));
connect(mTraceWidget->getTraceBrowser(), SIGNAL(displayReferencesWidget()), this, SLOT(displayReferencesWidget()));
connect(mTraceWidget->getTraceBrowser(), SIGNAL(displayLogWidget()), this, SLOT(displayLogWidget()));
@ -376,6 +376,7 @@ MainWindow::MainWindow(QWidget* parent)
setupLanguagesMenu();
setupThemesMenu();
setupMenuCustomization();
ui->actionAbout_Qt->setIcon(QApplication::style()->standardIcon(QStyle::SP_TitleBarMenuButton));
// Set default setttings (when not set)
SettingsDialog defaultSettings;
@ -439,7 +440,7 @@ void MainWindow::setupLanguagesMenu()
languageMenu = new QMenu(QString("Languages"));
else
languageMenu = new QMenu(tr("Languages") + QString(" Languages"), this);
languageMenu->setIcon(DIcon("codepage.png"));
languageMenu->setIcon(DIcon("codepage"));
QLocale enUS(QLocale::English, QLocale::UnitedStates);
QAction* action_enUS = new QAction(QString("[%1] %2 - %3").arg(enUS.name()).arg(enUS.nativeLanguageName()).arg(enUS.nativeCountryName()), languageMenu);
@ -500,6 +501,11 @@ void MainWindow::loadSelectedStyle(bool reloadStyleCss)
QString settingsPath = QString("%1/../themes/%2/style.ini").arg(QCoreApplication::applicationDirPath()).arg(selectedTheme);
if(QFile(themePath).exists())
styleSettings = settingsPath;
QIcon::setThemeName(selectedTheme);
}
else
{
QIcon::setThemeName("Default");
}
QFile f(stylePath);
if(f.open(QFile::ReadOnly | QFile::Text))
@ -539,6 +545,8 @@ void MainWindow::setupThemesMenu()
auto dir = it.next();
auto nameIdx = dir.lastIndexOf('/');
auto name = dir.mid(nameIdx + 1);
if(name == "Default")
continue;
auto action = ui->menuTheme->addAction(name);
connect(action, SIGNAL(triggered()), this, SLOT(themeTriggeredSlot()));
action->setText(name);
@ -593,7 +601,7 @@ void MainWindow::closeEvent(QCloseEvent* event)
QMessageBox msgbox(this);
msgbox.setText(tr("The debuggee is still running and will be terminated if you exit. Do you really want to exit?"));
msgbox.setWindowTitle(tr("Debuggee is still running"));
msgbox.setWindowIcon(DIcon("bug.png"));
msgbox.setWindowIcon(DIcon("bug"));
msgbox.addButton(QMessageBox::Yes)->setText(tr("&Exit"));
msgbox.addButton(QMessageBox::Cancel)->setText(tr("&Cancel"));
msgbox.addButton(QMessageBox::Abort)->setText(tr("&Detach and exit"));
@ -992,7 +1000,7 @@ void MainWindow::execTicnd()
return;
mSimpleTraceDialog->setTraceCommand("TraceIntoConditional");
mSimpleTraceDialog->setWindowTitle(tr("Trace into..."));
mSimpleTraceDialog->setWindowIcon(DIcon("traceinto.png"));
mSimpleTraceDialog->setWindowIcon(DIcon("traceinto"));
mSimpleTraceDialog->exec();
}
@ -1002,7 +1010,7 @@ void MainWindow::execTocnd()
return;
mSimpleTraceDialog->setTraceCommand("TraceOverConditional");
mSimpleTraceDialog->setWindowTitle(tr("Trace over..."));
mSimpleTraceDialog->setWindowIcon(DIcon("traceover.png"));
mSimpleTraceDialog->setWindowIcon(DIcon("traceover"));
mSimpleTraceDialog->exec();
}
@ -1687,7 +1695,7 @@ void MainWindow::displayRunTrace()
void MainWindow::donate()
{
QMessageBox msg(QMessageBox::Information, tr("Donate"), tr("All the money will go to x64dbg development."));
msg.setWindowIcon(DIcon("donate.png"));
msg.setWindowIcon(DIcon("donate"));
msg.setParent(this, Qt::Dialog);
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
msg.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
@ -1700,7 +1708,7 @@ void MainWindow::donate()
void MainWindow::blog()
{
QMessageBox msg(QMessageBox::Information, tr("Blog"), tr("You will visit x64dbg's official blog."));
msg.setWindowIcon(DIcon("hex.png"));
msg.setWindowIcon(DIcon("hex"));
msg.setParent(this, Qt::Dialog);
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
msg.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
@ -1713,7 +1721,7 @@ void MainWindow::blog()
void MainWindow::reportBug()
{
QMessageBox msg(QMessageBox::Information, tr("Report Bug"), tr("You will be taken to a website where you can report a bug.\nMake sure to fill in as much information as possible."));
msg.setWindowIcon(DIcon("bug-report.png"));
msg.setWindowIcon(DIcon("bug-report"));
msg.setParent(this, Qt::Dialog);
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
msg.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
@ -1726,7 +1734,7 @@ void MainWindow::reportBug()
void MainWindow::crashDump()
{
QMessageBox msg(QMessageBox::Critical, tr("Generate crash dump"), tr("This action will crash the debugger and generate a crash dump. You will LOSE ALL YOUR UNSAVED DATA. Do you really want to continue?"));
msg.setWindowIcon(DIcon("fatal-error.png"));
msg.setWindowIcon(DIcon("fatal-error"));
msg.setParent(this, Qt::Dialog);
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
msg.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
@ -1774,7 +1782,7 @@ void MainWindow::changeCommandLine()
LineEditDialog mLineEdit(this);
mLineEdit.setText("");
mLineEdit.setWindowTitle(tr("Change Command Line"));
mLineEdit.setWindowIcon(DIcon("changeargs.png"));
mLineEdit.setWindowIcon(DIcon("changeargs"));
QString cmdLine;
if(!getCmdLine(cmdLine))
@ -1963,7 +1971,7 @@ void MainWindow::updateFavouriteTools()
ui->menuFavourites->clear();
delete actionManageFavourites;
mFavouriteToolbar->clear();
actionManageFavourites = new QAction(DIcon("star.png"), tr("&Manage Favourite Tools..."), this);
actionManageFavourites = new QAction(DIcon("star"), tr("&Manage Favourite Tools..."), this);
actionManageFavourites->setStatusTip(tr("Open the Favourites dialog to manage the favourites menu"));
for(unsigned int i = 1; BridgeSettingGet("Favourite", QString("Tool%1").arg(i).toUtf8().constData(), buffer); i++)
{
@ -1987,7 +1995,7 @@ void MainWindow::updateFavouriteTools()
splitToolPath(toolPath, file, cmd);
icon = getFileIcon(file);
if(icon.isNull())
icon = DIcon("plugin.png");
icon = DIcon("plugin");
newAction->setIcon(icon);
connect(newAction, SIGNAL(triggered()), this, SLOT(clickFavouriteTool()));
ui->menuFavourites->addAction(newAction);
@ -2017,7 +2025,7 @@ void MainWindow::updateFavouriteTools()
newAction->setText(description);
newAction->setStatusTip(description);
connect(newAction, SIGNAL(triggered()), this, SLOT(clickFavouriteTool()));
newAction->setIcon(DIcon("script-code.png"));
newAction->setIcon(DIcon("script-code"));
ui->menuFavourites->addAction(newAction);
mFavouriteToolbar->addAction(newAction);
isanythingexists = true;
@ -2038,7 +2046,7 @@ void MainWindow::updateFavouriteTools()
if(*buffer && strcmp(buffer, "NOT_SET") != 0)
setGlobalShortcut(newAction, QKeySequence(QString(buffer)));
connect(newAction, SIGNAL(triggered()), this, SLOT(clickFavouriteTool()));
newAction->setIcon(DIcon("star.png"));
newAction->setIcon(DIcon("star"));
ui->menuFavourites->addAction(newAction);
mFavouriteToolbar->addAction(newAction);
isanythingexists = true;
@ -2133,7 +2141,7 @@ void MainWindow::chooseLanguage()
if(file.size() < 512)
{
QMessageBox msg(this);
msg.setWindowIcon(DIcon("codepage.png"));
msg.setWindowIcon(DIcon("codepage"));
msg.setIcon(QMessageBox::Information);
if(tr("Languages") == QString("Languages"))
{
@ -2154,7 +2162,7 @@ void MainWindow::chooseLanguage()
BridgeSettingSet("Engine", "Language", localeName.toUtf8().constData());
QMessageBox msg(this);
msg.setIcon(QMessageBox::Information);
msg.setWindowIcon(DIcon("codepage.png"));
msg.setWindowIcon(DIcon("codepage"));
if(tr("Languages") == QString("Languages"))
{
msg.setWindowTitle(QString("Languages"));
@ -2250,7 +2258,7 @@ void MainWindow::customizeMenu()
{
CustomizeMenuDialog customMenuDialog(this);
customMenuDialog.setWindowTitle(tr("Customize Menus"));
customMenuDialog.setWindowIcon(DIcon("analysis.png"));
customMenuDialog.setWindowIcon(DIcon("analysis"));
customMenuDialog.exec();
onMenuCustomized();
}
@ -2394,7 +2402,10 @@ void MainWindow::on_actionDefaultTheme_triggered()
void MainWindow::on_actionAbout_Qt_triggered()
{
QMessageBox::aboutQt(this);
auto w = new QWidget(this);
w->setWindowIcon(QApplication::style()->standardIcon(QStyle::SP_TitleBarMenuButton));
QMessageBox::aboutQt(w);
delete w;
}
void MainWindow::updateStyle()

View File

@ -265,9 +265,9 @@ private:
QList<WidgetInfo> mPluginWidgetList;
protected:
void dragEnterEvent(QDragEnterEvent* pEvent);
void dropEvent(QDropEvent* pEvent);
bool event(QEvent* event);
void dragEnterEvent(QDragEnterEvent* pEvent) override;
void dropEvent(QDropEvent* pEvent) override;
bool event(QEvent* event) override;
private slots:
void setupLanguagesMenu2();

File diff suppressed because it is too large Load Diff

View File

@ -45,71 +45,71 @@ MemoryMapView::MemoryMapView(StdTable* parent)
void MemoryMapView::setupContextMenu()
{
//Follow in Dump
mFollowDump = new QAction(DIcon("dump.png"), tr("&Follow in Dump"), this);
mFollowDump = new QAction(DIcon("dump"), tr("&Follow in Dump"), this);
connect(mFollowDump, SIGNAL(triggered()), this, SLOT(followDumpSlot()));
//Follow in Disassembler
mFollowDisassembly = new QAction(DIcon(ArchValue("processor32.png", "processor64.png")), tr("Follow in &Disassembler"), this);
mFollowDisassembly = new QAction(DIcon(ArchValue("processor32", "processor64")), tr("Follow in &Disassembler"), this);
connect(mFollowDisassembly, SIGNAL(triggered()), this, SLOT(followDisassemblerSlot()));
connect(this, SIGNAL(enterPressedSignal()), this, SLOT(doubleClickedSlot()));
connect(this, SIGNAL(doubleClickedSignal()), this, SLOT(doubleClickedSlot()));
//Follow in Symbols
mFollowSymbols = new QAction(DIcon("pdb.png"), tr("&Follow in Symbols"), this);
mFollowSymbols = new QAction(DIcon("pdb"), tr("&Follow in Symbols"), this);
connect(mFollowSymbols, SIGNAL(triggered()), this, SLOT(followSymbolsSlot()));
//Set PageMemory Rights
mPageMemoryRights = new QAction(DIcon("memmap_set_page_memory_rights.png"), tr("Set Page Memory Rights"), this);
mPageMemoryRights = new QAction(DIcon("memmap_set_page_memory_rights"), tr("Set Page Memory Rights"), this);
connect(mPageMemoryRights, SIGNAL(triggered()), this, SLOT(pageMemoryRights()));
//Switch View
mSwitchView = new QAction(DIcon("change-view.png"), tr("&Switch View"), this);
mSwitchView = new QAction(DIcon("change-view"), tr("&Switch View"), this);
connect(mSwitchView, SIGNAL(triggered()), this, SLOT(switchView()));
//Breakpoint menu
mBreakpointMenu = new QMenu(tr("Memory &Breakpoint"), this);
mBreakpointMenu->setIcon(DIcon("breakpoint.png"));
mBreakpointMenu->setIcon(DIcon("breakpoint"));
//Breakpoint->Memory Access
mMemoryAccessMenu = new QMenu(tr("Access"), this);
mMemoryAccessMenu->setIcon(DIcon("breakpoint_memory_access.png"));
mMemoryAccessSingleshoot = new QAction(DIcon("breakpoint_memory_singleshoot.png"), tr("&Singleshoot"), this);
mMemoryAccessMenu->setIcon(DIcon("breakpoint_memory_access"));
mMemoryAccessSingleshoot = new QAction(DIcon("breakpoint_memory_singleshoot"), tr("&Singleshoot"), this);
makeCommandAction(mMemoryAccessSingleshoot, "bpm $, 0, a");
mMemoryAccessMenu->addAction(mMemoryAccessSingleshoot);
mMemoryAccessRestore = new QAction(DIcon("breakpoint_memory_restore_on_hit.png"), tr("&Restore"), this);
mMemoryAccessRestore = new QAction(DIcon("breakpoint_memory_restore_on_hit"), tr("&Restore"), this);
makeCommandAction(mMemoryAccessRestore, "bpm $, 1, a");
mMemoryAccessMenu->addAction(mMemoryAccessRestore);
mBreakpointMenu->addMenu(mMemoryAccessMenu);
//Breakpoint->Memory Read
mMemoryReadMenu = new QMenu(tr("Read"), this);
mMemoryReadMenu->setIcon(DIcon("breakpoint_memory_read.png"));
mMemoryReadSingleshoot = new QAction(DIcon("breakpoint_memory_singleshoot.png"), tr("&Singleshoot"), this);
mMemoryReadMenu->setIcon(DIcon("breakpoint_memory_read"));
mMemoryReadSingleshoot = new QAction(DIcon("breakpoint_memory_singleshoot"), tr("&Singleshoot"), this);
makeCommandAction(mMemoryReadSingleshoot, "bpm $, 0, r");
mMemoryReadMenu->addAction(mMemoryReadSingleshoot);
mMemoryReadRestore = new QAction(DIcon("breakpoint_memory_restore_on_hit.png"), tr("&Restore"), this);
mMemoryReadRestore = new QAction(DIcon("breakpoint_memory_restore_on_hit"), tr("&Restore"), this);
makeCommandAction(mMemoryReadRestore, "bpm $, 1, r");
mMemoryReadMenu->addAction(mMemoryReadRestore);
mBreakpointMenu->addMenu(mMemoryReadMenu);
//Breakpoint->Memory Write
mMemoryWriteMenu = new QMenu(tr("Write"), this);
mMemoryWriteMenu->setIcon(DIcon("breakpoint_memory_write.png"));
mMemoryWriteSingleshoot = new QAction(DIcon("breakpoint_memory_singleshoot.png"), tr("&Singleshoot"), this);
mMemoryWriteMenu->setIcon(DIcon("breakpoint_memory_write"));
mMemoryWriteSingleshoot = new QAction(DIcon("breakpoint_memory_singleshoot"), tr("&Singleshoot"), this);
makeCommandAction(mMemoryWriteSingleshoot, "bpm $, 0, w");
mMemoryWriteMenu->addAction(mMemoryWriteSingleshoot);
mMemoryWriteRestore = new QAction(DIcon("breakpoint_memory_restore_on_hit.png"), tr("&Restore"), this);
mMemoryWriteRestore = new QAction(DIcon("breakpoint_memory_restore_on_hit"), tr("&Restore"), this);
makeCommandAction(mMemoryWriteRestore, "bpm $, 1, w");
mMemoryWriteMenu->addAction(mMemoryWriteRestore);
mBreakpointMenu->addMenu(mMemoryWriteMenu);
//Breakpoint->Memory Execute
mMemoryExecuteMenu = new QMenu(tr("Execute"), this);
mMemoryExecuteMenu->setIcon(DIcon("breakpoint_memory_execute.png"));
mMemoryExecuteSingleshoot = new QAction(DIcon("breakpoint_memory_singleshoot.png"), tr("&Singleshoot"), this);
mMemoryExecuteMenu->setIcon(DIcon("breakpoint_memory_execute"));
mMemoryExecuteSingleshoot = new QAction(DIcon("breakpoint_memory_singleshoot"), tr("&Singleshoot"), this);
makeCommandAction(mMemoryExecuteSingleshoot, "bpm $, 0, x");
mMemoryExecuteMenu->addAction(mMemoryExecuteSingleshoot);
mMemoryExecuteRestore = new QAction(DIcon("breakpoint_memory_restore_on_hit.png"), tr("&Restore"), this);
mMemoryExecuteRestore = new QAction(DIcon("breakpoint_memory_restore_on_hit"), tr("&Restore"), this);
makeCommandAction(mMemoryExecuteRestore, "bpm $, 1, x");
mMemoryExecuteMenu->addAction(mMemoryExecuteRestore);
mBreakpointMenu->addMenu(mMemoryExecuteMenu);
@ -127,44 +127,44 @@ void MemoryMapView::setupContextMenu()
connect(mMemoryExecuteSingleshootToggle, SIGNAL(triggered()), this, SLOT(memoryExecuteSingleshootToggleSlot()));
//Allocate memory
mMemoryAllocate = new QAction(DIcon("memmap_alloc_memory.png"), tr("&Allocate memory"), this);
mMemoryAllocate = new QAction(DIcon("memmap_alloc_memory"), tr("&Allocate memory"), this);
mMemoryAllocate->setShortcutContext(Qt::WidgetShortcut);
connect(mMemoryAllocate, SIGNAL(triggered()), this, SLOT(memoryAllocateSlot()));
this->addAction(mMemoryAllocate);
//Free memory
mMemoryFree = new QAction(DIcon("memmap_free_memory.png"), tr("&Free memory"), this);
mMemoryFree = new QAction(DIcon("memmap_free_memory"), tr("&Free memory"), this);
mMemoryFree->setShortcutContext(Qt::WidgetShortcut);
makeCommandAction(mMemoryFree, "free $");
this->addAction(mMemoryFree);
//Goto
mGotoMenu = new QMenu(tr("Go to"), this);
mGotoMenu->setIcon(DIcon("goto.png"));
mGotoMenu->setIcon(DIcon("goto"));
//Goto->Origin
mGotoOrigin = new QAction(DIcon("cbp.png"), tr("Origin"), this);
mGotoOrigin = new QAction(DIcon("cbp"), tr("Origin"), this);
mGotoOrigin->setShortcutContext(Qt::WidgetShortcut);
connect(mGotoOrigin, SIGNAL(triggered()), this, SLOT(gotoOriginSlot()));
this->addAction(mGotoOrigin);
mGotoMenu->addAction(mGotoOrigin);
//Goto->Expression
mGotoExpression = new QAction(DIcon("geolocation-goto.png"), tr("Expression"), this);
mGotoExpression = new QAction(DIcon("geolocation-goto"), tr("Expression"), this);
mGotoExpression->setShortcutContext(Qt::WidgetShortcut);
connect(mGotoExpression, SIGNAL(triggered()), this, SLOT(gotoExpressionSlot()));
this->addAction(mGotoExpression);
mGotoMenu->addAction(mGotoExpression);
//Find
mFindPattern = new QAction(DIcon("search-for.png"), tr("&Find Pattern..."), this);
mFindPattern = new QAction(DIcon("search-for"), tr("&Find Pattern..."), this);
this->addAction(mFindPattern);
mFindPattern->setShortcutContext(Qt::WidgetShortcut);
connect(mFindPattern, SIGNAL(triggered()), this, SLOT(findPatternSlot()));
//Dump
//TODO: These two actions should also appear in CPUDump
mDumpMemory = new QAction(DIcon("binary_save.png"), tr("&Dump Memory to File"), this);
mDumpMemory = new QAction(DIcon("binary_save"), tr("&Dump Memory to File"), this);
connect(mDumpMemory, SIGNAL(triggered()), this, SLOT(dumpMemory()));
//Load
@ -172,15 +172,15 @@ void MemoryMapView::setupContextMenu()
connect(mLoadMemory, SIGNAL(triggered()), this, SLOT(loadMemory()));
//Add virtual module
mAddVirtualMod = new QAction(DIcon("virtual.png"), tr("Add virtual module"), this);
mAddVirtualMod = new QAction(DIcon("virtual"), tr("Add virtual module"), this);
connect(mAddVirtualMod, SIGNAL(triggered()), this, SLOT(addVirtualModSlot()));
//References
mReferences = new QAction(DIcon("find.png"), tr("Find references to region"), this);
mReferences = new QAction(DIcon("find"), tr("Find references to region"), this);
connect(mReferences, SIGNAL(triggered()), this, SLOT(findReferencesSlot()));
//Comment
mComment = new QAction(DIcon("comment.png"), tr("&Comment"), this);
mComment = new QAction(DIcon("comment"), tr("&Comment"), this);
this->addAction(mComment);
connect(mComment, SIGNAL(triggered()), this, SLOT(commentSlot()));
mComment->setShortcutContext(Qt::WidgetShortcut);
@ -238,7 +238,7 @@ void MemoryMapView::contextMenuSlot(const QPoint & pos)
DbgMenuPrepare(GUI_MEMMAP_MENU);
wMenu.addActions(mPluginMenu->actions());
QMenu wCopyMenu(tr("&Copy"), this);
wCopyMenu.setIcon(DIcon("copy.png"));
wCopyMenu.setIcon(DIcon("copy"));
setupCopyMenu(&wCopyMenu);
if(wCopyMenu.actions().length())
{

View File

@ -17,8 +17,8 @@
<string>Message Breakpoint</string>
</property>
<property name="windowIcon">
<iconset resource="../../resource.qrc">
<normaloff>:/icons/images/breakpoint_execute.png</normaloff>:/icons/images/breakpoint_execute.png</iconset>
<iconset theme="breakpoint_execute" resource="../../resource.qrc">
<normaloff>:/Default/icons/breakpoint_execute.png</normaloff>:/Default/icons/breakpoint_execute.png</iconset>
</property>
<property name="locale">
<locale language="English" country="UnitedStates"/>

View File

@ -20,8 +20,8 @@
<string>Set Page Memory Rights</string>
</property>
<property name="windowIcon">
<iconset resource="../../resource.qrc">
<normaloff>:/icons/images/memory-map.png</normaloff>:/icons/images/memory-map.png</iconset>
<iconset theme="memory-map" resource="../../resource.qrc">
<normaloff>:/Default/icons/memory-map.png</normaloff>:/Default/icons/memory-map.png</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>

View File

@ -580,7 +580,7 @@ void PatchDialog::on_btnImport_clicked()
if(bAlreadyDone)
{
QMessageBox msg(QMessageBox::Question, tr("Question"), tr("Some patches are already applied.\n\nDo you want to remove these patches?"), QMessageBox::Yes | QMessageBox::No);
msg.setWindowIcon(DIcon("question.png"));
msg.setWindowIcon(DIcon("question"));
msg.setParent(this, Qt::Dialog);
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
if(msg.exec() == QMessageBox::Yes)
@ -591,7 +591,7 @@ void PatchDialog::on_btnImport_clicked()
if(bBadOriginal)
{
QMessageBox msg(QMessageBox::Question, tr("Question"), tr("Some bytes do not match the original in the patch file.\n\nDo you want to apply these patches anyway?"), QMessageBox::Yes | QMessageBox::No);
msg.setWindowIcon(DIcon("question.png"));
msg.setWindowIcon(DIcon("question"));
msg.setParent(this, Qt::Dialog);
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
if(msg.exec() == QMessageBox::Yes)

View File

@ -14,8 +14,8 @@
<string>Patches</string>
</property>
<property name="windowIcon">
<iconset resource="../../resource.qrc">
<normaloff>:/icons/images/patch.png</normaloff>:/icons/images/patch.png</iconset>
<iconset theme="patch" resource="../../resource.qrc">
<normaloff>:/Default/icons/patch.png</normaloff>:/Default/icons/patch.png</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>

View File

@ -14,8 +14,8 @@
<string>Group Selector</string>
</property>
<property name="windowIcon">
<iconset resource="../../resource.qrc">
<normaloff>:/icons/images/patch.png</normaloff>:/icons/images/patch.png</iconset>
<iconset theme="patch" resource="../../resource.qrc">
<normaloff>:/Default/icons/patch.png</normaloff>:/Default/icons/patch.png</iconset>
</property>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">

View File

@ -9,7 +9,7 @@ ReferenceManager::ReferenceManager(QWidget* parent) : QTabWidget(parent)
//Close All Tabs
mCloseAllTabs = new QPushButton(this);
mCloseAllTabs->setIcon(DIcon("close-all-tabs.png"));
mCloseAllTabs->setIcon(DIcon("close-all-tabs"));
mCloseAllTabs->setToolTip(tr("Close All Tabs"));
connect(mCloseAllTabs, SIGNAL(clicked()), this, SLOT(closeAllTabs()));
setCornerWidget(mCloseAllTabs, Qt::TopLeftCorner);

View File

@ -1094,13 +1094,13 @@ RegistersView::RegistersView(QWidget* parent) : QScrollArea(parent), mVScrollOff
// Context Menu
this->setContextMenuPolicy(Qt::CustomContextMenu);
wCM_CopyToClipboard = setupAction(DIcon("copy.png"), tr("Copy value"));
wCM_CopyFloatingPointValueToClipboard = setupAction(DIcon("copy.png"), tr("Copy floating point value"));
wCM_CopySymbolToClipboard = setupAction(DIcon("pdb.png"), tr("Copy Symbol Value"));
wCM_CopyAll = setupAction(DIcon("copy-alt.png"), tr("Copy all registers"));
wCM_ChangeFPUView = new QAction(DIcon("change-view.png"), tr("Change view"), this);
wCM_CopyToClipboard = setupAction(DIcon("copy"), tr("Copy value"));
wCM_CopyFloatingPointValueToClipboard = setupAction(DIcon("copy"), tr("Copy floating point value"));
wCM_CopySymbolToClipboard = setupAction(DIcon("pdb"), tr("Copy Symbol Value"));
wCM_CopyAll = setupAction(DIcon("copy-alt"), tr("Copy all registers"));
wCM_ChangeFPUView = new QAction(DIcon("change-view"), tr("Change view"), this);
mSwitchSIMDDispMode = new QMenu(tr("Change SIMD Register Display Mode"), this);
mSwitchSIMDDispMode->setIcon(DIcon("simdmode.png"));
mSwitchSIMDDispMode->setIcon(DIcon("simdmode"));
mDisplaySTX = new QAction(tr("Display ST(x)"), this);
mDisplayx87rX = new QAction(tr("Display x87rX"), this);
mDisplayMMX = new QAction(tr("Display MMX"), this);

View File

@ -18,7 +18,7 @@ SEHChainView::SEHChainView(StdTable* parent) : StdTable(parent)
void SEHChainView::setupContextMenu()
{
QIcon icon = DIcon(ArchValue("processor32.png", "processor64.png"));
QIcon icon = DIcon(ArchValue("processor32", "processor64"));
mFollowAddress = new QAction(icon, tr("Follow &Address"), this);
connect(mFollowAddress, SIGNAL(triggered()), this, SLOT(followAddress()));
mFollowHandler = new QAction(icon, tr("Follow Handler"), this);
@ -69,7 +69,7 @@ void SEHChainView::contextMenuSlot(const QPoint pos)
wMenu.addAction(mFollowAddress);
wMenu.addAction(mFollowHandler);
QMenu wCopyMenu(tr("&Copy"), this);
wCopyMenu.setIcon(DIcon("copy.png"));
wCopyMenu.setIcon(DIcon("copy"));
setupCopyMenu(&wCopyMenu);
if(wCopyMenu.actions().length())
{

View File

@ -382,8 +382,8 @@ void ScriptView::setupContextMenu()
{
mMenu = new MenuBuilder(this);
MenuBuilder* loadMenu = new MenuBuilder(this);
loadMenu->addAction(makeShortcutAction(DIcon("folder-horizontal-open.png"), tr("&Open..."), SLOT(openFile()), "ActionLoadScript"));
loadMenu->addAction(makeShortcutAction(DIcon("binary_paste.png"), tr("&Paste"), SLOT(paste()), "ActionBinaryPaste"), [](QMenu*)
loadMenu->addAction(makeShortcutAction(DIcon("folder-horizontal-open"), tr("&Open..."), SLOT(openFile()), "ActionLoadScript"));
loadMenu->addAction(makeShortcutAction(DIcon("binary_paste"), tr("&Paste"), SLOT(paste()), "ActionBinaryPaste"), [](QMenu*)
{
return QApplication::clipboard()->mimeData()->hasText();
});
@ -393,7 +393,7 @@ void ScriptView::setupContextMenu()
mMRUList->appendMenu(menu);
return true;
}));
mMenu->addMenu(makeMenu(DIcon("load-script.png"), tr("Load Script")), loadMenu);
mMenu->addMenu(makeMenu(DIcon("load-script"), tr("Load Script")), loadMenu);
auto isempty = [this](QMenu*)
{
return getRowCount() != 0;
@ -402,21 +402,21 @@ void ScriptView::setupContextMenu()
{
return getRowCount() != 0 && !filename.isEmpty();
};
mMenu->addAction(makeShortcutAction(DIcon("arrow-restart.png"), tr("Re&load Script"), SLOT(reload()), "ActionReloadScript"), isemptyclipboard);
mMenu->addAction(makeShortcutAction(DIcon("control-exit.png"), tr("&Unload Script"), SLOT(unload()), "ActionUnloadScript"), isempty);
mMenu->addAction(makeShortcutAction(DIcon("edit-script.png"), tr("&Edit Script"), SLOT(edit()), "ActionEditScript"), isemptyclipboard);
mMenu->addAction(makeShortcutAction(DIcon("arrow-restart"), tr("Re&load Script"), SLOT(reload()), "ActionReloadScript"), isemptyclipboard);
mMenu->addAction(makeShortcutAction(DIcon("control-exit"), tr("&Unload Script"), SLOT(unload()), "ActionUnloadScript"), isempty);
mMenu->addAction(makeShortcutAction(DIcon("edit-script"), tr("&Edit Script"), SLOT(edit()), "ActionEditScript"), isemptyclipboard);
mMenu->addSeparator();
mMenu->addAction(makeShortcutAction(DIcon("breakpoint_toggle.png"), tr("Toggle &BP"), SLOT(bpToggle()), "ActionToggleBreakpointScript"), isempty);
mMenu->addAction(makeShortcutAction(DIcon("arrow-run-cursor.png"), tr("Ru&n until selection"), SLOT(runCursor()), "ActionRunToCursorScript"), isempty);
mMenu->addAction(makeShortcutAction(DIcon("arrow-step-into.png"), tr("&Step"), SLOT(step()), "ActionStepScript"), isempty);
mMenu->addAction(makeShortcutAction(DIcon("arrow-run.png"), tr("&Run"), SLOT(run()), "ActionRunScript"), isempty);
mMenu->addAction(makeShortcutAction(DIcon("control-stop.png"), tr("&Abort"), SLOT(abort()), "ActionAbortScript"), isempty);
mMenu->addAction(makeAction(DIcon("neworigin.png"), tr("&Continue here..."), SLOT(newIp())), isempty);
mMenu->addAction(makeShortcutAction(DIcon("breakpoint_toggle"), tr("Toggle &BP"), SLOT(bpToggle()), "ActionToggleBreakpointScript"), isempty);
mMenu->addAction(makeShortcutAction(DIcon("arrow-run-cursor"), tr("Ru&n until selection"), SLOT(runCursor()), "ActionRunToCursorScript"), isempty);
mMenu->addAction(makeShortcutAction(DIcon("arrow-step-into"), tr("&Step"), SLOT(step()), "ActionStepScript"), isempty);
mMenu->addAction(makeShortcutAction(DIcon("arrow-run"), tr("&Run"), SLOT(run()), "ActionRunScript"), isempty);
mMenu->addAction(makeShortcutAction(DIcon("control-stop"), tr("&Abort"), SLOT(abort()), "ActionAbortScript"), isempty);
mMenu->addAction(makeAction(DIcon("neworigin"), tr("&Continue here..."), SLOT(newIp())), isempty);
mMenu->addSeparator();
MenuBuilder* copyMenu = new MenuBuilder(this);
setupCopyMenu(copyMenu);
mMenu->addMenu(makeMenu(DIcon("copy.png"), tr("Copy")), copyMenu);
mMenu->addAction(makeShortcutAction(DIcon("terminal-command.png"), tr("E&xecute Command..."), SLOT(cmdExec()), "ActionExecuteCommandScript"));
mMenu->addMenu(makeMenu(DIcon("copy"), tr("Copy")), copyMenu);
mMenu->addAction(makeShortcutAction(DIcon("terminal-command"), tr("E&xecute Command..."), SLOT(cmdExec()), "ActionExecuteCommandScript"));
}
bool ScriptView::isScriptCommand(QString text, QString cmd, QString & mnemonic, QString & argument)
@ -478,7 +478,7 @@ void ScriptView::error(int line, QString message)
msg->setWindowTitle(title);
msg->setText(message);
msg->setStandardButtons(QMessageBox::Ok);
msg->setWindowIcon(DIcon("script-error.png"));
msg->setWindowIcon(DIcon("script-error"));
msg->show();
}
@ -589,7 +589,7 @@ void ScriptView::message(QString message)
msg->setWindowTitle(tr("Message"));
msg->setText(message);
msg->setStandardButtons(QMessageBox::Ok);
msg->setWindowIcon(DIcon("information.png"));
msg->setWindowIcon(DIcon("information"));
msg->show();
}
@ -608,7 +608,7 @@ void ScriptView::question(QString message)
msg->setWindowTitle(tr("Question"));
msg->setText(message);
msg->setStandardButtons(QMessageBox::Yes | QMessageBox::No);
msg->setWindowIcon(DIcon("question.png"));
msg->setWindowIcon(DIcon("question"));
msg->show();
}

View File

@ -17,8 +17,8 @@
<string>Dialog</string>
</property>
<property name="windowIcon">
<iconset resource="../../resource.qrc">
<normaloff>:/icons/images/log.png</normaloff>:/icons/images/log.png</iconset>
<iconset theme="log" resource="../../resource.qrc">
<normaloff>:/Default/icons/log.png</normaloff>:/Default/icons/log.png</iconset>
</property>
<property name="modal">
<bool>true</bool>

View File

@ -897,7 +897,7 @@ void SettingsDialog::on_btnDeleteRange_clicked()
void SettingsDialog::on_btnIgnoreLast_clicked()
{
QMessageBox msg(QMessageBox::Question, tr("Question"), QString().sprintf(tr("Are you sure you want to add %.8X?").toUtf8().constData(), lastException));
msg.setWindowIcon(DIcon("question.png"));
msg.setWindowIcon(DIcon("question"));
msg.setParent(this, Qt::Dialog);
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
msg.setStandardButtons(QMessageBox::No | QMessageBox::Yes);

View File

@ -20,8 +20,8 @@
<string>Preferences</string>
</property>
<property name="windowIcon">
<iconset resource="../../resource.qrc">
<normaloff>:/icons/images/settings.png</normaloff>:/icons/images/settings.png</iconset>
<iconset theme="settings" resource="../../resource.qrc">
<normaloff>:/Default/icons/settings.png</normaloff>:/Default/icons/settings.png</iconset>
</property>
<property name="autoFillBackground">
<bool>true</bool>

View File

@ -14,8 +14,8 @@
<string>Shortcuts</string>
</property>
<property name="windowIcon">
<iconset resource="../../resource.qrc">
<normaloff>:/icons/images/shortcut.png</normaloff>:/icons/images/shortcut.png</iconset>
<iconset theme="shortcut" resource="../../resource.qrc">
<normaloff>:/Default/icons/shortcut.png</normaloff>:/Default/icons/shortcut.png</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>

View File

@ -46,7 +46,7 @@ void SimpleTraceDialog::on_btnOk_clicked()
{
QMessageBox msgyn(QMessageBox::Warning, tr("Trace log file"),
tr("It appears you have set the log file, but not the log text. <b>This will result in an empty log</b>. Do you really want to continue?"), QMessageBox::Yes | QMessageBox::No, this);
msgyn.setWindowIcon(DIcon("compile-warning.png"));
msgyn.setWindowIcon(DIcon("compile-warning"));
msgyn.setParent(this, Qt::Dialog);
msgyn.setWindowFlags(msgyn.windowFlags() & (~Qt::WindowContextHelpButtonHint));
if(msgyn.exec() == QMessageBox::No)

View File

@ -151,13 +151,13 @@ void SourceView::setupContextMenu()
mCommonActions->build(mMenuBuilder, CommonActions::ActionDisasm | CommonActions::ActionDump | CommonActions::ActionBreakpoint | CommonActions::ActionLabel | CommonActions::ActionComment
| CommonActions::ActionBookmark | CommonActions::ActionMemoryMap | CommonActions::ActionNewOrigin | CommonActions::ActionNewThread);
mMenuBuilder->addSeparator();
mMenuBuilder->addAction(makeShortcutAction(DIcon("geolocation-goto.png"), tr("Go to line"), SLOT(gotoLineSlot()), "ActionGotoExpression"));
mMenuBuilder->addAction(makeAction(DIcon("source.png"), tr("Open source file"), SLOT(openSourceFileSlot())));
mMenuBuilder->addAction(makeAction(DIcon("source_show_in_folder.png"), tr("Show source file in directory"), SLOT(showInDirectorySlot())));
mMenuBuilder->addAction(makeShortcutAction(DIcon("geolocation-goto"), tr("Go to line"), SLOT(gotoLineSlot()), "ActionGotoExpression"));
mMenuBuilder->addAction(makeAction(DIcon("source"), tr("Open source file"), SLOT(openSourceFileSlot())));
mMenuBuilder->addAction(makeAction(DIcon("source_show_in_folder"), tr("Show source file in directory"), SLOT(showInDirectorySlot())));
mMenuBuilder->addSeparator();
MenuBuilder* copyMenu = new MenuBuilder(this);
setupCopyColumnMenu(copyMenu);
mMenuBuilder->addMenu(makeMenu(DIcon("copy.png"), tr("&Copy")), copyMenu);
mMenuBuilder->addMenu(makeMenu(DIcon("copy"), tr("&Copy")), copyMenu);
mMenuBuilder->loadFromConfig();
}

View File

@ -11,7 +11,7 @@ SourceViewerManager::SourceViewerManager(QWidget* parent) : QTabWidget(parent)
//Close All Tabs
mCloseAllTabs = new QPushButton(this);
mCloseAllTabs->setIcon(DIcon("close-all-tabs.png"));
mCloseAllTabs->setIcon(DIcon("close-all-tabs"));
mCloseAllTabs->setToolTip(tr("Close All Tabs"));
connect(mCloseAllTabs, SIGNAL(clicked()), this, SLOT(closeAllTabs()));
setCornerWidget(mCloseAllTabs, Qt::TopLeftCorner);

View File

@ -181,31 +181,31 @@ void StructWidget::setupColumns()
void StructWidget::setupContextMenu()
{
mMenuBuilder = new MenuBuilder(this);
mMenuBuilder->addAction(makeAction(DIcon("dump.png"), tr("Follow value in Dump"), SLOT(followValueDumpSlot())), [this](QMenu*)
mMenuBuilder->addAction(makeAction(DIcon("dump"), tr("Follow value in Dump"), SLOT(followValueDumpSlot())), [this](QMenu*)
{
return DbgMemIsValidReadPtr(selectedValue());
});
mMenuBuilder->addAction(makeAction(DIcon("processor-cpu.png"), tr("Follow value in Disassembler"), SLOT(followValueDisasmSlot())), [this](QMenu*)
mMenuBuilder->addAction(makeAction(DIcon("processor-cpu"), tr("Follow value in Disassembler"), SLOT(followValueDisasmSlot())), [this](QMenu*)
{
return DbgMemIsValidReadPtr(selectedValue());
});
mMenuBuilder->addAction(makeAction(DIcon("dump.png"), tr("&Follow address in Dump"), SLOT(followDumpSlot())), [this](QMenu*)
mMenuBuilder->addAction(makeAction(DIcon("dump"), tr("&Follow address in Dump"), SLOT(followDumpSlot())), [this](QMenu*)
{
return hasSelection && DbgMemIsValidReadPtr(selectedType.addr + selectedType.offset);
});
mMenuBuilder->addAction(makeAction(DIcon("structaddr.png"), tr("Change address"), SLOT(changeAddrSlot())), [this](QMenu*)
mMenuBuilder->addAction(makeAction(DIcon("structaddr"), tr("Change address"), SLOT(changeAddrSlot())), [this](QMenu*)
{
return hasSelection && !selectedItem->parent() && DbgIsDebugging();
});
mMenuBuilder->addAction(makeAction(DIcon("visitstruct.png"), tr("Visit type"), SLOT(visitSlot())));
mMenuBuilder->addAction(makeAction(DIcon("database-import.png"), tr("Load JSON"), SLOT(loadJsonSlot())));
mMenuBuilder->addAction(makeAction(DIcon("source.png"), tr("Parse header"), SLOT(parseFileSlot())));
mMenuBuilder->addAction(makeAction(DIcon("removestruct.png"), tr("Remove"), SLOT(removeSlot())), [this](QMenu*)
mMenuBuilder->addAction(makeAction(DIcon("visitstruct"), tr("Visit type"), SLOT(visitSlot())));
mMenuBuilder->addAction(makeAction(DIcon("database-import"), tr("Load JSON"), SLOT(loadJsonSlot())));
mMenuBuilder->addAction(makeAction(DIcon("source"), tr("Parse header"), SLOT(parseFileSlot())));
mMenuBuilder->addAction(makeAction(DIcon("removestruct"), tr("Remove"), SLOT(removeSlot())), [this](QMenu*)
{
return hasSelection && !selectedItem->parent();
});
mMenuBuilder->addAction(makeAction(DIcon("eraser.png"), tr("Clear"), SLOT(clearSlot())));
mMenuBuilder->addAction(makeShortcutAction(DIcon("sync.png"), tr("&Refresh"), SLOT(refreshSlot()), "ActionRefresh"));
mMenuBuilder->addAction(makeAction(DIcon("eraser"), tr("Clear"), SLOT(clearSlot())));
mMenuBuilder->addAction(makeShortcutAction(DIcon("sync"), tr("&Refresh"), SLOT(refreshSlot()), "ActionRefresh"));
mMenuBuilder->loadFromConfig();
}

View File

@ -17,8 +17,8 @@
<string>Struct</string>
</property>
<property name="windowIcon">
<iconset resource="../../resource.qrc">
<normaloff>:/icons/images/struct.png</normaloff>:/icons/images/struct.png</iconset>
<iconset theme="struct" resource="../../resource.qrc">
<normaloff>:/Default/icons/struct.png</normaloff>:/Default/icons/struct.png</iconset>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">

View File

@ -292,24 +292,24 @@ void SymbolView::invalidateSymbolSource(duint base)
void SymbolView::setupContextMenu()
{
QIcon disassembler = DIcon(ArchValue("processor32.png", "processor64.png"));
QIcon disassembler = DIcon(ArchValue("processor32", "processor64"));
//Symbols
mFollowSymbolAction = new QAction(disassembler, tr("&Follow in Disassembler"), this);
connect(mFollowSymbolAction, SIGNAL(triggered()), this, SLOT(symbolFollow()));
mFollowSymbolDumpAction = new QAction(DIcon("dump.png"), tr("Follow in &Dump"), this);
mFollowSymbolDumpAction = new QAction(DIcon("dump"), tr("Follow in &Dump"), this);
connect(mFollowSymbolDumpAction, SIGNAL(triggered()), this, SLOT(symbolFollowDump()));
mFollowSymbolImportAction = new QAction(DIcon("import.png"), tr("Follow &imported address"), this);
mFollowSymbolImportAction = new QAction(DIcon("import"), tr("Follow &imported address"), this);
connect(mFollowSymbolImportAction, SIGNAL(triggered(bool)), this, SLOT(symbolFollowImport()));
mToggleBreakpoint = new QAction(DIcon("breakpoint.png"), tr("Toggle Breakpoint"), this);
mToggleBreakpoint = new QAction(DIcon("breakpoint"), tr("Toggle Breakpoint"), this);
mToggleBreakpoint->setShortcutContext(Qt::WidgetWithChildrenShortcut);
this->addAction(mToggleBreakpoint);
mSymbolSearchList->addAction(mToggleBreakpoint);
connect(mToggleBreakpoint, SIGNAL(triggered()), this, SLOT(toggleBreakpoint()));
mToggleBookmark = new QAction(DIcon("bookmark_toggle.png"), tr("Toggle Bookmark"), this);
mToggleBookmark = new QAction(DIcon("bookmark_toggle"), tr("Toggle Bookmark"), this);
mToggleBookmark->setShortcutContext(Qt::WidgetWithChildrenShortcut);
this->addAction(mToggleBookmark);
mSymbolSearchList->addAction(mToggleBookmark);
@ -324,61 +324,61 @@ void SymbolView::setupContextMenu()
mFollowModuleEntryAction = new QAction(disassembler, tr("Follow &Entry Point in Disassembler"), this);
connect(mFollowModuleEntryAction, SIGNAL(triggered()), this, SLOT(moduleEntryFollow()));
mFollowInMemMap = new QAction(DIcon("memmap_find_address_page.png"), tr("Follow in Memory Map"), this);
mFollowInMemMap = new QAction(DIcon("memmap_find_address_page"), tr("Follow in Memory Map"), this);
mFollowInMemMap->setShortcutContext(Qt::WidgetWithChildrenShortcut);
this->addAction(mFollowInMemMap);
mModuleList->addAction(mFollowInMemMap);
connect(mFollowInMemMap, SIGNAL(triggered()), this, SLOT(moduleFollowMemMap()));
mDownloadSymbolsAction = new QAction(DIcon("pdb.png"), tr("&Download Symbols for This Module"), this);
mDownloadSymbolsAction = new QAction(DIcon("pdb"), tr("&Download Symbols for This Module"), this);
mDownloadSymbolsAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
this->addAction(mDownloadSymbolsAction);
mModuleList->addAction(mDownloadSymbolsAction);
connect(mDownloadSymbolsAction, SIGNAL(triggered()), this, SLOT(moduleDownloadSymbols()));
mDownloadAllSymbolsAction = new QAction(DIcon("pdb.png"), tr("Download Symbols for &All Modules"), this);
mDownloadAllSymbolsAction = new QAction(DIcon("pdb"), tr("Download Symbols for &All Modules"), this);
mDownloadAllSymbolsAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
this->addAction(mDownloadAllSymbolsAction);
mModuleList->addAction(mDownloadAllSymbolsAction);
connect(mDownloadAllSymbolsAction, SIGNAL(triggered()), this, SLOT(moduleDownloadAllSymbols()));
mCopyPathAction = new QAction(DIcon("copyfilepath.png"), tr("Copy File &Path"), this);
mCopyPathAction = new QAction(DIcon("copyfilepath"), tr("Copy File &Path"), this);
mCopyPathAction->setShortcutContext(Qt::WidgetShortcut);
this->addAction(mCopyPathAction);
mModuleList->addAction(mCopyPathAction);
connect(mCopyPathAction, SIGNAL(triggered()), this, SLOT(moduleCopyPath()));
mBrowseInExplorer = new QAction(DIcon("browseinexplorer.png"), tr("Browse in Explorer"), this);
mBrowseInExplorer = new QAction(DIcon("browseinexplorer"), tr("Browse in Explorer"), this);
mBrowseInExplorer->setShortcutContext(Qt::WidgetWithChildrenShortcut);
this->addAction(mBrowseInExplorer);
mModuleList->addAction(mBrowseInExplorer);
connect(mBrowseInExplorer, SIGNAL(triggered()), this, SLOT(moduleBrowse()));
mLoadLib = new QAction(DIcon("lib_load.png"), tr("Load library..."), this);
mLoadLib = new QAction(DIcon("lib_load"), tr("Load library..."), this);
mLoadLib->setShortcutContext(Qt::WidgetWithChildrenShortcut);
this->addAction(mLoadLib);
mModuleList->addAction(mLoadLib);
connect(mLoadLib, SIGNAL(triggered()), this, SLOT(moduleLoad()));
mFreeLib = new QAction(DIcon("lib_free.png"), tr("Free library"), this);
mFreeLib = new QAction(DIcon("lib_free"), tr("Free library"), this);
mFreeLib->setShortcutContext(Qt::WidgetWithChildrenShortcut);
this->addAction(mFreeLib);
mModuleList->addAction(mFreeLib);
connect(mFreeLib, SIGNAL(triggered()), this, SLOT(moduleFree()));
mModSetUserAction = new QAction(DIcon("markasuser.png"), tr("Mark as &user module"), this);
mModSetUserAction = new QAction(DIcon("markasuser"), tr("Mark as &user module"), this);
mModSetUserAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
this->addAction(mModSetUserAction);
mModuleList->addAction(mModSetUserAction);
connect(mModSetUserAction, SIGNAL(triggered()), this, SLOT(moduleSetUser()));
mModSetSystemAction = new QAction(DIcon("markassystem.png"), tr("Mark as &system module"), this);
mModSetSystemAction = new QAction(DIcon("markassystem"), tr("Mark as &system module"), this);
mModSetSystemAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
this->addAction(mModSetSystemAction);
mModuleList->addAction(mModSetSystemAction);
connect(mModSetSystemAction, SIGNAL(triggered()), this, SLOT(moduleSetSystem()));
mModSetPartyAction = new QAction(DIcon("markasparty.png"), tr("Mark as &party..."), this);
mModSetPartyAction = new QAction(DIcon("markasparty"), tr("Mark as &party..."), this);
mModSetPartyAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
this->addAction(mModSetPartyAction);
mModuleList->addAction(mModSetPartyAction);
@ -610,7 +610,7 @@ void SymbolView::moduleContextMenu(QMenu* wMenu)
wMenu->addAction(mModSetSystemAction);
wMenu->addAction(mModSetPartyAction);
QMenu wCopyMenu(tr("&Copy"), this);
wCopyMenu.setIcon(DIcon("copy.png"));
wCopyMenu.setIcon(DIcon("copy"));
mModuleList->mCurList->setupCopyMenu(&wCopyMenu);
if(wCopyMenu.actions().length())
{
@ -780,7 +780,7 @@ void SymbolView::toggleBookmark()
if(!result)
{
QMessageBox msg(QMessageBox::Critical, tr("Error!"), tr("DbgSetBookmarkAt failed!"));
msg.setWindowIcon(DIcon("compile-error.png"));
msg.setWindowIcon(DIcon("compile-error"));
msg.setParent(this, Qt::Dialog);
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
msg.exec();
@ -817,7 +817,7 @@ void SymbolView::moduleSetParty()
duint modbase = DbgValFromString(mModuleList->mCurList->getCellContent(mModuleList->mCurList->getInitialSelection(), ColBase).toUtf8().constData());
party = DbgFunctions()->ModGetParty(modbase);
QString mLineEditeditText;
QIcon bookmark = DIcon("bookmark.png");
QIcon bookmark = DIcon("bookmark");
if(SimpleInputBox(this, tr("Mark the party of the module as"), QString::number(party), mLineEditeditText, tr("0 is user module, 1 is system module."), &bookmark))
{
bool ok;

View File

@ -14,8 +14,8 @@
<string>System breakpoint scripts</string>
</property>
<property name="windowIcon">
<iconset resource="../../resource.qrc">
<normaloff>:/icons/images/initscript.png</normaloff>:/icons/images/initscript.png</iconset>
<iconset theme="initscript" resource="../../resource.qrc">
<normaloff>:/Default/icons/initscript.png</normaloff>:/Default/icons/initscript.png</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>

View File

@ -24,31 +24,31 @@ void ThreadView::setupContextMenu()
{
mMenuBuilder = new MenuBuilder(this);
//Switch thread menu
mMenuBuilder->addAction(makeCommandAction(new QAction(DIcon("thread-switch.png"), tr("Switch Thread"), this), "switchthread $"));
mMenuBuilder->addAction(makeCommandAction(new QAction(DIcon("thread-switch"), tr("Switch Thread"), this), "switchthread $"));
//Suspend thread menu
mMenuBuilder->addAction(makeCommandAction(new QAction(DIcon("thread-pause.png"), tr("Suspend Thread"), this), "suspendthread $"));
mMenuBuilder->addAction(makeCommandAction(new QAction(DIcon("thread-pause"), tr("Suspend Thread"), this), "suspendthread $"));
//Resume thread menu
mMenuBuilder->addAction(makeCommandAction(new QAction(DIcon("thread-resume.png"), tr("Resume Thread"), this), "resumethread $"));
mMenuBuilder->addAction(makeCommandAction(new QAction(DIcon("thread-resume"), tr("Resume Thread"), this), "resumethread $"));
mMenuBuilder->addAction(makeCommandAction(new QAction(DIcon("thread-pause.png"), tr("Suspend All Threads"), this), "suspendallthreads"));
mMenuBuilder->addAction(makeCommandAction(new QAction(DIcon("thread-pause"), tr("Suspend All Threads"), this), "suspendallthreads"));
mMenuBuilder->addAction(makeCommandAction(new QAction(DIcon("thread-resume.png"), tr("Resume All Threads"), this), "resumeallthreads"));
mMenuBuilder->addAction(makeCommandAction(new QAction(DIcon("thread-resume"), tr("Resume All Threads"), this), "resumeallthreads"));
//Kill thread menu
mMenuBuilder->addAction(makeCommandAction(new QAction(DIcon("thread-kill.png"), tr("Kill Thread"), this), "killthread $"));
mMenuBuilder->addAction(makeCommandAction(new QAction(DIcon("thread-kill"), tr("Kill Thread"), this), "killthread $"));
mMenuBuilder->addSeparator();
// Set name
mMenuBuilder->addAction(makeAction(DIcon("thread-setname.png"), tr("Set Name"), SLOT(SetNameSlot())));
mMenuBuilder->addAction(makeAction(DIcon("thread-setname"), tr("Set Name"), SLOT(SetNameSlot())));
// Set priority
QAction* mSetPriorityIdle = makeCommandAction(new QAction(DIcon("thread-priority-idle.png"), tr("Idle"), this), "setprioritythread $, Idle");
QAction* mSetPriorityAboveNormal = makeCommandAction(new QAction(DIcon("thread-priority-above-normal.png"), tr("Above Normal"), this), "setprioritythread $, AboveNormal");
QAction* mSetPriorityBelowNormal = makeCommandAction(new QAction(DIcon("thread-priority-below-normal.png"), tr("Below Normal"), this), "setprioritythread $, BelowNormal");
QAction* mSetPriorityHighest = makeCommandAction(new QAction(DIcon("thread-priority-highest.png"), tr("Highest"), this), "setprioritythread $, Highest");
QAction* mSetPriorityLowest = makeCommandAction(new QAction(DIcon("thread-priority-lowest.png"), tr("Lowest"), this), "setprioritythread $, Lowest");
QAction* mSetPriorityNormal = makeCommandAction(new QAction(DIcon("thread-priority-normal.png"), tr("Normal"), this), "setprioritythread $, Normal");
QAction* mSetPriorityTimeCritical = makeCommandAction(new QAction(DIcon("thread-priority-timecritical.png"), tr("Time Critical"), this), "setprioritythread $, TimeCritical");
QAction* mSetPriorityIdle = makeCommandAction(new QAction(DIcon("thread-priority-idle"), tr("Idle"), this), "setprioritythread $, Idle");
QAction* mSetPriorityAboveNormal = makeCommandAction(new QAction(DIcon("thread-priority-above-normal"), tr("Above Normal"), this), "setprioritythread $, AboveNormal");
QAction* mSetPriorityBelowNormal = makeCommandAction(new QAction(DIcon("thread-priority-below-normal"), tr("Below Normal"), this), "setprioritythread $, BelowNormal");
QAction* mSetPriorityHighest = makeCommandAction(new QAction(DIcon("thread-priority-highest"), tr("Highest"), this), "setprioritythread $, Highest");
QAction* mSetPriorityLowest = makeCommandAction(new QAction(DIcon("thread-priority-lowest"), tr("Lowest"), this), "setprioritythread $, Lowest");
QAction* mSetPriorityNormal = makeCommandAction(new QAction(DIcon("thread-priority-normal"), tr("Normal"), this), "setprioritythread $, Normal");
QAction* mSetPriorityTimeCritical = makeCommandAction(new QAction(DIcon("thread-priority-timecritical"), tr("Time Critical"), this), "setprioritythread $, TimeCritical");
MenuBuilder* mSetPriority = new MenuBuilder(this, [this, mSetPriorityIdle, mSetPriorityAboveNormal, mSetPriorityBelowNormal,
mSetPriorityHighest, mSetPriorityLowest, mSetPriorityNormal, mSetPriorityTimeCritical](QMenu*)
{
@ -92,10 +92,10 @@ void ThreadView::setupContextMenu()
mSetPriority->addAction(mSetPriorityBelowNormal);
mSetPriority->addAction(mSetPriorityLowest);
mSetPriority->addAction(mSetPriorityIdle);
mMenuBuilder->addMenu(makeMenu(DIcon("thread-setpriority_alt.png"), tr("Set Priority")), mSetPriority);
mMenuBuilder->addMenu(makeMenu(DIcon("thread-setpriority_alt"), tr("Set Priority")), mSetPriority);
// GoToThreadEntry
mMenuBuilder->addAction(makeAction(DIcon("thread-entry.png"), tr("Go to Thread Entry"), SLOT(GoToThreadEntry())), [this](QMenu * menu)
mMenuBuilder->addAction(makeAction(DIcon("thread-entry"), tr("Go to Thread Entry"), SLOT(GoToThreadEntry())), [this](QMenu * menu)
{
bool ok;
ULONGLONG entry = getCellContent(getInitialSelection(), 2).toULongLong(&ok, 16);
@ -112,7 +112,7 @@ void ThreadView::setupContextMenu()
setupCopyMenu(mCopyMenu);
// Column count cannot be zero
mMenuBuilder->addSeparator();
mMenuBuilder->addMenu(makeMenu(DIcon("copy.png"), tr("&Copy")), mCopyMenu);
mMenuBuilder->addMenu(makeMenu(DIcon("copy"), tr("&Copy")), mCopyMenu);
mMenuBuilder->loadFromConfig();
}

View File

@ -148,31 +148,31 @@ void WatchView::setupContextMenu()
};
mMenu->addAction(makeAction(tr("&Add..."), SLOT(addWatchSlot())));
mMenu->addAction(makeShortcutAction(tr("&Delete"), SLOT(delWatchSlot()), "ActionDeleteBreakpoint"), nonEmptyFunc);
mMenu->addAction(makeAction(DIcon("labels.png"), tr("Rename"), SLOT(renameWatchSlot())), nonEmptyFunc);
mMenu->addAction(makeAction(DIcon("modify.png"), tr("&Edit..."), SLOT(editWatchSlot())), nonEmptyFunc);
mMenu->addAction(makeAction(DIcon("modify.png"), tr("&Modify..."), SLOT(modifyWatchSlot())), nonEmptyFunc);
mMenu->addAction(makeAction(DIcon("labels"), tr("Rename"), SLOT(renameWatchSlot())), nonEmptyFunc);
mMenu->addAction(makeAction(DIcon("modify"), tr("&Edit..."), SLOT(editWatchSlot())), nonEmptyFunc);
mMenu->addAction(makeAction(DIcon("modify"), tr("&Modify..."), SLOT(modifyWatchSlot())), nonEmptyFunc);
MenuBuilder* watchdogBuilder = new MenuBuilder(this, nonEmptyFunc);
QMenu* watchdogMenu = new QMenu(tr("Watchdog"), this);
watchdogMenu->setIcon(DIcon("animal-dog.png"));
watchdogBuilder->addAction(makeAction(DIcon("disable.png"), tr("Disabled"), SLOT(watchdogDisableSlot())));
watchdogMenu->setIcon(DIcon("animal-dog"));
watchdogBuilder->addAction(makeAction(DIcon("disable"), tr("Disabled"), SLOT(watchdogDisableSlot())));
watchdogBuilder->addSeparator();
watchdogBuilder->addAction(makeAction(DIcon("arrow-restart.png"), tr("Changed"), SLOT(watchdogChangedSlot())));
watchdogBuilder->addAction(makeAction(DIcon("control-pause.png"), tr("Not changed"), SLOT(watchdogUnchangedSlot())));
watchdogBuilder->addAction(makeAction(DIcon("treat_selection_as_tbyte.png"), tr("Is true"), SLOT(watchdogIsTrueSlot()))); // TODO: better icon
watchdogBuilder->addAction(makeAction(DIcon("treat_selection_as_fword.png"), tr("Is false"), SLOT(watchdogIsFalseSlot())));
watchdogBuilder->addAction(makeAction(DIcon("arrow-restart"), tr("Changed"), SLOT(watchdogChangedSlot())));
watchdogBuilder->addAction(makeAction(DIcon("control-pause"), tr("Not changed"), SLOT(watchdogUnchangedSlot())));
watchdogBuilder->addAction(makeAction(DIcon("treat_selection_as_tbyte"), tr("Is true"), SLOT(watchdogIsTrueSlot()))); // TODO: better icon
watchdogBuilder->addAction(makeAction(DIcon("treat_selection_as_fword"), tr("Is false"), SLOT(watchdogIsFalseSlot())));
mMenu->addMenu(watchdogMenu, watchdogBuilder);
MenuBuilder* typeBuilder = new MenuBuilder(this, nonEmptyFunc);
QMenu* typeMenu = new QMenu(tr("Type"), this);
typeBuilder->addAction(makeAction(DIcon("integer.png"), tr("Uint"), SLOT(setTypeUintSlot())));
typeBuilder->addAction(makeAction(DIcon("integer.png"), tr("Int"), SLOT(setTypeIntSlot())));
typeBuilder->addAction(makeAction(DIcon("float.png"), tr("Float"), SLOT(setTypeFloatSlot())));
typeBuilder->addAction(makeAction(DIcon("ascii.png"), tr("Ascii"), SLOT(setTypeAsciiSlot())));
typeBuilder->addAction(makeAction(DIcon("ascii-extended.png"), tr("Unicode"), SLOT(setTypeUnicodeSlot())));
typeBuilder->addAction(makeAction(DIcon("integer"), tr("Uint"), SLOT(setTypeUintSlot())));
typeBuilder->addAction(makeAction(DIcon("integer"), tr("Int"), SLOT(setTypeIntSlot())));
typeBuilder->addAction(makeAction(DIcon("float"), tr("Float"), SLOT(setTypeFloatSlot())));
typeBuilder->addAction(makeAction(DIcon("ascii"), tr("Ascii"), SLOT(setTypeAsciiSlot())));
typeBuilder->addAction(makeAction(DIcon("ascii-extended"), tr("Unicode"), SLOT(setTypeUnicodeSlot())));
mMenu->addMenu(typeMenu, typeBuilder);
mMenu->addSeparator();
MenuBuilder* copyMenu = new MenuBuilder(this);
setupCopyMenu(copyMenu);
mMenu->addMenu(makeMenu(DIcon("copy.png"), tr("&Copy")), copyMenu);
mMenu->addMenu(makeMenu(DIcon("copy"), tr("&Copy")), copyMenu);
mMenu->loadFromConfig();
}

View File

@ -20,8 +20,8 @@
<string>Edit</string>
</property>
<property name="windowIcon">
<iconset resource="../../resource.qrc">
<normaloff>:/icons/images/ui-combo-box-edit.png</normaloff>:/icons/images/ui-combo-box-edit.png</iconset>
<iconset theme="ui-combo-box-edit" resource="../../resource.qrc">
<normaloff>:/Default/icons/ui-combo-box-edit.png</normaloff>:/Default/icons/ui-combo-box-edit.png</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>

View File

@ -10,7 +10,7 @@ XrefBrowseDialog::XrefBrowseDialog(QWidget* parent) :
{
ui->setupUi(this);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
setWindowIcon(DIcon("xrefs.png"));
setWindowIcon(DIcon("xrefs"));
setModal(false);
mXrefInfo.refcount = 0;
ui->listWidget->setContextMenuPolicy(Qt::CustomContextMenu);
@ -85,40 +85,40 @@ void XrefBrowseDialog::setup(duint address, GotoFunction gotoFunction)
void XrefBrowseDialog::setupContextMenu()
{
mMenu = new MenuBuilder(this);
mMenu->addAction(makeAction(DIcon("breakpoint_toggle.png"), tr("Toggle &Breakpoint"), SLOT(breakpointSlot())));
mMenu->addAction(makeAction(DIcon("breakpoint_toggle"), tr("Toggle &Breakpoint"), SLOT(breakpointSlot())));
//Breakpoint (hardware access) menu
auto hardwareAccessMenu = makeMenu(DIcon("breakpoint_access.png"), tr("Hardware, Access"));
hardwareAccessMenu->addAction(makeAction(DIcon("breakpoint_byte.png"), tr("&Byte"), SLOT(hardwareAccess1Slot())));
hardwareAccessMenu->addAction(makeAction(DIcon("breakpoint_word.png"), tr("&Word"), SLOT(hardwareAccess2Slot())));
hardwareAccessMenu->addAction(makeAction(DIcon("breakpoint_dword.png"), tr("&Dword"), SLOT(hardwareAccess4Slot())));
auto hardwareAccessMenu = makeMenu(DIcon("breakpoint_access"), tr("Hardware, Access"));
hardwareAccessMenu->addAction(makeAction(DIcon("breakpoint_byte"), tr("&Byte"), SLOT(hardwareAccess1Slot())));
hardwareAccessMenu->addAction(makeAction(DIcon("breakpoint_word"), tr("&Word"), SLOT(hardwareAccess2Slot())));
hardwareAccessMenu->addAction(makeAction(DIcon("breakpoint_dword"), tr("&Dword"), SLOT(hardwareAccess4Slot())));
#ifdef _WIN64
hardwareAccessMenu->addAction(makeAction(DIcon("breakpoint_qword.png"), tr("&Qword"), SLOT(hardwareAccess8Slot())));
hardwareAccessMenu->addAction(makeAction(DIcon("breakpoint_qword"), tr("&Qword"), SLOT(hardwareAccess8Slot())));
#endif //_WIN64
//Breakpoint (hardware write) menu
auto hardwareWriteMenu = makeMenu(DIcon("breakpoint_write.png"), tr("Hardware, Write"));
hardwareWriteMenu->addAction(makeAction(DIcon("breakpoint_byte.png"), tr("&Byte"), SLOT(hardwareWrite1Slot())));
hardwareWriteMenu->addAction(makeAction(DIcon("breakpoint_word.png"), tr("&Word"), SLOT(hardwareWrite2Slot())));
hardwareWriteMenu->addAction(makeAction(DIcon("breakpoint_dword.png"), tr("&Dword"), SLOT(hardwareWrite4Slot())));
auto hardwareWriteMenu = makeMenu(DIcon("breakpoint_write"), tr("Hardware, Write"));
hardwareWriteMenu->addAction(makeAction(DIcon("breakpoint_byte"), tr("&Byte"), SLOT(hardwareWrite1Slot())));
hardwareWriteMenu->addAction(makeAction(DIcon("breakpoint_word"), tr("&Word"), SLOT(hardwareWrite2Slot())));
hardwareWriteMenu->addAction(makeAction(DIcon("breakpoint_dword"), tr("&Dword"), SLOT(hardwareWrite4Slot())));
#ifdef _WIN64
hardwareWriteMenu->addAction(makeAction(DIcon("breakpoint_qword.png"), tr("&Qword"), SLOT(hardwareAccess8Slot())));
hardwareWriteMenu->addAction(makeAction(DIcon("breakpoint_qword"), tr("&Qword"), SLOT(hardwareAccess8Slot())));
#endif //_WIN64
//Breakpoint (remove hardware)
auto hardwareRemove = makeAction(DIcon("breakpoint_remove.png"), tr("Remove &Hardware"), SLOT(hardwareRemoveSlot()));
auto hardwareRemove = makeAction(DIcon("breakpoint_remove"), tr("Remove &Hardware"), SLOT(hardwareRemoveSlot()));
//Breakpoint (memory access) menu
auto memoryAccessMenu = makeMenu(DIcon("breakpoint_memory_access.png"), tr("Memory, Access"));
memoryAccessMenu->addAction(makeAction(DIcon("breakpoint_memory_singleshoot.png"), tr("&Singleshoot"), SLOT(memoryAccessSingleshootSlot())));
memoryAccessMenu->addAction(makeAction(DIcon("breakpoint_memory_restore_on_hit.png"), tr("&Restore on hit"), SLOT(memoryAccessRestoreSlot())));
auto memoryAccessMenu = makeMenu(DIcon("breakpoint_memory_access"), tr("Memory, Access"));
memoryAccessMenu->addAction(makeAction(DIcon("breakpoint_memory_singleshoot"), tr("&Singleshoot"), SLOT(memoryAccessSingleshootSlot())));
memoryAccessMenu->addAction(makeAction(DIcon("breakpoint_memory_restore_on_hit"), tr("&Restore on hit"), SLOT(memoryAccessRestoreSlot())));
//Breakpoint (memory write) menu
auto memoryWriteMenu = makeMenu(DIcon("breakpoint_memory_write.png"), tr("Memory, Write"));
memoryWriteMenu->addAction(makeAction(DIcon("breakpoint_memory_singleshoot.png"), tr("&Singleshoot"), SLOT(memoryWriteSingleshootSlot())));
memoryWriteMenu->addAction(makeAction(DIcon("breakpoint_memory_restore_on_hit.png"), tr("&Restore on hit"), SLOT(memoryWriteRestoreSlot())));
auto memoryWriteMenu = makeMenu(DIcon("breakpoint_memory_write"), tr("Memory, Write"));
memoryWriteMenu->addAction(makeAction(DIcon("breakpoint_memory_singleshoot"), tr("&Singleshoot"), SLOT(memoryWriteSingleshootSlot())));
memoryWriteMenu->addAction(makeAction(DIcon("breakpoint_memory_restore_on_hit"), tr("&Restore on hit"), SLOT(memoryWriteRestoreSlot())));
//Breakpoint (remove memory) menu
auto memoryRemove = makeAction(DIcon("breakpoint_remove.png"), tr("Remove &Memory"), SLOT(memoryRemoveSlot()));
auto memoryRemove = makeAction(DIcon("breakpoint_remove"), tr("Remove &Memory"), SLOT(memoryRemoveSlot()));
//Breakpoint menu
auto breakpointMenu = new MenuBuilder(this);
@ -150,12 +150,12 @@ void XrefBrowseDialog::setupContextMenu()
}
return true;
}));
mMenu->addMenu(makeMenu(DIcon("breakpoint.png"), tr("Brea&kpoint")), breakpointMenu);
mMenu->addAction(makeAction(DIcon("breakpoint_toggle.png"), tr("Toggle breakpoints on all xrefs"), SLOT(breakpointAllSlot())));
mMenu->addMenu(makeMenu(DIcon("breakpoint"), tr("Brea&kpoint")), breakpointMenu);
mMenu->addAction(makeAction(DIcon("breakpoint_toggle"), tr("Toggle breakpoints on all xrefs"), SLOT(breakpointAllSlot())));
auto mCopyMenu = new MenuBuilder(mMenu);
mCopyMenu->addAction(makeAction(tr("Selected xref"), SLOT(copyThisSlot())));
mCopyMenu->addAction(makeAction(tr("All xrefs"), SLOT(copyAllSlot())));
mMenu->addMenu(makeMenu(DIcon("copy.png"), tr("Copy")), mCopyMenu);
mMenu->addMenu(makeMenu(DIcon("copy"), tr("Copy")), mCopyMenu);
mMenu->loadFromConfig();
}

View File

@ -803,7 +803,7 @@ void TraceBrowser::setupRightClickContextMenu()
else
return mTraceFile->Registers(getInitialSelection()).regcontext.cip;
});
QAction* toggleRunTrace = makeShortcutAction(DIcon("trace.png"), tr("Start Run Trace"), SLOT(toggleRunTraceSlot()), "ActionToggleRunTrace");
QAction* toggleRunTrace = makeShortcutAction(DIcon("trace"), tr("Start Run Trace"), SLOT(toggleRunTraceSlot()), "ActionToggleRunTrace");
mMenuBuilder->addAction(toggleRunTrace, [toggleRunTrace](QMenu*)
{
if(!DbgIsDebugging())
@ -819,8 +819,8 @@ void TraceBrowser::setupRightClickContextMenu()
return mTraceFile == nullptr;
};
mMenuBuilder->addAction(makeAction(DIcon("folder-horizontal-open.png"), tr("Open"), SLOT(openFileSlot())), mTraceFileIsNull);
mMenuBuilder->addMenu(makeMenu(DIcon("recentfiles.png"), tr("Recent Files")), [this](QMenu * menu)
mMenuBuilder->addAction(makeAction(DIcon("folder-horizontal-open"), tr("Open"), SLOT(openFileSlot())), mTraceFileIsNull);
mMenuBuilder->addMenu(makeMenu(DIcon("recentfiles"), tr("Recent Files")), [this](QMenu * menu)
{
if(mTraceFile == nullptr)
{
@ -830,11 +830,11 @@ void TraceBrowser::setupRightClickContextMenu()
else
return false;
});
mMenuBuilder->addAction(makeAction(DIcon("fatal-error.png"), tr("Close"), SLOT(closeFileSlot())), [this](QMenu*)
mMenuBuilder->addAction(makeAction(DIcon("fatal-error"), tr("Close"), SLOT(closeFileSlot())), [this](QMenu*)
{
return mTraceFile != nullptr;
});
mMenuBuilder->addAction(makeAction(DIcon("fatal-error.png"), tr("Close and delete"), SLOT(closeDeleteSlot())), [this](QMenu*)
mMenuBuilder->addAction(makeAction(DIcon("fatal-error"), tr("Close and delete"), SLOT(closeDeleteSlot())), [this](QMenu*)
{
return mTraceFile != nullptr;
});
@ -849,23 +849,23 @@ void TraceBrowser::setupRightClickContextMenu()
};
MenuBuilder* copyMenu = new MenuBuilder(this, isValid);
copyMenu->addAction(makeShortcutAction(DIcon("copy_selection.png"), tr("&Selection"), SLOT(copySelectionSlot()), "ActionCopy"));
copyMenu->addAction(makeAction(DIcon("copy_selection.png"), tr("Selection to &File"), SLOT(copySelectionToFileSlot())));
copyMenu->addAction(makeAction(DIcon("copy_selection_no_bytes.png"), tr("Selection (&No Bytes)"), SLOT(copySelectionNoBytesSlot())));
copyMenu->addAction(makeAction(DIcon("copy_selection_no_bytes.png"), tr("Selection to File (No Bytes)"), SLOT(copySelectionToFileNoBytesSlot())));
copyMenu->addAction(makeShortcutAction(DIcon("database-export.png"), tr("&Export Table"), SLOT(exportSlot()), "ActionExport"));
copyMenu->addAction(makeShortcutAction(DIcon("copy_address.png"), tr("Address"), SLOT(copyCipSlot()), "ActionCopyAddress"));
copyMenu->addAction(makeShortcutAction(DIcon("copy_address.png"), tr("&RVA"), SLOT(copyRvaSlot()), "ActionCopyRva"), isDebugging);
copyMenu->addAction(makeShortcutAction(DIcon("fileoffset.png"), tr("&File Offset"), SLOT(copyFileOffsetSlot()), "ActionCopyFileOffset"), isDebugging);
copyMenu->addAction(makeAction(DIcon("copy_disassembly.png"), tr("Disassembly"), SLOT(copyDisassemblySlot())));
copyMenu->addAction(makeAction(DIcon("copy_address.png"), tr("Index"), SLOT(copyIndexSlot())));
copyMenu->addAction(makeShortcutAction(DIcon("copy_selection"), tr("&Selection"), SLOT(copySelectionSlot()), "ActionCopy"));
copyMenu->addAction(makeAction(DIcon("copy_selection"), tr("Selection to &File"), SLOT(copySelectionToFileSlot())));
copyMenu->addAction(makeAction(DIcon("copy_selection_no_bytes"), tr("Selection (&No Bytes)"), SLOT(copySelectionNoBytesSlot())));
copyMenu->addAction(makeAction(DIcon("copy_selection_no_bytes"), tr("Selection to File (No Bytes)"), SLOT(copySelectionToFileNoBytesSlot())));
copyMenu->addAction(makeShortcutAction(DIcon("database-export"), tr("&Export Table"), SLOT(exportSlot()), "ActionExport"));
copyMenu->addAction(makeShortcutAction(DIcon("copy_address"), tr("Address"), SLOT(copyCipSlot()), "ActionCopyAddress"));
copyMenu->addAction(makeShortcutAction(DIcon("copy_address"), tr("&RVA"), SLOT(copyRvaSlot()), "ActionCopyRva"), isDebugging);
copyMenu->addAction(makeShortcutAction(DIcon("fileoffset"), tr("&File Offset"), SLOT(copyFileOffsetSlot()), "ActionCopyFileOffset"), isDebugging);
copyMenu->addAction(makeAction(DIcon("copy_disassembly"), tr("Disassembly"), SLOT(copyDisassemblySlot())));
copyMenu->addAction(makeAction(DIcon("copy_address"), tr("Index"), SLOT(copyIndexSlot())));
mMenuBuilder->addMenu(makeMenu(DIcon("copy.png"), tr("&Copy")), copyMenu);
mMenuBuilder->addMenu(makeMenu(DIcon("copy"), tr("&Copy")), copyMenu);
mCommonActions->build(mMenuBuilder, CommonActions::ActionDisasm | CommonActions::ActionBreakpoint | CommonActions::ActionLabel | CommonActions::ActionComment | CommonActions::ActionBookmark);
mMenuBuilder->addAction(makeShortcutAction(DIcon("highlight.png"), tr("&Highlighting mode"), SLOT(enableHighlightingModeSlot()), "ActionHighlightingMode"), isValid);
mMenuBuilder->addAction(makeShortcutAction(DIcon("helpmnemonic.png"), tr("Help on mnemonic"), SLOT(mnemonicHelpSlot()), "ActionHelpOnMnemonic"), isValid);
QAction* mnemonicBrief = makeShortcutAction(DIcon("helpbrief.png"), tr("Show mnemonic brief"), SLOT(mnemonicBriefSlot()), "ActionToggleMnemonicBrief");
mMenuBuilder->addAction(makeShortcutAction(DIcon("highlight"), tr("&Highlighting mode"), SLOT(enableHighlightingModeSlot()), "ActionHighlightingMode"), isValid);
mMenuBuilder->addAction(makeShortcutAction(DIcon("helpmnemonic"), tr("Help on mnemonic"), SLOT(mnemonicHelpSlot()), "ActionHelpOnMnemonic"), isValid);
QAction* mnemonicBrief = makeShortcutAction(DIcon("helpbrief"), tr("Show mnemonic brief"), SLOT(mnemonicBriefSlot()), "ActionToggleMnemonicBrief");
mMenuBuilder->addAction(mnemonicBrief, [this, mnemonicBrief](QMenu*)
{
if(mShowMnemonicBrief)
@ -875,22 +875,22 @@ void TraceBrowser::setupRightClickContextMenu()
return true;
});
MenuBuilder* gotoMenu = new MenuBuilder(this, isValid);
gotoMenu->addAction(makeShortcutAction(DIcon("goto.png"), tr("Expression"), SLOT(gotoSlot()), "ActionGotoExpression"), isValid);
gotoMenu->addAction(makeAction(DIcon("arrow-step-rtr.png"), tr("Function return"), SLOT(rtrSlot())), isValid);
gotoMenu->addAction(makeShortcutAction(DIcon("previous.png"), tr("Previous"), SLOT(gotoPreviousSlot()), "ActionGotoPrevious"), [this](QMenu*)
gotoMenu->addAction(makeShortcutAction(DIcon("goto"), tr("Expression"), SLOT(gotoSlot()), "ActionGotoExpression"), isValid);
gotoMenu->addAction(makeAction(DIcon("arrow-step-rtr"), tr("Function return"), SLOT(rtrSlot())), isValid);
gotoMenu->addAction(makeShortcutAction(DIcon("previous"), tr("Previous"), SLOT(gotoPreviousSlot()), "ActionGotoPrevious"), [this](QMenu*)
{
return mHistory.historyHasPrev();
});
gotoMenu->addAction(makeShortcutAction(DIcon("next.png"), tr("Next"), SLOT(gotoNextSlot()), "ActionGotoNext"), [this](QMenu*)
gotoMenu->addAction(makeShortcutAction(DIcon("next"), tr("Next"), SLOT(gotoNextSlot()), "ActionGotoNext"), [this](QMenu*)
{
return mHistory.historyHasNext();
});
mMenuBuilder->addMenu(makeMenu(DIcon("goto.png"), tr("Go to")), gotoMenu);
mMenuBuilder->addMenu(makeMenu(DIcon("goto"), tr("Go to")), gotoMenu);
MenuBuilder* searchMenu = new MenuBuilder(this, isValid);
searchMenu->addAction(makeAction(DIcon("search_for_constant.png"), tr("Constant"), SLOT(searchConstantSlot())));
searchMenu->addAction(makeAction(DIcon("memory-map.png"), tr("Memory Reference"), SLOT(searchMemRefSlot())));
mMenuBuilder->addMenu(makeMenu(DIcon("search.png"), tr("&Search")), searchMenu);
searchMenu->addAction(makeAction(DIcon("search_for_constant"), tr("Constant"), SLOT(searchConstantSlot())));
searchMenu->addAction(makeAction(DIcon("memory-map"), tr("Memory Reference"), SLOT(searchMemRefSlot())));
mMenuBuilder->addMenu(makeMenu(DIcon("search"), tr("&Search")), searchMenu);
// The following code adds a menu to view the information about currently selected instruction. When info box is completed, remove me.
MenuBuilder* infoMenu = new MenuBuilder(this, [this, isValid](QMenu * menu)

View File

@ -7,7 +7,7 @@
TraceRegisters::TraceRegisters(QWidget* parent) : RegistersView(parent)
{
wCM_CopySIMDRegister = setupAction(DIcon("copy.png"), tr("Copy floating point value"));
wCM_CopySIMDRegister = setupAction(DIcon("copy"), tr("Copy floating point value"));
connect(wCM_CopySIMDRegister, SIGNAL(triggered()), this, SLOT(onCopySIMDRegister()));
connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(displayCustomContextMenuSlot(QPoint)));
}

View File

@ -31,19 +31,19 @@ void CommonActions::build(MenuBuilder* builder, int actions)
// Menu action
if(actions & ActionDisasm)
{
builder->addAction(makeShortcutAction(DIcon(ArchValue("processor32.png", "processor64.png")), tr("Follow in Disassembler"), std::bind(&CommonActions::followDisassemblySlot, this), "ActionFollowDisasm"), wIsDebugging);
builder->addAction(makeShortcutAction(DIcon(ArchValue("processor32", "processor64")), tr("Follow in Disassembler"), std::bind(&CommonActions::followDisassemblySlot, this), "ActionFollowDisasm"), wIsDebugging);
}
if(actions & ActionDisasmData)
{
builder->addAction(makeCommandAction(DIcon("processor32.png"), ArchValue(tr("&Follow DWORD in Disassembler"), tr("&Follow QWORD in Disassembler")), "disasm [$]", "ActionFollowDwordQwordDisasm"), wIsValidReadPtrCallback);
builder->addAction(makeCommandAction(DIcon("processor32"), ArchValue(tr("&Follow DWORD in Disassembler"), tr("&Follow QWORD in Disassembler")), "disasm [$]", "ActionFollowDwordQwordDisasm"), wIsValidReadPtrCallback);
}
if(actions & ActionDump)
{
builder->addAction(makeCommandAction(DIcon("dump.png"), tr("Follow in Dump"), "dump $"));
builder->addAction(makeCommandAction(DIcon("dump"), tr("Follow in Dump"), "dump $"));
}
if(actions & ActionDumpData)
{
builder->addAction(makeCommandAction(DIcon("dump.png"), ArchValue(tr("&Follow DWORD in Current Dump"), tr("&Follow QWORD in Current Dump")), "dump [$]", "ActionFollowDwordQwordDump"), wIsValidReadPtrCallback);
builder->addAction(makeCommandAction(DIcon("dump"), ArchValue(tr("&Follow DWORD in Current Dump"), tr("&Follow QWORD in Current Dump")), "dump [$]", "ActionFollowDwordQwordDump"), wIsValidReadPtrCallback);
}
if(actions & ActionDumpN)
{
@ -62,11 +62,11 @@ void CommonActions::build(MenuBuilder* builder, int actions)
if(DbgMemIsValidReadPtr(selectedData))
DbgCmdExec(QString("dump [%1], %2").arg(ToPtrString(selectedData)).arg(i + 1));
}));
builder->addMenu(makeMenu(DIcon("dump.png"), ArchValue(tr("Follow DWORD in Dump"), tr("Follow QWORD in Dump"))), followDumpNMenu);
builder->addMenu(makeMenu(DIcon("dump"), ArchValue(tr("Follow DWORD in Dump"), tr("Follow QWORD in Dump"))), followDumpNMenu);
}
if(actions & ActionStackDump)
{
builder->addAction(makeCommandAction(DIcon("stack.png"), tr("Follow in Stack"), "sdump $", "ActionFollowStack"), [this](QMenu*)
builder->addAction(makeCommandAction(DIcon("stack"), tr("Follow in Stack"), "sdump $", "ActionFollowStack"), [this](QMenu*)
{
auto start = mGetSelection();
return (DbgMemIsValidReadPtr(start) && DbgMemFindBaseAddr(start, 0) == DbgMemFindBaseAddr(DbgValFromString("csp"), 0));
@ -74,11 +74,11 @@ void CommonActions::build(MenuBuilder* builder, int actions)
}
if(actions & ActionMemoryMap)
{
builder->addAction(makeCommandAction(DIcon("memmap_find_address_page.png"), tr("Follow in Memory Map"), "memmapdump $", "ActionFollowMemMap"), wIsDebugging);
builder->addAction(makeCommandAction(DIcon("memmap_find_address_page"), tr("Follow in Memory Map"), "memmapdump $", "ActionFollowMemMap"), wIsDebugging);
}
if(actions & ActionGraph)
{
builder->addAction(makeShortcutAction(DIcon("graph.png"), tr("Graph"), std::bind(&CommonActions::graphSlot, this), "ActionGraph"));
builder->addAction(makeShortcutAction(DIcon("graph"), tr("Graph"), std::bind(&CommonActions::graphSlot, this), "ActionGraph"));
}
if(actions & ActionBreakpoint)
{
@ -92,19 +92,19 @@ void CommonActions::build(MenuBuilder* builder, int actions)
QAction* replaceSlotAction[4];
} hodl;
hodl.toggleBreakpointAction = makeShortcutAction(DIcon("breakpoint_toggle.png"), tr("Toggle"), std::bind(&CommonActions::toggleInt3BPActionSlot, this), "ActionToggleBreakpoint");
hodl.editSoftwareBreakpointAction = makeShortcutAction(DIcon("breakpoint_edit_alt.png"), tr("Edit"), std::bind(&CommonActions::editSoftBpActionSlot, this), "ActionEditBreakpoint");
hodl.setHwBreakpointAction = makeShortcutAction(DIcon("breakpoint_execute.png"), tr("Set Hardware on Execution"), std::bind(&CommonActions::toggleHwBpActionSlot, this), "ActionSetHwBpE");
hodl.removeHwBreakpointAction = makeShortcutAction(DIcon("breakpoint_remove.png"), tr("Remove Hardware"), std::bind(&CommonActions::toggleHwBpActionSlot, this), "ActionRemoveHwBp");
hodl.toggleBreakpointAction = makeShortcutAction(DIcon("breakpoint_toggle"), tr("Toggle"), std::bind(&CommonActions::toggleInt3BPActionSlot, this), "ActionToggleBreakpoint");
hodl.editSoftwareBreakpointAction = makeShortcutAction(DIcon("breakpoint_edit_alt"), tr("Edit"), std::bind(&CommonActions::editSoftBpActionSlot, this), "ActionEditBreakpoint");
hodl.setHwBreakpointAction = makeShortcutAction(DIcon("breakpoint_execute"), tr("Set Hardware on Execution"), std::bind(&CommonActions::toggleHwBpActionSlot, this), "ActionSetHwBpE");
hodl.removeHwBreakpointAction = makeShortcutAction(DIcon("breakpoint_remove"), tr("Remove Hardware"), std::bind(&CommonActions::toggleHwBpActionSlot, this), "ActionRemoveHwBp");
hodl.replaceSlotMenu = makeMenu(DIcon("breakpoint_execute.png"), tr("Set Hardware on Execution"));
hodl.replaceSlotMenu = makeMenu(DIcon("breakpoint_execute"), tr("Set Hardware on Execution"));
// Replacement slot menu are only used when the breakpoints are full, so using "Unknown" as the placeholder. Might want to change this in case we display the menu when there are still free slots.
hodl.replaceSlotAction[0] = makeMenuAction(hodl.replaceSlotMenu, DIcon("breakpoint_execute_slot1.png"), tr("Replace Slot %1 (Unknown)").arg(1), std::bind(&CommonActions::setHwBpOnSlot0ActionSlot, this));
hodl.replaceSlotAction[1] = makeMenuAction(hodl.replaceSlotMenu, DIcon("breakpoint_execute_slot2.png"), tr("Replace Slot %1 (Unknown)").arg(2), std::bind(&CommonActions::setHwBpOnSlot1ActionSlot, this));
hodl.replaceSlotAction[2] = makeMenuAction(hodl.replaceSlotMenu, DIcon("breakpoint_execute_slot3.png"), tr("Replace Slot %1 (Unknown)").arg(3), std::bind(&CommonActions::setHwBpOnSlot2ActionSlot, this));
hodl.replaceSlotAction[3] = makeMenuAction(hodl.replaceSlotMenu, DIcon("breakpoint_execute_slot4.png"), tr("Replace Slot %1 (Unknown)").arg(4), std::bind(&CommonActions::setHwBpOnSlot3ActionSlot, this));
hodl.replaceSlotAction[0] = makeMenuAction(hodl.replaceSlotMenu, DIcon("breakpoint_execute_slot1"), tr("Replace Slot %1 (Unknown)").arg(1), std::bind(&CommonActions::setHwBpOnSlot0ActionSlot, this));
hodl.replaceSlotAction[1] = makeMenuAction(hodl.replaceSlotMenu, DIcon("breakpoint_execute_slot2"), tr("Replace Slot %1 (Unknown)").arg(2), std::bind(&CommonActions::setHwBpOnSlot1ActionSlot, this));
hodl.replaceSlotAction[2] = makeMenuAction(hodl.replaceSlotMenu, DIcon("breakpoint_execute_slot3"), tr("Replace Slot %1 (Unknown)").arg(3), std::bind(&CommonActions::setHwBpOnSlot2ActionSlot, this));
hodl.replaceSlotAction[3] = makeMenuAction(hodl.replaceSlotMenu, DIcon("breakpoint_execute_slot4"), tr("Replace Slot %1 (Unknown)").arg(4), std::bind(&CommonActions::setHwBpOnSlot3ActionSlot, this));
builder->addMenu(makeMenu(DIcon("breakpoint.png"), tr("Breakpoint")), [this, hodl](QMenu * menu)
builder->addMenu(makeMenu(DIcon("breakpoint"), tr("Breakpoint")), [this, hodl](QMenu * menu)
{
auto selection = mGetSelection();
if(selection == 0)
@ -156,27 +156,27 @@ void CommonActions::build(MenuBuilder* builder, int actions)
}
if(actions & ActionLabel)
{
builder->addAction(makeShortcutAction(DIcon("label.png"), tr("Label Current Address"), std::bind(&CommonActions::setLabelSlot, this), "ActionSetLabel"), wIsDebugging);
builder->addAction(makeShortcutAction(DIcon("label"), tr("Label Current Address"), std::bind(&CommonActions::setLabelSlot, this), "ActionSetLabel"), wIsDebugging);
}
if(actions & ActionComment)
{
builder->addAction(makeShortcutAction(DIcon("comment.png"), tr("Comment"), std::bind(&CommonActions::setCommentSlot, this), "ActionSetComment"), wIsDebugging);
builder->addAction(makeShortcutAction(DIcon("comment"), tr("Comment"), std::bind(&CommonActions::setCommentSlot, this), "ActionSetComment"), wIsDebugging);
}
if(actions & ActionBookmark)
{
builder->addAction(makeShortcutAction(DIcon("bookmark_toggle.png"), tr("Toggle Bookmark"), std::bind(&CommonActions::setBookmarkSlot, this), "ActionToggleBookmark"), wIsDebugging);
builder->addAction(makeShortcutAction(DIcon("bookmark_toggle"), tr("Toggle Bookmark"), std::bind(&CommonActions::setBookmarkSlot, this), "ActionToggleBookmark"), wIsDebugging);
}
if(actions & ActionNewOrigin)
{
builder->addAction(makeShortcutAction(DIcon("neworigin.png"), tr("Set %1 Here").arg(ArchValue("EIP", "RIP")), std::bind(&CommonActions::setNewOriginHereActionSlot, this), "ActionSetNewOriginHere"));
builder->addAction(makeShortcutAction(DIcon("neworigin"), tr("Set %1 Here").arg(ArchValue("EIP", "RIP")), std::bind(&CommonActions::setNewOriginHereActionSlot, this), "ActionSetNewOriginHere"));
}
if(actions & ActionNewThread)
{
builder->addAction(makeShortcutAction(DIcon("createthread.png"), tr("Create New Thread Here"), std::bind(&CommonActions::createThreadSlot, this), "ActionCreateNewThreadHere"));
builder->addAction(makeShortcutAction(DIcon("createthread"), tr("Create New Thread Here"), std::bind(&CommonActions::createThreadSlot, this), "ActionCreateNewThreadHere"));
}
if(actions & ActionWatch)
{
builder->addAction(makeCommandAction(DIcon("animal-dog.png"), ArchValue(tr("&Watch DWORD"), tr("&Watch QWORD")), "AddWatch \"[$]\", \"uint\"", "ActionWatchDwordQword"));
builder->addAction(makeCommandAction(DIcon("animal-dog"), ArchValue(tr("&Watch DWORD"), tr("&Watch QWORD")), "AddWatch \"[$]\", \"uint\"", "ActionWatchDwordQword"));
}
}
@ -232,7 +232,7 @@ restart:
QMessageBox msg(QMessageBox::Warning, tr("The label may be in use"),
tr("The label \"%1\" may be an existing label or a valid expression. Using such label might have undesired effects. Do you still want to continue?").arg(mLineEdit.editText),
QMessageBox::Yes | QMessageBox::No, widgetparent());
msg.setWindowIcon(DIcon("compile-warning.png"));
msg.setWindowIcon(DIcon("compile-warning"));
msg.setParent(widgetparent(), Qt::Dialog);
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
if(msg.exec() == QMessageBox::No)
@ -270,7 +270,7 @@ void CommonActions::setCommentSlot()
static bool easter = isEaster();
if(easter && comment.toLower() == "oep")
{
QFile file(":/icons/images/egg.wav");
QFile file(":/Default/icons/egg.wav");
if(file.open(QIODevice::ReadOnly))
{
QByteArray egg = file.readAll();
@ -299,7 +299,7 @@ bool CommonActions::WarningBoxNotExecutable(const QString & text, duint wVA)
if(DbgFunctions()->IsDepEnabled() && !DbgFunctions()->MemIsCodePage(wVA, false))
{
QMessageBox msgyn(QMessageBox::Warning, tr("Current address is not executable"), text, QMessageBox::Yes | QMessageBox::No, widgetparent());
msgyn.setWindowIcon(DIcon("compile-warning.png"));
msgyn.setWindowIcon(DIcon("compile-warning"));
msgyn.setParent(widgetparent(), Qt::Dialog);
msgyn.setWindowFlags(msgyn.windowFlags() & (~Qt::WindowContextHelpButtonHint));
if(msgyn.exec() == QMessageBox::No)

View File

@ -815,7 +815,7 @@ const QColor Configuration::getColor(const QString & id) const
if(noMoreMsgbox)
return Qt::black;
QMessageBox msg(QMessageBox::Warning, tr("NOT FOUND IN CONFIG!"), id, QMessageBox::Retry | QMessageBox::Cancel);
msg.setWindowIcon(DIcon("compile-warning.png"));
msg.setWindowIcon(DIcon("compile-warning"));
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
if(msg.exec() == QMessageBox::Cancel)
noMoreMsgbox = true;
@ -831,7 +831,7 @@ const bool Configuration::getBool(const QString & category, const QString & id)
if(noMoreMsgbox)
return false;
QMessageBox msg(QMessageBox::Warning, tr("NOT FOUND IN CONFIG!"), category + ":" + id, QMessageBox::Retry | QMessageBox::Cancel); /* insertMenuBuilderBools */
msg.setWindowIcon(DIcon("compile-warning.png"));
msg.setWindowIcon(DIcon("compile-warning"));
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
if(msg.exec() == QMessageBox::Cancel)
noMoreMsgbox = true;
@ -840,7 +840,7 @@ const bool Configuration::getBool(const QString & category, const QString & id)
if(noMoreMsgbox)
return false;
QMessageBox msg(QMessageBox::Warning, tr("NOT FOUND IN CONFIG!"), category, QMessageBox::Retry | QMessageBox::Cancel);
msg.setWindowIcon(DIcon("compile-warning.png"));
msg.setWindowIcon(DIcon("compile-warning"));
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
if(msg.exec() == QMessageBox::Cancel)
noMoreMsgbox = true;
@ -859,7 +859,7 @@ void Configuration::setBool(const QString & category, const QString & id, const
if(noMoreMsgbox)
return;
QMessageBox msg(QMessageBox::Warning, tr("NOT FOUND IN CONFIG!"), category + ":" + id, QMessageBox::Retry | QMessageBox::Cancel);
msg.setWindowIcon(DIcon("compile-warning.png"));
msg.setWindowIcon(DIcon("compile-warning"));
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
if(msg.exec() == QMessageBox::Cancel)
noMoreMsgbox = true;
@ -868,7 +868,7 @@ void Configuration::setBool(const QString & category, const QString & id, const
if(noMoreMsgbox)
return;
QMessageBox msg(QMessageBox::Warning, tr("NOT FOUND IN CONFIG!"), category, QMessageBox::Retry | QMessageBox::Cancel);
msg.setWindowIcon(DIcon("compile-warning.png"));
msg.setWindowIcon(DIcon("compile-warning"));
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
if(msg.exec() == QMessageBox::Cancel)
noMoreMsgbox = true;
@ -883,7 +883,7 @@ const duint Configuration::getUint(const QString & category, const QString & id)
if(noMoreMsgbox)
return 0;
QMessageBox msg(QMessageBox::Warning, tr("NOT FOUND IN CONFIG!"), category + ":" + id, QMessageBox::Retry | QMessageBox::Cancel);
msg.setWindowIcon(DIcon("compile-warning.png"));
msg.setWindowIcon(DIcon("compile-warning"));
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
if(msg.exec() == QMessageBox::Cancel)
noMoreMsgbox = true;
@ -892,7 +892,7 @@ const duint Configuration::getUint(const QString & category, const QString & id)
if(noMoreMsgbox)
return 0;
QMessageBox msg(QMessageBox::Warning, tr("NOT FOUND IN CONFIG!"), category, QMessageBox::Retry | QMessageBox::Cancel);
msg.setWindowIcon(DIcon("compile-warning.png"));
msg.setWindowIcon(DIcon("compile-warning"));
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
if(msg.exec() == QMessageBox::Cancel)
noMoreMsgbox = true;
@ -911,7 +911,7 @@ void Configuration::setUint(const QString & category, const QString & id, const
if(noMoreMsgbox)
return;
QMessageBox msg(QMessageBox::Warning, tr("NOT FOUND IN CONFIG!"), category + ":" + id, QMessageBox::Retry | QMessageBox::Cancel);
msg.setWindowIcon(DIcon("compile-warning.png"));
msg.setWindowIcon(DIcon("compile-warning"));
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
if(msg.exec() == QMessageBox::Cancel)
noMoreMsgbox = true;
@ -920,7 +920,7 @@ void Configuration::setUint(const QString & category, const QString & id, const
if(noMoreMsgbox)
return;
QMessageBox msg(QMessageBox::Warning, tr("NOT FOUND IN CONFIG!"), category, QMessageBox::Retry | QMessageBox::Cancel);
msg.setWindowIcon(DIcon("compile-warning.png"));
msg.setWindowIcon(DIcon("compile-warning"));
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
if(msg.exec() == QMessageBox::Cancel)
noMoreMsgbox = true;
@ -936,7 +936,7 @@ const QFont Configuration::getFont(const QString & id) const
if(noMoreMsgbox)
return ret;
QMessageBox msg(QMessageBox::Warning, tr("NOT FOUND IN CONFIG!"), id, QMessageBox::Retry | QMessageBox::Cancel);
msg.setWindowIcon(DIcon("compile-warning.png"));
msg.setWindowIcon(DIcon("compile-warning"));
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
if(msg.exec() == QMessageBox::Cancel)
noMoreMsgbox = true;
@ -950,7 +950,7 @@ const Configuration::Shortcut Configuration::getShortcut(const QString & key_id)
if(!noMoreMsgbox)
{
QMessageBox msg(QMessageBox::Warning, tr("NOT FOUND IN CONFIG!"), key_id, QMessageBox::Retry | QMessageBox::Cancel);
msg.setWindowIcon(DIcon("compile-warning.png"));
msg.setWindowIcon(DIcon("compile-warning"));
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
if(msg.exec() == QMessageBox::Cancel)
noMoreMsgbox = true;
@ -968,7 +968,7 @@ void Configuration::setShortcut(const QString & key_id, const QKeySequence key_s
if(noMoreMsgbox)
return;
QMessageBox msg(QMessageBox::Warning, tr("NOT FOUND IN CONFIG!"), key_id, QMessageBox::Retry | QMessageBox::Cancel);
msg.setWindowIcon(DIcon("compile-warning.png"));
msg.setWindowIcon(DIcon("compile-warning"));
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
if(msg.exec() == QMessageBox::Cancel)
noMoreMsgbox = true;

View File

@ -84,7 +84,7 @@ bool SimpleChoiceBox(QWidget* parent, const QString & title, QString defaultValu
void SimpleErrorBox(QWidget* parent, const QString & title, const QString & text)
{
QMessageBox msg(QMessageBox::Critical, title, text, QMessageBox::NoButton, parent);
msg.setWindowIcon(DIcon("fatal-error.png"));
msg.setWindowIcon(DIcon("fatal-error"));
msg.setParent(parent, Qt::Dialog);
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
msg.exec();
@ -93,7 +93,7 @@ void SimpleErrorBox(QWidget* parent, const QString & title, const QString & text
void SimpleWarningBox(QWidget* parent, const QString & title, const QString & text)
{
QMessageBox msg(QMessageBox::Warning, title, text, QMessageBox::NoButton, parent);
msg.setWindowIcon(DIcon("exclamation.png"));
msg.setWindowIcon(DIcon("exclamation"));
msg.setParent(parent, Qt::Dialog);
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
msg.exec();
@ -102,7 +102,7 @@ void SimpleWarningBox(QWidget* parent, const QString & title, const QString & te
void SimpleInfoBox(QWidget* parent, const QString & title, const QString & text)
{
QMessageBox msg(QMessageBox::Information, title, text, QMessageBox::NoButton, parent);
msg.setWindowIcon(DIcon("information.png"));
msg.setWindowIcon(DIcon("information"));
msg.setParent(parent, Qt::Dialog);
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
msg.exec();
@ -177,7 +177,7 @@ QIcon getFileIcon(QString file)
bool ExportCSV(dsint rows, dsint columns, std::vector<QString> headers, std::function<QString(dsint, dsint)> getCellContent)
{
BrowseDialog browse(nullptr, QApplication::translate("ExportCSV", "Export data in CSV format"), QApplication::translate("ExportCSV", "Enter the CSV file name to export"), QApplication::translate("ExportCSV", "CSV files (*.csv);;All files (*.*)"), QApplication::applicationDirPath() + QDir::separator() + "db", true);
browse.setWindowIcon(DIcon("database-export.png"));
browse.setWindowIcon(DIcon("database-export"));
if(browse.exec() == QDialog::Accepted)
{
FILE* csv;
@ -326,16 +326,19 @@ bool isSeasonal()
return (isChristmas() || isEaster());
}
QString couldItBeSeasonal(QString icon)
QIcon DIconHelper(QString name)
{
if(name.endsWith(".png"))
name = name.left(name.length() - 4);
static bool seasons = allowSeasons();
static bool christmas = isChristmas();
static bool easter = isEaster();
if(!seasons)
return icon;
if(christmas)
return QString("christmas%1.png").arg(rand() % 8 + 1);
else if(easter)
return QString("easter%1.png").arg(rand() % 8 + 1);
return icon;
if(seasons)
{
if(christmas)
name = QString("christmas%1").arg(rand() % 8 + 1);
else if(easter)
name = QString("easter%1").arg(rand() % 8 + 1);
}
return QIcon::fromTheme(name);
}

View File

@ -20,14 +20,7 @@ QString getSymbolicNameStr(duint addr);
bool ExportCSV(dsint rows, dsint columns, std::vector<QString> headers, std::function<QString(dsint, dsint)> getCellContent);
bool isEaster();
bool isSeasonal();
QString couldItBeSeasonal(QString icon);
QIcon getFileIcon(QString file);
QIcon DIconHelper(QString name);
template<int>
static const QIcon & DIconHelper(const QString & file)
{
static QIcon icon(QString(":/icons/images/").append(couldItBeSeasonal(file)));
return icon;
}
#define DIcon(file) DIconHelper<__LINE__>(file)
#define DIcon(name) [](QString arg) { static QIcon icon(DIconHelper(std::move(arg))); return icon; }(name)

View File

@ -62,7 +62,7 @@ QVariant SymbolAutoCompleteModel::data(const QModelIndex & index, int role) cons
}
else if(role == Qt::DecorationRole)
{
return QVariant(DIcon("functions.png"));
return QVariant(DIcon("functions"));
}
}
}

View File

@ -139,6 +139,9 @@ int main(int argc, char* argv[])
{
handleHighDpiScaling();
MyApplication application(argc, argv);
// For unclear reasons it looks like the search path order is inverted.
// This might be specific to Qt 5.6 and only matters when you override the "Default" theme
QIcon::setThemeSearchPaths({ ":/", QCoreApplication::applicationDirPath() + "/../themes" });
MainWindow::loadSelectedStyle(true);
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
QAbstractEventDispatcher::instance(application.thread())->setEventFilter(MyApplication::globalEventFilter);
@ -210,7 +213,7 @@ int main(int argc, char* argv[])
if(errormsg)
{
QMessageBox msg(QMessageBox::Critical, QObject::tr("DbgInit Error!"), QString(errormsg));
msg.setWindowIcon(DIcon("compile-error.png"));
msg.setWindowIcon(DIcon("compile-error"));
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
msg.exec();
exit(1);

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 709 B

After

Width:  |  Height:  |  Size: 709 B

View File

Before

Width:  |  Height:  |  Size: 610 B

After

Width:  |  Height:  |  Size: 610 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 725 B

After

Width:  |  Height:  |  Size: 725 B

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 655 B

After

Width:  |  Height:  |  Size: 655 B

View File

Before

Width:  |  Height:  |  Size: 803 B

After

Width:  |  Height:  |  Size: 803 B

View File

Before

Width:  |  Height:  |  Size: 665 B

After

Width:  |  Height:  |  Size: 665 B

View File

Before

Width:  |  Height:  |  Size: 525 B

After

Width:  |  Height:  |  Size: 525 B

View File

Before

Width:  |  Height:  |  Size: 611 B

After

Width:  |  Height:  |  Size: 611 B

View File

Before

Width:  |  Height:  |  Size: 494 B

After

Width:  |  Height:  |  Size: 494 B

View File

Before

Width:  |  Height:  |  Size: 503 B

After

Width:  |  Height:  |  Size: 503 B

View File

Before

Width:  |  Height:  |  Size: 587 B

After

Width:  |  Height:  |  Size: 587 B

Some files were not shown because too many files have changed in this diff Show More