This commit is contained in:
寂静的羽夏 2022-12-30 12:15:08 +08:00
parent ff9a2eb07d
commit 5d13296701
5 changed files with 10 additions and 7 deletions

View File

@ -1,7 +1,7 @@
#ifndef IWINGPLUGINSTRUCTWRAPPER_H
#define IWINGPLUGINSTRUCTWRAPPER_H
#include "../../WingHexExplorer/wing-hex-explorer.sourcecode/WingHexExplorer/plugin/iwingplugin.h"
#include "../WingHexExplorer/WingHexExplorer/plugin/iwingplugin.h"
#include <QObject>
class IWingPluginStructWrapper : public QObject {
@ -86,6 +86,9 @@ public slots:
QColor foreground(HexMetadataItem *meta) { return meta->foreground; }
QColor background(HexMetadataItem *meta) { return meta->background; }
QString comment(HexMetadataItem *meta) { return meta->comment; }
// ErrFile
int value(ErrFile *err) { return int(*err); }
};
#endif // IWINGPLUGINSTRUCTWRAPPER_H

View File

@ -3,7 +3,7 @@
#define PY_SSIZE_T_CLEAN
#include "../../WingHexExplorer/wing-hex-explorer.sourcecode/WingHexExplorer/plugin/iwingplugin.h"
#include "../WingHexExplorer/WingHexExplorer/plugin/iwingplugin.h"
#include "PythonQt/PythonQt.h"
#include "PythonQt/gui/PythonQtScriptingConsole.h"
#include <QApplication>

View File

@ -29,7 +29,7 @@ void RecentFileManager::apply() {
return;
}
bool ok;
auto d = DInputDialog::getInt(nullptr, tr("Input"), tr("InputIndex"), 0, 0,
auto d = QInputDialog::getInt(nullptr, tr("Input"), tr("InputIndex"), 0, 0,
m_recents.count(), 1, &ok);
if (ok) {
m_menu->removeAction(hitems.at(d));

View File

@ -1,7 +1,7 @@
#ifndef SCRIPTMANAGER_H
#define SCRIPTMANAGER_H
#include "../../WingHexExplorer/wing-hex-explorer.sourcecode/WingHexExplorer/plugin/iwingplugin.h"
#include "../WingHexExplorer/WingHexExplorer/plugin/iwingplugin.h"
#include "plginterface.h"
#include <QMap>
#include <QObject>

View File

@ -1,5 +1,5 @@
#include "scriptwindow.h"
#include "../../WingHexExplorer/wing-hex-explorer.sourcecode/WingHexExplorer/plugin/iwingplugin.h"
#include "scriptwindow.h"
#include "../WingHexExplorer/WingHexExplorer/plugin/iwingplugin.h"
#include "QCodeEditor/QPythonHighlighter.hpp"
#include "plginterface.h"
#include <DFileDialog>
@ -555,7 +555,7 @@ void ScriptWindow::on_replace() {
void ScriptWindow::on_jmp() {
auto cur = editor->textCursor();
auto ok = false;
auto pos = DInputDialog::getInt(this, tr("Goto"), tr("Line"), 1, 1,
auto pos = QInputDialog::getInt(this, tr("Goto"), tr("Line"), 1, 1,
cur.blockNumber(), 1, &ok);
if (ok) {
auto p = editor->document()->findBlockByLineNumber(pos - 1).position();