feat: 增强十六进制编辑区拓展插件;
This commit is contained in:
parent
0ba470c858
commit
af15ffc8aa
|
@ -111,6 +111,19 @@ void QHexRenderer::renderFrame(QPainter *painter) {
|
|||
painter->drawLine(endx, rect.top(), endx, rect.bottom());
|
||||
}
|
||||
|
||||
void QHexRenderer::renderAdditonalFrame(QPainter *painter, bool top,
|
||||
bool left) {
|
||||
QRect rect = painter->window();
|
||||
int endx = this->getEndColumnX();
|
||||
painter->setPen(m_borderColor);
|
||||
if (top) {
|
||||
painter->drawLine(0, 0, endx, 0);
|
||||
}
|
||||
if (left) {
|
||||
painter->drawLine(0, 0, 0, rect.bottom());
|
||||
}
|
||||
}
|
||||
|
||||
// modified by wingsummer
|
||||
void QHexRenderer::render(QPainter *painter, qsizetype begin, qsizetype end,
|
||||
qsizetype firstline) {
|
||||
|
|
|
@ -43,6 +43,7 @@ public:
|
|||
const QFontMetricsF &fontmetrics,
|
||||
QObject *parent = nullptr);
|
||||
void renderFrame(QPainter *painter);
|
||||
void renderAdditonalFrame(QPainter *painter, bool top, bool left);
|
||||
void render(QPainter *painter, qsizetype start, qsizetype end,
|
||||
qsizetype firstline); // begin included, end excluded
|
||||
void updateMetrics(const QFontMetricsF &fm);
|
||||
|
|
|
@ -325,10 +325,17 @@ void QHexView::keyPressEvent(QKeyEvent *e) {
|
|||
QPoint QHexView::absolutePosition(const QPoint &pos) const {
|
||||
auto margins = viewport()->contentsMargins();
|
||||
QPoint shift(horizontalScrollBar()->value() - margins.left(),
|
||||
-margins.top() * m_renderer->lineHeight());
|
||||
-margins.top());
|
||||
return pos + shift;
|
||||
}
|
||||
|
||||
bool QHexView::disableInternalPaint() const { return m_disableInternalPaint; }
|
||||
|
||||
void QHexView::setDisableInternalPaint(bool newDisableInternalPaint) {
|
||||
m_disableInternalPaint = newDisableInternalPaint;
|
||||
update();
|
||||
}
|
||||
|
||||
QHexCursor *QHexView::cursor() const { return m_cursor; }
|
||||
|
||||
qsizetype QHexView::copyLimit() const { return m_copylimit; }
|
||||
|
@ -786,9 +793,9 @@ void QHexView::paintEvent(QPaintEvent *e) {
|
|||
|
||||
// these are lines from the point of view of the visible rect
|
||||
// where the first "headerCount" are taken by the header
|
||||
const int first = (r.top() / lineHeight); // included
|
||||
const int first = (r.top() - m.top()) / lineHeight; // included
|
||||
const int lastPlusOne =
|
||||
(r.bottom() / lineHeight) + 1 - m.top() - m.bottom(); // excluded
|
||||
((r.bottom() - m.top() - m.bottom()) / lineHeight) + 1; // excluded
|
||||
|
||||
// compute document lines, adding firstVisible and removing the header
|
||||
// the max is necessary if the rect covers the header
|
||||
|
@ -796,12 +803,15 @@ void QHexView::paintEvent(QPaintEvent *e) {
|
|||
const qsizetype end = firstVisible + std::max(lastPlusOne - headerCount, 0);
|
||||
|
||||
Q_EMIT onPaintCustomEventBegin();
|
||||
painter.save();
|
||||
auto xOff = this->horizontalScrollBar()->value();
|
||||
painter.translate(-xOff + m.left(), m.top() * m_renderer->lineHeight());
|
||||
if (Q_LIKELY(!m_disableInternalPaint)) {
|
||||
painter.save();
|
||||
painter.translate(-xOff + m.left(), m.top());
|
||||
m_renderer->render(&painter, begin, end, firstVisible);
|
||||
m_renderer->renderFrame(&painter);
|
||||
m_renderer->renderAdditonalFrame(&painter, m.top() > 0, m.left() > 0);
|
||||
painter.restore();
|
||||
}
|
||||
Q_EMIT onPaintCustomEvent(xOff, firstVisible, begin, end);
|
||||
}
|
||||
|
||||
|
@ -1184,7 +1194,6 @@ void QHexView::adjustScrollBars() {
|
|||
|
||||
auto docLines = m_renderer->documentLines();
|
||||
auto visLines = this->visibleLines();
|
||||
auto margins = viewport()->contentsMargins();
|
||||
|
||||
// modified by wingsummer,fix the scrollbar bug
|
||||
if (docLines > visLines && !m_document->isEmpty()) {
|
||||
|
@ -1200,6 +1209,7 @@ void QHexView::adjustScrollBars() {
|
|||
QScrollBar *hscrollbar = this->horizontalScrollBar();
|
||||
int documentWidth = m_renderer->documentWidth();
|
||||
int viewportWidth = viewport()->width();
|
||||
auto margins = viewport()->contentsMargins();
|
||||
|
||||
if (documentWidth > viewportWidth) {
|
||||
this->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
||||
|
@ -1231,9 +1241,10 @@ qsizetype QHexView::lastVisibleLine() const {
|
|||
|
||||
qsizetype QHexView::visibleLines() const {
|
||||
auto margins = viewport()->contentsMargins();
|
||||
auto visLines = qsizetype(std::ceil(
|
||||
this->height() / m_renderer->lineHeight() -
|
||||
m_renderer->headerLineCount() - margins.top() - margins.bottom()));
|
||||
auto visLines = qsizetype(
|
||||
std::ceil((this->height() - margins.top() - margins.bottom()) /
|
||||
m_renderer->lineHeight() -
|
||||
m_renderer->headerLineCount()));
|
||||
return std::min(visLines, m_renderer->documentLines());
|
||||
}
|
||||
|
||||
|
|
|
@ -106,6 +106,9 @@ public:
|
|||
qsizetype copyLimit() const;
|
||||
QHexCursor *cursor() const;
|
||||
|
||||
bool disableInternalPaint() const;
|
||||
void setDisableInternalPaint(bool newDisableInternalPaint);
|
||||
|
||||
public slots:
|
||||
void setDocument(const QSharedPointer<QHexDocument> &document,
|
||||
QHexCursor *cursor = nullptr);
|
||||
|
@ -228,6 +231,7 @@ private:
|
|||
|
||||
qreal m_fontSize;
|
||||
qreal m_scaleRate = 1.0;
|
||||
bool m_disableInternalPaint = false;
|
||||
|
||||
qsizetype m_copylimit = 1; // MB
|
||||
};
|
||||
|
|
|
@ -48,7 +48,6 @@ QMenu *TestHexExt::registeredHexContextMenu() const { return m_context; }
|
|||
|
||||
QList<WingHex::WingRibbonToolBoxInfo>
|
||||
TestHexExt::registeredRibbonTools() const {
|
||||
// TODO
|
||||
return {};
|
||||
}
|
||||
|
||||
|
@ -60,8 +59,10 @@ QMargins TestHexExt::contentMargins(WingHex::HexEditorContext *context) const {
|
|||
auto str = QString::number(lines);
|
||||
auto fm = context->fontMetrics();
|
||||
constexpr auto padding = 4;
|
||||
auto len = fm.horizontalAdvance(str) + padding;
|
||||
return {int(len), 0, 0, 1};
|
||||
auto header = QStringLiteral("Line");
|
||||
auto minLen = fm.horizontalAdvance(header) + padding;
|
||||
auto colLen = qMax(fm.horizontalAdvance(str) + padding, minLen);
|
||||
return {int(colLen) + 1, 0, 0, 0};
|
||||
}
|
||||
|
||||
void TestHexExt::onPaintEvent(QPainter *painter, const QWidget *w,
|
||||
|
@ -90,7 +91,6 @@ void TestHexExt::onPaintEvent(QPainter *painter, const QWidget *w,
|
|||
painter->restore();
|
||||
context->renderHexBackground(painter, {0, 0}, colLen);
|
||||
}
|
||||
painter->drawLine(colLen, 0, colLen, w->height());
|
||||
|
||||
// draw Line Numbers
|
||||
painter->setPen(context->addressColor());
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 19604dfffe05008c22f3ec77b7d09f6525836ed9
|
||||
Subproject commit fad774858664d6a137c21b0c2af73ca209cc2f47
|
|
@ -450,72 +450,72 @@
|
|||
<context>
|
||||
<name>EditorView</name>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="116"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="119"/>
|
||||
<source>Cut</source>
|
||||
<translation>剪切</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="118"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="121"/>
|
||||
<source>CutHex</source>
|
||||
<translation>剪切(十六进制)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="120"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="123"/>
|
||||
<source>Copy</source>
|
||||
<translation>复制</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="122"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="125"/>
|
||||
<source>CopyHex</source>
|
||||
<translation>复制(十六进制)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="124"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="127"/>
|
||||
<source>Paste</source>
|
||||
<translation>粘贴</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="126"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="129"/>
|
||||
<source>PasteHex</source>
|
||||
<translation>粘贴(十六进制)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="128"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="131"/>
|
||||
<source>Delete</source>
|
||||
<translation>删除</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="131"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="134"/>
|
||||
<source>Find</source>
|
||||
<translation>查找</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="133"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="136"/>
|
||||
<source>Goto</source>
|
||||
<translation>跳转</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="135"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="138"/>
|
||||
<source>Fill</source>
|
||||
<translation>填充</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="137"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="140"/>
|
||||
<source>MetaData</source>
|
||||
<translation>标注</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="139"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="142"/>
|
||||
<source>BookMark</source>
|
||||
<translation>书签</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="333"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="336"/>
|
||||
<source>Untitled</source>
|
||||
<translation>未命名</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="917"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="920"/>
|
||||
<source>Not allowed operation in non-UI thread</source>
|
||||
<translation>该操作在非 UI 线程非法</translation>
|
||||
</message>
|
||||
|
@ -2298,7 +2298,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.ui" line="81"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="282"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="280"/>
|
||||
<source>PluginInfo</source>
|
||||
<translation>插件信息</translation>
|
||||
</message>
|
||||
|
@ -2315,7 +2315,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.ui" line="146"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="290"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="288"/>
|
||||
<source>DevExtInfo</source>
|
||||
<translation>设备插件信息</translation>
|
||||
</message>
|
||||
|
@ -2341,88 +2341,88 @@
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="322"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="320"/>
|
||||
<source>Plugin</source>
|
||||
<translation>插件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="449"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="447"/>
|
||||
<source>ID</source>
|
||||
<translation>ID</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="447"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="445"/>
|
||||
<source>Name</source>
|
||||
<translation>名称</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="450"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="448"/>
|
||||
<source>License</source>
|
||||
<translation>协议</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="451"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="449"/>
|
||||
<source>Author</source>
|
||||
<translation>作者</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="452"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="450"/>
|
||||
<source>Vendor</source>
|
||||
<translation>厂家</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="454"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="465"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="452"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="463"/>
|
||||
<source>Version</source>
|
||||
<translation>版本</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="370"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="368"/>
|
||||
<source>SelectAll</source>
|
||||
<translation type="unfinished">全选</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="351"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="349"/>
|
||||
<source>SelectEnable</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="359"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="357"/>
|
||||
<source>SelectDisable</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="371"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="369"/>
|
||||
<source>SelectClear</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="375"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="373"/>
|
||||
<source>DiscardChanges</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="460"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="458"/>
|
||||
<source>Dependencies</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="462"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="460"/>
|
||||
<source>PUID</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="471"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="469"/>
|
||||
<source>Comment</source>
|
||||
<translation>说明</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="474"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="472"/>
|
||||
<source>NoPluginLoaded</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="456"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="454"/>
|
||||
<source>URL</source>
|
||||
<translation>网址</translation>
|
||||
</message>
|
||||
|
@ -2430,187 +2430,186 @@
|
|||
<context>
|
||||
<name>PluginSystem</name>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3239"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3327"/>
|
||||
<source>LoadingPlugin</source>
|
||||
<translation>加载插件中:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3257"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3862"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3939"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3345"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3950"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4027"/>
|
||||
<source>InvalidPluginBrokenInfo</source>
|
||||
<translation>加载插件失败:损坏的插件数据</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3285"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4469"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4557"/>
|
||||
<source>PluginBlockByManager</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3691"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3779"/>
|
||||
<source>AppClosingCanceled:</source>
|
||||
<translation>程序关闭被取消:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3777"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3865"/>
|
||||
<source>- PluginID:</source>
|
||||
<translation>- 插件 ID:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3799"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3887"/>
|
||||
<source>FoundDrvPluginCount</source>
|
||||
<translation>总计发现设备拓展插件数目:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3840"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3928"/>
|
||||
<source>PluginManagerNeedSingleton</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3270"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3856"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3933"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3358"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3944"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4021"/>
|
||||
<source>ErrLoadPluginSDKVersion</source>
|
||||
<translation>插件加载失败:非法插件 SDK 版本!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4095"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4183"/>
|
||||
<source>ErrLoadPluginNoName</source>
|
||||
<translation>插件加载失败:非法插件名称!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3886"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3963"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4116"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3974"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4051"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4204"/>
|
||||
<source>ErrLoadInitPlugin</source>
|
||||
<translation>插件加载失败:初始化插件失败!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3916"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4004"/>
|
||||
<source>HexExtNeedSingleton</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4125"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4213"/>
|
||||
<source>PluginName :</source>
|
||||
<translation>插件名:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4126"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4214"/>
|
||||
<source>PluginAuthor :</source>
|
||||
<translation>插件作者:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4127"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4215"/>
|
||||
<source>PluginWidgetRegister</source>
|
||||
<translation>注册插件对象中……</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4167"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4255"/>
|
||||
<source>ExtPluginAuthor :</source>
|
||||
<translation>设备拓展插件作者:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4168"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4256"/>
|
||||
<source>ExtPluginWidgetRegister</source>
|
||||
<translation>设备拓展注册插件对象中……</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4184"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4272"/>
|
||||
<source>ErrLoadInitExtPlugin</source>
|
||||
<translation>设备拓展插件加载失败:初始化插件失败!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4207"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4295"/>
|
||||
<source>ChooseFile</source>
|
||||
<translation>选择文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4214"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4219"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4302"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4307"/>
|
||||
<source>Error</source>
|
||||
<translation>错误</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4215"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4303"/>
|
||||
<source>FileNotExist</source>
|
||||
<translation>文件不存在!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4220"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4308"/>
|
||||
<source>FilePermission</source>
|
||||
<translation>因文件权限无法继续!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4250"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4338"/>
|
||||
<source>EmptyNameDockWidget:</source>
|
||||
<translation>空的贴边组件名:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4260"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4348"/>
|
||||
<source>InvalidNameDockWidget:</source>
|
||||
<translation>无效贴边组件名:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4268"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4356"/>
|
||||
<source>InvalidNullDockWidget:</source>
|
||||
<translation>无效空贴边组件:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4381"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4469"/>
|
||||
<source>Not allowed operation in non-UI thread</source>
|
||||
<translation>该操作在非 UI 线程非法</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="1487"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="1571"/>
|
||||
<source>UnexpectedUndoCmdPushDetected</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3825"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3913"/>
|
||||
<source>UnsafePluginDir</source>
|
||||
<translation>不安全的插件目录,请将插件目录设置为仅管理员账户可写</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3264"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3859"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3936"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3352"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3947"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4024"/>
|
||||
<source>InvalidPluginID</source>
|
||||
<translation>加载插件失败:非法插件标识符</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3267"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3355"/>
|
||||
<source>InvalidDupPlugin</source>
|
||||
<translation>加载插件失败:重复的插件标识符</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3742"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3830"/>
|
||||
<source>FoundPluginCount</source>
|
||||
<translation>总计发现插件数目:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3773"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3861"/>
|
||||
<source>PluginLoadingFailedSummary</source>
|
||||
<translation>有依赖插件加载失败总结</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3778"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3866"/>
|
||||
<source>- Dependencies:</source>
|
||||
<translation>- 依赖:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3780"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3868"/>
|
||||
<source>PUID:</source>
|
||||
<translation>插件唯一标志符:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3781"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3869"/>
|
||||
<source>Version:</source>
|
||||
<translation>版本:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3788"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3876"/>
|
||||
<source>PluginLoadingFinished</source>
|
||||
<translation>加载插件完毕!</translation>
|
||||
</message>
|
||||
|
@ -5452,15 +5451,6 @@
|
|||
<translation>纯文本</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>WingAngel</name>
|
||||
<message>
|
||||
<location filename="../../src/class/wingangel.cpp" line="242"/>
|
||||
<location filename="../../src/class/wingangel.cpp" line="284"/>
|
||||
<source>RegisterScriptFnUnSupportedTypes:</source>
|
||||
<translation type="unfinished">因脚本函数含有未支持的类型而注册失败:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>WingAngelAPI</name>
|
||||
<message>
|
||||
|
|
|
@ -450,72 +450,72 @@
|
|||
<context>
|
||||
<name>EditorView</name>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="116"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="119"/>
|
||||
<source>Cut</source>
|
||||
<translation>剪切</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="118"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="121"/>
|
||||
<source>CutHex</source>
|
||||
<translation>剪切(十六進制)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="120"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="123"/>
|
||||
<source>Copy</source>
|
||||
<translation>複製</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="122"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="125"/>
|
||||
<source>CopyHex</source>
|
||||
<translation>複製(十六進制)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="124"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="127"/>
|
||||
<source>Paste</source>
|
||||
<translation>粘貼</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="126"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="129"/>
|
||||
<source>PasteHex</source>
|
||||
<translation>粘貼(十六進制)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="128"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="131"/>
|
||||
<source>Delete</source>
|
||||
<translation>刪除</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="131"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="134"/>
|
||||
<source>Find</source>
|
||||
<translation>查找</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="133"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="136"/>
|
||||
<source>Goto</source>
|
||||
<translation>跳轉</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="135"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="138"/>
|
||||
<source>Fill</source>
|
||||
<translation>填充</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="137"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="140"/>
|
||||
<source>MetaData</source>
|
||||
<translation>標注</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="139"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="142"/>
|
||||
<source>BookMark</source>
|
||||
<translation>書簽</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="333"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="336"/>
|
||||
<source>Untitled</source>
|
||||
<translation>未命名</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/control/editorview.cpp" line="917"/>
|
||||
<location filename="../../src/control/editorview.cpp" line="920"/>
|
||||
<source>Not allowed operation in non-UI thread</source>
|
||||
<translation>該操作在非 UI 線程非法</translation>
|
||||
</message>
|
||||
|
@ -2298,7 +2298,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.ui" line="81"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="282"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="280"/>
|
||||
<source>PluginInfo</source>
|
||||
<translation>插件資訊</translation>
|
||||
</message>
|
||||
|
@ -2315,7 +2315,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.ui" line="146"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="290"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="288"/>
|
||||
<source>DevExtInfo</source>
|
||||
<translation>設備插件資訊</translation>
|
||||
</message>
|
||||
|
@ -2341,88 +2341,88 @@
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="322"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="320"/>
|
||||
<source>Plugin</source>
|
||||
<translation>插件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="449"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="447"/>
|
||||
<source>ID</source>
|
||||
<translation>ID</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="447"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="445"/>
|
||||
<source>Name</source>
|
||||
<translation>名稱</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="450"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="448"/>
|
||||
<source>License</source>
|
||||
<translation>協議</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="451"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="449"/>
|
||||
<source>Author</source>
|
||||
<translation>作者</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="452"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="450"/>
|
||||
<source>Vendor</source>
|
||||
<translation>廠家</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="454"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="465"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="452"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="463"/>
|
||||
<source>Version</source>
|
||||
<translation>版本</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="370"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="368"/>
|
||||
<source>SelectAll</source>
|
||||
<translation type="unfinished">全選</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="351"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="349"/>
|
||||
<source>SelectEnable</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="359"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="357"/>
|
||||
<source>SelectDisable</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="371"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="369"/>
|
||||
<source>SelectClear</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="375"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="373"/>
|
||||
<source>DiscardChanges</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="460"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="458"/>
|
||||
<source>Dependencies</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="462"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="460"/>
|
||||
<source>PUID</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="471"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="469"/>
|
||||
<source>Comment</source>
|
||||
<translation>說明</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="474"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="472"/>
|
||||
<source>NoPluginLoaded</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="456"/>
|
||||
<location filename="../../src/settings/pluginsettingdialog.cpp" line="454"/>
|
||||
<source>URL</source>
|
||||
<translation>網址</translation>
|
||||
</message>
|
||||
|
@ -2430,187 +2430,186 @@
|
|||
<context>
|
||||
<name>PluginSystem</name>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3239"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3327"/>
|
||||
<source>LoadingPlugin</source>
|
||||
<translation>加載插件中:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3257"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3862"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3939"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3345"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3950"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4027"/>
|
||||
<source>InvalidPluginBrokenInfo</source>
|
||||
<translation>加載插件失敗:損壞的插件數據</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3285"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4469"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4557"/>
|
||||
<source>PluginBlockByManager</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3691"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3779"/>
|
||||
<source>AppClosingCanceled:</source>
|
||||
<translation>程式關閉被取消:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3777"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3865"/>
|
||||
<source>- PluginID:</source>
|
||||
<translation>- 插件 ID:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3799"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3887"/>
|
||||
<source>FoundDrvPluginCount</source>
|
||||
<translation>總計發現設備拓展插件數目:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3840"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3928"/>
|
||||
<source>PluginManagerNeedSingleton</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3270"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3856"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3933"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3358"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3944"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4021"/>
|
||||
<source>ErrLoadPluginSDKVersion</source>
|
||||
<translation>插件加載失敗:非法插件 SDK 版本!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4095"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4183"/>
|
||||
<source>ErrLoadPluginNoName</source>
|
||||
<translation>插件加載失敗:非法插件名稱!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3886"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3963"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4116"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3974"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4051"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4204"/>
|
||||
<source>ErrLoadInitPlugin</source>
|
||||
<translation>插件加載失敗:初始化插件失敗!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3916"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4004"/>
|
||||
<source>HexExtNeedSingleton</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4125"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4213"/>
|
||||
<source>PluginName :</source>
|
||||
<translation>插件名:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4126"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4214"/>
|
||||
<source>PluginAuthor :</source>
|
||||
<translation>插件作者:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4127"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4215"/>
|
||||
<source>PluginWidgetRegister</source>
|
||||
<translation>註冊插件對象中……</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4167"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4255"/>
|
||||
<source>ExtPluginAuthor :</source>
|
||||
<translation>設備拓展插件作者:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4168"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4256"/>
|
||||
<source>ExtPluginWidgetRegister</source>
|
||||
<translation>設備拓展註冊插件對象中……</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4184"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4272"/>
|
||||
<source>ErrLoadInitExtPlugin</source>
|
||||
<translation>設備拓展插件加載失敗:初始化插件失敗!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4207"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4295"/>
|
||||
<source>ChooseFile</source>
|
||||
<translation>選擇檔</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4214"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4219"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4302"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4307"/>
|
||||
<source>Error</source>
|
||||
<translation>錯誤</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4215"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4303"/>
|
||||
<source>FileNotExist</source>
|
||||
<translation>檔不存在!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4220"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4308"/>
|
||||
<source>FilePermission</source>
|
||||
<translation>因檔許可權無法繼續!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4250"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4338"/>
|
||||
<source>EmptyNameDockWidget:</source>
|
||||
<translation>空的貼邊組件名:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4260"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4348"/>
|
||||
<source>InvalidNameDockWidget:</source>
|
||||
<translation>無效貼邊組件名:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4268"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4356"/>
|
||||
<source>InvalidNullDockWidget:</source>
|
||||
<translation>無效空貼邊組件:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4381"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4469"/>
|
||||
<source>Not allowed operation in non-UI thread</source>
|
||||
<translation>該操作在非 UI 線程非法</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="1487"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="1571"/>
|
||||
<source>UnexpectedUndoCmdPushDetected</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3825"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3913"/>
|
||||
<source>UnsafePluginDir</source>
|
||||
<translation>不安全的插件目錄,請將插件目錄設置為僅管理員帳戶可寫</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3264"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3859"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3936"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3352"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3947"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="4024"/>
|
||||
<source>InvalidPluginID</source>
|
||||
<translation>加載插件失敗:非法插件識別字</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3267"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3355"/>
|
||||
<source>InvalidDupPlugin</source>
|
||||
<translation>加載插件失敗:重複的插件識別字</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3742"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3830"/>
|
||||
<source>FoundPluginCount</source>
|
||||
<translation>總計發現插件數目:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3773"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3861"/>
|
||||
<source>PluginLoadingFailedSummary</source>
|
||||
<translation>有依賴插件加載失敗總結</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3778"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3866"/>
|
||||
<source>- Dependencies:</source>
|
||||
<translation>- 依賴:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3780"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3868"/>
|
||||
<source>PUID:</source>
|
||||
<translation>插件唯一標誌符:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3781"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3869"/>
|
||||
<source>Version:</source>
|
||||
<translation>版本:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3788"/>
|
||||
<location filename="../../src/class/pluginsystem.cpp" line="3876"/>
|
||||
<source>PluginLoadingFinished</source>
|
||||
<translation>加載插件完畢!</translation>
|
||||
</message>
|
||||
|
@ -5452,15 +5451,6 @@
|
|||
<translation>純文字</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>WingAngel</name>
|
||||
<message>
|
||||
<location filename="../../src/class/wingangel.cpp" line="242"/>
|
||||
<location filename="../../src/class/wingangel.cpp" line="284"/>
|
||||
<source>RegisterScriptFnUnSupportedTypes:</source>
|
||||
<translation type="unfinished">因腳本函數含有未支持的類型而註冊失敗:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>WingAngelAPI</name>
|
||||
<message>
|
||||
|
|
|
@ -953,7 +953,7 @@ void AsPreprocesser::overwriteCode(QByteArray &modifiedScript, int start,
|
|||
|
||||
int AsPreprocesser::getLineCount(const QByteArray &modifiedScript,
|
||||
int pos) const {
|
||||
pos = qBound(0, pos, int(modifiedScript.size()));
|
||||
pos = qBound(0, pos, qsizetype(modifiedScript.size()));
|
||||
return std::count_if(modifiedScript.begin(),
|
||||
std::next(modifiedScript.begin(), pos),
|
||||
[](char ch) -> bool { return ch == '\n'; }) +
|
||||
|
|
|
@ -513,14 +513,66 @@ bool PluginSystem::invokeServiceImpl(const QObject *sender, const QString &puid,
|
|||
return false;
|
||||
}
|
||||
|
||||
auto r =
|
||||
std::find_if(_loadedplgs.begin(), _loadedplgs.end(),
|
||||
[=](IWingPlugin *plg) { return getPUID(plg) == puid; });
|
||||
QObject *obj = nullptr;
|
||||
if (puid.compare(QStringLiteral("[MAN]"), Qt::CaseInsensitive) == 0) {
|
||||
obj = _manager;
|
||||
} else if (puid.compare(QStringLiteral("[HEXE]"), Qt::CaseInsensitive) ==
|
||||
0) {
|
||||
obj = _hexExt;
|
||||
} else {
|
||||
QString rpuid;
|
||||
auto question = puid.indexOf('?');
|
||||
enum { None, MustPlugin, MustExt } State = None;
|
||||
|
||||
if (question >= 0) {
|
||||
rpuid = puid.sliced(0, question);
|
||||
auto equest = puid.sliced(question + 1);
|
||||
if (equest.compare(QStringLiteral("[PLG]"))) {
|
||||
State = MustPlugin;
|
||||
} else if (equest.compare(QStringLiteral("[EXT]"))) {
|
||||
State = MustExt;
|
||||
} else {
|
||||
// warn and ignored
|
||||
Logger::warning(
|
||||
QStringLiteral("[PluginSystem::invokeServiceImpl] Cannot "
|
||||
"parsing filter: '%1'")
|
||||
.arg(equest));
|
||||
}
|
||||
} else {
|
||||
rpuid = puid;
|
||||
State = None;
|
||||
}
|
||||
auto r = std::find_if(
|
||||
_loadedplgs.begin(), _loadedplgs.end(),
|
||||
[=](IWingPlugin *plg) { return getPUID(plg) == rpuid; });
|
||||
|
||||
if (r == _loadedplgs.end()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto obj = *r;
|
||||
auto rc = *r;
|
||||
switch (State) {
|
||||
case None:
|
||||
obj = rc;
|
||||
break;
|
||||
case MustPlugin:
|
||||
if (qobject_cast<IWingPlugin *>(rc)) {
|
||||
obj = rc;
|
||||
}
|
||||
break;
|
||||
case MustExt:
|
||||
if (qobject_cast<IWingDevice *>(rc)) {
|
||||
obj = rc;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (obj == nullptr) {
|
||||
qCritical("[PluginSystem::invokeServiceImpl] Null caller");
|
||||
return false;
|
||||
}
|
||||
|
||||
auto meta = obj->metaObject();
|
||||
|
||||
Qt::ConnectionType c;
|
||||
|
@ -532,6 +584,7 @@ bool PluginSystem::invokeServiceImpl(const QObject *sender, const QString &puid,
|
|||
std::tie(method, c, paramCount, parameters, typeNames, metaTypes) = infos;
|
||||
|
||||
if (parameters == nullptr || typeNames == nullptr || metaTypes == nullptr) {
|
||||
qCritical("[PluginSystem::invokeServiceImpl] Invalid calling info");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -561,6 +614,7 @@ bool PluginSystem::invokeServiceImpl(const QObject *sender, const QString &puid,
|
|||
}
|
||||
|
||||
if (!m.isValid()) {
|
||||
qCritical("[PluginSystem::invokeServiceImpl] Invalid MetaMethod");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -610,7 +664,37 @@ bool PluginSystem::invokeServiceImpl(const QObject *sender, const QString &puid,
|
|||
m, obj, c, nparamCount, nparameters.data(), ntypeNames.data(),
|
||||
nmetaTypes.data());
|
||||
|
||||
// errror report
|
||||
auto cstr = [](QMetaMethodInvoker::InvokeFailReason r) -> const char * {
|
||||
switch (r) {
|
||||
case QMetaMethodInvoker::InvokeFailReason::ReturnTypeMismatch:
|
||||
return "ReturnTypeMismatch";
|
||||
case QMetaMethodInvoker::InvokeFailReason::DeadLockDetected:
|
||||
return "DeadLockDetected";
|
||||
case QMetaMethodInvoker::InvokeFailReason::CallViaVirtualFailed:
|
||||
return "CallViaVirtualFailed";
|
||||
case QMetaMethodInvoker::InvokeFailReason::ConstructorCallOnObject:
|
||||
return "ConstructorCallOnObject";
|
||||
case QMetaMethodInvoker::InvokeFailReason::ConstructorCallWithoutResult:
|
||||
return "ConstructorCallWithoutResult";
|
||||
case QMetaMethodInvoker::InvokeFailReason::ConstructorCallFailed:
|
||||
return "ConstructorCallFailed";
|
||||
case QMetaMethodInvoker::InvokeFailReason::CouldNotQueueParameter:
|
||||
return "CouldNotQueueParameter";
|
||||
case QMetaMethodInvoker::InvokeFailReason::None:
|
||||
return "None";
|
||||
case QMetaMethodInvoker::InvokeFailReason::TooFewArguments:
|
||||
return "TooFewArguments";
|
||||
case QMetaMethodInvoker::InvokeFailReason::FormalParameterMismatch:
|
||||
return "FormalParameterMismatch";
|
||||
break;
|
||||
}
|
||||
return "";
|
||||
};
|
||||
|
||||
if (ret != QMetaMethodInvoker::InvokeFailReason::None) {
|
||||
qCritical("[PluginSystem::invokeServiceImpl] MetaCall failed: %s (%d)",
|
||||
cstr(ret), ret);
|
||||
}
|
||||
|
||||
return ret == QMetaMethodInvoker::InvokeFailReason::None;
|
||||
}
|
||||
|
@ -2612,7 +2696,11 @@ IWingGeneric *PluginSystem::__createParamContext(const QObject *sender,
|
|||
bool PluginSystem::passByFailedGuard(const QObject *sender, const char *func,
|
||||
const QVariantList ¶ms) {
|
||||
if (_manager && sender != _manager) {
|
||||
return !_manager->enterGuard(sender->metaObject(), func, params);
|
||||
auto ret = !_manager->enterGuard(sender->metaObject(), func, params);
|
||||
if (ret) {
|
||||
qCritical("[GuardBlock] '%s' was blocked", func);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -3280,9 +3368,9 @@ std::optional<PluginInfo> PluginSystem::loadPlugin(const QFileInfo &fileinfo,
|
|||
} else if constexpr (std::is_same_v<T, IWingDevice>) {
|
||||
_blkdevs[BlockReason::BlockedByManager].append(m);
|
||||
}
|
||||
Logger::critical(QStringLiteral("{ ") + m.id +
|
||||
QStringLiteral(" } ") +
|
||||
tr("PluginBlockByManager"));
|
||||
qCritical(
|
||||
"[PluginSystem::loadPlugin] '%s' was blocked by manager",
|
||||
qUtf8Printable(m.id));
|
||||
return std::nullopt;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -239,8 +239,10 @@ WingAngel::registerGlobalFunction(uint retMetaType, const ScriptFn &fn,
|
|||
const QVector<QPair<uint, QString>> ¶ms) {
|
||||
auto sig = getScriptFnSig(retMetaType, fn, fnName, params);
|
||||
if (sig.isEmpty()) {
|
||||
Logger::critical(tr("RegisterScriptFnUnSupportedTypes:") + _plgsess +
|
||||
QStringLiteral("::") + fnName);
|
||||
Logger::critical(QStringLiteral("[WingAngel::registerGlobalFunction] "
|
||||
"getScriptFnSig failed (") +
|
||||
_plgsess + QStringLiteral("::") + fnName +
|
||||
QStringLiteral(")"));
|
||||
return WingHex::asRetCodes::asINVALID_ARG;
|
||||
}
|
||||
|
||||
|
@ -250,8 +252,13 @@ WingAngel::registerGlobalFunction(uint retMetaType, const ScriptFn &fn,
|
|||
sig.toUtf8(), asFUNCTION(WingAngelAPI::script_call),
|
||||
asECallConvTypes::asCALL_GENERIC);
|
||||
|
||||
auto minfo = QMetaEnum::fromType<WingHex::asRetCodes>();
|
||||
|
||||
if (ret < 0) {
|
||||
// TODO
|
||||
Logger::critical(
|
||||
QStringLiteral("[WingAngel::registerGlobalFunction] "
|
||||
"RegisterGlobalFunction '%1' failed (%2)")
|
||||
.arg(sig, minfo.valueToKey(ret)));
|
||||
return returnValue(ret);
|
||||
}
|
||||
|
||||
|
@ -264,6 +271,9 @@ WingAngel::registerGlobalFunction(uint retMetaType, const ScriptFn &fn,
|
|||
f->SetUserData(reinterpret_cast<void *>(id),
|
||||
AsUserDataType::UserData_PluginFn);
|
||||
} else {
|
||||
Logger::critical(QStringLiteral("[WingAngel::registerGlobalFunction] "
|
||||
"'%1' GetFunctionById failed")
|
||||
.arg(sig));
|
||||
return WingHex::asRetCodes::asINVALID_ARG;
|
||||
}
|
||||
|
||||
|
@ -281,8 +291,8 @@ WingHex::asRetCodes
|
|||
WingAngel::registerGlobalFunction(const QString &decl,
|
||||
const WingHex::UNSAFE_SCFNPTR &fn) {
|
||||
if (decl.isEmpty()) {
|
||||
Logger::critical(tr("RegisterScriptFnUnSupportedTypes:") + _plgsess +
|
||||
QStringLiteral("::") + decl);
|
||||
Logger::critical(QStringLiteral(
|
||||
"[WingAngel::registerGlobalFunction] Empty declaration"));
|
||||
return WingHex::asRetCodes::asINVALID_ARG;
|
||||
}
|
||||
|
||||
|
@ -292,8 +302,12 @@ WingAngel::registerGlobalFunction(const QString &decl,
|
|||
decl.toUtf8(), asFUNCTION(WingAngelAPI::script_unsafe_call),
|
||||
asECallConvTypes::asCALL_GENERIC);
|
||||
|
||||
auto minfo = QMetaEnum::fromType<WingHex::asRetCodes>();
|
||||
if (ret < 0) {
|
||||
// TODO
|
||||
Logger::critical(
|
||||
QStringLiteral("[WingAngel::registerGlobalFunction] "
|
||||
"RegisterGlobalFunction '%1' failed (%2)")
|
||||
.arg(decl, minfo.valueToKey(ret)));
|
||||
return returnValue(ret);
|
||||
}
|
||||
|
||||
|
@ -306,6 +320,9 @@ WingAngel::registerGlobalFunction(const QString &decl,
|
|||
f->SetUserData(reinterpret_cast<void *>(id),
|
||||
AsUserDataType::UserData_PluginFn);
|
||||
} else {
|
||||
Logger::critical(QStringLiteral("[WingAngel::registerGlobalFunction] "
|
||||
"'%1' GetFunctionById failed")
|
||||
.arg(decl));
|
||||
return WingHex::asRetCodes::asINVALID_ARG;
|
||||
}
|
||||
|
||||
|
@ -319,8 +336,8 @@ void WingAngel::registerScriptMarco(const QString &marco) {
|
|||
static auto sep = QStringLiteral("_");
|
||||
_scriptMarcos.append(sep + _plgsess + sep + marco + sep);
|
||||
} else {
|
||||
|
||||
// TODO
|
||||
Logger::critical(QStringLiteral(
|
||||
"[WingAngel::registerScriptMarco] isValidIdentifier failed"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -236,260 +236,278 @@ private:
|
|||
bool checkThreadAff();
|
||||
|
||||
private slots:
|
||||
WING_API bool existsServiceHost(QObject *caller, const QString &puid);
|
||||
WING_API bool existsServiceHost(const QObject *caller, const QString &puid);
|
||||
|
||||
WING_API bool invokeServiceImpl(const QObject *sender, const QString &puid,
|
||||
const WingHex::MetaCallInfo &infos);
|
||||
|
||||
private slots:
|
||||
WING_API QString currentDocFilename(QObject *caller);
|
||||
WING_API QString currentDocFilename(const QObject *caller);
|
||||
|
||||
// document
|
||||
WING_API bool isReadOnly(QObject *caller);
|
||||
WING_API bool isInsertionMode(QObject *caller);
|
||||
WING_API bool isKeepSize(QObject *caller);
|
||||
WING_API bool isLocked(QObject *caller);
|
||||
WING_API qsizetype documentLines(QObject *caller);
|
||||
WING_API qsizetype documentBytes(QObject *caller);
|
||||
WING_API WingHex::HexPosition currentPos(QObject *caller);
|
||||
WING_API qsizetype currentRow(QObject *caller);
|
||||
WING_API qsizetype currentColumn(QObject *caller);
|
||||
WING_API qsizetype currentOffset(QObject *caller);
|
||||
WING_API qsizetype selectedLength(QObject *caller);
|
||||
WING_API bool isReadOnly(const QObject *caller);
|
||||
WING_API bool isInsertionMode(const QObject *caller);
|
||||
WING_API bool isKeepSize(const QObject *caller);
|
||||
WING_API bool isLocked(const QObject *caller);
|
||||
WING_API qsizetype documentLines(const QObject *caller);
|
||||
WING_API qsizetype documentBytes(const QObject *caller);
|
||||
WING_API WingHex::HexPosition currentPos(const QObject *caller);
|
||||
WING_API qsizetype currentRow(const QObject *caller);
|
||||
WING_API qsizetype currentColumn(const QObject *caller);
|
||||
WING_API qsizetype currentOffset(const QObject *caller);
|
||||
WING_API qsizetype selectedLength(const QObject *caller);
|
||||
|
||||
WING_API QByteArray selectedBytes(QObject *caller, qsizetype index);
|
||||
WING_API QByteArrayList selectionBytes(QObject *caller);
|
||||
WING_API QByteArray selectedBytes(const QObject *caller, qsizetype index);
|
||||
WING_API QByteArrayList selectionBytes(const QObject *caller);
|
||||
|
||||
WING_API WingHex::HexPosition selectionStart(QObject *caller,
|
||||
WING_API WingHex::HexPosition selectionStart(const QObject *caller,
|
||||
qsizetype index);
|
||||
WING_API WingHex::HexPosition selectionEnd(QObject *caller,
|
||||
WING_API WingHex::HexPosition selectionEnd(const QObject *caller,
|
||||
qsizetype index);
|
||||
WING_API qsizetype selectionLength(QObject *caller, qsizetype index);
|
||||
WING_API qsizetype selectionCount(QObject *caller);
|
||||
WING_API qsizetype selectionLength(const QObject *caller, qsizetype index);
|
||||
WING_API qsizetype selectionCount(const QObject *caller);
|
||||
|
||||
WING_API bool stringVisible(QObject *caller);
|
||||
WING_API bool addressVisible(QObject *caller);
|
||||
WING_API bool headerVisible(QObject *caller);
|
||||
WING_API quintptr addressBase(QObject *caller);
|
||||
WING_API bool isModified(QObject *caller);
|
||||
WING_API bool stringVisible(const QObject *caller);
|
||||
WING_API bool addressVisible(const QObject *caller);
|
||||
WING_API bool headerVisible(const QObject *caller);
|
||||
WING_API quintptr addressBase(const QObject *caller);
|
||||
WING_API bool isModified(const QObject *caller);
|
||||
|
||||
WING_API qint8 readInt8(QObject *caller, qsizetype offset);
|
||||
WING_API qint16 readInt16(QObject *caller, qsizetype offset);
|
||||
WING_API qint32 readInt32(QObject *caller, qsizetype offset);
|
||||
WING_API qint64 readInt64(QObject *caller, qsizetype offset);
|
||||
WING_API quint8 readUInt8(QObject *caller, qsizetype offset);
|
||||
WING_API quint16 readUInt16(QObject *caller, qsizetype offset);
|
||||
WING_API quint32 readUInt32(QObject *caller, qsizetype offset);
|
||||
WING_API quint64 readUInt64(QObject *caller, qsizetype offset);
|
||||
WING_API float readFloat(QObject *caller, qsizetype offset);
|
||||
WING_API double readDouble(QObject *caller, qsizetype offset);
|
||||
WING_API QString readString(QObject *caller, qsizetype offset,
|
||||
WING_API qint8 readInt8(const QObject *caller, qsizetype offset);
|
||||
WING_API qint16 readInt16(const QObject *caller, qsizetype offset);
|
||||
WING_API qint32 readInt32(const QObject *caller, qsizetype offset);
|
||||
WING_API qint64 readInt64(const QObject *caller, qsizetype offset);
|
||||
WING_API quint8 readUInt8(const QObject *caller, qsizetype offset);
|
||||
WING_API quint16 readUInt16(const QObject *caller, qsizetype offset);
|
||||
WING_API quint32 readUInt32(const QObject *caller, qsizetype offset);
|
||||
WING_API quint64 readUInt64(const QObject *caller, qsizetype offset);
|
||||
WING_API float readFloat(const QObject *caller, qsizetype offset);
|
||||
WING_API double readDouble(const QObject *caller, qsizetype offset);
|
||||
WING_API QString readString(const QObject *caller, qsizetype offset,
|
||||
const QString &encoding);
|
||||
WING_API QByteArray readBytes(QObject *caller, qsizetype offset,
|
||||
WING_API QByteArray readBytes(const QObject *caller, qsizetype offset,
|
||||
qsizetype count);
|
||||
|
||||
WING_API qsizetype findNext(QObject *caller, qsizetype begin,
|
||||
WING_API qsizetype findNext(const QObject *caller, qsizetype begin,
|
||||
const QByteArray &ba);
|
||||
WING_API qsizetype findPrevious(QObject *caller, qsizetype begin,
|
||||
WING_API qsizetype findPrevious(const QObject *caller, qsizetype begin,
|
||||
const QByteArray &ba);
|
||||
|
||||
WING_API QString bookMarkComment(QObject *caller, qsizetype pos);
|
||||
WING_API bool existBookMark(QObject *caller, qsizetype pos);
|
||||
WING_API QString bookMarkComment(const QObject *caller, qsizetype pos);
|
||||
WING_API bool existBookMark(const QObject *caller, qsizetype pos);
|
||||
|
||||
WING_API bool setLockedFile(QObject *caller, bool b);
|
||||
WING_API bool setKeepSize(QObject *caller, bool b);
|
||||
WING_API bool setStringVisible(QObject *caller, bool b);
|
||||
WING_API bool setAddressVisible(QObject *caller, bool b);
|
||||
WING_API bool setHeaderVisible(QObject *caller, bool b);
|
||||
WING_API bool setAddressBase(QObject *caller, quintptr base);
|
||||
WING_API bool setLockedFile(const QObject *caller, bool b);
|
||||
WING_API bool setKeepSize(const QObject *caller, bool b);
|
||||
WING_API bool setStringVisible(const QObject *caller, bool b);
|
||||
WING_API bool setAddressVisible(const QObject *caller, bool b);
|
||||
WING_API bool setHeaderVisible(const QObject *caller, bool b);
|
||||
WING_API bool setAddressBase(const QObject *caller, quintptr base);
|
||||
|
||||
WING_API bool beginMarco(QObject *caller, const QString &txt);
|
||||
bool endMarco(QObject *caller);
|
||||
WING_API bool beginMarco(const QObject *caller, const QString &txt);
|
||||
bool endMarco(const QObject *caller);
|
||||
|
||||
WING_API bool writeInt8(QObject *caller, qsizetype offset, qint8 value);
|
||||
WING_API bool writeInt16(QObject *caller, qsizetype offset, qint16 value);
|
||||
WING_API bool writeInt32(QObject *caller, qsizetype offset, qint32 value);
|
||||
WING_API bool writeInt64(QObject *caller, qsizetype offset, qint64 value);
|
||||
WING_API bool writeUInt8(QObject *caller, qsizetype offset, quint8 value);
|
||||
WING_API bool writeUInt16(QObject *caller, qsizetype offset, quint16 value);
|
||||
WING_API bool writeUInt32(QObject *caller, qsizetype offset, quint32 value);
|
||||
WING_API bool writeUInt64(QObject *caller, qsizetype offset, quint64 value);
|
||||
WING_API bool writeFloat(QObject *caller, qsizetype offset, float value);
|
||||
WING_API bool writeDouble(QObject *caller, qsizetype offset, double value);
|
||||
WING_API
|
||||
bool writeString(QObject *caller, qsizetype offset, const QString &value,
|
||||
const QString &encoding);
|
||||
WING_API bool writeBytes(QObject *caller, qsizetype offset,
|
||||
const QByteArray &data);
|
||||
|
||||
WING_API bool insertInt8(QObject *caller, qsizetype offset, qint8 value);
|
||||
WING_API bool insertInt16(QObject *caller, qsizetype offset, qint16 value);
|
||||
WING_API bool insertInt32(QObject *caller, qsizetype offset, qint32 value);
|
||||
WING_API bool insertInt64(QObject *caller, qsizetype offset, qint64 value);
|
||||
WING_API bool insertUInt8(QObject *caller, qsizetype offset, quint8 value);
|
||||
WING_API
|
||||
bool insertUInt16(QObject *caller, qsizetype offset, quint16 value);
|
||||
WING_API
|
||||
bool insertUInt32(QObject *caller, qsizetype offset, quint32 value);
|
||||
WING_API bool insertUInt64(QObject *caller, qsizetype offset,
|
||||
WING_API bool writeInt8(const QObject *caller, qsizetype offset,
|
||||
qint8 value);
|
||||
WING_API bool writeInt16(const QObject *caller, qsizetype offset,
|
||||
qint16 value);
|
||||
WING_API bool writeInt32(const QObject *caller, qsizetype offset,
|
||||
qint32 value);
|
||||
WING_API bool writeInt64(const QObject *caller, qsizetype offset,
|
||||
qint64 value);
|
||||
WING_API bool writeUInt8(const QObject *caller, qsizetype offset,
|
||||
quint8 value);
|
||||
WING_API bool writeUInt16(const QObject *caller, qsizetype offset,
|
||||
quint16 value);
|
||||
WING_API bool writeUInt32(const QObject *caller, qsizetype offset,
|
||||
quint32 value);
|
||||
WING_API bool writeUInt64(const QObject *caller, qsizetype offset,
|
||||
quint64 value);
|
||||
WING_API bool insertFloat(QObject *caller, qsizetype offset, float value);
|
||||
WING_API bool insertDouble(QObject *caller, qsizetype offset, double value);
|
||||
WING_API bool insertString(QObject *caller, qsizetype offset,
|
||||
WING_API bool writeFloat(const QObject *caller, qsizetype offset,
|
||||
float value);
|
||||
WING_API bool writeDouble(const QObject *caller, qsizetype offset,
|
||||
double value);
|
||||
WING_API
|
||||
bool writeString(const QObject *caller, qsizetype offset,
|
||||
const QString &value, const QString &encoding);
|
||||
WING_API bool insertBytes(QObject *caller, qsizetype offset,
|
||||
WING_API bool writeBytes(const QObject *caller, qsizetype offset,
|
||||
const QByteArray &data);
|
||||
|
||||
WING_API bool appendInt8(QObject *caller, qint8 value);
|
||||
WING_API bool appendInt16(QObject *caller, qint16 value);
|
||||
WING_API bool appendInt32(QObject *caller, qint32 value);
|
||||
WING_API bool appendInt64(QObject *caller, qint64 value);
|
||||
WING_API bool appendUInt8(QObject *caller, quint8 value);
|
||||
WING_API bool appendUInt16(QObject *caller, quint16 value);
|
||||
WING_API bool appendUInt32(QObject *caller, quint32 value);
|
||||
WING_API bool appendUInt64(QObject *caller, quint64 value);
|
||||
WING_API bool appendFloat(QObject *caller, float value);
|
||||
WING_API bool appendDouble(QObject *caller, double value);
|
||||
WING_API bool appendString(QObject *caller, const QString &value,
|
||||
const QString &encoding);
|
||||
WING_API bool appendBytes(QObject *caller, const QByteArray &data);
|
||||
WING_API bool insertInt8(const QObject *caller, qsizetype offset,
|
||||
qint8 value);
|
||||
WING_API bool insertInt16(const QObject *caller, qsizetype offset,
|
||||
qint16 value);
|
||||
WING_API bool insertInt32(const QObject *caller, qsizetype offset,
|
||||
qint32 value);
|
||||
WING_API bool insertInt64(const QObject *caller, qsizetype offset,
|
||||
qint64 value);
|
||||
WING_API bool insertUInt8(const QObject *caller, qsizetype offset,
|
||||
quint8 value);
|
||||
WING_API
|
||||
bool insertUInt16(const QObject *caller, qsizetype offset, quint16 value);
|
||||
WING_API
|
||||
bool insertUInt32(const QObject *caller, qsizetype offset, quint32 value);
|
||||
WING_API bool insertUInt64(const QObject *caller, qsizetype offset,
|
||||
quint64 value);
|
||||
WING_API bool insertFloat(const QObject *caller, qsizetype offset,
|
||||
float value);
|
||||
WING_API bool insertDouble(const QObject *caller, qsizetype offset,
|
||||
double value);
|
||||
WING_API bool insertString(const QObject *caller, qsizetype offset,
|
||||
const QString &value, const QString &encoding);
|
||||
WING_API bool insertBytes(const QObject *caller, qsizetype offset,
|
||||
const QByteArray &data);
|
||||
|
||||
WING_API bool removeBytes(QObject *caller, qsizetype offset, qsizetype len);
|
||||
WING_API bool appendInt8(const QObject *caller, qint8 value);
|
||||
WING_API bool appendInt16(const QObject *caller, qint16 value);
|
||||
WING_API bool appendInt32(const QObject *caller, qint32 value);
|
||||
WING_API bool appendInt64(const QObject *caller, qint64 value);
|
||||
WING_API bool appendUInt8(const QObject *caller, quint8 value);
|
||||
WING_API bool appendUInt16(const QObject *caller, quint16 value);
|
||||
WING_API bool appendUInt32(const QObject *caller, quint32 value);
|
||||
WING_API bool appendUInt64(const QObject *caller, quint64 value);
|
||||
WING_API bool appendFloat(const QObject *caller, float value);
|
||||
WING_API bool appendDouble(const QObject *caller, double value);
|
||||
WING_API bool appendString(const QObject *caller, const QString &value,
|
||||
const QString &encoding);
|
||||
WING_API bool appendBytes(const QObject *caller, const QByteArray &data);
|
||||
|
||||
WING_API bool removeBytes(const QObject *caller, qsizetype offset,
|
||||
qsizetype len);
|
||||
|
||||
// cursor
|
||||
WING_API bool moveTo(QObject *caller, qsizetype line, qsizetype column,
|
||||
int nibbleindex, bool clearSelection);
|
||||
WING_API bool moveTo(QObject *caller, qsizetype offset,
|
||||
WING_API bool moveTo(const QObject *caller, qsizetype line,
|
||||
qsizetype column, int nibbleindex,
|
||||
bool clearSelection);
|
||||
WING_API bool select(QObject *caller, qsizetype offset, qsizetype length,
|
||||
WingHex::SelectionMode mode);
|
||||
WING_API bool setInsertionMode(QObject *caller, bool isinsert);
|
||||
WING_API bool moveTo(const QObject *caller, qsizetype offset,
|
||||
bool clearSelection);
|
||||
WING_API bool select(const QObject *caller, qsizetype offset,
|
||||
qsizetype length, WingHex::SelectionMode mode);
|
||||
WING_API bool setInsertionMode(const QObject *caller, bool isinsert);
|
||||
|
||||
// metadata
|
||||
WING_API bool metadata(QObject *caller, qsizetype begin, qsizetype length,
|
||||
const QColor &fgcolor, const QColor &bgcolor,
|
||||
const QString &comment);
|
||||
WING_API bool metadata(const QObject *caller, qsizetype begin,
|
||||
qsizetype length, const QColor &fgcolor,
|
||||
const QColor &bgcolor, const QString &comment);
|
||||
|
||||
WING_API bool removeMetadata(QObject *caller, qsizetype offset);
|
||||
WING_API bool clearMetadata(QObject *caller);
|
||||
WING_API bool setMetaVisible(QObject *caller, bool b);
|
||||
WING_API bool setMetafgVisible(QObject *caller, bool b);
|
||||
WING_API bool setMetabgVisible(QObject *caller, bool b);
|
||||
WING_API bool setMetaCommentVisible(QObject *caller, bool b);
|
||||
WING_API bool removeMetadata(const QObject *caller, qsizetype offset);
|
||||
WING_API bool clearMetadata(const QObject *caller);
|
||||
WING_API bool setMetaVisible(const QObject *caller, bool b);
|
||||
WING_API bool setMetafgVisible(const QObject *caller, bool b);
|
||||
WING_API bool setMetabgVisible(const QObject *caller, bool b);
|
||||
WING_API bool setMetaCommentVisible(const QObject *caller, bool b);
|
||||
|
||||
// bookmark
|
||||
WING_API bool addBookMark(QObject *caller, qsizetype pos,
|
||||
WING_API bool addBookMark(const QObject *caller, qsizetype pos,
|
||||
const QString &comment);
|
||||
WING_API bool modBookMark(QObject *caller, qsizetype pos,
|
||||
WING_API bool modBookMark(const QObject *caller, qsizetype pos,
|
||||
const QString &comment);
|
||||
WING_API bool removeBookMark(QObject *caller, qsizetype pos);
|
||||
WING_API bool clearBookMark(QObject *caller);
|
||||
WING_API bool removeBookMark(const QObject *caller, qsizetype pos);
|
||||
WING_API bool clearBookMark(const QObject *caller);
|
||||
|
||||
private slots:
|
||||
WING_API void toast(QObject *caller, const QPixmap &icon,
|
||||
WING_API void toast(const QObject *caller, const QPixmap &icon,
|
||||
const QString &message);
|
||||
WING_API void logTrace(QObject *caller, const QString &message);
|
||||
WING_API void logDebug(QObject *caller, const QString &message);
|
||||
WING_API void logWarn(QObject *caller, const QString &message);
|
||||
WING_API void logError(QObject *caller, const QString &message);
|
||||
WING_API void logInfo(QObject *caller, const QString &message);
|
||||
WING_API void logTrace(const QObject *caller, const QString &message);
|
||||
WING_API void logDebug(const QObject *caller, const QString &message);
|
||||
WING_API void logWarn(const QObject *caller, const QString &message);
|
||||
WING_API void logError(const QObject *caller, const QString &message);
|
||||
WING_API void logInfo(const QObject *caller, const QString &message);
|
||||
|
||||
WING_API bool raiseDockWidget(QObject *caller, QWidget *w);
|
||||
WING_API bool raiseDockWidget(const QObject *caller, QWidget *w);
|
||||
|
||||
// theme
|
||||
WING_API WingHex::AppTheme currentAppTheme(QObject *caller);
|
||||
WING_API WingHex::AppTheme currentAppTheme(const QObject *caller);
|
||||
|
||||
// not available for AngelScript
|
||||
// only for plugin UI extenstion
|
||||
WING_API QDialog *createDialog(QObject *caller, QWidget *content);
|
||||
WING_API QDialog *createDialog(const QObject *caller, QWidget *content);
|
||||
|
||||
private slots:
|
||||
WING_API void msgAboutQt(QObject *caller, QWidget *parent = nullptr,
|
||||
WING_API void msgAboutQt(const QObject *caller, QWidget *parent = nullptr,
|
||||
const QString &title = QString());
|
||||
|
||||
WING_API QMessageBox::StandardButton msgInformation(
|
||||
QObject *caller, QWidget *parent, const QString &title,
|
||||
const QObject *caller, QWidget *parent, const QString &title,
|
||||
const QString &text,
|
||||
QMessageBox::StandardButtons buttons = QMessageBox::Ok,
|
||||
QMessageBox::StandardButton defaultButton = QMessageBox::NoButton);
|
||||
|
||||
WING_API QMessageBox::StandardButton msgQuestion(
|
||||
QObject *caller, QWidget *parent, const QString &title,
|
||||
const QObject *caller, QWidget *parent, const QString &title,
|
||||
const QString &text,
|
||||
QMessageBox::StandardButtons buttons =
|
||||
QMessageBox::StandardButtons(QMessageBox::Yes | QMessageBox::No),
|
||||
QMessageBox::StandardButton defaultButton = QMessageBox::NoButton);
|
||||
|
||||
WING_API QMessageBox::StandardButton msgWarning(
|
||||
QObject *caller, QWidget *parent, const QString &title,
|
||||
const QObject *caller, QWidget *parent, const QString &title,
|
||||
const QString &text,
|
||||
QMessageBox::StandardButtons buttons = QMessageBox::Ok,
|
||||
QMessageBox::StandardButton defaultButton = QMessageBox::NoButton);
|
||||
|
||||
WING_API QMessageBox::StandardButton msgCritical(
|
||||
QObject *caller, QWidget *parent, const QString &title,
|
||||
const QObject *caller, QWidget *parent, const QString &title,
|
||||
const QString &text,
|
||||
QMessageBox::StandardButtons buttons = QMessageBox::Ok,
|
||||
QMessageBox::StandardButton defaultButton = QMessageBox::NoButton);
|
||||
|
||||
WING_API void msgAbout(QObject *caller, QWidget *parent,
|
||||
WING_API void msgAbout(const QObject *caller, QWidget *parent,
|
||||
const QString &title, const QString &text);
|
||||
|
||||
WING_API QMessageBox::StandardButton
|
||||
msgbox(QObject *caller, QWidget *parent, QMessageBox::Icon icon,
|
||||
msgbox(const QObject *caller, QWidget *parent, QMessageBox::Icon icon,
|
||||
const QString &title, const QString &text,
|
||||
QMessageBox::StandardButtons buttons = QMessageBox::NoButton,
|
||||
QMessageBox::StandardButton defaultButton = QMessageBox::NoButton);
|
||||
|
||||
private slots:
|
||||
WING_API QString dlgGetText(QObject *caller, QWidget *parent,
|
||||
WING_API QString dlgGetText(const QObject *caller, QWidget *parent,
|
||||
const QString &title, const QString &label,
|
||||
QLineEdit::EchoMode echo, const QString &text,
|
||||
bool *ok,
|
||||
Qt::InputMethodHints inputMethodHints);
|
||||
WING_API QString dlgGetMultiLineText(QObject *caller, QWidget *parent,
|
||||
WING_API QString dlgGetMultiLineText(const QObject *caller, QWidget *parent,
|
||||
const QString &title,
|
||||
const QString &label,
|
||||
const QString &text, bool *ok,
|
||||
Qt::InputMethodHints inputMethodHints);
|
||||
|
||||
WING_API QString dlgGetItem(QObject *caller, QWidget *parent,
|
||||
WING_API QString dlgGetItem(const QObject *caller, QWidget *parent,
|
||||
const QString &title, const QString &label,
|
||||
const QStringList &items, int current,
|
||||
bool editable, bool *ok,
|
||||
Qt::InputMethodHints inputMethodHints);
|
||||
|
||||
WING_API int dlgGetInt(QObject *caller, QWidget *parent,
|
||||
WING_API int dlgGetInt(const QObject *caller, QWidget *parent,
|
||||
const QString &title, const QString &label,
|
||||
int value, int minValue, int maxValue, int step,
|
||||
bool *ok);
|
||||
|
||||
WING_API double dlgGetDouble(QObject *caller, QWidget *parent,
|
||||
WING_API double dlgGetDouble(const QObject *caller, QWidget *parent,
|
||||
const QString &title, const QString &label,
|
||||
double value, double minValue, double maxValue,
|
||||
int decimals, bool *ok, double step);
|
||||
|
||||
private slots:
|
||||
WING_API QString dlgGetExistingDirectory(QObject *caller, QWidget *parent,
|
||||
WING_API QString dlgGetExistingDirectory(const QObject *caller,
|
||||
QWidget *parent,
|
||||
const QString &caption,
|
||||
const QString &dir,
|
||||
QFileDialog::Options options);
|
||||
|
||||
WING_API QString dlgGetOpenFileName(QObject *caller, QWidget *parent,
|
||||
WING_API QString dlgGetOpenFileName(const QObject *caller, QWidget *parent,
|
||||
const QString &caption,
|
||||
const QString &dir,
|
||||
const QString &filter,
|
||||
QString *selectedFilter,
|
||||
QFileDialog::Options options);
|
||||
|
||||
WING_API QStringList dlgGetOpenFileNames(QObject *caller, QWidget *parent,
|
||||
const QString &caption,
|
||||
const QString &dir,
|
||||
const QString &filter,
|
||||
QString *selectedFilter,
|
||||
WING_API QStringList dlgGetOpenFileNames(
|
||||
const QObject *caller, QWidget *parent, const QString &caption,
|
||||
const QString &dir, const QString &filter, QString *selectedFilter,
|
||||
QFileDialog::Options options);
|
||||
|
||||
WING_API QString dlgGetSaveFileName(QObject *caller, QWidget *parent,
|
||||
WING_API QString dlgGetSaveFileName(const QObject *caller, QWidget *parent,
|
||||
const QString &caption,
|
||||
const QString &dir,
|
||||
const QString &filter,
|
||||
|
@ -497,7 +515,7 @@ private slots:
|
|||
QFileDialog::Options options);
|
||||
|
||||
private slots:
|
||||
WING_API QColor dlgGetColor(QObject *caller, const QString &caption,
|
||||
WING_API QColor dlgGetColor(const QObject *caller, const QString &caption,
|
||||
QWidget *parent);
|
||||
|
||||
private:
|
||||
|
|
|
@ -74,7 +74,7 @@ SettingDialog::SettingDialog(QWidget *parent)
|
|||
ui->btnRestore->setStyleSheet(
|
||||
QStringLiteral("QToolButton::down-arrow {width:10px; height:10px; "
|
||||
"subcontrol-position:right center; "
|
||||
"subcontrol-origin:content; left: -2px;"));
|
||||
"subcontrol-origin:content; left: -2px;}"));
|
||||
auto menu = new QMenu(ui->btnRestore);
|
||||
auto a = menu->addAction(tr("Restore current"));
|
||||
connect(a, &QAction::triggered, this, [this]() {
|
||||
|
|
Loading…
Reference in New Issue