尽可能使用内部资源减少占用
This commit is contained in:
parent
ffcc4d2e60
commit
51c3eb744a
BIN
WingHexDisasm.qm
BIN
WingHexDisasm.qm
Binary file not shown.
|
@ -25,65 +25,71 @@
|
|||
<context>
|
||||
<name>WingHexDisasm</name>
|
||||
<message>
|
||||
<location filename="winghexdisasm.cpp" line="42"/>
|
||||
<location filename="winghexdisasm.cpp" line="43"/>
|
||||
<source>Arch :</source>
|
||||
<translation>架构:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="winghexdisasm.cpp" line="110"/>
|
||||
<location filename="winghexdisasm.cpp" line="111"/>
|
||||
<source>Mode :</source>
|
||||
<translation>模式:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="winghexdisasm.cpp" line="150"/>
|
||||
<location filename="winghexdisasm.cpp" line="159"/>
|
||||
<source>DisasmWindow</source>
|
||||
<translation>反汇编</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="winghexdisasm.cpp" line="152"/>
|
||||
<location filename="winghexdisasm.cpp" line="198"/>
|
||||
<location filename="winghexdisasm.cpp" line="161"/>
|
||||
<location filename="winghexdisasm.cpp" line="208"/>
|
||||
<source>WingHexDisasm</source>
|
||||
<translation>羽云反汇编器</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="winghexdisasm.cpp" line="156"/>
|
||||
<location filename="winghexdisasm.cpp" line="174"/>
|
||||
<location filename="winghexdisasm.cpp" line="165"/>
|
||||
<location filename="winghexdisasm.cpp" line="184"/>
|
||||
<source>Clear</source>
|
||||
<translation>清空</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="winghexdisasm.cpp" line="154"/>
|
||||
<location filename="winghexdisasm.cpp" line="172"/>
|
||||
<location filename="winghexdisasm.cpp" line="163"/>
|
||||
<location filename="winghexdisasm.cpp" line="182"/>
|
||||
<source>Disasm</source>
|
||||
<translation>反汇编</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="winghexdisasm.cpp" line="159"/>
|
||||
<location filename="winghexdisasm.cpp" line="168"/>
|
||||
<source>Author</source>
|
||||
<translation>作者</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="winghexdisasm.cpp" line="163"/>
|
||||
<location filename="winghexdisasm.cpp" line="172"/>
|
||||
<source>Sponsor</source>
|
||||
<translation>赞助</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="winghexdisasm.cpp" line="219"/>
|
||||
<location filename="winghexdisasm.cpp" line="217"/>
|
||||
<source>A small disassembly plugin for WingHexExplorer.</source>
|
||||
<oldsource>A small disasmbly plugin for WingHexExplorer.</oldsource>
|
||||
<translation>一个轻量的羽云十六进制编辑器的反汇编插件。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="winghexdisasm.cpp" line="231"/>
|
||||
<source>Error: Failed capstone initialization</source>
|
||||
<translation>【错误】无法初始化 capstone 反汇编引擎</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="winghexdisasm.cpp" line="237"/>
|
||||
<location filename="winghexdisasm.cpp" line="257"/>
|
||||
<source>Error: Failed to disassemble given op codes</source>
|
||||
<translation>【错误】无法对选中字节进行反汇编</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="winghexdisasm.cpp" line="245"/>
|
||||
<location filename="winghexdisasm.cpp" line="266"/>
|
||||
<source>No Document Opened</source>
|
||||
<translation>没有任何打开的文档!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="winghexdisasm.cpp" line="251"/>
|
||||
<location filename="winghexdisasm.cpp" line="272"/>
|
||||
<source>No Selection Bytes</source>
|
||||
<translation>无选择字节!</translation>
|
||||
</message>
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
#include "authordialog.h"
|
||||
#include "../../WingHexExplorer/wing-hex-explorer.sourcecode/WingHexExplorer/plugin/iwingplugin.h"
|
||||
#include "ui_authordialog.h"
|
||||
|
||||
AuthorDialog::AuthorDialog(QWidget *parent)
|
||||
: QDialog(parent), ui(new Ui::AuthorDialog) {
|
||||
ui->setupUi(this);
|
||||
ui->retranslateUi(this);
|
||||
ui->label->setPixmap(QPixmap(HOSTAUTHORPIMG));
|
||||
auto txtb = ui->txtb;
|
||||
txtb->setSearchPaths(QStringList({":/WingHexDisasm", ":/WingHexDisasm/img"}));
|
||||
txtb->setSource(QUrl("README.md"), QTextDocument::MarkdownResource);
|
||||
|
|
|
@ -25,9 +25,6 @@
|
|||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="resource.qrc">:/WingHexDisasm/img/author.jpg</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
@ -49,8 +46,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="resource.qrc"/>
|
||||
</resources>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
BIN
img/author.jpg
BIN
img/author.jpg
Binary file not shown.
Before Width: | Height: | Size: 49 KiB |
BIN
img/author.png
BIN
img/author.png
Binary file not shown.
Before Width: | Height: | Size: 11 KiB |
BIN
img/clear.png
BIN
img/clear.png
Binary file not shown.
Before Width: | Height: | Size: 7.4 KiB |
BIN
img/copy.png
BIN
img/copy.png
Binary file not shown.
Before Width: | Height: | Size: 3.4 KiB |
BIN
img/sp.png
BIN
img/sp.png
Binary file not shown.
Before Width: | Height: | Size: 776 KiB |
BIN
img/sponsor.png
BIN
img/sponsor.png
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB |
|
@ -2,12 +2,6 @@
|
|||
<qresource prefix="/WingHexDisasm">
|
||||
<file>img/icon.png</file>
|
||||
<file>img/analyse.png</file>
|
||||
<file>img/author.jpg</file>
|
||||
<file>img/author.png</file>
|
||||
<file>img/clear.png</file>
|
||||
<file>img/copy.png</file>
|
||||
<file>img/sp.png</file>
|
||||
<file>img/sponsor.png</file>
|
||||
<file>img/README.md</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
#include "sponsordialog.h"
|
||||
#include "../../WingHexExplorer/wing-hex-explorer.sourcecode/WingHexExplorer/plugin/iwingplugin.h"
|
||||
#include "ui_sponsordialog.h"
|
||||
|
||||
SponsorDialog::SponsorDialog(QWidget *parent)
|
||||
: QDialog(parent), ui(new Ui::SponsorDialog) {
|
||||
ui->setupUi(this);
|
||||
ui->retranslateUi(this);
|
||||
ui->label_2->setPixmap(QPixmap(SPONSORQRCODE));
|
||||
}
|
||||
|
||||
SponsorDialog::~SponsorDialog() { delete ui; }
|
||||
|
|
|
@ -41,16 +41,11 @@
|
|||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="resource.qrc">:/WingHexDisasm/img/sp.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="resource.qrc"/>
|
||||
</resources>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -13,6 +13,7 @@ Q_DECLARE_METATYPE(cs_arch)
|
|||
Q_DECLARE_METATYPE(cs_mode)
|
||||
|
||||
#define ICONRES(name) QIcon(":/WingHexDisasm/img/" name ".png")
|
||||
#define HOSTICONRES(name) QIcon(HOSTRESPIMG(name))
|
||||
|
||||
WingHexDisasm::WingHexDisasm(QObject *parent) { Q_UNUSED(parent); }
|
||||
|
||||
|
@ -151,6 +152,7 @@ bool WingHexDisasm::init(QList<WingPluginInfo> loadedplugin) {
|
|||
vlayout->addSpacing(30);
|
||||
|
||||
txtAsm = new QTextBrowser(w);
|
||||
txtAsm->setUndoRedoEnabled(false);
|
||||
vlayout->addItem(hlayout);
|
||||
vlayout->addWidget(txtAsm);
|
||||
|
||||
|
@ -160,17 +162,18 @@ bool WingHexDisasm::init(QList<WingPluginInfo> loadedplugin) {
|
|||
menu->setIcon(ICONRES("icon"));
|
||||
PluginMenuAddItemIconAction(menu, tr("Disasm"), ICONRES("analyse"),
|
||||
WingHexDisasm::on_disasm);
|
||||
PluginMenuAddItemIconAction(menu, tr("Clear"), ICONRES("clear"),
|
||||
PluginMenuAddItemIconAction(menu, tr("Clear"), HOSTICONRES("clearhis"),
|
||||
WingHexDisasm::on_clear);
|
||||
menu->addSeparator();
|
||||
PluginMenuAddItemIconLamba(menu, tr("Author"), ICONRES("author"), [=] {
|
||||
PluginMenuAddItemIconLamba(menu, tr("Author"), HOSTICONRES("author"), [=] {
|
||||
AuthorDialog d;
|
||||
d.exec();
|
||||
});
|
||||
PluginMenuAddItemIconLamba(menu, tr("Sponsor"), ICONRES("sponsor"), [=] {
|
||||
SponsorDialog d;
|
||||
d.exec();
|
||||
});
|
||||
PluginMenuAddItemIconLamba(menu, tr("Sponsor"), HOSTICONRES("sponsor"),
|
||||
[=] {
|
||||
SponsorDialog d;
|
||||
d.exec();
|
||||
});
|
||||
}
|
||||
PluginMenuInitEnd();
|
||||
|
||||
|
@ -178,7 +181,7 @@ bool WingHexDisasm::init(QList<WingPluginInfo> loadedplugin) {
|
|||
PluginMenuInitBegin(tmenu, "") {
|
||||
PluginMenuAddItemIconAction(tmenu, tr("Disasm"), ICONRES("analyse"),
|
||||
WingHexDisasm::on_disasm);
|
||||
PluginMenuAddItemIconAction(tmenu, tr("Clear"), ICONRES("clear"),
|
||||
PluginMenuAddItemIconAction(tmenu, tr("Clear"), HOSTICONRES("clearhis"),
|
||||
WingHexDisasm::on_clear);
|
||||
}
|
||||
PluginMenuInitEnd();
|
||||
|
@ -199,7 +202,7 @@ QToolButton *WingHexDisasm::registerToolButton() { return tbtn; }
|
|||
|
||||
void WingHexDisasm::registerDockWidget(
|
||||
QMap<QDockWidget *, Qt::DockWidgetArea> &rdw) {
|
||||
rdw.insert(dw, Qt::DockWidgetArea::BottomDockWidgetArea);
|
||||
rdw.insert(dw, Qt::DockWidgetArea::NoDockWidgetArea);
|
||||
}
|
||||
|
||||
QString WingHexDisasm::pluginName() { return tr("WingHexDisasm"); }
|
||||
|
@ -210,7 +213,9 @@ uint WingHexDisasm::pluginVersion() { return 1; }
|
|||
|
||||
QString WingHexDisasm::signature() { return WINGSUMMER; }
|
||||
|
||||
QString WingHexDisasm::pluginComment() { return tr(""); }
|
||||
QString WingHexDisasm::pluginComment() {
|
||||
return tr("A small disassembly plugin for WingHexExplorer.");
|
||||
}
|
||||
|
||||
void WingHexDisasm::plugin2MessagePipe(WingPluginMessage type,
|
||||
QList<QVariant> msg) {
|
||||
|
|
Loading…
Reference in New Issue