增加插件系统安全性
This commit is contained in:
parent
6f164b0253
commit
d52013ed64
|
@ -1,5 +1,6 @@
|
||||||
*.json
|
*.json
|
||||||
!settings.json
|
!settings.json
|
||||||
!TestPlugin.json
|
!TestPlugin.json
|
||||||
|
!BadTestPlugin.json
|
||||||
**/*.pro.user
|
**/*.pro.user
|
||||||
push.sh
|
push.sh
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"Keys" : [ ]
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
#-------------------------------------------------
|
||||||
|
#
|
||||||
|
# Project created by QtCreator 2022-06-27T09:21:45
|
||||||
|
#
|
||||||
|
#-------------------------------------------------
|
||||||
|
|
||||||
|
QT += core gui
|
||||||
|
|
||||||
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||||
|
|
||||||
|
TARGET = BadTestPlugin
|
||||||
|
TEMPLATE = lib
|
||||||
|
CONFIG += plugin
|
||||||
|
|
||||||
|
DESTDIR = $$[QT_INSTALL_PLUGINS]/generic
|
||||||
|
|
||||||
|
# The following define makes your compiler emit warnings if you use
|
||||||
|
# any feature of Qt which has been marked as deprecated (the exact warnings
|
||||||
|
# depend on your compiler). Please consult the documentation of the
|
||||||
|
# deprecated API in order to know how to port your code away from it.
|
||||||
|
DEFINES += QT_DEPRECATED_WARNINGS
|
||||||
|
|
||||||
|
# You can also make your code fail to compile if you use deprecated APIs.
|
||||||
|
# In order to do so, uncomment the following line.
|
||||||
|
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||||
|
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||||
|
|
||||||
|
SOURCES += \
|
||||||
|
badplugin.cpp
|
||||||
|
|
||||||
|
HEADERS += \
|
||||||
|
badplugin.h \
|
||||||
|
../WingHexExplorer/plugin/iwingplugin.h
|
||||||
|
DISTFILES += BadTestPlugin.json
|
||||||
|
|
||||||
|
unix {
|
||||||
|
target.path = /usr/lib
|
||||||
|
INSTALLS += target
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
#include "badplugin.h"
|
||||||
|
|
||||||
|
BadPlugin::BadPlugin(QObject *parent) {}
|
||||||
|
|
||||||
|
#if QT_VERSION < 0x050000
|
||||||
|
Q_EXPORT_PLUGIN2(BadTestPlugin, BadPlugin)
|
||||||
|
#endif // QT_VERSION < 0x050000
|
|
@ -0,0 +1,20 @@
|
||||||
|
#ifndef BADPLUGIN_H
|
||||||
|
#define BADPLUGIN_H
|
||||||
|
|
||||||
|
#include "iwingplugin.h"
|
||||||
|
#include <QList>
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
class BadPlugin : public IWingPlugin {
|
||||||
|
|
||||||
|
Q_OBJECT
|
||||||
|
#if QT_VERSION >= 0x050000
|
||||||
|
Q_PLUGIN_METADATA(IID IWINGPLUGIN_INTERFACE_IID FILE "BadTestPlugin.json")
|
||||||
|
#endif // QT_VERSION >= 0x050000
|
||||||
|
Q_INTERFACES(IWingPlugin)
|
||||||
|
|
||||||
|
public:
|
||||||
|
BadPlugin(QObject *parent = nullptr);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // BADPLUGIN_H
|
|
@ -0,0 +1,391 @@
|
||||||
|
#ifndef IWINGPLUGIN_H
|
||||||
|
#define IWINGPLUGIN_H
|
||||||
|
|
||||||
|
#include <QCryptographicHash>
|
||||||
|
#include <QDockWidget>
|
||||||
|
#include <QList>
|
||||||
|
#include <QMenu>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QtCore>
|
||||||
|
|
||||||
|
enum ErrFile {
|
||||||
|
Success,
|
||||||
|
Error,
|
||||||
|
UnSaved,
|
||||||
|
Permission,
|
||||||
|
NotExist,
|
||||||
|
AlreadyOpened,
|
||||||
|
IsNewFile,
|
||||||
|
IsDirver,
|
||||||
|
WorkSpaceUnSaved
|
||||||
|
};
|
||||||
|
|
||||||
|
struct FindResult {
|
||||||
|
int fid;
|
||||||
|
QList<int> indices;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct BookMark {
|
||||||
|
qlonglong pos;
|
||||||
|
QString comment;
|
||||||
|
};
|
||||||
|
|
||||||
|
class IWingPlugin;
|
||||||
|
|
||||||
|
struct HexPosition {
|
||||||
|
quint64 line;
|
||||||
|
int column;
|
||||||
|
quint8 lineWidth;
|
||||||
|
int nibbleindex;
|
||||||
|
|
||||||
|
HexPosition() = default;
|
||||||
|
inline qint64 offset() const {
|
||||||
|
return static_cast<qint64>(line * lineWidth) + column;
|
||||||
|
}
|
||||||
|
inline int operator-(const HexPosition &rhs) const {
|
||||||
|
return int(this->offset() - rhs.offset());
|
||||||
|
}
|
||||||
|
inline bool operator==(const HexPosition &rhs) const {
|
||||||
|
return (line == rhs.line) && (column == rhs.column) &&
|
||||||
|
(nibbleindex == rhs.nibbleindex);
|
||||||
|
}
|
||||||
|
inline bool operator!=(const HexPosition &rhs) const {
|
||||||
|
return (line != rhs.line) || (column != rhs.column) ||
|
||||||
|
(nibbleindex != rhs.nibbleindex);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct HexMetadataAbsoluteItem {
|
||||||
|
qint64 begin;
|
||||||
|
qint64 end;
|
||||||
|
QColor foreground, background;
|
||||||
|
QString comment;
|
||||||
|
|
||||||
|
// added by wingsummer
|
||||||
|
bool operator==(const HexMetadataAbsoluteItem &item) {
|
||||||
|
return begin == item.begin && end == item.end &&
|
||||||
|
foreground == item.foreground && background == item.background &&
|
||||||
|
comment == item.comment;
|
||||||
|
}
|
||||||
|
|
||||||
|
HexMetadataAbsoluteItem(qint64 begin, qint64 end, QColor foreground,
|
||||||
|
QColor background, QString comment) {
|
||||||
|
this->begin = begin;
|
||||||
|
this->end = end;
|
||||||
|
this->foreground = foreground;
|
||||||
|
this->background = background;
|
||||||
|
this->comment = comment;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct HexMetadataItem {
|
||||||
|
quint64 line;
|
||||||
|
int start, length;
|
||||||
|
QColor foreground, background;
|
||||||
|
QString comment;
|
||||||
|
|
||||||
|
// added by wingsummer
|
||||||
|
bool operator==(const HexMetadataItem &item) {
|
||||||
|
return line == item.line && start == item.start &&
|
||||||
|
foreground == item.foreground && background == item.background &&
|
||||||
|
comment == item.comment;
|
||||||
|
}
|
||||||
|
|
||||||
|
HexMetadataItem(quint64 line, int start, int length, QColor foreground,
|
||||||
|
QColor background, QString comment) {
|
||||||
|
this->line = line;
|
||||||
|
this->start = start;
|
||||||
|
this->length = length;
|
||||||
|
this->foreground = foreground;
|
||||||
|
this->background = background;
|
||||||
|
this->comment = comment;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
|
||||||
|
typedef QLinkedList<HexMetadataItem> HexLineMetadata;
|
||||||
|
#else
|
||||||
|
typedef QList<HexMetadataItem> HexLineMetadata;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
enum class WingPluginMessage {
|
||||||
|
PluginLoading,
|
||||||
|
PluginLoaded,
|
||||||
|
PluginUnLoading,
|
||||||
|
PluginUnLoaded,
|
||||||
|
ErrorMessage,
|
||||||
|
ConnectTimeout,
|
||||||
|
MessageResponse,
|
||||||
|
HookMessage
|
||||||
|
};
|
||||||
|
|
||||||
|
enum class ResponseMsg { UnImplement, Success, ErrorParams, Permission };
|
||||||
|
|
||||||
|
enum HookIndex {
|
||||||
|
None = 0,
|
||||||
|
OpenFileBegin = 1,
|
||||||
|
OpenFileEnd = 2,
|
||||||
|
OpenDriverBegin = 4,
|
||||||
|
OpenDriverEnd = 8,
|
||||||
|
CloseFileBegin = 16,
|
||||||
|
CloseFileEnd = 32,
|
||||||
|
NewFileBegin = 64,
|
||||||
|
NewFileEnd = 128
|
||||||
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_METATYPE(WingPluginMessage)
|
||||||
|
Q_DECLARE_METATYPE(ResponseMsg)
|
||||||
|
Q_DECLARE_METATYPE(HookIndex)
|
||||||
|
|
||||||
|
namespace WingPlugin {
|
||||||
|
class Reader : public QObject {
|
||||||
|
Q_OBJECT
|
||||||
|
signals:
|
||||||
|
int currentDoc();
|
||||||
|
|
||||||
|
// document
|
||||||
|
bool isReadOnly();
|
||||||
|
bool isKeepSize();
|
||||||
|
bool isLocked();
|
||||||
|
quint64 documentLines();
|
||||||
|
quint64 documentBytes();
|
||||||
|
HexPosition currentPos();
|
||||||
|
HexPosition selectionPos();
|
||||||
|
quint64 currentRow();
|
||||||
|
quint64 currentColumn();
|
||||||
|
quint64 currentOffset();
|
||||||
|
quint64 selectlength();
|
||||||
|
|
||||||
|
bool stringVisible();
|
||||||
|
bool addressVisible();
|
||||||
|
bool headerVisible();
|
||||||
|
quint64 addressBase();
|
||||||
|
bool isModified();
|
||||||
|
|
||||||
|
bool isEmpty();
|
||||||
|
bool atEnd();
|
||||||
|
bool canUndo();
|
||||||
|
bool canRedo();
|
||||||
|
int areaIndent();
|
||||||
|
int hexLineWidth();
|
||||||
|
|
||||||
|
void copy(bool hex = false);
|
||||||
|
QByteArray read(qint64 offset, int len);
|
||||||
|
qint64 searchForward(const QByteArray &ba);
|
||||||
|
qint64 searchBackward(const QByteArray &ba);
|
||||||
|
void findAllBytes(qlonglong begin, qlonglong end, QByteArray b,
|
||||||
|
QList<quint64> &results, int maxCount = -1);
|
||||||
|
|
||||||
|
// render
|
||||||
|
bool editableArea(int area);
|
||||||
|
quint64 documentLastLine();
|
||||||
|
int documentLastColumn();
|
||||||
|
int documentWidth();
|
||||||
|
int lineHeight();
|
||||||
|
QRect getLineRect(quint64 line, quint64 firstline);
|
||||||
|
int headerLineCount();
|
||||||
|
int borderSize();
|
||||||
|
|
||||||
|
// metadata
|
||||||
|
bool lineHasMetadata(quint64 line) const;
|
||||||
|
QList<HexMetadataAbsoluteItem> getMetadatas(qint64 offset);
|
||||||
|
HexLineMetadata getMetaLine(quint64 line) const;
|
||||||
|
|
||||||
|
// bookmark
|
||||||
|
bool lineHasBookMark(quint64 line);
|
||||||
|
QList<qint64> getsBookmarkPos(quint64 line);
|
||||||
|
BookMark bookMark(qint64 pos);
|
||||||
|
QString bookMarkComment(qint64 pos);
|
||||||
|
void getBookMarks(QList<BookMark> &bookmarks);
|
||||||
|
bool existBookMark(qint64 pos);
|
||||||
|
|
||||||
|
// extension
|
||||||
|
QList<QString> getOpenFiles();
|
||||||
|
QStringList getSupportedEncodings();
|
||||||
|
QString currentEncoding();
|
||||||
|
};
|
||||||
|
|
||||||
|
class Controller : public QObject {
|
||||||
|
Q_OBJECT
|
||||||
|
signals:
|
||||||
|
// document
|
||||||
|
void switchDocument(int index, bool gui = false);
|
||||||
|
bool setLockedFile(bool b);
|
||||||
|
bool setKeepSize(bool b);
|
||||||
|
void setAsciiVisible(bool b);
|
||||||
|
void setAddressVisible(bool b);
|
||||||
|
void setHeaderVisible(bool b);
|
||||||
|
void setAddressBase(quint64 base);
|
||||||
|
void setAreaIndent(quint8 value);
|
||||||
|
void setHexLineWidth(quint8 value);
|
||||||
|
|
||||||
|
void undo();
|
||||||
|
void redo();
|
||||||
|
bool cut(bool hex = false);
|
||||||
|
void paste(bool hex = false);
|
||||||
|
bool insert(qint64 offset, uchar b);
|
||||||
|
bool replace(qint64 offset, uchar b);
|
||||||
|
bool insert(qint64 offset, const QByteArray &data);
|
||||||
|
bool replace(qint64 offset, const QByteArray &data);
|
||||||
|
bool remove(qint64 offset, int len);
|
||||||
|
|
||||||
|
// cursor
|
||||||
|
void moveTo(const HexPosition &pos);
|
||||||
|
void moveTo(quint64 line, int column, int nibbleindex = 1);
|
||||||
|
void moveTo(qint64 offset);
|
||||||
|
void select(const HexPosition &pos);
|
||||||
|
void select(quint64 line, int column, int nibbleindex = 1);
|
||||||
|
void select(int length);
|
||||||
|
void selectOffset(qint64 offset, int length);
|
||||||
|
void setInsertionMode(bool isinsert);
|
||||||
|
void setLineWidth(quint8 width);
|
||||||
|
|
||||||
|
// metadata
|
||||||
|
bool metadata(qint64 begin, qint64 end, const QColor &fgcolor,
|
||||||
|
const QColor &bgcolor, const QString &comment);
|
||||||
|
bool metadata(quint64 line, int start, int length, const QColor &fgcolor,
|
||||||
|
const QColor &bgcolor, const QString &comment);
|
||||||
|
bool removeMetadata(qint64 offset);
|
||||||
|
bool clearMeta();
|
||||||
|
bool color(quint64 line, int start, int length, const QColor &fgcolor,
|
||||||
|
const QColor &bgcolor);
|
||||||
|
bool foreground(quint64 line, int start, int length, const QColor &fgcolor);
|
||||||
|
bool background(quint64 line, int start, int length, const QColor &bgcolor);
|
||||||
|
bool comment(quint64 line, int start, int length, const QString &comment);
|
||||||
|
void applyMetas(QList<HexMetadataAbsoluteItem> metas);
|
||||||
|
|
||||||
|
// mainwindow
|
||||||
|
void newFile(bool bigfile = false);
|
||||||
|
ErrFile openFile(QString filename, bool readonly = false);
|
||||||
|
ErrFile openDriver(QString driver);
|
||||||
|
ErrFile closeFile(int index, bool force = false);
|
||||||
|
ErrFile saveFile(int index);
|
||||||
|
ErrFile exportFile(QString filename, int index);
|
||||||
|
void exportFileGUI();
|
||||||
|
ErrFile saveasFile(QString filename, int index);
|
||||||
|
void saveasFileGUI();
|
||||||
|
ErrFile closeCurrentFile(bool force = false);
|
||||||
|
ErrFile saveCurrentFile();
|
||||||
|
void openFileGUI();
|
||||||
|
void openDriverGUI();
|
||||||
|
void findGUI();
|
||||||
|
void gotoGUI();
|
||||||
|
void fillGUI();
|
||||||
|
void fillzeroGUI();
|
||||||
|
void fillnopGUI();
|
||||||
|
|
||||||
|
// bookmark
|
||||||
|
void setMetafgVisible(bool b);
|
||||||
|
void setMetabgVisible(bool b);
|
||||||
|
void setMetaCommentVisible(bool b);
|
||||||
|
bool addBookMark(qint64 pos, QString comment);
|
||||||
|
bool modBookMark(qint64 pos, QString comment);
|
||||||
|
void applyBookMarks(QList<BookMark> books);
|
||||||
|
bool removeBookMark(qint64 pos);
|
||||||
|
bool clearBookMark();
|
||||||
|
|
||||||
|
// workspace
|
||||||
|
bool openWorkSpace(QString filename, bool readonly = false);
|
||||||
|
bool setCurrentEncoding(QString encoding);
|
||||||
|
};
|
||||||
|
} // namespace WingPlugin
|
||||||
|
|
||||||
|
class IWingPlugin : public QObject {
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
virtual bool init(QList<IWingPlugin *> loadedplugins) = 0;
|
||||||
|
virtual ~IWingPlugin() {}
|
||||||
|
virtual void unload() = 0;
|
||||||
|
virtual QMenu *registerMenu() = 0;
|
||||||
|
virtual QDockWidget *registerDockWidget() = 0;
|
||||||
|
virtual Qt::DockWidgetArea registerDockWidgetDockArea() = 0;
|
||||||
|
virtual QString pluginName() = 0;
|
||||||
|
virtual QString pluginAuthor() = 0;
|
||||||
|
virtual uint pluginVersion() = 0;
|
||||||
|
virtual QString puid() = 0;
|
||||||
|
virtual QString signature() = 0;
|
||||||
|
virtual QString pluginComment() = 0;
|
||||||
|
virtual QList<QVariant> optionalInfos() = 0;
|
||||||
|
virtual HookIndex getHookSubscribe() = 0;
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
virtual void plugin2MessagePipe(WingPluginMessage type,
|
||||||
|
QList<QVariant> msg) = 0;
|
||||||
|
|
||||||
|
signals:
|
||||||
|
bool requestControl(int timeout = 1500);
|
||||||
|
bool requestRelease();
|
||||||
|
|
||||||
|
public:
|
||||||
|
WingPlugin::Reader reader;
|
||||||
|
WingPlugin::Controller controller;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define WINGSUMMER "wingsummer"
|
||||||
|
#define PluginDockWidgetInit(dw, widget, title, objname) \
|
||||||
|
dw = new QDockWidget; \
|
||||||
|
dw->setWidget(widget); \
|
||||||
|
dw->setWindowTitle(title); \
|
||||||
|
dw->setObjectName(objname);
|
||||||
|
|
||||||
|
#define PluginWidgetFree(w) w->deleteLater();
|
||||||
|
|
||||||
|
#define PluginMenuInitBegin(menu, title) \
|
||||||
|
menu = new QMenu; \
|
||||||
|
menu->setTitle(title); \
|
||||||
|
{ \
|
||||||
|
QAction *a;
|
||||||
|
|
||||||
|
#define PluginMenuAddItemAction(menu, title, slot) \
|
||||||
|
a = new QAction(title, this); \
|
||||||
|
connect(a, &QAction::triggered, this, &slot); \
|
||||||
|
menu->addAction(a);
|
||||||
|
|
||||||
|
#define PluginMenuAddItemLamba(menu, title, lamba) \
|
||||||
|
a = new QAction(title, this); \
|
||||||
|
connect(a, &QAction::triggered, this, lamba); \
|
||||||
|
menu->addAction(a);
|
||||||
|
|
||||||
|
#define PluginMenuAddItemIconAction(menu, title, icon, slot) \
|
||||||
|
a = new QAction(icon, title, this); \
|
||||||
|
connect(a, &QAction::triggered, this, &slot); \
|
||||||
|
menu->addAction(a);
|
||||||
|
|
||||||
|
#define PluginMenuAddItemIconLamba(menu, title, icon, lamba) \
|
||||||
|
a = new QAction(icon, title, this); \
|
||||||
|
connect(a, &QAction::triggered, this, lamba); \
|
||||||
|
menu->addAction(a);
|
||||||
|
|
||||||
|
#define PluginMenuInitEnd() }
|
||||||
|
|
||||||
|
class PluginUtils {
|
||||||
|
public:
|
||||||
|
static QString GetPUID(IWingPlugin *plugin) {
|
||||||
|
auto str = QString("%1%2%3%4%5")
|
||||||
|
.arg(WINGSUMMER)
|
||||||
|
.arg(plugin->pluginName())
|
||||||
|
.arg(plugin->pluginAuthor())
|
||||||
|
.arg(plugin->pluginComment())
|
||||||
|
.arg(plugin->pluginVersion());
|
||||||
|
return QCryptographicHash::hash(str.toLatin1(), QCryptographicHash::Md5)
|
||||||
|
.toHex();
|
||||||
|
}
|
||||||
|
|
||||||
|
static QString GetPuid(QString pluginName, QString author, QString comment,
|
||||||
|
uint version) {
|
||||||
|
auto str = QString("%1%2%3%4%5")
|
||||||
|
.arg(WINGSUMMER)
|
||||||
|
.arg(pluginName)
|
||||||
|
.arg(author)
|
||||||
|
.arg(comment)
|
||||||
|
.arg(version);
|
||||||
|
return QCryptographicHash::hash(str.toLatin1(), QCryptographicHash::Md5)
|
||||||
|
.toHex();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
#define IWINGPLUGIN_INTERFACE_IID "com.wingsummer.iwingplugin"
|
||||||
|
Q_DECLARE_INTERFACE(IWingPlugin, IWINGPLUGIN_INTERFACE_IID)
|
||||||
|
|
||||||
|
#endif // IWINGPLUGIN_H
|
|
@ -142,7 +142,7 @@ QHexEdit is released under MIT license
|
||||||
|
|
||||||
  起初我打算使用`QHexEdit2`作为十六进制编辑器为基础进行开发,该组件虽然轻松打开超大文件,但是它的编辑功能能用是能用,但有很多大大小小的 Bug ,我还逐一修了修,但发现仅仅我的力量和时间是杯水车薪。然后我找到了`QHexView`,也就是上面所属的组件,但它有一个致命的缺陷,无法打开超大文件,被我 Pass 掉了,后来我尝试用了它,发现开发者在开发改组件是下了足够大的功夫的,编辑十分流畅。最近看到`QHexView`贡献者们想搞一个`QHexView 5.0`,对代码进行了重构,但并没有实现任何功能,差不多是个空空的框架,不过从接口看出更强大的易用性,这个是原组件所不具有的,这花费我比较多的时间来阅读源代码,并向外扩展接口以适应我的开发需求。
|
  起初我打算使用`QHexEdit2`作为十六进制编辑器为基础进行开发,该组件虽然轻松打开超大文件,但是它的编辑功能能用是能用,但有很多大大小小的 Bug ,我还逐一修了修,但发现仅仅我的力量和时间是杯水车薪。然后我找到了`QHexView`,也就是上面所属的组件,但它有一个致命的缺陷,无法打开超大文件,被我 Pass 掉了,后来我尝试用了它,发现开发者在开发改组件是下了足够大的功夫的,编辑十分流畅。最近看到`QHexView`贡献者们想搞一个`QHexView 5.0`,对代码进行了重构,但并没有实现任何功能,差不多是个空空的框架,不过从接口看出更强大的易用性,这个是原组件所不具有的,这花费我比较多的时间来阅读源代码,并向外扩展接口以适应我的开发需求。
|
||||||
|
|
||||||
  然后我想,既然`QHexEdit2`具有强大的打开文件的能力,而`QHexView`不具备,但它具有强大的编辑界面,于是乎,我移植`QHexEdit2`的打开超大文件的代码到`QHexView`当中,并做好了适配和功能增强。改仓库的链接: https://github.com/Simsys/qhexedit2 ,它的协议如下:
|
  然后我想,既然`QHexEdit2`具有强大的打开文件的能力,而`QHexView`不具备,但它具有强大的编辑界面,于是乎,我移植`QHexEdit2`的打开超大文件的代码到`QHexView`当中,并做好了适配和功能增强。原仓库的链接: https://github.com/Simsys/qhexedit2 ,它的协议如下:
|
||||||
|
|
||||||
Copyright (C) 2015-2016 Winfried Simon
|
Copyright (C) 2015-2016 Winfried Simon
|
||||||
|
|
||||||
|
|
|
@ -1,94 +0,0 @@
|
||||||
#ifndef IWINGPLUGIN_H
|
|
||||||
#define IWINGPLUGIN_H
|
|
||||||
|
|
||||||
#include <QCryptographicHash>
|
|
||||||
#include <QDockWidget>
|
|
||||||
#include <QList>
|
|
||||||
#include <QMenu>
|
|
||||||
#include <QObject>
|
|
||||||
#include <QWidget>
|
|
||||||
|
|
||||||
enum WingPluginMessage {
|
|
||||||
PluginLoading,
|
|
||||||
PluginLoaded,
|
|
||||||
PluginUnLoading,
|
|
||||||
PluginUnLoaded,
|
|
||||||
ErrorMessage,
|
|
||||||
PluginCall
|
|
||||||
};
|
|
||||||
|
|
||||||
enum CallTableIndex {
|
|
||||||
NewFile,
|
|
||||||
OpenFile,
|
|
||||||
OpenFileGUI,
|
|
||||||
CloseFile,
|
|
||||||
SaveFile,
|
|
||||||
SaveAsFile,
|
|
||||||
ExportFile,
|
|
||||||
Undo,
|
|
||||||
Redo,
|
|
||||||
WriteFileBytes,
|
|
||||||
ReadFileBytes,
|
|
||||||
DeleteFileBytes,
|
|
||||||
FindFileBytes,
|
|
||||||
GotFileOffset,
|
|
||||||
GotoFileLine,
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
class IWingPlugin {
|
|
||||||
public:
|
|
||||||
virtual bool init(QList<IWingPlugin *> loadedplugins) = 0;
|
|
||||||
virtual ~IWingPlugin() {}
|
|
||||||
virtual void unload() = 0;
|
|
||||||
virtual QMenu *registerMenu() = 0;
|
|
||||||
virtual QDockWidget *registerDockWidget() = 0;
|
|
||||||
virtual QString pluginName() = 0;
|
|
||||||
virtual QString pluginAuthor() = 0;
|
|
||||||
virtual uint pluginVersion() = 0;
|
|
||||||
virtual QString puid() = 0;
|
|
||||||
virtual QString signature() = 0;
|
|
||||||
virtual QString comment() = 0;
|
|
||||||
virtual QList<QVariant> optionalInfos() = 0;
|
|
||||||
IWingPlugin *self;
|
|
||||||
|
|
||||||
signals:
|
|
||||||
void host2MessagePipe(IWingPlugin *sender, WingPluginMessage type,
|
|
||||||
QList<QVariant> msg);
|
|
||||||
public slots:
|
|
||||||
virtual void plugin2MessagePipe(WingPluginMessage type,
|
|
||||||
QList<QVariant> msg) = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
const QString sign = "wingsummer";
|
|
||||||
|
|
||||||
class PluginUtils {
|
|
||||||
public:
|
|
||||||
static QString GetPUID(IWingPlugin *plugin) {
|
|
||||||
auto str = QString("%1%2%3%4%5")
|
|
||||||
.arg(sign)
|
|
||||||
.arg(plugin->pluginName())
|
|
||||||
.arg(plugin->pluginAuthor())
|
|
||||||
.arg(plugin->comment())
|
|
||||||
.arg(plugin->pluginVersion());
|
|
||||||
return QCryptographicHash::hash(str.toLatin1(), QCryptographicHash::Md5)
|
|
||||||
.toHex();
|
|
||||||
}
|
|
||||||
|
|
||||||
static QString GetPuid(QString pluginName, QString author, QString comment,
|
|
||||||
uint version) {
|
|
||||||
auto str = QString("%1%2%3%4%5")
|
|
||||||
.arg(sign)
|
|
||||||
.arg(pluginName)
|
|
||||||
.arg(author)
|
|
||||||
.arg(comment)
|
|
||||||
.arg(version);
|
|
||||||
return QCryptographicHash::hash(str.toLatin1(), QCryptographicHash::Md5)
|
|
||||||
.toHex();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#define IWINGPLUGIN_INTERFACE_IID "com.wingsummer.iwingplugin"
|
|
||||||
Q_DECLARE_INTERFACE(IWingPlugin, IWINGPLUGIN_INTERFACE_IID)
|
|
||||||
|
|
||||||
#endif // IWINGPLUGIN_H
|
|
|
@ -7,11 +7,11 @@ TestPlugin::TestPlugin(QObject *parent){Q_UNUSED(parent)}
|
||||||
|
|
||||||
TestPlugin::~TestPlugin() {}
|
TestPlugin::~TestPlugin() {}
|
||||||
|
|
||||||
bool TestPlugin::init(QList<IWingPlugin *> loadedplugins) {
|
bool TestPlugin::init(QList<WingPluginInfo> loadedplugin) {
|
||||||
if (loadedplugins.length() > 0) {
|
if (loadedplugin.length() > 0) {
|
||||||
QString ps;
|
QString ps;
|
||||||
for (auto item : loadedplugins) {
|
for (auto item : loadedplugin) {
|
||||||
ps.append(item->pluginName());
|
ps.append(item.pluginName);
|
||||||
ps.append('\n');
|
ps.append('\n');
|
||||||
}
|
}
|
||||||
QMessageBox::information(nullptr, "Test", ps);
|
QMessageBox::information(nullptr, "Test", ps);
|
||||||
|
@ -63,7 +63,7 @@ void TestPlugin::plugin2MessagePipe(WingPluginMessage type,
|
||||||
controller.setKeepSize(true);
|
controller.setKeepSize(true);
|
||||||
controller.metadata(0, 2, Qt::red, Qt::transparent, QString());
|
controller.metadata(0, 2, Qt::red, Qt::transparent, QString());
|
||||||
requestRelease();
|
requestRelease();
|
||||||
controller.newFile();
|
controller.newFile(); //此语句在 requestRelease 释放成功无效
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ class TestPlugin : public IWingPlugin {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TestPlugin(QObject *parent = nullptr);
|
TestPlugin(QObject *parent = nullptr);
|
||||||
bool init(QList<IWingPlugin *> loadedplugins) override;
|
bool init(QList<WingPluginInfo> loadedplugin) override;
|
||||||
~TestPlugin() override;
|
~TestPlugin() override;
|
||||||
void unload() override;
|
void unload() override;
|
||||||
QMenu *registerMenu() override;
|
QMenu *registerMenu() override;
|
||||||
|
|
|
@ -161,8 +161,9 @@ MainWindow::MainWindow(DMainWindow *parent) {
|
||||||
auto keyGeneral =
|
auto keyGeneral =
|
||||||
QKeySequence(Qt::KeyboardModifier::ControlModifier |
|
QKeySequence(Qt::KeyboardModifier::ControlModifier |
|
||||||
Qt::KeyboardModifier::ShiftModifier | Qt::Key_G);
|
Qt::KeyboardModifier::ShiftModifier | Qt::Key_G);
|
||||||
auto keyplugin = QKeySequence(Qt::KeyboardModifier::ControlModifier |
|
auto keyplugin =
|
||||||
Qt::KeyboardModifier::AltModifier | Qt::Key_P);
|
QKeySequence(Qt::KeyboardModifier::ControlModifier |
|
||||||
|
Qt::KeyboardModifier::ShiftModifier | Qt::Key_P);
|
||||||
auto keymetadata =
|
auto keymetadata =
|
||||||
QKeySequence(Qt::KeyboardModifier::ControlModifier | Qt::Key_M);
|
QKeySequence(Qt::KeyboardModifier::ControlModifier | Qt::Key_M);
|
||||||
auto keymetaedit =
|
auto keymetaedit =
|
||||||
|
|
|
@ -2,27 +2,54 @@
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
#include <DLabel>
|
#include <DLabel>
|
||||||
#include <QListWidgetItem>
|
#include <QListWidgetItem>
|
||||||
|
#include <QPushButton>
|
||||||
|
|
||||||
|
#define Bool2String(b) (b ? "true" : "false")
|
||||||
|
|
||||||
PluginWindow::PluginWindow(DMainWindow *parent) : DDialog(parent) {
|
PluginWindow::PluginWindow(DMainWindow *parent) : DDialog(parent) {
|
||||||
this->setFixedSize(500, 600);
|
this->setFixedSize(500, 750);
|
||||||
this->setWindowTitle(tr("plugin"));
|
this->setWindowTitle(tr("plugin"));
|
||||||
|
txtc = new DTextBrowser(this);
|
||||||
|
addContent(txtc);
|
||||||
|
addSpacing(5);
|
||||||
plglist = new DListWidget(this);
|
plglist = new DListWidget(this);
|
||||||
plglist->setFixedHeight(200);
|
plglist->setFixedHeight(200);
|
||||||
this->addContent(plglist);
|
addContent(plglist);
|
||||||
|
addSpacing(5);
|
||||||
txtb = new DTextBrowser(this);
|
txtb = new DTextBrowser(this);
|
||||||
this->addContent(txtb);
|
txtb->setMinimumHeight(300);
|
||||||
|
addContent(txtb);
|
||||||
|
addSpacing(10);
|
||||||
connect(plglist, &QListWidget::itemSelectionChanged, this,
|
connect(plglist, &QListWidget::itemSelectionChanged, this,
|
||||||
&PluginWindow::on_list_selchanged);
|
&PluginWindow::on_list_selchanged);
|
||||||
|
auto btn = new QPushButton(tr("Refresh"), this);
|
||||||
|
connect(btn, &QPushButton::clicked, this,
|
||||||
|
[=] { this->setPluginSystem(m_pluginsys); });
|
||||||
|
addContent(btn);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginWindow::~PluginWindow() {}
|
PluginWindow::~PluginWindow() {}
|
||||||
|
|
||||||
void PluginWindow::setPluginSystem(PluginSystem *pluginsys) {
|
void PluginWindow::setPluginSystem(PluginSystem *pluginsys) {
|
||||||
m_pluginsys = pluginsys;
|
m_pluginsys = pluginsys;
|
||||||
|
plglist->clear();
|
||||||
auto pico = ICONRES("plugin");
|
auto pico = ICONRES("plugin");
|
||||||
for (auto item : pluginsys->plugins()) {
|
for (auto item : pluginsys->plugins()) {
|
||||||
plglist->addItem(new QListWidgetItem(pico, item->pluginName()));
|
plglist->addItem(new QListWidgetItem(pico, item->pluginName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define CInfo(mem, info) txtc->append(mem + " : " + info)
|
||||||
|
txtc->clear();
|
||||||
|
if (pluginsys->hasControl()) {
|
||||||
|
auto p = pluginsys->currentControlPlugin();
|
||||||
|
CInfo(tr("CtlPlg"), p->pluginName());
|
||||||
|
CInfo(tr("CtlPlgPuid"), p->puid());
|
||||||
|
CInfo(tr("CtlPlgAuthor"), p->pluginAuthor());
|
||||||
|
CInfo(tr("ControlTimeout"),
|
||||||
|
Bool2String(pluginsys->currentControlTimeout()));
|
||||||
|
} else {
|
||||||
|
txtc->append(tr("NoPlgControl"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PluginWindow::on_list_selchanged() {
|
void PluginWindow::on_list_selchanged() {
|
||||||
|
@ -40,4 +67,9 @@ void PluginWindow::on_list_selchanged() {
|
||||||
for (auto item : plg->optionalInfos()) {
|
for (auto item : plg->optionalInfos()) {
|
||||||
Info(QString::number(i), item.toString());
|
Info(QString::number(i), item.toString());
|
||||||
}
|
}
|
||||||
|
txtb->append(QString(10, '-'));
|
||||||
|
bool hc = plg == m_pluginsys->currentControlPlugin();
|
||||||
|
Info(tr("HasControl"), Bool2String(hc));
|
||||||
|
Info(tr("ControlTimeout"),
|
||||||
|
(hc ? Bool2String(m_pluginsys->currentControlTimeout()) : QString("-")));
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@ private:
|
||||||
PluginSystem *m_pluginsys;
|
PluginSystem *m_pluginsys;
|
||||||
DListWidget *plglist;
|
DListWidget *plglist;
|
||||||
DTextBrowser *txtb;
|
DTextBrowser *txtb;
|
||||||
|
DTextBrowser *txtc;
|
||||||
|
|
||||||
void on_list_selchanged();
|
void on_list_selchanged();
|
||||||
};
|
};
|
||||||
|
|
Binary file not shown.
|
@ -133,48 +133,48 @@
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="142"/>
|
<location filename="../dialog/mainwindow.cpp" line="142"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="485"/>
|
<location filename="../dialog/mainwindow.cpp" line="486"/>
|
||||||
<source>New</source>
|
<source>New</source>
|
||||||
<translation>新建</translation>
|
<translation>新建</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="150"/>
|
<location filename="../dialog/mainwindow.cpp" line="150"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="490"/>
|
<location filename="../dialog/mainwindow.cpp" line="491"/>
|
||||||
<source>OpenF</source>
|
<source>OpenF</source>
|
||||||
<translation>打开文件</translation>
|
<translation>打开文件</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="232"/>
|
<location filename="../dialog/mainwindow.cpp" line="233"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="493"/>
|
<location filename="../dialog/mainwindow.cpp" line="494"/>
|
||||||
<source>OpenD</source>
|
<source>OpenD</source>
|
||||||
<translation>打开驱动器</translation>
|
<translation>打开驱动器</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="235"/>
|
<location filename="../dialog/mainwindow.cpp" line="236"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="495"/>
|
<location filename="../dialog/mainwindow.cpp" line="496"/>
|
||||||
<source>Save</source>
|
<source>Save</source>
|
||||||
<translation>保存</translation>
|
<translation>保存</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="238"/>
|
<location filename="../dialog/mainwindow.cpp" line="239"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="497"/>
|
<location filename="../dialog/mainwindow.cpp" line="498"/>
|
||||||
<source>SaveAs</source>
|
<source>SaveAs</source>
|
||||||
<translation>另存为</translation>
|
<translation>另存为</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="241"/>
|
<location filename="../dialog/mainwindow.cpp" line="242"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="499"/>
|
<location filename="../dialog/mainwindow.cpp" line="500"/>
|
||||||
<source>Export</source>
|
<source>Export</source>
|
||||||
<translation>导出</translation>
|
<translation>导出</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="244"/>
|
<location filename="../dialog/mainwindow.cpp" line="245"/>
|
||||||
<source>SaveSel</source>
|
<source>SaveSel</source>
|
||||||
<translation>保存选区字节</translation>
|
<translation>保存选区字节</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="230"/>
|
<location filename="../dialog/mainwindow.cpp" line="231"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="492"/>
|
<location filename="../dialog/mainwindow.cpp" line="493"/>
|
||||||
<source>OpenWorkSpace</source>
|
<source>OpenWorkSpace</source>
|
||||||
<translation>打开工作区</translation>
|
<translation>打开工作区</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -187,483 +187,480 @@
|
||||||
<translation type="vanished">另存为工作区</translation>
|
<translation type="vanished">另存为工作区</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="254"/>
|
<location filename="../dialog/mainwindow.cpp" line="255"/>
|
||||||
<source>Exit</source>
|
<source>Exit</source>
|
||||||
<translation>退出</translation>
|
<translation>退出</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="259"/>
|
<location filename="../dialog/mainwindow.cpp" line="260"/>
|
||||||
<source>Edit</source>
|
<source>Edit</source>
|
||||||
<translation>编辑</translation>
|
<translation>编辑</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="261"/>
|
<location filename="../dialog/mainwindow.cpp" line="262"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="502"/>
|
<location filename="../dialog/mainwindow.cpp" line="503"/>
|
||||||
<source>Undo</source>
|
<source>Undo</source>
|
||||||
<translation>撤销</translation>
|
<translation>撤销</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="264"/>
|
<location filename="../dialog/mainwindow.cpp" line="265"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="504"/>
|
<location filename="../dialog/mainwindow.cpp" line="505"/>
|
||||||
<source>Redo</source>
|
<source>Redo</source>
|
||||||
<translation>恢复</translation>
|
<translation>恢复</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="268"/>
|
<location filename="../dialog/mainwindow.cpp" line="269"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="413"/>
|
<location filename="../dialog/mainwindow.cpp" line="414"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="508"/>
|
<location filename="../dialog/mainwindow.cpp" line="509"/>
|
||||||
<source>Cut</source>
|
<source>Cut</source>
|
||||||
<translation>剪切</translation>
|
<translation>剪切</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="271"/>
|
<location filename="../dialog/mainwindow.cpp" line="272"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="415"/>
|
<location filename="../dialog/mainwindow.cpp" line="416"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="509"/>
|
<location filename="../dialog/mainwindow.cpp" line="510"/>
|
||||||
<source>CutHex</source>
|
<source>CutHex</source>
|
||||||
<translation>剪切(十六进制)</translation>
|
<translation>剪切(十六进制)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="274"/>
|
<location filename="../dialog/mainwindow.cpp" line="275"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="417"/>
|
<location filename="../dialog/mainwindow.cpp" line="418"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="514"/>
|
<location filename="../dialog/mainwindow.cpp" line="515"/>
|
||||||
<source>Copy</source>
|
<source>Copy</source>
|
||||||
<translation>复制</translation>
|
<translation>复制</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="277"/>
|
<location filename="../dialog/mainwindow.cpp" line="278"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="419"/>
|
<location filename="../dialog/mainwindow.cpp" line="420"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="515"/>
|
<location filename="../dialog/mainwindow.cpp" line="516"/>
|
||||||
<source>CopyHex</source>
|
<source>CopyHex</source>
|
||||||
<translation>复制(十六进制)</translation>
|
<translation>复制(十六进制)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="280"/>
|
<location filename="../dialog/mainwindow.cpp" line="281"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="421"/>
|
<location filename="../dialog/mainwindow.cpp" line="422"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="520"/>
|
<location filename="../dialog/mainwindow.cpp" line="521"/>
|
||||||
<source>Paste</source>
|
<source>Paste</source>
|
||||||
<translation>粘贴</translation>
|
<translation>粘贴</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="283"/>
|
<location filename="../dialog/mainwindow.cpp" line="284"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="423"/>
|
<location filename="../dialog/mainwindow.cpp" line="424"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="521"/>
|
<location filename="../dialog/mainwindow.cpp" line="522"/>
|
||||||
<source>PasteHex</source>
|
<source>PasteHex</source>
|
||||||
<translation>粘贴(十六进制)</translation>
|
<translation>粘贴(十六进制)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="286"/>
|
<location filename="../dialog/mainwindow.cpp" line="287"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="425"/>
|
<location filename="../dialog/mainwindow.cpp" line="426"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="525"/>
|
<location filename="../dialog/mainwindow.cpp" line="526"/>
|
||||||
<source>Delete</source>
|
<source>Delete</source>
|
||||||
<translation>删除</translation>
|
<translation>删除</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="290"/>
|
<location filename="../dialog/mainwindow.cpp" line="291"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="428"/>
|
<location filename="../dialog/mainwindow.cpp" line="429"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="528"/>
|
<location filename="../dialog/mainwindow.cpp" line="529"/>
|
||||||
<source>Find</source>
|
<source>Find</source>
|
||||||
<translation>查找</translation>
|
<translation>查找</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="293"/>
|
<location filename="../dialog/mainwindow.cpp" line="294"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="430"/>
|
<location filename="../dialog/mainwindow.cpp" line="431"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="530"/>
|
<location filename="../dialog/mainwindow.cpp" line="531"/>
|
||||||
<source>Goto</source>
|
<source>Goto</source>
|
||||||
<translation>跳转</translation>
|
<translation>跳转</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="297"/>
|
<location filename="../dialog/mainwindow.cpp" line="298"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="431"/>
|
<location filename="../dialog/mainwindow.cpp" line="432"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="535"/>
|
<location filename="../dialog/mainwindow.cpp" line="536"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2682"/>
|
<location filename="../dialog/mainwindow.cpp" line="2883"/>
|
||||||
<source>Fill</source>
|
<source>Fill</source>
|
||||||
<translation>填充</translation>
|
<translation>填充</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="300"/>
|
<location filename="../dialog/mainwindow.cpp" line="301"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="536"/>
|
<location filename="../dialog/mainwindow.cpp" line="537"/>
|
||||||
<source>FillNop</source>
|
<source>FillNop</source>
|
||||||
<translation>填充 nop</translation>
|
<translation>填充 nop</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="303"/>
|
<location filename="../dialog/mainwindow.cpp" line="304"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="537"/>
|
<location filename="../dialog/mainwindow.cpp" line="538"/>
|
||||||
<source>FillZero</source>
|
<source>FillZero</source>
|
||||||
<translation>填充零</translation>
|
<translation>填充零</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="325"/>
|
<location filename="../dialog/mainwindow.cpp" line="326"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="432"/>
|
<location filename="../dialog/mainwindow.cpp" line="433"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="550"/>
|
<location filename="../dialog/mainwindow.cpp" line="551"/>
|
||||||
<source>MetaData</source>
|
<source>MetaData</source>
|
||||||
<translation>添加标注</translation>
|
<translation>添加标注</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="331"/>
|
<location filename="../dialog/mainwindow.cpp" line="332"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="553"/>
|
<location filename="../dialog/mainwindow.cpp" line="554"/>
|
||||||
<source>DeleteMetaData</source>
|
<source>DeleteMetaData</source>
|
||||||
<translation>删除标注</translation>
|
<translation>删除标注</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="334"/>
|
<location filename="../dialog/mainwindow.cpp" line="335"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="555"/>
|
<location filename="../dialog/mainwindow.cpp" line="556"/>
|
||||||
<source>ClearMetaData</source>
|
<source>ClearMetaData</source>
|
||||||
<translation>清空标注</translation>
|
<translation>清空标注</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="315"/>
|
<location filename="../dialog/mainwindow.cpp" line="316"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="434"/>
|
<location filename="../dialog/mainwindow.cpp" line="435"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="578"/>
|
<location filename="../dialog/mainwindow.cpp" line="579"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="831"/>
|
<location filename="../dialog/mainwindow.cpp" line="834"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="840"/>
|
<location filename="../dialog/mainwindow.cpp" line="863"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2557"/>
|
<location filename="../dialog/mainwindow.cpp" line="2767"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2565"/>
|
<location filename="../dialog/mainwindow.cpp" line="2775"/>
|
||||||
<source>BookMark</source>
|
<source>BookMark</source>
|
||||||
<translation>书签</translation>
|
<translation>书签</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="318"/>
|
<location filename="../dialog/mainwindow.cpp" line="319"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="579"/>
|
<location filename="../dialog/mainwindow.cpp" line="580"/>
|
||||||
|
<location filename="../dialog/mainwindow.cpp" line="838"/>
|
||||||
<source>DeleteBookMark</source>
|
<source>DeleteBookMark</source>
|
||||||
<translation>删除书签</translation>
|
<translation>删除书签</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="321"/>
|
<location filename="../dialog/mainwindow.cpp" line="322"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="581"/>
|
<location filename="../dialog/mainwindow.cpp" line="582"/>
|
||||||
|
<location filename="../dialog/mainwindow.cpp" line="848"/>
|
||||||
<source>ClearBookMark</source>
|
<source>ClearBookMark</source>
|
||||||
<translation>清空书签</translation>
|
<translation>清空书签</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="307"/>
|
<location filename="../dialog/mainwindow.cpp" line="308"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="436"/>
|
<location filename="../dialog/mainwindow.cpp" line="437"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="586"/>
|
<location filename="../dialog/mainwindow.cpp" line="587"/>
|
||||||
<source>Encoding</source>
|
<source>Encoding</source>
|
||||||
<translation>编码</translation>
|
<translation>编码</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="366"/>
|
<location filename="../dialog/mainwindow.cpp" line="367"/>
|
||||||
<source>Setting</source>
|
<source>Setting</source>
|
||||||
<translation>设置</translation>
|
<translation>设置</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="368"/>
|
<location filename="../dialog/mainwindow.cpp" line="369"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="589"/>
|
<location filename="../dialog/mainwindow.cpp" line="590"/>
|
||||||
<source>General</source>
|
<source>General</source>
|
||||||
<translation>基本设置</translation>
|
<translation>基本设置</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="370"/>
|
<location filename="../dialog/mainwindow.cpp" line="371"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="378"/>
|
<location filename="../dialog/mainwindow.cpp" line="379"/>
|
||||||
<source>Plugin</source>
|
<source>Plugin</source>
|
||||||
<translation>插件</translation>
|
<translation>插件</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="373"/>
|
<location filename="../dialog/mainwindow.cpp" line="374"/>
|
||||||
<source>RestoreLayout</source>
|
<source>RestoreLayout</source>
|
||||||
<translation>恢复默认布局</translation>
|
<translation>恢复默认布局</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="380"/>
|
<location filename="../dialog/mainwindow.cpp" line="381"/>
|
||||||
<source>LoadPlugin</source>
|
<source>LoadPlugin</source>
|
||||||
<translation>加载外部插件</translation>
|
<translation>加载外部插件</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="393"/>
|
<location filename="../dialog/mainwindow.cpp" line="394"/>
|
||||||
<source>Author</source>
|
<source>Author</source>
|
||||||
<translation>作者</translation>
|
<translation>作者</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="395"/>
|
<location filename="../dialog/mainwindow.cpp" line="396"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="590"/>
|
<location filename="../dialog/mainwindow.cpp" line="591"/>
|
||||||
<source>About</source>
|
<source>About</source>
|
||||||
<translation>关于</translation>
|
<translation>关于</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="396"/>
|
<location filename="../dialog/mainwindow.cpp" line="397"/>
|
||||||
<source>Sponsor</source>
|
<source>Sponsor</source>
|
||||||
<translation>赞助</translation>
|
<translation>赞助</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="328"/>
|
<location filename="../dialog/mainwindow.cpp" line="329"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="551"/>
|
<location filename="../dialog/mainwindow.cpp" line="552"/>
|
||||||
<source>MetaDataEdit</source>
|
<source>MetaDataEdit</source>
|
||||||
<translation>编辑标注</translation>
|
<translation>编辑标注</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="148"/>
|
<location filename="../dialog/mainwindow.cpp" line="148"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="486"/>
|
<location filename="../dialog/mainwindow.cpp" line="487"/>
|
||||||
<source>NewBigFile</source>
|
<source>NewBigFile</source>
|
||||||
<translation>新建超大文件</translation>
|
<translation>新建超大文件</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="249"/>
|
<location filename="../dialog/mainwindow.cpp" line="250"/>
|
||||||
<source>RecentFile</source>
|
<source>RecentFile</source>
|
||||||
<translation>最近打开文件</translation>
|
<translation>最近打开文件</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="313"/>
|
<location filename="../dialog/mainwindow.cpp" line="314"/>
|
||||||
<source>Mark</source>
|
<source>Mark</source>
|
||||||
<translation>标记</translation>
|
<translation>标记</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="388"/>
|
<location filename="../dialog/mainwindow.cpp" line="389"/>
|
||||||
<source>Window</source>
|
<source>Window</source>
|
||||||
<translation>窗体</translation>
|
<translation>窗体</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="397"/>
|
<location filename="../dialog/mainwindow.cpp" line="398"/>
|
||||||
<source>Wiki</source>
|
<source>Wiki</source>
|
||||||
<translation>网页 Wiki</translation>
|
<translation>网页 Wiki</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="348"/>
|
<location filename="../dialog/mainwindow.cpp" line="349"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="559"/>
|
<location filename="../dialog/mainwindow.cpp" line="560"/>
|
||||||
<source>ShowMetafg</source>
|
<source>ShowMetafg</source>
|
||||||
<translation>标注前景色</translation>
|
<translation>标注前景色</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="351"/>
|
<location filename="../dialog/mainwindow.cpp" line="352"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="562"/>
|
<location filename="../dialog/mainwindow.cpp" line="563"/>
|
||||||
<source>ShowMetabg</source>
|
<source>ShowMetabg</source>
|
||||||
<translation>标注背景色</translation>
|
<translation>标注背景色</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="354"/>
|
<location filename="../dialog/mainwindow.cpp" line="355"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="564"/>
|
<location filename="../dialog/mainwindow.cpp" line="565"/>
|
||||||
<source>ShowMetaComment</source>
|
<source>ShowMetaComment</source>
|
||||||
<translation>标注评语</translation>
|
<translation>标注评语</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="359"/>
|
<location filename="../dialog/mainwindow.cpp" line="360"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="569"/>
|
<location filename="../dialog/mainwindow.cpp" line="570"/>
|
||||||
<source>MetaShowAll</source>
|
<source>MetaShowAll</source>
|
||||||
<translation>显示所有标注</translation>
|
<translation>显示所有标注</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="361"/>
|
<location filename="../dialog/mainwindow.cpp" line="362"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="570"/>
|
<location filename="../dialog/mainwindow.cpp" line="571"/>
|
||||||
<source>MetaHideAll</source>
|
<source>MetaHideAll</source>
|
||||||
<translation>隐藏所有标注</translation>
|
<translation>隐藏所有标注</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="618"/>
|
<location filename="../dialog/mainwindow.cpp" line="619"/>
|
||||||
<source>SetaddressBase</source>
|
<source>SetaddressBase</source>
|
||||||
<translation>设置基址</translation>
|
<translation>设置基址</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="622"/>
|
<location filename="../dialog/mainwindow.cpp" line="623"/>
|
||||||
<source>addressBase</source>
|
<source>addressBase</source>
|
||||||
<translation>基址</translation>
|
<translation>基址</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="622"/>
|
<location filename="../dialog/mainwindow.cpp" line="623"/>
|
||||||
<source>inputAddressBase</source>
|
<source>inputAddressBase</source>
|
||||||
<translation>请输入基址</translation>
|
<translation>请输入基址</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="630"/>
|
<location filename="../dialog/mainwindow.cpp" line="631"/>
|
||||||
<source>WarnBigBaseAddress</source>
|
<source>WarnBigBaseAddress</source>
|
||||||
<translation>基址过大,你得到的地址将会不正确!</translation>
|
<translation>基址过大,你得到的地址将会不正确!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="635"/>
|
<location filename="../dialog/mainwindow.cpp" line="636"/>
|
||||||
<source>ErrBaseAddress</source>
|
<source>ErrBaseAddress</source>
|
||||||
<translation>非法基址输入</translation>
|
<translation>非法基址输入</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="641"/>
|
<location filename="../dialog/mainwindow.cpp" line="642"/>
|
||||||
<source>SetColInfo</source>
|
<source>SetColInfo</source>
|
||||||
<translation>显示/隐藏地址栏</translation>
|
<translation>显示/隐藏地址栏</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="645"/>
|
<location filename="../dialog/mainwindow.cpp" line="646"/>
|
||||||
<source>SetHeaderInfo</source>
|
<source>SetHeaderInfo</source>
|
||||||
<translation>显示/隐藏表头</translation>
|
<translation>显示/隐藏表头</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="649"/>
|
<location filename="../dialog/mainwindow.cpp" line="650"/>
|
||||||
<source>SetAsciiString</source>
|
<source>SetAsciiString</source>
|
||||||
<translation>显示/隐藏解码字符串</translation>
|
<translation>显示/隐藏解码字符串</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="654"/>
|
<location filename="../dialog/mainwindow.cpp" line="655"/>
|
||||||
<source>loc:</source>
|
<source>loc:</source>
|
||||||
<translation>坐标:</translation>
|
<translation>坐标:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="661"/>
|
<location filename="../dialog/mainwindow.cpp" line="662"/>
|
||||||
<source>sel:</source>
|
<source>sel:</source>
|
||||||
<translation>选长:</translation>
|
<translation>选长:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="683"/>
|
<location filename="../dialog/mainwindow.cpp" line="684"/>
|
||||||
<source>InfoSave</source>
|
<source>InfoSave</source>
|
||||||
<translation>是否保存</translation>
|
<translation>是否保存</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="686"/>
|
<location filename="../dialog/mainwindow.cpp" line="687"/>
|
||||||
<source>InfoReadWrite</source>
|
<source>InfoReadWrite</source>
|
||||||
<translation>是否可写</translation>
|
<translation>是否可写</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="688"/>
|
<location filename="../dialog/mainwindow.cpp" line="689"/>
|
||||||
<source>InfoWorks</source>
|
<source>InfoWorks</source>
|
||||||
<translation>是否保存工作区</translation>
|
<translation>是否保存工作区</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="699"/>
|
<location filename="../dialog/mainwindow.cpp" line="700"/>
|
||||||
<source>SetLocked</source>
|
<source>SetLocked</source>
|
||||||
<translation>启用/禁用锁定编辑</translation>
|
<translation>启用/禁用锁定编辑</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="703"/>
|
<location filename="../dialog/mainwindow.cpp" line="704"/>
|
||||||
<source>SetOver</source>
|
<source>SetOver</source>
|
||||||
<translation>启用/禁用改变大小</translation>
|
<translation>启用/禁用改变大小</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="708"/>
|
<location filename="../dialog/mainwindow.cpp" line="709"/>
|
||||||
<source>ErrUnLock</source>
|
<source>ErrUnLock</source>
|
||||||
<translation>锁定编辑失败</translation>
|
<translation>锁定编辑失败</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="715"/>
|
<location filename="../dialog/mainwindow.cpp" line="716"/>
|
||||||
<source>ErrUnOver</source>
|
<source>ErrUnOver</source>
|
||||||
<translation>锁定文件大小失败</translation>
|
<translation>锁定文件大小失败</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="719"/>
|
<location filename="../dialog/mainwindow.cpp" line="720"/>
|
||||||
<source>InfoCanOverLimit</source>
|
<source>InfoCanOverLimit</source>
|
||||||
<translation>当前编辑处于受限模式!</translation>
|
<translation>当前编辑处于受限模式!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="730"/>
|
<location filename="../dialog/mainwindow.cpp" line="731"/>
|
||||||
<source>ExportFindResult</source>
|
<source>ExportFindResult</source>
|
||||||
<translation>导出搜索结果</translation>
|
<translation>导出搜索结果</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="732"/>
|
<location filename="../dialog/mainwindow.cpp" line="733"/>
|
||||||
<source>ClearFindResult</source>
|
<source>ClearFindResult</source>
|
||||||
<translation>清空记录</translation>
|
<translation>清空记录</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="760"/>
|
<location filename="../dialog/mainwindow.cpp" line="761"/>
|
||||||
<source>file</source>
|
<source>file</source>
|
||||||
<translation>文件名</translation>
|
<translation>文件名</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="760"/>
|
<location filename="../dialog/mainwindow.cpp" line="761"/>
|
||||||
<source>addr</source>
|
<source>addr</source>
|
||||||
<translation>地址偏移</translation>
|
<translation>地址偏移</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="760"/>
|
<location filename="../dialog/mainwindow.cpp" line="761"/>
|
||||||
<source>value</source>
|
<source>value</source>
|
||||||
<translation>搜索值</translation>
|
<translation>搜索值</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="783"/>
|
<location filename="../dialog/mainwindow.cpp" line="784"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="786"/>
|
<location filename="../dialog/mainwindow.cpp" line="787"/>
|
||||||
<source>FindResult</source>
|
<source>FindResult</source>
|
||||||
<translation>搜索结果</translation>
|
<translation>搜索结果</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="790"/>
|
<location filename="../dialog/mainwindow.cpp" line="791"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="792"/>
|
<location filename="../dialog/mainwindow.cpp" line="793"/>
|
||||||
<source>Log</source>
|
<source>Log</source>
|
||||||
<translation>日志</translation>
|
<translation>日志</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="802"/>
|
<location filename="../dialog/mainwindow.cpp" line="804"/>
|
||||||
<source>LoggerInitFinish</source>
|
<source>LoggerInitFinish</source>
|
||||||
<translation>日志系统初始化完毕</translation>
|
<translation>日志系统初始化完毕</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="1025"/>
|
<location filename="../dialog/mainwindow.cpp" line="1050"/>
|
||||||
<source>ErrDockWidgetAddNoName</source>
|
<source>ErrDockWidgetAddNoName</source>
|
||||||
<translation>停靠组件加载失败:非法名称!</translation>
|
<translation>停靠组件加载失败:非法名称!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="1930"/>
|
<location filename="../dialog/mainwindow.cpp" line="2150"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="1941"/>
|
<location filename="../dialog/mainwindow.cpp" line="2161"/>
|
||||||
<source>CutToClipBoard</source>
|
<source>CutToClipBoard</source>
|
||||||
<translation>数据已剪切到粘贴板!</translation>
|
<translation>数据已剪切到粘贴板!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="1933"/>
|
<location filename="../dialog/mainwindow.cpp" line="2153"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="1944"/>
|
<location filename="../dialog/mainwindow.cpp" line="2164"/>
|
||||||
<source>UnCutToClipBoard</source>
|
<source>UnCutToClipBoard</source>
|
||||||
<translation>由于保持大小限制,数据剪切到粘贴板失败!</translation>
|
<translation>由于保持大小限制,数据剪切到粘贴板失败!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="1952"/>
|
<location filename="../dialog/mainwindow.cpp" line="2172"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="1959"/>
|
<location filename="../dialog/mainwindow.cpp" line="2179"/>
|
||||||
<source>CopyToClipBoard</source>
|
<source>CopyToClipBoard</source>
|
||||||
<translation>数据已拷贝到粘贴板</translation>
|
<translation>数据已拷贝到粘贴板</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2026"/>
|
<location filename="../dialog/mainwindow.cpp" line="2246"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2051"/>
|
<location filename="../dialog/mainwindow.cpp" line="2271"/>
|
||||||
<source>SaveWSError</source>
|
<source>SaveWSError</source>
|
||||||
<translation>保存工作区错误!</translation>
|
<translation>保存工作区错误!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2123"/>
|
<location filename="../dialog/mainwindow.cpp" line="2343"/>
|
||||||
<source>TooMuchFindResult</source>
|
<source>TooMuchFindResult</source>
|
||||||
<translation>搜索结果数量达到限制,结果可能不完整!</translation>
|
<translation>搜索结果数量达到限制,结果可能不完整!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2129"/>
|
<location filename="../dialog/mainwindow.cpp" line="2349"/>
|
||||||
<source>FindFininishError</source>
|
<source>FindFininishError</source>
|
||||||
<translation>正在搜索中,无法创建新的搜索!</translation>
|
<translation>正在搜索中,无法创建新的搜索!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2415"/>
|
<location filename="../dialog/mainwindow.cpp" line="2637"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2457"/>
|
<location filename="../dialog/mainwindow.cpp" line="2679"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2484"/>
|
<location filename="../dialog/mainwindow.cpp" line="2706"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2497"/>
|
<location filename="../dialog/mainwindow.cpp" line="2719"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2508"/>
|
<location filename="../dialog/mainwindow.cpp" line="2758"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2529"/>
|
<location filename="../dialog/mainwindow.cpp" line="2789"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2548"/>
|
<location filename="../dialog/mainwindow.cpp" line="2803"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2579"/>
|
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2593"/>
|
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2651"/>
|
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2658"/>
|
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2665"/>
|
|
||||||
<source>CheckKeepSize</source>
|
<source>CheckKeepSize</source>
|
||||||
<translation>请检查锁定文件大小是否开启!</translation>
|
<translation>请检查锁定文件大小是否开启!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2443"/>
|
<location filename="../dialog/mainwindow.cpp" line="2665"/>
|
||||||
<source>NoMetaData</source>
|
<source>NoMetaData</source>
|
||||||
<translation>无可编辑标记</translation>
|
<translation>无可编辑标记</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2739"/>
|
<location filename="../dialog/mainwindow.cpp" line="2940"/>
|
||||||
<source>EmptyFindResult</source>
|
<source>EmptyFindResult</source>
|
||||||
<translation>没有可导出的搜索结果!</translation>
|
<translation>没有可导出的搜索结果!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2761"/>
|
<location filename="../dialog/mainwindow.cpp" line="2962"/>
|
||||||
<source>SaveFindResult</source>
|
<source>SaveFindResult</source>
|
||||||
<translation>导出搜索结果成功!</translation>
|
<translation>导出搜索结果成功!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2765"/>
|
<location filename="../dialog/mainwindow.cpp" line="2966"/>
|
||||||
<source>SaveFindResultError</source>
|
<source>SaveFindResultError</source>
|
||||||
<translation>导出结果失败!</translation>
|
<translation>导出结果失败!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2828"/>
|
<location filename="../dialog/mainwindow.cpp" line="3029"/>
|
||||||
<source>ProjectFile (*.wingpro)</source>
|
<source>ProjectFile (*.wingpro)</source>
|
||||||
<translation>项目文件 (*.wingpro)</translation>
|
<translation>项目文件 (*.wingpro)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2837"/>
|
<location filename="../dialog/mainwindow.cpp" line="3038"/>
|
||||||
<source>WSOpenedUnSuccessfully</source>
|
<source>WSOpenedUnSuccessfully</source>
|
||||||
<translation>因工作区打开包含文件已被打开,故打开工作区失败!</translation>
|
<translation>因工作区打开包含文件已被打开,故打开工作区失败!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2840"/>
|
<location filename="../dialog/mainwindow.cpp" line="3041"/>
|
||||||
<source>WorkSpaceOpenUnSuccessfully</source>
|
<source>WorkSpaceOpenUnSuccessfully</source>
|
||||||
<translation>工作区打开失败!</translation>
|
<translation>工作区打开失败!</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -680,53 +677,53 @@
|
||||||
<translation type="vanished">类型</translation>
|
<translation type="vanished">类型</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="810"/>
|
<location filename="../dialog/mainwindow.cpp" line="812"/>
|
||||||
<source>Value</source>
|
<source>Value</source>
|
||||||
<translation>值</translation>
|
<translation>值</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="805"/>
|
<location filename="../dialog/mainwindow.cpp" line="807"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="824"/>
|
<location filename="../dialog/mainwindow.cpp" line="826"/>
|
||||||
<source>Number</source>
|
<source>Number</source>
|
||||||
<translation>数值</translation>
|
<translation>数值</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="920"/>
|
<location filename="../dialog/mainwindow.cpp" line="945"/>
|
||||||
<source>SettingLoading</source>
|
<source>SettingLoading</source>
|
||||||
<translation>设置加载中……</translation>
|
<translation>设置加载中……</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="980"/>
|
<location filename="../dialog/mainwindow.cpp" line="1005"/>
|
||||||
<source>PluginLoading</source>
|
<source>PluginLoading</source>
|
||||||
<translation>正在加载插件……</translation>
|
<translation>正在加载插件……</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="994"/>
|
<location filename="../dialog/mainwindow.cpp" line="1019"/>
|
||||||
<source>UnLoadPluginSetting</source>
|
<source>UnLoadPluginSetting</source>
|
||||||
<translation>因在设置中禁用插件导致无法加载!</translation>
|
<translation>因在设置中禁用插件导致无法加载!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="1015"/>
|
<location filename="../dialog/mainwindow.cpp" line="1040"/>
|
||||||
<source>MenuName :</source>
|
<source>MenuName :</source>
|
||||||
<translation>菜单名称:</translation>
|
<translation>菜单名称:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="1028"/>
|
<location filename="../dialog/mainwindow.cpp" line="1053"/>
|
||||||
<source>DockWidgetName :</source>
|
<source>DockWidgetName :</source>
|
||||||
<translation>停靠组件名:</translation>
|
<translation>停靠组件名:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="1556"/>
|
<location filename="../dialog/mainwindow.cpp" line="1776"/>
|
||||||
<source>Untitled</source>
|
<source>Untitled</source>
|
||||||
<translation>未命名</translation>
|
<translation>未命名</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2721"/>
|
<location filename="../dialog/mainwindow.cpp" line="2922"/>
|
||||||
<source>ChoosePlugin</source>
|
<source>ChoosePlugin</source>
|
||||||
<translation>请选择插件文件</translation>
|
<translation>请选择插件文件</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2721"/>
|
<location filename="../dialog/mainwindow.cpp" line="2922"/>
|
||||||
<source>PluginFile (*.wingplg)</source>
|
<source>PluginFile (*.wingplg)</source>
|
||||||
<translation>插件文件 (*.wingplg)</translation>
|
<translation>插件文件 (*.wingplg)</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -735,109 +732,109 @@
|
||||||
<translation type="vanished">由于你目前处于 ROOT 状态,故默认锁定文件!请为自己的修改负责!</translation>
|
<translation type="vanished">由于你目前处于 ROOT 状态,故默认锁定文件!请为自己的修改负责!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="1977"/>
|
<location filename="../dialog/mainwindow.cpp" line="2197"/>
|
||||||
<source>DriverOpenErrorTip</source>
|
<source>DriverOpenErrorTip</source>
|
||||||
<translation>打开驱动器失败</translation>
|
<translation>打开驱动器失败</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="1797"/>
|
<location filename="../dialog/mainwindow.cpp" line="2017"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="1885"/>
|
<location filename="../dialog/mainwindow.cpp" line="2105"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="1894"/>
|
<location filename="../dialog/mainwindow.cpp" line="2114"/>
|
||||||
<source>Error</source>
|
<source>Error</source>
|
||||||
<translation>错误</translation>
|
<translation>错误</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="1797"/>
|
<location filename="../dialog/mainwindow.cpp" line="2017"/>
|
||||||
<source>NoRoot</source>
|
<source>NoRoot</source>
|
||||||
<translation>无 root 权限,无法继续的操作!</translation>
|
<translation>无 root 权限,无法继续的操作!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="1879"/>
|
<location filename="../dialog/mainwindow.cpp" line="2099"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2828"/>
|
<location filename="../dialog/mainwindow.cpp" line="3029"/>
|
||||||
<source>ChooseFile</source>
|
<source>ChooseFile</source>
|
||||||
<translation>选择文件</translation>
|
<translation>选择文件</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="1885"/>
|
<location filename="../dialog/mainwindow.cpp" line="2105"/>
|
||||||
<source>FileNotExist</source>
|
<source>FileNotExist</source>
|
||||||
<translation>文件不存在!</translation>
|
<translation>文件不存在!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="1894"/>
|
<location filename="../dialog/mainwindow.cpp" line="2114"/>
|
||||||
<source>FilePermission</source>
|
<source>FilePermission</source>
|
||||||
<translation>因文件权限无法继续!</translation>
|
<translation>因文件权限无法继续!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="1906"/>
|
<location filename="../dialog/mainwindow.cpp" line="2126"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2001"/>
|
<location filename="../dialog/mainwindow.cpp" line="2221"/>
|
||||||
<source>Close</source>
|
<source>Close</source>
|
||||||
<translation>关闭</translation>
|
<translation>关闭</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="1907"/>
|
<location filename="../dialog/mainwindow.cpp" line="2127"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2002"/>
|
<location filename="../dialog/mainwindow.cpp" line="2222"/>
|
||||||
<source>ConfirmSave</source>
|
<source>ConfirmSave</source>
|
||||||
<translation>正在关闭未保存的文件或工作区,你确定抛弃继续吗?</translation>
|
<translation>正在关闭未保存的文件或工作区,你确定抛弃继续吗?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="1984"/>
|
<location filename="../dialog/mainwindow.cpp" line="2204"/>
|
||||||
<source>ChooseExportFile</source>
|
<source>ChooseExportFile</source>
|
||||||
<translation>请选择导出文件路径:</translation>
|
<translation>请选择导出文件路径:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2023"/>
|
<location filename="../dialog/mainwindow.cpp" line="2243"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2048"/>
|
<location filename="../dialog/mainwindow.cpp" line="2268"/>
|
||||||
<source>SaveSuccessfully</source>
|
<source>SaveSuccessfully</source>
|
||||||
<translation>保存成功!</translation>
|
<translation>保存成功!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2029"/>
|
<location filename="../dialog/mainwindow.cpp" line="2249"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2054"/>
|
<location filename="../dialog/mainwindow.cpp" line="2274"/>
|
||||||
<source>SaveUnSuccessfully</source>
|
<source>SaveUnSuccessfully</source>
|
||||||
<translation>保存失败</translation>
|
<translation>保存失败</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2041"/>
|
<location filename="../dialog/mainwindow.cpp" line="2261"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2232"/>
|
<location filename="../dialog/mainwindow.cpp" line="2452"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2743"/>
|
<location filename="../dialog/mainwindow.cpp" line="2944"/>
|
||||||
<source>ChooseSaveFile</source>
|
<source>ChooseSaveFile</source>
|
||||||
<translation>请选择保存文件路径:</translation>
|
<translation>请选择保存文件路径:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2126"/>
|
<location filename="../dialog/mainwindow.cpp" line="2346"/>
|
||||||
<source>FindFininish</source>
|
<source>FindFininish</source>
|
||||||
<translation>查找结果完毕!</translation>
|
<translation>查找结果完毕!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2243"/>
|
<location filename="../dialog/mainwindow.cpp" line="2463"/>
|
||||||
<source>SaveSelError</source>
|
<source>SaveSelError</source>
|
||||||
<translation>保存选区字节失败,因文件不具有可写权限!</translation>
|
<translation>保存选区字节失败,因文件不具有可写权限!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2255"/>
|
<location filename="../dialog/mainwindow.cpp" line="2476"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2274"/>
|
<location filename="../dialog/mainwindow.cpp" line="2496"/>
|
||||||
<source>Addr : 0x%1</source>
|
<source>Addr : 0x%1</source>
|
||||||
<translation>地址:0x%1</translation>
|
<translation>地址:0x%1</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2447"/>
|
<location filename="../dialog/mainwindow.cpp" line="2669"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2474"/>
|
<location filename="../dialog/mainwindow.cpp" line="2696"/>
|
||||||
<source>NoSelection</source>
|
<source>NoSelection</source>
|
||||||
<translation>没有选区,无法继续的操作!</translation>
|
<translation>没有选区,无法继续的操作!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2557"/>
|
<location filename="../dialog/mainwindow.cpp" line="2767"/>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2565"/>
|
<location filename="../dialog/mainwindow.cpp" line="2775"/>
|
||||||
<source>InputComment</source>
|
<source>InputComment</source>
|
||||||
<translation>请输入评语:</translation>
|
<translation>请输入评语:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2682"/>
|
<location filename="../dialog/mainwindow.cpp" line="2883"/>
|
||||||
<source>PleaseInputFill</source>
|
<source>PleaseInputFill</source>
|
||||||
<translation>请输入填充字节值</translation>
|
<translation>请输入填充字节值</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/mainwindow.cpp" line="2694"/>
|
<location filename="../dialog/mainwindow.cpp" line="2895"/>
|
||||||
<source>FillInputError</source>
|
<source>FillInputError</source>
|
||||||
<translation>填充字节输入错误</translation>
|
<translation>填充字节输入错误</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -913,40 +910,76 @@
|
||||||
<context>
|
<context>
|
||||||
<name>PluginWindow</name>
|
<name>PluginWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/pluginwindow.cpp" line="8"/>
|
<location filename="../dialog/pluginwindow.cpp" line="11"/>
|
||||||
<source>plugin</source>
|
<source>plugin</source>
|
||||||
<translation>插件</translation>
|
<translation>插件</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/pluginwindow.cpp" line="33"/>
|
<location filename="../dialog/pluginwindow.cpp" line="25"/>
|
||||||
|
<source>Refresh</source>
|
||||||
|
<translation>刷新</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../dialog/pluginwindow.cpp" line="45"/>
|
||||||
|
<source>CtlPlg</source>
|
||||||
|
<translation>获取控制插件名</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../dialog/pluginwindow.cpp" line="46"/>
|
||||||
|
<source>CtlPlgPuid</source>
|
||||||
|
<translation>获取控制插件标识符</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../dialog/pluginwindow.cpp" line="47"/>
|
||||||
|
<source>CtlPlgAuthor</source>
|
||||||
|
<translation>获取控制插件作者</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../dialog/pluginwindow.cpp" line="48"/>
|
||||||
|
<location filename="../dialog/pluginwindow.cpp" line="73"/>
|
||||||
|
<source>ControlTimeout</source>
|
||||||
|
<translation>控制超时</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../dialog/pluginwindow.cpp" line="51"/>
|
||||||
|
<source>NoPlgControl</source>
|
||||||
|
<translation>暂无获取控制的插件……</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../dialog/pluginwindow.cpp" line="60"/>
|
||||||
<source>pluginName</source>
|
<source>pluginName</source>
|
||||||
<translation>插件名</translation>
|
<translation>插件名</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/pluginwindow.cpp" line="34"/>
|
<location filename="../dialog/pluginwindow.cpp" line="61"/>
|
||||||
<source>pluginAuthor</source>
|
<source>pluginAuthor</source>
|
||||||
<translation>插件作者</translation>
|
<translation>插件作者</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/pluginwindow.cpp" line="35"/>
|
<location filename="../dialog/pluginwindow.cpp" line="62"/>
|
||||||
<source>pluginVersion</source>
|
<source>pluginVersion</source>
|
||||||
<translation>插件版本</translation>
|
<translation>插件版本</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/pluginwindow.cpp" line="36"/>
|
<location filename="../dialog/pluginwindow.cpp" line="63"/>
|
||||||
<source>pluginComment</source>
|
<source>pluginComment</source>
|
||||||
<translation>插件说明</translation>
|
<translation>插件说明</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/pluginwindow.cpp" line="37"/>
|
<location filename="../dialog/pluginwindow.cpp" line="64"/>
|
||||||
<source>PUID</source>
|
<source>PUID</source>
|
||||||
<translation>插件 ID</translation>
|
<translation>插件 ID</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../dialog/pluginwindow.cpp" line="39"/>
|
<location filename="../dialog/pluginwindow.cpp" line="66"/>
|
||||||
<source>optionalInfos</source>
|
<source>optionalInfos</source>
|
||||||
<translation>附加信息</translation>
|
<translation>附加信息</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../dialog/pluginwindow.cpp" line="72"/>
|
||||||
|
<source>HasControl</source>
|
||||||
|
<translation>是否获取控制</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>QObject</name>
|
<name>QObject</name>
|
||||||
|
|
|
@ -291,10 +291,18 @@ signals:
|
||||||
};
|
};
|
||||||
} // namespace WingPlugin
|
} // namespace WingPlugin
|
||||||
|
|
||||||
|
struct WingPluginInfo {
|
||||||
|
QString pluginName;
|
||||||
|
QString pluginAuthor;
|
||||||
|
uint pluginVersion;
|
||||||
|
QString puid;
|
||||||
|
QString pluginComment;
|
||||||
|
};
|
||||||
|
|
||||||
class IWingPlugin : public QObject {
|
class IWingPlugin : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
virtual bool init(QList<IWingPlugin *> loadedplugins) = 0;
|
virtual bool init(QList<WingPluginInfo> loadedplugin) = 0;
|
||||||
virtual ~IWingPlugin() {}
|
virtual ~IWingPlugin() {}
|
||||||
virtual void unload() = 0;
|
virtual void unload() = 0;
|
||||||
virtual QMenu *registerMenu() = 0;
|
virtual QMenu *registerMenu() = 0;
|
||||||
|
|
|
@ -44,6 +44,7 @@ void PluginSystem::loadPlugin(QFileInfo fileinfo) {
|
||||||
QPluginLoader loader(fileinfo.absoluteFilePath());
|
QPluginLoader loader(fileinfo.absoluteFilePath());
|
||||||
logger->logMessage(
|
logger->logMessage(
|
||||||
INFOLOG(QString(">> ") + tr("LoadingPlugin") + fileinfo.fileName()));
|
INFOLOG(QString(">> ") + tr("LoadingPlugin") + fileinfo.fileName()));
|
||||||
|
QList<WingPluginInfo> loadedplginfos;
|
||||||
auto p = qobject_cast<IWingPlugin *>(loader.instance());
|
auto p = qobject_cast<IWingPlugin *>(loader.instance());
|
||||||
if (p) {
|
if (p) {
|
||||||
if (p->signature() != WINGSUMMER) {
|
if (p->signature() != WINGSUMMER) {
|
||||||
|
@ -70,8 +71,16 @@ void PluginSystem::loadPlugin(QFileInfo fileinfo) {
|
||||||
|
|
||||||
emit p->plugin2MessagePipe(WingPluginMessage::PluginLoading, emptyparam);
|
emit p->plugin2MessagePipe(WingPluginMessage::PluginLoading, emptyparam);
|
||||||
|
|
||||||
p->init(loadedplgs);
|
p->init(loadedplginfos);
|
||||||
|
|
||||||
|
WingPluginInfo info;
|
||||||
|
info.puid = p->puid();
|
||||||
|
info.pluginName = p->pluginName();
|
||||||
|
info.pluginAuthor = p->pluginAuthor();
|
||||||
|
info.pluginComment = p->pluginComment();
|
||||||
|
info.pluginVersion = p->pluginVersion();
|
||||||
|
|
||||||
|
loadedplginfos.push_back(info);
|
||||||
loadedplgs.push_back(p);
|
loadedplgs.push_back(p);
|
||||||
loadedpuid << puid;
|
loadedpuid << puid;
|
||||||
|
|
||||||
|
@ -177,3 +186,11 @@ void PluginSystem::initControl(IWingPlugin *plugin) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PluginSystem::hasControl() { return curpluginctl != nullptr; }
|
bool PluginSystem::hasControl() { return curpluginctl != nullptr; }
|
||||||
|
|
||||||
|
IWingPlugin *PluginSystem::currentControlPlugin() { return curpluginctl; }
|
||||||
|
|
||||||
|
bool PluginSystem::currentControlTimeout() {
|
||||||
|
if (hasControl())
|
||||||
|
return plugintimeout[curpluginctl];
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
|
@ -27,9 +27,10 @@ public:
|
||||||
bool requestRelease(IWingPlugin *plugin);
|
bool requestRelease(IWingPlugin *plugin);
|
||||||
bool hasControl();
|
bool hasControl();
|
||||||
void resetTimeout(IWingPlugin *plugin);
|
void resetTimeout(IWingPlugin *plugin);
|
||||||
|
|
||||||
void initControl(IWingPlugin *plugin);
|
void initControl(IWingPlugin *plugin);
|
||||||
void loadPlugin(QFileInfo filename);
|
void loadPlugin(QFileInfo filename);
|
||||||
|
IWingPlugin *currentControlPlugin();
|
||||||
|
bool currentControlTimeout();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const QList<QVariant> emptyparam;
|
const QList<QVariant> emptyparam;
|
||||||
|
|
Loading…
Reference in New Issue