This commit is contained in:
parent
b5b5f8a9a3
commit
16d737ead1
Binary file not shown.
|
@ -0,0 +1,130 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1" language="zh_CN">
|
||||||
|
<context>
|
||||||
|
<name>AuthorDialog</name>
|
||||||
|
<message>
|
||||||
|
<location filename="authordialog.ui" line="14"/>
|
||||||
|
<source>Dialog</source>
|
||||||
|
<translation>关于作者</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>SettingDialog</name>
|
||||||
|
<message>
|
||||||
|
<location filename="settingdialog.ui" line="20"/>
|
||||||
|
<source>SettingDialog</source>
|
||||||
|
<translation>设置</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="settingdialog.ui" line="50"/>
|
||||||
|
<source>elf_header color</source>
|
||||||
|
<translation>elf 文件头颜色</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="settingdialog.ui" line="57"/>
|
||||||
|
<location filename="settingdialog.ui" line="71"/>
|
||||||
|
<location filename="settingdialog.ui" line="85"/>
|
||||||
|
<location filename="settingdialog.ui" line="99"/>
|
||||||
|
<location filename="settingdialog.ui" line="113"/>
|
||||||
|
<source>ChooseColor</source>
|
||||||
|
<translation>选择颜色</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="settingdialog.ui" line="64"/>
|
||||||
|
<source>program_table color</source>
|
||||||
|
<translation>程序表颜色</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="settingdialog.ui" line="78"/>
|
||||||
|
<source>section_header_table color</source>
|
||||||
|
<translation>节区头表颜色</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="settingdialog.ui" line="92"/>
|
||||||
|
<source>symbol_table color</source>
|
||||||
|
<translation>符号表颜色</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="settingdialog.ui" line="106"/>
|
||||||
|
<source>dynamic_symbol_table</source>
|
||||||
|
<translation>动态符号表颜色</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>SponsorDialog</name>
|
||||||
|
<message>
|
||||||
|
<location filename="sponsordialog.ui" line="14"/>
|
||||||
|
<source>Dialog</source>
|
||||||
|
<translation>赞助</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="sponsordialog.ui" line="26"/>
|
||||||
|
<source>Thanks for sponsor!</source>
|
||||||
|
<translation>感谢大家的赞助支持!</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>WingElfPlugin</name>
|
||||||
|
<message>
|
||||||
|
<location filename="wingelfparser.cpp" line="30"/>
|
||||||
|
<location filename="wingelfparser.cpp" line="41"/>
|
||||||
|
<location filename="wingelfparser.cpp" line="96"/>
|
||||||
|
<location filename="wingelfparser.cpp" line="118"/>
|
||||||
|
<source>WingElfParser</source>
|
||||||
|
<translation>羽云 ELF 分析器</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="wingelfparser.cpp" line="34"/>
|
||||||
|
<source>A Marker plugin for Elf</source>
|
||||||
|
<translation>一个用于分析标注 ELF 文件结构的插件</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="wingelfparser.cpp" line="44"/>
|
||||||
|
<source>AddMetaData</source>
|
||||||
|
<translation>是否添加标注</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="wingelfparser.cpp" line="48"/>
|
||||||
|
<location filename="wingelfparser.cpp" line="75"/>
|
||||||
|
<source>Analyse</source>
|
||||||
|
<translation>分析</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="wingelfparser.cpp" line="52"/>
|
||||||
|
<location filename="wingelfparser.cpp" line="78"/>
|
||||||
|
<source>Setting</source>
|
||||||
|
<translation>设置</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="wingelfparser.cpp" line="55"/>
|
||||||
|
<source>Author</source>
|
||||||
|
<translation>作者</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="wingelfparser.cpp" line="60"/>
|
||||||
|
<source>Sponsor</source>
|
||||||
|
<translation>赞助</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="wingelfparser.cpp" line="70"/>
|
||||||
|
<source>Value</source>
|
||||||
|
<translation>值</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="wingelfparser.cpp" line="113"/>
|
||||||
|
<source>NoFile</source>
|
||||||
|
<translation>没有打开的文件!</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="wingelfparser.cpp" line="116"/>
|
||||||
|
<source>Success</source>
|
||||||
|
<translation>分析完毕!</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="wingelfparser.cpp" line="118"/>
|
||||||
|
<source>Error</source>
|
||||||
|
<translation>分析过程中出现错误!</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
</TS>
|
|
@ -4,6 +4,7 @@
|
||||||
AuthorDialog::AuthorDialog(QWidget *parent)
|
AuthorDialog::AuthorDialog(QWidget *parent)
|
||||||
: QDialog(parent), ui(new Ui::AuthorDialog) {
|
: QDialog(parent), ui(new Ui::AuthorDialog) {
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
ui->retranslateUi(this);
|
||||||
auto txtb = ui->txtb;
|
auto txtb = ui->txtb;
|
||||||
txtb->setSearchPaths(QStringList({":/", ":/image"}));
|
txtb->setSearchPaths(QStringList({":/", ":/image"}));
|
||||||
txtb->setSource(QUrl("README.md"), QTextDocument::MarkdownResource);
|
txtb->setSource(QUrl("README.md"), QTextDocument::MarkdownResource);
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
SettingDialog::SettingDialog(QWidget *parent)
|
SettingDialog::SettingDialog(QWidget *parent)
|
||||||
: QDialog(parent), ui(new Ui::SettingDialog) {
|
: QDialog(parent), ui(new Ui::SettingDialog) {
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
ui->retranslateUi(this);
|
||||||
settings = Settings::instance();
|
settings = Settings::instance();
|
||||||
settings->getAllColor(elf_header_color, program_table_color,
|
settings->getAllColor(elf_header_color, program_table_color,
|
||||||
section_header_color, symbol_color, dysymbol_color);
|
section_header_color, symbol_color, dysymbol_color);
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>SettingDialog</string>
|
<string>SettingDialog</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="">
|
<widget class="QWidget" name="layoutWidget">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
SponsorDialog::SponsorDialog(QWidget *parent)
|
SponsorDialog::SponsorDialog(QWidget *parent)
|
||||||
: QDialog(parent), ui(new Ui::SponsorDialog) {
|
: QDialog(parent), ui(new Ui::SponsorDialog) {
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
ui->retranslateUi(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
SponsorDialog::~SponsorDialog() { delete ui; }
|
SponsorDialog::~SponsorDialog() { delete ui; }
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include "settingdialog.h"
|
#include "settingdialog.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "sponsordialog.h"
|
#include "sponsordialog.h"
|
||||||
|
#include <QApplication>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QTreeWidgetItem>
|
#include <QTreeWidgetItem>
|
||||||
#include <elf.h>
|
#include <elf.h>
|
||||||
|
@ -36,6 +37,14 @@ QString WingElfPlugin::pluginComment() { return tr("A Marker plugin for Elf"); }
|
||||||
bool WingElfPlugin::init(QList<WingPluginInfo> loadedplugin) {
|
bool WingElfPlugin::init(QList<WingPluginInfo> loadedplugin) {
|
||||||
Q_UNUSED(loadedplugin);
|
Q_UNUSED(loadedplugin);
|
||||||
|
|
||||||
|
auto s = GETPLUGINQM("WingElfParser.qm");
|
||||||
|
QTranslator translator;
|
||||||
|
if (!translator.load(s) || !QApplication::installTranslator(&translator)) {
|
||||||
|
QMessageBox::critical(nullptr, "Error", "Error Loading Translation File!",
|
||||||
|
QMessageBox::Ok);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
auto icon = QIcon(":/image/icon.png");
|
auto icon = QIcon(":/image/icon.png");
|
||||||
|
|
||||||
PluginMenuInitBegin(menu, tr("WingElfParser")) {
|
PluginMenuInitBegin(menu, tr("WingElfParser")) {
|
||||||
|
|
Loading…
Reference in New Issue