feat: 将协议注释添加到代码中;初步支持内置函数的自动补充(WIP);调整 AngelScript 的字符串全局函数的命名空间为 string 而非空;
This commit is contained in:
parent
63b4583ccd
commit
4f4db8b5f8
|
@ -88,7 +88,7 @@ QEditor *QCodeCompletionEngine::editor() const { return pEdit; }
|
|||
*/
|
||||
void QCodeCompletionEngine::setEditor(QEditor *e) {
|
||||
if (pEdit) {
|
||||
pEdit->removeAction(pForcedTrigger, "&Edit");
|
||||
pEdit->removeAction(pForcedTrigger, tr("&Edit"));
|
||||
// pEdit->removeEventFilter(this);
|
||||
|
||||
disconnect(pEdit, SIGNAL(textEdited(QKeyEvent *)), this,
|
||||
|
@ -99,10 +99,9 @@ void QCodeCompletionEngine::setEditor(QEditor *e) {
|
|||
|
||||
if (pEdit) {
|
||||
// pEdit->installEventFilter(this);
|
||||
pEdit->addAction(pForcedTrigger, "&Edit");
|
||||
|
||||
connect(pEdit, SIGNAL(textEdited(QKeyEvent *)), this,
|
||||
SLOT(textEdited(QKeyEvent *)));
|
||||
pEdit->addAction(pForcedTrigger, tr("&Edit"));
|
||||
connect(pEdit, &QEditor::textEdited, this,
|
||||
&QCodeCompletionEngine::textEdited);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ public:
|
|||
QAction *triggerAction() const;
|
||||
|
||||
QEditor *editor() const;
|
||||
void setEditor(QEditor *e);
|
||||
virtual void setEditor(QEditor *e);
|
||||
|
||||
QStringList triggers() const;
|
||||
|
||||
|
|
|
@ -303,15 +303,12 @@ set(CODEEDIT_WIDGET
|
|||
src/qcodeeditwidget/qformatconfig.ui)
|
||||
|
||||
set(CODE_MODEL
|
||||
src/codemodel/qcm-config.h
|
||||
src/codemodel/qcodemodel.cpp
|
||||
src/codemodel/qcodemodel.h
|
||||
src/codemodel/qcodenode.cpp
|
||||
src/codemodel/qcodenode.h
|
||||
src/codemodel/qcodeproxymodel.cpp
|
||||
src/codemodel/qcodeproxymodel.h
|
||||
src/codemodel/qcodeserializer.cpp
|
||||
src/codemodel/qcodeserializer.h
|
||||
src/codemodel/qcodeview.cpp
|
||||
src/codemodel/qcodeview.h
|
||||
src/codemodel/qsourcecodewatcher.cpp
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "angelobjstring.h"
|
||||
#include "AngelScript/sdk/add_on/datetime/datetime.h"
|
||||
#include "AngelScript/sdk/add_on/scriptarray/scriptarray.h"
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef ANGELOBJSTRING_H
|
||||
#define ANGELOBJSTRING_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef ANGELSCRIPTHELPER_H
|
||||
#define ANGELSCRIPTHELPER_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "appmanager.h"
|
||||
|
||||
#include <QFont>
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef APPMANAGER_H
|
||||
#define APPMANAGER_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "asbuilder.h"
|
||||
|
||||
#include <QDir>
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef ASBUILDER_H
|
||||
#define ASBUILDER_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "ascompletion.h"
|
||||
|
||||
#include "qasparser.h"
|
||||
|
@ -5,8 +22,6 @@
|
|||
#include "qdocumentcursor.h"
|
||||
#include "qdocumentline.h"
|
||||
|
||||
// #include "plugin.h"
|
||||
|
||||
#include <QDir>
|
||||
#include <QLibraryInfo>
|
||||
#include <QQueue>
|
||||
|
@ -15,21 +30,28 @@
|
|||
#include <QTimer>
|
||||
#include <QtDebug>
|
||||
|
||||
#include "control/qcodecompletionwidget.h"
|
||||
|
||||
const auto DOT_TRIGGER = QStringLiteral(".");
|
||||
const auto SEMI_COLON_TRIGGER = QStringLiteral("::");
|
||||
const auto LEFT_PARE_TRIGGER = QStringLiteral("(");
|
||||
|
||||
AsCompletion::AsCompletion(asIScriptEngine *engine, QObject *p)
|
||||
: QCodeCompletionEngine(p), _engine(engine) {
|
||||
: QCodeCompletionEngine(p), parser(engine), _engine(engine),
|
||||
pPopup(new QCodeCompletionWidget()) {
|
||||
Q_ASSERT(engine);
|
||||
|
||||
addTrigger(".");
|
||||
addTrigger("::");
|
||||
addTrigger(DOT_TRIGGER);
|
||||
addTrigger(SEMI_COLON_TRIGGER);
|
||||
|
||||
// unleash the power of call tips
|
||||
addTrigger("(");
|
||||
addTrigger(LEFT_PARE_TRIGGER);
|
||||
}
|
||||
|
||||
AsCompletion::~AsCompletion() {}
|
||||
|
||||
QCodeCompletionEngine *AsCompletion::clone() {
|
||||
AsCompletion *e = new AsCompletion(_engine);
|
||||
AsCompletion *e = new AsCompletion(_engine, pPopup->editor());
|
||||
|
||||
for (auto &t : triggers())
|
||||
e->addTrigger(t);
|
||||
|
@ -51,15 +73,78 @@ QStringList AsCompletion::extensions() const {
|
|||
}
|
||||
|
||||
void AsCompletion::complete(const QDocumentCursor &c, const QString &trigger) {
|
||||
auto codes = c.document()->text(true, false);
|
||||
QAsParser parser(_engine);
|
||||
parser.parse(codes, this->editor()->fileName());
|
||||
// TODO
|
||||
// auto codes = c.document()->text(true, false);
|
||||
// parser.parse(codes, this->editor()->fileName());
|
||||
|
||||
QList<QCodeNode *> nodes = parser.codeNodes();
|
||||
// QList<QCodeNode *> nodes = parser.codeNodes();
|
||||
auto txt = c.line().text().left(c.columnNumber());
|
||||
auto code = txt.toUtf8();
|
||||
|
||||
auto p = code.data();
|
||||
auto len = code.length();
|
||||
auto end = p + len;
|
||||
|
||||
struct Token {
|
||||
asETokenClass type;
|
||||
QByteArray content;
|
||||
};
|
||||
|
||||
QVector<Token> tokens;
|
||||
for (; p < end;) {
|
||||
asUINT tokenLen = 0;
|
||||
auto tt = _engine->ParseToken(p, len, &tokenLen);
|
||||
Token token;
|
||||
token.type = tt;
|
||||
token.content = QByteArray(p, tokenLen);
|
||||
tokens << token;
|
||||
p += tokenLen;
|
||||
}
|
||||
|
||||
QByteArray fn;
|
||||
QList<QCodeNode *> nodes;
|
||||
|
||||
auto r =
|
||||
std::find_if(tokens.rbegin(), tokens.rend(), [](const Token &token) {
|
||||
return token.type == asTC_IDENTIFIER || token.type == asTC_VALUE;
|
||||
});
|
||||
if (r == tokens.rend()) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto &_headerNodes = parser.headerNodes();
|
||||
fn = r->content;
|
||||
if (trigger == SEMI_COLON_TRIGGER) {
|
||||
for (auto &n : _headerNodes) {
|
||||
auto name = n->qualifiedName();
|
||||
if (name == fn) {
|
||||
nodes << n;
|
||||
}
|
||||
}
|
||||
} else if (trigger == LEFT_PARE_TRIGGER) {
|
||||
if (r != tokens.rend()) {
|
||||
auto pr = std::next(r);
|
||||
if (pr->content == SEMI_COLON_TRIGGER) {
|
||||
if (pr != tokens.rend()) {
|
||||
auto prr = std::next(pr);
|
||||
auto ns = prr->content;
|
||||
if (prr->type == asTC_IDENTIFIER) {
|
||||
for (auto &n : _headerNodes) {
|
||||
auto name = n->qualifiedName();
|
||||
if (name == ns) {
|
||||
nodes << n;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO
|
||||
QByteArray fn;
|
||||
QList<QCodeNode *> temp; // internal CodeNodes
|
||||
// QList<QCodeNode *> temp; // internal CodeNodes
|
||||
int filter = QCodeCompletionWidget::FilterFlag::KeepAll;
|
||||
|
||||
if (nodes.count()) {
|
||||
|
@ -69,7 +154,7 @@ void AsCompletion::complete(const QDocumentCursor &c, const QString &trigger) {
|
|||
// qDebug("fn %s", fn.constData());
|
||||
|
||||
for (auto &n : nodes) {
|
||||
for (auto &f : n->children) {
|
||||
for (auto &f : n->children()) {
|
||||
if (f->type() != QCodeNode::Function ||
|
||||
f->role(QCodeNode::Name) != fn)
|
||||
continue;
|
||||
|
@ -104,7 +189,7 @@ void AsCompletion::complete(const QDocumentCursor &c, const QString &trigger) {
|
|||
#endif
|
||||
}
|
||||
} else {
|
||||
pPopup->setTemporaryNodes(temp);
|
||||
// pPopup->setTemporaryNodes(temp);
|
||||
pPopup->setFilter(QCodeCompletionWidget::Filter(filter));
|
||||
pPopup->setCompletions(nodes);
|
||||
|
||||
|
@ -116,7 +201,12 @@ void AsCompletion::complete(const QDocumentCursor &c, const QString &trigger) {
|
|||
pPopup->popup();
|
||||
}
|
||||
} else {
|
||||
qDeleteAll(temp);
|
||||
// qDeleteAll(temp);
|
||||
qDebug("completion failed");
|
||||
}
|
||||
}
|
||||
|
||||
void AsCompletion::setEditor(QEditor *e) {
|
||||
QCodeCompletionEngine::setEditor(e);
|
||||
pPopup->setEditor(e);
|
||||
}
|
||||
|
|
|
@ -1,13 +1,27 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef _AS_COMPLETION_H_
|
||||
#define _AS_COMPLETION_H_
|
||||
|
||||
#include "angelscript.h"
|
||||
#include "control/qcodecompletionwidget.h"
|
||||
#include "class/qasparser.h"
|
||||
#include "qcodecompletionengine.h"
|
||||
|
||||
#include <QHash>
|
||||
|
||||
class QByteArray;
|
||||
class QCodeCompletionWidget;
|
||||
|
||||
class AsCompletion : public QCodeCompletionEngine {
|
||||
Q_OBJECT
|
||||
|
@ -21,11 +35,14 @@ public:
|
|||
virtual QString language() const override;
|
||||
virtual QStringList extensions() const override;
|
||||
|
||||
virtual void setEditor(QEditor *e) override;
|
||||
|
||||
protected:
|
||||
virtual void complete(const QDocumentCursor &c,
|
||||
const QString &trigger) override;
|
||||
|
||||
private:
|
||||
QAsParser parser;
|
||||
asIScriptEngine *_engine;
|
||||
QCodeCompletionWidget *pPopup;
|
||||
QPointer<QCodeModel> pModel;
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "ascontextmgr.h"
|
||||
|
||||
asContextMgr::asContextMgr() : CContextMgr() {}
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef ASCONTEXTMGR_H
|
||||
#define ASCONTEXTMGR_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "asdebugger.h"
|
||||
|
||||
#include <QApplication>
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef ASDEBUGGER_H
|
||||
#define ASDEBUGGER_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef FOCUSOUTEVENTFILTER_H
|
||||
#define FOCUSOUTEVENTFILTER_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "framelesshelper.h"
|
||||
|
||||
#include "widgetframe/windowbutton.h"
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef FRAMELESSHELPER_H
|
||||
#define FRAMELESSHELPER_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "languagemanager.h"
|
||||
|
||||
#include "wingmessagebox.h"
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef LANGUAGEMANAGER_H
|
||||
#define LANGUAGEMANAGER_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "logger.h"
|
||||
#include <QApplication>
|
||||
#include <QDateTime>
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef LOGGER_H
|
||||
#define LOGGER_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "qasparser.h"
|
||||
|
||||
#include "AngelScript/sdk/angelscript/source/as_builder.h"
|
||||
|
@ -8,52 +25,24 @@
|
|||
#include <QDebug>
|
||||
|
||||
QAsParser::QAsParser(asIScriptEngine *engine) : asBuilder(), _engine(engine) {
|
||||
constexpr const char *_HEADER_ =
|
||||
"namespace reader { bool copy(bool hex = false); }";
|
||||
constexpr size_t _HEADER_LEN_ = std::char_traits<char>::length(_HEADER_);
|
||||
|
||||
// module->AddScriptSection("header", _HEADER_, _HEADER_LEN_, 0);
|
||||
|
||||
ClearAll();
|
||||
|
||||
if (StartNewModule(_engine, "_HEADER_PARSER_") != 0) {
|
||||
Q_ASSERT(false);
|
||||
}
|
||||
|
||||
auto mod = dynamic_cast<asCModule *>(GetModule());
|
||||
auto en = dynamic_cast<asCScriptEngine *>(engine);
|
||||
Q_ASSERT(en && mod);
|
||||
asCParser parser(new asCBuilder(en, mod));
|
||||
|
||||
m_code.reset(new asCScriptCode);
|
||||
m_code->SetCode("_HEADER_", _HEADER_, true);
|
||||
|
||||
parser.ParseScript(m_code.get());
|
||||
|
||||
auto pnodes = parser.GetScriptNode();
|
||||
|
||||
QList<QCodeNode *> qnodes;
|
||||
|
||||
auto node = new QCodeNode;
|
||||
processNode(nullptr, pnodes, node);
|
||||
|
||||
do {
|
||||
auto p = qnodes.first();
|
||||
} while (false);
|
||||
addEnumCompletion(engine);
|
||||
addGlobalFunctionCompletion(engine);
|
||||
}
|
||||
|
||||
QAsParser::~QAsParser() {}
|
||||
QAsParser::~QAsParser() {
|
||||
qDeleteAll(_headerNodes);
|
||||
_headerNodes.clear();
|
||||
}
|
||||
|
||||
void QAsParser::processNode(asCScriptCode *code, asCScriptNode *raw,
|
||||
QCodeNode *node) {
|
||||
Q_ASSERT(raw && node);
|
||||
|
||||
node->model = nullptr;
|
||||
int row = -1;
|
||||
if (code) {
|
||||
code->ConvertPosToRowCol(raw->tokenPos, &row, nullptr);
|
||||
}
|
||||
node->line = row;
|
||||
node->setLine(row);
|
||||
|
||||
QByteArray ns; // namespace
|
||||
|
||||
|
@ -92,10 +81,104 @@ void QAsParser::processNode(asCScriptCode *code, asCScriptNode *raw,
|
|||
auto cnode = new QCodeNode;
|
||||
// cnode->parent = node;
|
||||
processNode(code, p, cnode);
|
||||
node->children.append(cnode);
|
||||
node->children().append(cnode);
|
||||
p = p->next;
|
||||
}
|
||||
node->children.append(node);
|
||||
node->children().append(node);
|
||||
}
|
||||
|
||||
QByteArray QAsParser::getFnParamDeclString(asIScriptFunction *fn,
|
||||
bool includeNamespace,
|
||||
bool includeParamNames) {
|
||||
auto fun = dynamic_cast<asCScriptFunction *>(fn);
|
||||
if (fun == nullptr) {
|
||||
return {};
|
||||
}
|
||||
|
||||
asCString str;
|
||||
|
||||
auto ¶meterTypes = fun->parameterTypes;
|
||||
auto ¶meterNames = fun->parameterNames;
|
||||
auto &nameSpace = fun->nameSpace;
|
||||
auto &inOutFlags = fun->inOutFlags;
|
||||
auto &defaultArgs = fun->defaultArgs;
|
||||
|
||||
if (parameterTypes.GetLength() > 0) {
|
||||
asUINT n;
|
||||
for (n = 0; n < parameterTypes.GetLength() - 1; n++) {
|
||||
str += parameterTypes[n].Format(nameSpace, includeNamespace);
|
||||
if (parameterTypes[n].IsReference() && inOutFlags.GetLength() > n) {
|
||||
if (inOutFlags[n] == asTM_INREF)
|
||||
str += "in";
|
||||
else if (inOutFlags[n] == asTM_OUTREF)
|
||||
str += "out";
|
||||
else if (inOutFlags[n] == asTM_INOUTREF)
|
||||
str += "inout";
|
||||
}
|
||||
|
||||
if (includeParamNames && n < parameterNames.GetLength() &&
|
||||
parameterNames[n].GetLength() != 0) {
|
||||
str += " ";
|
||||
str += parameterNames[n];
|
||||
}
|
||||
|
||||
if (defaultArgs.GetLength() > n && defaultArgs[n]) {
|
||||
asCString tmp;
|
||||
tmp.Format(" = %s", defaultArgs[n]->AddressOf());
|
||||
str += tmp;
|
||||
}
|
||||
|
||||
str += ", ";
|
||||
}
|
||||
|
||||
// Add the last parameter
|
||||
str += parameterTypes[n].Format(nameSpace, includeNamespace);
|
||||
if (parameterTypes[n].IsReference() && inOutFlags.GetLength() > n) {
|
||||
if (inOutFlags[n] == asTM_INREF)
|
||||
str += "in";
|
||||
else if (inOutFlags[n] == asTM_OUTREF)
|
||||
str += "out";
|
||||
else if (inOutFlags[n] == asTM_INOUTREF)
|
||||
str += "inout";
|
||||
}
|
||||
|
||||
if (includeParamNames && n < parameterNames.GetLength() &&
|
||||
parameterNames[n].GetLength() != 0) {
|
||||
str += " ";
|
||||
str += parameterNames[n];
|
||||
}
|
||||
|
||||
if (defaultArgs.GetLength() > n && defaultArgs[n]) {
|
||||
asCString tmp;
|
||||
tmp.Format(" = %s", defaultArgs[n]->AddressOf());
|
||||
str += tmp;
|
||||
}
|
||||
}
|
||||
|
||||
return QByteArray(str.AddressOf(), str.GetLength());
|
||||
}
|
||||
|
||||
QByteArray QAsParser::getFnRetTypeString(asIScriptFunction *fn,
|
||||
bool includeNamespace) {
|
||||
auto fun = dynamic_cast<asCScriptFunction *>(fn);
|
||||
if (fun == nullptr) {
|
||||
return {};
|
||||
}
|
||||
|
||||
auto &returnType = fun->returnType;
|
||||
auto &objectType = fun->objectType;
|
||||
auto &name = fun->name;
|
||||
auto &nameSpace = fun->nameSpace;
|
||||
|
||||
if (!(returnType.GetTokenType() == ttVoid && objectType &&
|
||||
(name == objectType->name ||
|
||||
(name.GetLength() > 0 && name[0] == '~') || name == "$beh0" ||
|
||||
name == "$beh2"))) {
|
||||
auto str = returnType.Format(nameSpace, includeNamespace);
|
||||
return QByteArray(str.AddressOf(), str.GetLength());
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
bool QAsParser::parse(const QString &filename) {
|
||||
|
@ -145,3 +228,153 @@ bool QAsParser::parse(const QString &filename) {
|
|||
bool QAsParser::parse(const QString &code, const QString §ion) {
|
||||
return ProcessScriptSection(code.toUtf8(), code.length(), section, 0);
|
||||
}
|
||||
|
||||
const QList<QCodeNode *> &QAsParser::headerNodes() const {
|
||||
return _headerNodes;
|
||||
}
|
||||
|
||||
void QAsParser::addGlobalFunctionCompletion(asIScriptEngine *engine) {
|
||||
Q_ASSERT(engine);
|
||||
|
||||
struct FnInfo {
|
||||
QByteArray retType;
|
||||
QByteArray fnName;
|
||||
QByteArray params;
|
||||
bool isConst = false;
|
||||
};
|
||||
|
||||
QHash<QByteArray, QList<FnInfo>> _maps;
|
||||
|
||||
for (asUINT i = 0; i < engine->GetGlobalFunctionCount(); ++i) {
|
||||
auto fn = engine->GetGlobalFunctionByIndex(i);
|
||||
|
||||
FnInfo fnInfo;
|
||||
auto ns = fn->GetNamespace();
|
||||
fnInfo.retType = getFnRetTypeString(fn, true);
|
||||
fnInfo.fnName = fn->GetName();
|
||||
fnInfo.params = getFnParamDeclString(fn, false, true);
|
||||
fnInfo.isConst = fn->IsReadOnly();
|
||||
|
||||
_maps[ns] << fnInfo;
|
||||
}
|
||||
|
||||
for (auto p = _maps.keyValueBegin(); p != _maps.keyValueEnd(); p++) {
|
||||
auto node = new QCodeNode;
|
||||
_headerNodes << node;
|
||||
if (p->first.isEmpty()) {
|
||||
node->setNodeType(QCodeNode::Group);
|
||||
} else {
|
||||
node->setNodeType(QCodeNode::Namespace);
|
||||
}
|
||||
node->setRole(QCodeNode::Name, p->first);
|
||||
|
||||
auto pnodes = &node->children();
|
||||
auto nodeParent = node;
|
||||
|
||||
for (auto &fn : p->second) {
|
||||
auto node = new QCodeNode;
|
||||
node->setNodeType(QCodeNode::Function);
|
||||
node->setRole(QCodeNode::Return, fn.retType);
|
||||
node->setRole(QCodeNode::Name, fn.fnName);
|
||||
node->setRole(QCodeNode::Arguments, fn.params);
|
||||
QByteArray qualifiers;
|
||||
if (fn.isConst) {
|
||||
qualifiers.setNum(QCodeNode::QUALIFIER_CONST);
|
||||
}
|
||||
node->setRole(QCodeNode::Qualifiers, qualifiers);
|
||||
node->setParent(nodeParent);
|
||||
pnodes->append(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void QAsParser::addEnumCompletion(asIScriptEngine *engine) {
|
||||
Q_ASSERT(engine);
|
||||
|
||||
struct EnumInfo {
|
||||
QByteArray name;
|
||||
QList<QPair<QByteArray, int>> enums;
|
||||
};
|
||||
|
||||
QHash<QByteArray, QList<EnumInfo>> _maps;
|
||||
|
||||
for (asUINT i = 0; i < engine->GetEnumCount(); ++i) {
|
||||
auto etype = engine->GetEnumByIndex(i);
|
||||
etype->AddRef();
|
||||
|
||||
EnumInfo einfo;
|
||||
auto ns = etype->GetNamespace();
|
||||
einfo.name = etype->GetName();
|
||||
|
||||
for (asUINT i = 0; i < etype->GetEnumValueCount(); ++i) {
|
||||
int v;
|
||||
auto e = etype->GetEnumValueByIndex(i, &v);
|
||||
einfo.enums.append(qMakePair(QByteArray(e), v));
|
||||
}
|
||||
|
||||
etype->Release();
|
||||
|
||||
_maps[ns] << einfo;
|
||||
}
|
||||
|
||||
for (auto p = _maps.keyValueBegin(); p != _maps.keyValueEnd(); p++) {
|
||||
auto node = new QCodeNode;
|
||||
_headerNodes << node;
|
||||
if (p->first.isEmpty()) {
|
||||
node->setNodeType(QCodeNode::Group);
|
||||
} else {
|
||||
node->setNodeType(QCodeNode::Namespace);
|
||||
}
|
||||
node->setRole(QCodeNode::Name, p->first);
|
||||
|
||||
auto pnodes = &node->children();
|
||||
auto nodeParent = node;
|
||||
for (auto &fn : p->second) {
|
||||
auto node = new QCodeNode;
|
||||
node->setNodeType(QCodeNode::Enum);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void QAsParser::addClassCompletion(asIScriptEngine *engine) {
|
||||
Q_ASSERT(engine);
|
||||
|
||||
struct ClassInfo {
|
||||
QByteArray name;
|
||||
//
|
||||
};
|
||||
|
||||
QHash<QByteArray, QList<ClassInfo>> _maps;
|
||||
|
||||
for (asUINT i = 0; i < engine->GetObjectTypeCount(); ++i) {
|
||||
auto obj = engine->GetObjectTypeByIndex(i);
|
||||
obj->AddRef();
|
||||
|
||||
ClassInfo cls;
|
||||
cls.name = obj->GetNamespace();
|
||||
auto ns = obj->GetNamespace();
|
||||
|
||||
for (asUINT i = 0; i < obj->GetBehaviourCount(); ++i) {
|
||||
asEBehaviours bv;
|
||||
auto b = obj->GetBehaviourByIndex(i, &bv);
|
||||
switch (bv) {
|
||||
case asBEHAVE_CONSTRUCT:
|
||||
case asBEHAVE_DESTRUCT:
|
||||
// only these are supported
|
||||
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
for (asUINT i = 0; i < obj->GetMethodCount(); ++i) {
|
||||
auto m = obj->GetMethodByIndex(i);
|
||||
}
|
||||
|
||||
obj->Release();
|
||||
|
||||
_maps[ns] << cls;
|
||||
}
|
||||
}
|
||||
|
||||
QList<QCodeNode *> QAsParser::codeNodes() const { return _nodes; }
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef _QAS_PARSER_H_
|
||||
#define _QAS_PARSER_H_
|
||||
|
||||
|
@ -17,20 +34,30 @@ public:
|
|||
private:
|
||||
void processNode(asCScriptCode *code, asCScriptNode *raw, QCodeNode *node);
|
||||
|
||||
QByteArray getFnParamDeclString(asIScriptFunction *fn,
|
||||
bool includeNamespace,
|
||||
bool includeParamNames);
|
||||
|
||||
QByteArray getFnRetTypeString(asIScriptFunction *fn, bool includeNamespace);
|
||||
|
||||
public:
|
||||
bool parse(const QString &filename);
|
||||
bool parse(const QString &code, const QString §ion);
|
||||
|
||||
QList<QCodeNode *> codeNodes() const;
|
||||
|
||||
const QList<QCodeNode *> &headerNodes() const;
|
||||
|
||||
private:
|
||||
void addGlobalFunctionCompletion(asIScriptEngine *engine);
|
||||
void addEnumCompletion(asIScriptEngine *engine);
|
||||
void addClassCompletion(asIScriptEngine *engine);
|
||||
|
||||
private:
|
||||
asIScriptEngine *_engine;
|
||||
QScopedPointer<asCScriptCode> m_code;
|
||||
QList<QCodeNode *> _headerNodes;
|
||||
QList<QCodeNode *> _nodes;
|
||||
};
|
||||
|
||||
// I don't know why it doesn't pass the compiler under Windows when
|
||||
// these codes are in the qasparser.cpp
|
||||
inline QList<QCodeNode *> QAsParser::codeNodes() const { return _nodes; }
|
||||
|
||||
#endif // !_QCPP_PARSER_H_
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2006-2009 fullmetalcoder <fullmetalcoder@hotmail.fr>
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2006-2009 fullmetalcoder <fullmetalcoder@hotmail.fr>
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "qkeysequences.h"
|
||||
|
||||
QKeySequences::QKeySequences() {
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef QKEYSEQUENCES_H
|
||||
#define QKEYSEQUENCES_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "recentfilemanager.h"
|
||||
#include "control/toast.h"
|
||||
#include "utilities.h"
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef RECENTFILEMANAGER_H
|
||||
#define RECENTFILEMANAGER_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "scriptconsolemachine.h"
|
||||
|
||||
#include "AngelScript/sdk/add_on/scripthelper/scripthelper.h"
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef SCRIPTCONSOLEMACHINE_H
|
||||
#define SCRIPTCONSOLEMACHINE_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "scripteditortheme.h"
|
||||
|
||||
#include <QFile>
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef SCRIPTEDITORTHEME_H
|
||||
#define SCRIPTEDITORTHEME_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "scriptmachine.h"
|
||||
|
||||
#include "AngelScript/sdk/add_on/datetime/datetime.h"
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef SCRIPTMACHINE_H
|
||||
#define SCRIPTMACHINE_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "scriptmanager.h"
|
||||
|
||||
#include "dbghelper.h"
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef SCRIPTMANAGER_H
|
||||
#define SCRIPTMANAGER_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "settingmanager.h"
|
||||
|
||||
#include "class/logger.h"
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef SETTINGMANAGER_H
|
||||
#define SETTINGMANAGER_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "skinmanager.h"
|
||||
|
||||
#include "dbghelper.h"
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef SKINMANAGER_H
|
||||
#define SKINMANAGER_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "wingangelapi.h"
|
||||
|
||||
#include "AngelScript/sdk/angelscript/include/angelscript.h"
|
||||
|
@ -28,13 +45,7 @@ WingAngelAPI::WingAngelAPI() {
|
|||
_fnbuffer.reserve(signalCount);
|
||||
}
|
||||
|
||||
WingAngelAPI::~WingAngelAPI() {
|
||||
for (auto &p : _fnbuffer) {
|
||||
auto f = reinterpret_cast<std::function<void(void *)> *>(p);
|
||||
delete f;
|
||||
}
|
||||
_fnbuffer.clear();
|
||||
}
|
||||
WingAngelAPI::~WingAngelAPI() { _fnbuffer.clear(); }
|
||||
|
||||
int WingAngelAPI::sdkVersion() const { return WingHex::SDKVERSION; }
|
||||
|
||||
|
|
|
@ -1,10 +1,29 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef WINGANGELAPI_H
|
||||
#define WINGANGELAPI_H
|
||||
|
||||
#include "AngelScript/sdk/add_on/scriptarray/scriptarray.h"
|
||||
#include "plugin/iwingplugin.h"
|
||||
|
||||
#include <any>
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
|
||||
class asIScriptEngine;
|
||||
|
||||
|
@ -45,11 +64,11 @@ private:
|
|||
template <class T>
|
||||
void registerAPI(asIScriptEngine *engine, const std::function<T> &fn,
|
||||
const char *sig) {
|
||||
auto *f = new std::function<T>(fn);
|
||||
_fnbuffer.push_back(fn);
|
||||
auto r = engine->RegisterGlobalFunction(
|
||||
sig, asMETHOD(std::function<T>, operator()),
|
||||
asCALL_THISCALL_ASGLOBAL, f);
|
||||
_fnbuffer << f;
|
||||
asCALL_THISCALL_ASGLOBAL,
|
||||
std::any_cast<std::function<T>>(&_fnbuffer.back()));
|
||||
Q_ASSERT(r >= 0);
|
||||
}
|
||||
|
||||
|
@ -118,7 +137,7 @@ private:
|
|||
const CScriptArray &headerNames);
|
||||
|
||||
private:
|
||||
QVector<void *> _fnbuffer;
|
||||
std::vector<std::any> _fnbuffer;
|
||||
};
|
||||
|
||||
#endif // WINGANGELAPI_H
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "wingfiledialog.h"
|
||||
#include "../dialog/framelessdialogbase.h"
|
||||
#include "settingmanager.h"
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef WINGFILEDIALOG_H
|
||||
#define WINGFILEDIALOG_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "winginputdialog.h"
|
||||
#include "../dialog/framelessdialogbase.h"
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef WINGINPUTDIALOG_H
|
||||
#define WINGINPUTDIALOG_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "wingmessagebox.h"
|
||||
#include "class/eventfilter.h"
|
||||
#include "dialog/framelessdialogbase.h"
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef WINGMESSAGEBOX_H
|
||||
#define WINGMESSAGEBOX_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "wingprogressdialog.h"
|
||||
|
||||
WingProgressDialog::WingProgressDialog(const QString &labelText,
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef WINGPROGRESSDIALOG_H
|
||||
#define WINGPROGRESSDIALOG_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "workspacemanager.h"
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef WORKSPACEMANAGER_H
|
||||
#define WORKSPACEMANAGER_H
|
||||
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2006-2009 fullmetalcoder <fullmetalcoder@hotmail.fr>
|
||||
**
|
||||
** This file is part of the Edyuk project <http://edyuk.org>
|
||||
**
|
||||
** This file may be used under the terms of the GNU General Public License
|
||||
** version 3 as published by the Free Software Foundation and appearing in the
|
||||
** file GPL.txt included in the packaging of this file.
|
||||
**
|
||||
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _QCM_CONFIG_H_
|
||||
#define _QCM_CONFIG_H_
|
||||
|
||||
#include <qglobal.h>
|
||||
|
||||
#ifndef QCM_EXPORT
|
||||
#define QCM_EXPORT
|
||||
#endif
|
||||
|
||||
class QByteArray;
|
||||
|
||||
template <typename T>
|
||||
class QList;
|
||||
|
||||
typedef QByteArray QToken;
|
||||
typedef QList<QToken> QTokenList;
|
||||
|
||||
#endif // _QCM_CONFIG_H_
|
|
@ -34,7 +34,7 @@ void QCodeModel::q_cache(QCodeNode *n, QByteArray cxt = QByteArray()) {
|
|||
// qDebug("Caching %s [0x%x] in 0x%x", cxt.constData(), n, this);
|
||||
}
|
||||
|
||||
for (auto &child : n->children) {
|
||||
for (auto &child : n->children()) {
|
||||
q_cache(child, cxt);
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ void QCodeModel::q_uncache(QCodeNode *n, QByteArray cxt = QByteArray()) {
|
|||
// qDebug("De-Caching %s", cxt.constData());
|
||||
}
|
||||
|
||||
for (auto &child : n->children) {
|
||||
for (auto &child : n->children()) {
|
||||
q_uncache(child, cxt);
|
||||
}
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ void QCodeModel::beginRemoveRows(const QModelIndex idx, int beg, int end) {
|
|||
|
||||
Q_EXTRACT_INDEX(idx, parent)
|
||||
|
||||
const QList<QCodeNode *> &l = parent ? parent->children : m_topLevel;
|
||||
const QList<QCodeNode *> &l = parent ? parent->children() : m_topLevel;
|
||||
|
||||
QByteArray cxt;
|
||||
|
||||
|
@ -113,7 +113,7 @@ void QCodeModel::endInsertRows() {
|
|||
CacheOp op = m_cache_ops.pop();
|
||||
|
||||
const QList<QCodeNode *> &l =
|
||||
op.parent ? op.parent->children : m_topLevel;
|
||||
op.parent ? op.parent->children() : m_topLevel;
|
||||
|
||||
QByteArray cxt;
|
||||
|
||||
|
@ -152,9 +152,9 @@ void QCodeModel::appendTopLevelNode(QCodeNode *n) {
|
|||
|
||||
while (nodes.count()) {
|
||||
n = nodes.pop();
|
||||
n->model = this;
|
||||
n->setModel(this);
|
||||
|
||||
foreach (QCodeNode *c, n->children)
|
||||
foreach (QCodeNode *c, n->children())
|
||||
nodes.push(c);
|
||||
}
|
||||
|
||||
|
@ -179,9 +179,9 @@ void QCodeModel::removeTopLevelNode(QCodeNode *n) {
|
|||
|
||||
while (nodes.count()) {
|
||||
n = nodes.pop();
|
||||
n->model = nullptr;
|
||||
n->setModel(nullptr);
|
||||
|
||||
for (auto &c : n->children) {
|
||||
for (auto &c : n->children()) {
|
||||
nodes.push(c);
|
||||
}
|
||||
}
|
||||
|
@ -260,7 +260,7 @@ QList<QCodeNode *> QCodeModel::findRootNodes(const QByteArray &name) {
|
|||
QList<QCodeNode *> l;
|
||||
|
||||
for (auto &g : m_topLevel) {
|
||||
for (auto &r : g->children) {
|
||||
for (auto &r : g->children()) {
|
||||
if (r->role(QCodeNode::Name) == name)
|
||||
l << r;
|
||||
}
|
||||
|
@ -296,10 +296,6 @@ bool QCodeModel::isCachable(QCodeNode *n, QByteArray &cxt) const {
|
|||
cxt += qn;
|
||||
|
||||
return true;
|
||||
|
||||
} else if (t == QCodeNode::Language) {
|
||||
|
||||
cxt += n->role(QCodeNode::Name); // + "/";
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -321,7 +317,7 @@ int QCodeModel::rowCount(const QModelIndex &parent) const {
|
|||
|
||||
Q_EXTRACT_INDEX(parent, item)
|
||||
|
||||
return item ? item->children.count() : 0;
|
||||
return item ? item->children().count() : 0;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -371,8 +367,8 @@ QCodeNode *QCodeModel::node(const QModelIndex &idx) const {
|
|||
\brief Please read Qt docs on Model/View framework for more informations
|
||||
*/
|
||||
QModelIndex QCodeModel::index(QCodeNode *n) const {
|
||||
return n ? createIndex(n->parent ? n->parent->children.indexOf(n)
|
||||
: m_topLevel.indexOf(n),
|
||||
return n ? createIndex(n->parent() ? n->parent()->children().indexOf(n)
|
||||
: m_topLevel.indexOf(n),
|
||||
0, n)
|
||||
: QModelIndex();
|
||||
}
|
||||
|
@ -392,8 +388,8 @@ QModelIndex QCodeModel::index(int row, int column,
|
|||
|
||||
if (!parent.isValid() && (row < m_topLevel.count())) {
|
||||
abs = m_topLevel.at(row);
|
||||
} else if (item && (row < item->children.count())) {
|
||||
abs = item->children.at(row);
|
||||
} else if (item && (row < item->children().count())) {
|
||||
abs = item->children().at(row);
|
||||
}
|
||||
|
||||
#ifdef _TRACE_MODEL_
|
||||
|
@ -420,7 +416,7 @@ QModelIndex QCodeModel::parent(const QModelIndex &index) const {
|
|||
Q_EXTRACT_INDEX(index, child)
|
||||
|
||||
if (child)
|
||||
parent = child->parent;
|
||||
parent = child->parent();
|
||||
|
||||
#ifdef _TRACE_MODEL_
|
||||
|
||||
|
@ -435,8 +431,9 @@ QModelIndex QCodeModel::parent(const QModelIndex &index) const {
|
|||
if (!parent)
|
||||
return QModelIndex();
|
||||
|
||||
const int row = parent->parent ? parent->parent->children.indexOf(parent)
|
||||
: m_topLevel.indexOf(parent);
|
||||
const int row = parent->parent()
|
||||
? parent->parent()->children().indexOf(parent)
|
||||
: m_topLevel.indexOf(parent);
|
||||
|
||||
return createIndex(row, 0, parent);
|
||||
}
|
||||
|
|
|
@ -16,18 +16,16 @@
|
|||
#ifndef _QCODE_MODEL_H_
|
||||
#define _QCODE_MODEL_H_
|
||||
|
||||
#include "qcm-config.h"
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
#include <QHash>
|
||||
#include <QStack>
|
||||
|
||||
struct QCodeNode;
|
||||
class QCodeNode;
|
||||
|
||||
class QCM_EXPORT QCodeModel : public QAbstractItemModel {
|
||||
class QCodeModel : public QAbstractItemModel {
|
||||
Q_OBJECT
|
||||
|
||||
friend struct QCodeNode;
|
||||
friend class QCodeNode;
|
||||
|
||||
public:
|
||||
enum ExtraRoles { TypeRole = Qt::UserRole, VisibilityRole };
|
||||
|
|
|
@ -90,86 +90,15 @@ static QIcon icon(int cacheIndex) {
|
|||
return q_icon_cache.value(cacheIndex);
|
||||
}
|
||||
|
||||
QByteArray section(const QByteArray &b, char c, int beg, int end = -1) {
|
||||
QList<QByteArray> l = b.split(c);
|
||||
|
||||
// qDebug("split %s into %i parts...", b.constData(), l.length());
|
||||
// qDebug("parts %i to %i", beg, end);
|
||||
|
||||
if (beg < 0)
|
||||
beg = l.length() + beg;
|
||||
|
||||
if (end < 0)
|
||||
end = l.length() + end;
|
||||
|
||||
int start = qMin(beg, end), stop = qMax(beg, end);
|
||||
|
||||
// qDebug("parts %i to %i", start, stop);
|
||||
|
||||
if ((start >= l.length()) || (stop < 0))
|
||||
return QByteArray();
|
||||
|
||||
QByteArray sec = l.at(start);
|
||||
|
||||
while (++start <= stop)
|
||||
sec.prepend(c).prepend(l.at(start));
|
||||
|
||||
return sec;
|
||||
}
|
||||
|
||||
void setSection(QByteArray &b, char c, int beg, int end = -1,
|
||||
const QByteArray &r = QByteArray()) {
|
||||
QList<QByteArray> l = b.split(c);
|
||||
|
||||
if (beg < 0)
|
||||
beg = l.length() + beg;
|
||||
|
||||
if (end < 0)
|
||||
end = l.length() + end;
|
||||
|
||||
int offset = 0, length = 0;
|
||||
int start = qMin(beg, end), stop = qMax(beg, end);
|
||||
|
||||
if ((start >= l.length()) || (stop < 0))
|
||||
return;
|
||||
|
||||
for (int i = 0; i < start; ++i)
|
||||
offset += l.at(i).length() + 1;
|
||||
|
||||
for (int i = start; i <= stop; ++i)
|
||||
length += l.at(i).length() + 1;
|
||||
|
||||
--length;
|
||||
|
||||
/*
|
||||
qDebug("set section [%i, %i]=>[%i, %i] of \"%s\" to \"%s\"",
|
||||
beg, end,
|
||||
offset, offset + length,
|
||||
b.constData(),
|
||||
r.constData());
|
||||
*/
|
||||
|
||||
b.replace(offset, length, r);
|
||||
}
|
||||
|
||||
void QCodeNode::operator delete(void *p) {
|
||||
QCodeNode *n = static_cast<QCodeNode *>(p);
|
||||
|
||||
if (!n)
|
||||
return;
|
||||
else
|
||||
::operator delete(p);
|
||||
}
|
||||
|
||||
QCodeNode::QCodeNode() : line(-1), parent(0), model(0) {}
|
||||
QCodeNode::QCodeNode() : line(-1), _parent(0), _model(0) {}
|
||||
|
||||
QCodeNode::~QCodeNode() {
|
||||
detach();
|
||||
QCodeNode::detach();
|
||||
|
||||
model = nullptr;
|
||||
parent = nullptr;
|
||||
_model = nullptr;
|
||||
_parent = nullptr;
|
||||
|
||||
clear();
|
||||
QCodeNode::clear();
|
||||
|
||||
QSourceCodeWatcher *w = QSourceCodeWatcher::watcher(this, nullptr);
|
||||
|
||||
|
@ -180,10 +109,10 @@ QCodeNode::~QCodeNode() {
|
|||
void QCodeNode::attach(QCodeNode *p) {
|
||||
detach();
|
||||
|
||||
if (!p || p->children.contains(this))
|
||||
if (!p || p->_children.contains(this))
|
||||
return;
|
||||
|
||||
bool modelChange = model != p->model;
|
||||
bool modelChange = _model != p->_model;
|
||||
|
||||
if (modelChange) {
|
||||
QStack<QCodeNode *> tree;
|
||||
|
@ -193,44 +122,44 @@ void QCodeNode::attach(QCodeNode *p) {
|
|||
while (tree.length()) {
|
||||
QCodeNode *n = tree.pop();
|
||||
|
||||
n->model = p->model;
|
||||
n->_model = p->_model;
|
||||
|
||||
foreach (QCodeNode *c, n->children)
|
||||
foreach (QCodeNode *c, n->_children)
|
||||
tree.push(c);
|
||||
}
|
||||
}
|
||||
|
||||
int row = p->children.length();
|
||||
int row = p->_children.length();
|
||||
|
||||
if (model)
|
||||
model->beginInsertRows(model->index(p), row, row);
|
||||
if (_model)
|
||||
_model->beginInsertRows(_model->index(p), row, row);
|
||||
|
||||
parent = p;
|
||||
p->children.insert(row, this);
|
||||
_parent = p;
|
||||
p->_children.insert(row, this);
|
||||
|
||||
if (model)
|
||||
model->endInsertRows();
|
||||
if (_model)
|
||||
_model->endInsertRows();
|
||||
}
|
||||
|
||||
void QCodeNode::detach() {
|
||||
if (!parent)
|
||||
if (!_parent)
|
||||
return;
|
||||
|
||||
int row = parent->children.indexOf(this);
|
||||
int row = _parent->_children.indexOf(this);
|
||||
|
||||
if (row < 0)
|
||||
return;
|
||||
|
||||
if (model)
|
||||
model->beginRemoveRows(model->index(parent), row, row);
|
||||
if (_model)
|
||||
_model->beginRemoveRows(_model->index(_parent), row, row);
|
||||
|
||||
parent->children.removeAt(row);
|
||||
parent = 0;
|
||||
_parent->_children.removeAt(row);
|
||||
_parent = 0;
|
||||
|
||||
if (model)
|
||||
model->endRemoveRows();
|
||||
if (_model)
|
||||
_model->endRemoveRows();
|
||||
|
||||
if (model) {
|
||||
if (_model) {
|
||||
QStack<QCodeNode *> tree;
|
||||
|
||||
tree.push(this);
|
||||
|
@ -238,16 +167,28 @@ void QCodeNode::detach() {
|
|||
while (tree.length()) {
|
||||
QCodeNode *n = tree.pop();
|
||||
|
||||
n->model = 0;
|
||||
n->_model = 0;
|
||||
|
||||
foreach (QCodeNode *c, n->children)
|
||||
foreach (QCodeNode *c, n->_children)
|
||||
tree.push(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QCodeModel *QCodeNode::model() const { return _model; }
|
||||
|
||||
void QCodeNode::setModel(QCodeModel *newModel) { _model = newModel; }
|
||||
|
||||
QCodeNode *QCodeNode::parent() const { return _parent; }
|
||||
|
||||
void QCodeNode::setParent(QCodeNode *newParent) { _parent = newParent; }
|
||||
|
||||
int QCodeNode::getLine() const { return line; }
|
||||
|
||||
void QCodeNode::setLine(int newLine) { line = newLine; }
|
||||
|
||||
void QCodeNode::clear() {
|
||||
QList<QCodeNode *> c = children;
|
||||
QList<QCodeNode *> c = _children;
|
||||
|
||||
removeAll();
|
||||
|
||||
|
@ -255,66 +196,61 @@ void QCodeNode::clear() {
|
|||
}
|
||||
|
||||
void QCodeNode::removeAll() {
|
||||
if (children.isEmpty())
|
||||
if (_children.isEmpty())
|
||||
return;
|
||||
|
||||
if (model)
|
||||
model->beginRemoveRows(model->index(this), 0, children.length() - 1);
|
||||
if (_model)
|
||||
_model->beginRemoveRows(_model->index(this), 0, _children.length() - 1);
|
||||
|
||||
foreach (QCodeNode *n, children) {
|
||||
n->model = 0;
|
||||
n->parent = 0;
|
||||
foreach (QCodeNode *n, _children) {
|
||||
n->_model = nullptr;
|
||||
n->_parent = nullptr;
|
||||
}
|
||||
|
||||
children.clear();
|
||||
_children.clear();
|
||||
|
||||
if (model)
|
||||
model->endRemoveRows();
|
||||
if (_model)
|
||||
_model->endRemoveRows();
|
||||
}
|
||||
|
||||
int QCodeNode::type() const {
|
||||
return roles.length() ? role(NodeType).at(0) : 0;
|
||||
return roles.value(NodeType, QByteArray(1, 0)).at(0);
|
||||
}
|
||||
|
||||
QByteArray QCodeNode::context() const {
|
||||
int t = type();
|
||||
|
||||
if ((t == Group) || (t == Language) || (t == Namespace))
|
||||
if ((t == Group) || (t == Namespace))
|
||||
return QByteArray();
|
||||
|
||||
const QCodeNode *p = this;
|
||||
|
||||
while (p->parent) {
|
||||
int t = p->parent->type();
|
||||
while (p->_parent) {
|
||||
int t = p->_parent->type();
|
||||
|
||||
if ((t == Group) || (t == Language) || (t == Namespace))
|
||||
if ((t == Group) || (t == Namespace))
|
||||
break;
|
||||
|
||||
p = p->parent;
|
||||
p = p->_parent;
|
||||
}
|
||||
|
||||
return p ? p->role(Context) : role(Context);
|
||||
}
|
||||
|
||||
QByteArray QCodeNode::qualifiedName(bool language) const {
|
||||
QByteArray QCodeNode::qualifiedName(bool ext) const {
|
||||
int t = type();
|
||||
|
||||
if (t == Group)
|
||||
return QByteArray();
|
||||
else if (t == Language)
|
||||
return language ? role(Name) : QByteArray();
|
||||
|
||||
QByteArray cxt = parent ? parent->qualifiedName(language) : QByteArray();
|
||||
|
||||
if (cxt.length()) {
|
||||
// if ( parent->type() == Language )
|
||||
// cxt += "/";
|
||||
// else
|
||||
QByteArray cxt;
|
||||
if (ext) {
|
||||
if (_parent && _parent->type() == Namespace) {
|
||||
cxt += _parent->role(Name);
|
||||
}
|
||||
cxt += "::";
|
||||
}
|
||||
|
||||
// cxt += role(Name);
|
||||
|
||||
cxt += role(Name);
|
||||
|
||||
if (t == Function) {
|
||||
|
@ -537,15 +473,10 @@ QVariant QCodeNode::data(int r) const {
|
|||
return QVariant();
|
||||
}
|
||||
|
||||
void QCodeNode::setData(int role, const QVariant &v) {
|
||||
Q_UNUSED(v)
|
||||
Q_UNUSED(role)
|
||||
}
|
||||
QByteArray QCodeNode::role(RoleIndex r) const { return roles.value(r); }
|
||||
|
||||
QByteArray QCodeNode::role(RoleIndex r) const {
|
||||
return section(roles, '@', (int)r, (int)r);
|
||||
}
|
||||
void QCodeNode::setRole(RoleIndex r, const QByteArray &b) { roles[r] = b; }
|
||||
|
||||
void QCodeNode::setRole(RoleIndex r, const QByteArray &b) {
|
||||
setSection(roles, '@', (int)r, (int)r, b);
|
||||
void QCodeNode::setNodeType(DefaultNodeTypes t) {
|
||||
setRole(NodeType, QByteArray(1, t));
|
||||
}
|
||||
|
|
|
@ -16,15 +16,15 @@
|
|||
#ifndef _QCODE_NODE_H_
|
||||
#define _QCODE_NODE_H_
|
||||
|
||||
#include "qcm-config.h"
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QVariant>
|
||||
|
||||
class QCodeModel;
|
||||
|
||||
struct QCM_EXPORT QCodeNode {
|
||||
class QCodeNode {
|
||||
public:
|
||||
enum RoleIndex {
|
||||
NodeType = 0,
|
||||
Name = 1,
|
||||
|
@ -55,9 +55,8 @@ struct QCM_EXPORT QCodeNode {
|
|||
Context = -1
|
||||
};
|
||||
|
||||
enum DefaultNodeTypes {
|
||||
enum DefaultNodeTypes : char {
|
||||
Group = 'g',
|
||||
Language = 'l',
|
||||
|
||||
Class = 'c',
|
||||
// Struct = 's',
|
||||
|
@ -113,29 +112,40 @@ public:
|
|||
QCodeNode();
|
||||
virtual ~QCodeNode();
|
||||
|
||||
void operator delete(void *p);
|
||||
int type() const;
|
||||
QByteArray context() const;
|
||||
QByteArray qualifiedName(bool ext = false) const;
|
||||
|
||||
virtual int type() const;
|
||||
virtual QByteArray context() const;
|
||||
virtual QByteArray qualifiedName(bool language = true) const;
|
||||
|
||||
virtual QVariant data(int role) const;
|
||||
virtual void setData(int role, const QVariant &v);
|
||||
QVariant data(int role) const;
|
||||
|
||||
QByteArray role(RoleIndex r) const;
|
||||
void setRole(RoleIndex r, const QByteArray &b);
|
||||
|
||||
virtual void clear();
|
||||
virtual void removeAll();
|
||||
QList<QCodeNode *> &children() { return _children; }
|
||||
|
||||
virtual void attach(QCodeNode *p);
|
||||
virtual void detach();
|
||||
void setNodeType(DefaultNodeTypes t);
|
||||
|
||||
int line;
|
||||
QByteArray roles;
|
||||
QCodeNode *parent;
|
||||
QCodeModel *model;
|
||||
QList<QCodeNode *> children;
|
||||
void clear();
|
||||
void removeAll();
|
||||
|
||||
void attach(QCodeNode *p);
|
||||
void detach();
|
||||
|
||||
QCodeModel *model() const;
|
||||
void setModel(QCodeModel *newModel);
|
||||
|
||||
QCodeNode *parent() const;
|
||||
void setParent(QCodeNode *newParent);
|
||||
|
||||
int getLine() const;
|
||||
void setLine(int newLine);
|
||||
|
||||
private:
|
||||
int line = -1;
|
||||
QMap<RoleIndex, QByteArray> roles;
|
||||
QCodeNode *_parent = nullptr;
|
||||
QCodeModel *_model = nullptr;
|
||||
QList<QCodeNode *> _children;
|
||||
};
|
||||
|
||||
#endif // !_QCODE_NODE_H_
|
||||
|
|
|
@ -24,8 +24,7 @@
|
|||
#include "qcodenode.h"
|
||||
|
||||
static QList<int> priority = QList<int>()
|
||||
<< QCodeNode::Group << QCodeNode::Language
|
||||
<< QCodeNode::Namespace
|
||||
<< QCodeNode::Group << QCodeNode::Namespace
|
||||
<< QCodeNode::Class
|
||||
// << QCodeNode::Struct << QCodeNode::Union
|
||||
<< QCodeNode::Enum << QCodeNode::Typedef
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
#ifndef _QCODE_PROXY_MODEL_H_
|
||||
#define _QCODE_PROXY_MODEL_H_
|
||||
|
||||
#include "qcm-config.h"
|
||||
|
||||
/*!
|
||||
\file qcodeproxymodel.h
|
||||
\brief Definition of the QCodeProxyModel class.
|
||||
|
@ -25,7 +23,7 @@
|
|||
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
class QCM_EXPORT QCodeProxyModel : public QSortFilterProxyModel {
|
||||
class QCodeProxyModel : public QSortFilterProxyModel {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
|
|
@ -1,195 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2006-2009 fullmetalcoder <fullmetalcoder@hotmail.fr>
|
||||
**
|
||||
** This file is part of the Edyuk project <http://edyuk.org>
|
||||
**
|
||||
** This file may be used under the terms of the GNU General Public License
|
||||
** version 3 as published by the Free Software Foundation and appearing in the
|
||||
** file GPL.txt included in the packaging of this file.
|
||||
**
|
||||
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qcodeserializer.h"
|
||||
|
||||
/*!
|
||||
\file qcodeserializer.cpp
|
||||
\brief Implementation of the QCodeSerializer class.
|
||||
*/
|
||||
|
||||
#include "qcodemodel.h"
|
||||
#include "qcodenode.h"
|
||||
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QIODevice>
|
||||
#include <QRegularExpression>
|
||||
#include <QTextStream>
|
||||
|
||||
/*
|
||||
File format :
|
||||
* header : '{' MIME type (text/x-tag) ',' version ',' source '}'
|
||||
* each line represents on node as a at ('@') separated list of roles
|
||||
* each space at the begining of the line represents a parenting level
|
||||
|
||||
*/
|
||||
|
||||
#define Q_VERSION(maj, min, patch) ((maj << 8) | (min << 8) | patch)
|
||||
|
||||
static int _version = Q_VERSION(2, 0, 0);
|
||||
static int _version_min = Q_VERSION(2, 0, 0), _version_max = Q_VERSION(2, 0, 0);
|
||||
static QString header_pattern("{text/x-tag,%1,%2}");
|
||||
static QRegularExpression
|
||||
header_matcher("^\\{text/x-tag,([0-9a-fA-F]+),([^}]+)\\}\n$");
|
||||
|
||||
/*!
|
||||
\class QCodeSerializer
|
||||
\brief Serializer/deserializer for code trees
|
||||
*/
|
||||
|
||||
QCodeSerializer::QCodeSerializer() : m_model(0) {}
|
||||
|
||||
QCodeSerializer::~QCodeSerializer() {}
|
||||
|
||||
QCodeModel *QCodeSerializer::targetModel() const { return m_model; }
|
||||
|
||||
void QCodeSerializer::setTargetModel(QCodeModel *m) { m_model = m; }
|
||||
|
||||
void QCodeSerializer::serialize(QCodeNode *n, QTextStream &out, int indent) {
|
||||
if (!n)
|
||||
return;
|
||||
|
||||
if (indent > 0)
|
||||
out << QByteArray(indent, ' ');
|
||||
else
|
||||
out << header_pattern.arg(QString::number(_version))
|
||||
.arg(QString::fromLocal8Bit(n->role(QCodeNode::Context)))
|
||||
<< Qt::endl;
|
||||
|
||||
out << n->roles << "\n";
|
||||
|
||||
foreach (QCodeNode *c, n->children)
|
||||
serialize(c, out, indent + 1);
|
||||
}
|
||||
|
||||
void QCodeSerializer::deserialize(const QString &file, bool *ok,
|
||||
QString *source, const QDateTime &t) {
|
||||
QFile f(file);
|
||||
|
||||
if (f.open(QFile::Text | QFile::ReadOnly))
|
||||
deserialize(&f, ok, source, t);
|
||||
}
|
||||
|
||||
void QCodeSerializer::deserialize(QIODevice *device, bool *ok, QString *source,
|
||||
const QDateTime &t) {
|
||||
if (!device)
|
||||
return;
|
||||
|
||||
QByteArray line;
|
||||
int indent = 0, spaces;
|
||||
QCodeNode *n, *previous = 0, *parent = 0;
|
||||
|
||||
line = device->readLine();
|
||||
|
||||
auto match = header_matcher.match(line);
|
||||
|
||||
if (!match.hasMatch()) {
|
||||
qWarning("Header mismatch : %s", line.constData());
|
||||
|
||||
if (ok)
|
||||
*ok = false;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
int version = match.captured(1).toInt(0, 0);
|
||||
|
||||
if ((version < _version_min) || (version > _version_max)) {
|
||||
qWarning("Version mismatch : %i !E [%i, %i]", version, _version_min,
|
||||
_version_max);
|
||||
|
||||
if (ok)
|
||||
*ok = false;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (source)
|
||||
*source = match.captured(2);
|
||||
|
||||
if (t.isValid() && ok) {
|
||||
// check time stamps if someone pay attention to success/failure
|
||||
QFileInfo info(*source);
|
||||
|
||||
if (info.lastModified() > t) {
|
||||
// source modified after tag file... must reload...
|
||||
|
||||
*ok = false;
|
||||
}
|
||||
}
|
||||
|
||||
while (!device->atEnd()) {
|
||||
spaces = 0;
|
||||
char c;
|
||||
bool ok = device->getChar(&c);
|
||||
|
||||
while (ok && isspace(c) && (c != '\n')) {
|
||||
++spaces;
|
||||
ok = device->getChar(&c);
|
||||
}
|
||||
|
||||
if (!ok || c == '\n')
|
||||
continue;
|
||||
|
||||
if (spaces > indent) {
|
||||
// down one level
|
||||
parent = previous;
|
||||
|
||||
// if ( parent )
|
||||
// qDebug("down a level : parent = %s",
|
||||
// parent->role(QCodeNode::Name).constData());
|
||||
} else if (spaces < indent) {
|
||||
|
||||
// up one (or more) level
|
||||
for (int i = 0; (i < (indent - spaces)) && parent && parent->parent;
|
||||
++i)
|
||||
parent = parent ? parent->parent : 0;
|
||||
|
||||
// if ( parent )
|
||||
// qDebug("up one level : parent = %s",
|
||||
// parent->role(QCodeNode::Name).constData());
|
||||
} else {
|
||||
// qDebug("adding child %s", line.constData());
|
||||
}
|
||||
|
||||
n = new QCodeNode;
|
||||
|
||||
while (ok && c != '\n') {
|
||||
n->roles += c;
|
||||
ok = device->getChar(&c);
|
||||
}
|
||||
|
||||
// n->roles = device->readLine();
|
||||
// n->roles.prepend(c);
|
||||
|
||||
n->roles.squeeze();
|
||||
|
||||
if (parent)
|
||||
n->attach(parent);
|
||||
|
||||
indent = spaces;
|
||||
previous = n;
|
||||
}
|
||||
|
||||
while (parent && parent->parent)
|
||||
parent = parent->parent;
|
||||
|
||||
if (parent && m_model)
|
||||
m_model->appendTopLevelNode(parent);
|
||||
|
||||
if (ok)
|
||||
*ok = true;
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2006-2009 fullmetalcoder <fullmetalcoder@hotmail.fr>
|
||||
**
|
||||
** This file is part of the Edyuk project <http://edyuk.org>
|
||||
**
|
||||
** This file may be used under the terms of the GNU General Public License
|
||||
** version 3 as published by the Free Software Foundation and appearing in the
|
||||
** file GPL.txt included in the packaging of this file.
|
||||
**
|
||||
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _QCODE_SERIALIZER_H_
|
||||
#define _QCODE_SERIALIZER_H_
|
||||
|
||||
#include "qcm-config.h"
|
||||
|
||||
/*!
|
||||
\file qcodeserializer.h
|
||||
\brief Definition of the QCodeSerializer class.
|
||||
*/
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QThread>
|
||||
|
||||
struct QCodeNode;
|
||||
class QCodeModel;
|
||||
|
||||
class QIODevice;
|
||||
class QTextStream;
|
||||
|
||||
class QCM_EXPORT QCodeSerializer {
|
||||
public:
|
||||
QCodeSerializer();
|
||||
virtual ~QCodeSerializer();
|
||||
|
||||
QCodeModel *targetModel() const;
|
||||
void setTargetModel(QCodeModel *m);
|
||||
|
||||
void serialize(QCodeNode *n, QTextStream &out, int indent = 0);
|
||||
|
||||
void deserialize(const QString &file, bool *ok = 0, QString *source = 0,
|
||||
const QDateTime &t = QDateTime());
|
||||
|
||||
void deserialize(QIODevice *device, bool *ok = 0, QString *source = 0,
|
||||
const QDateTime &t = QDateTime());
|
||||
|
||||
private:
|
||||
QCodeModel *m_model;
|
||||
};
|
||||
|
||||
#endif // !_QCODE_SERIALIZER_H_
|
|
@ -47,7 +47,7 @@ QCodeView::QCodeView(QCodeModel *m, QWidget *p) : QTreeView(p), m_model(0) {
|
|||
connect(this, SIGNAL(activated(QModelIndex)), this,
|
||||
SLOT(indexActivated(QModelIndex)));
|
||||
|
||||
setModel(m);
|
||||
QCodeView::setModel(m);
|
||||
}
|
||||
|
||||
QCodeView::~QCodeView() {}
|
||||
|
@ -114,9 +114,10 @@ void QCodeView::indexActivated(const QModelIndex &idx) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
} else if (n->line != -1) {
|
||||
emit actionRequested("open", QStringList() << cxt << "-l"
|
||||
<< QString::number(n->line));
|
||||
} else if (n->getLine() != -1) {
|
||||
emit actionRequested("open", QStringList()
|
||||
<< cxt << "-l"
|
||||
<< QString::number(n->getLine()));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -132,20 +133,21 @@ void QCodeView::indexActivated(const QModelIndex &idx) {
|
|||
ptp = qn;
|
||||
rxp = QRegularExpression::escape(qn);
|
||||
|
||||
rxp.replace(
|
||||
QRegularExpression("\\s*(::|\\\\[()\\[\\]{}|*$+.?^]|[,&<>])\\s*"),
|
||||
"\\s*\\1\\s*");
|
||||
static QRegularExpression rxp_r(
|
||||
"\\s*(::|\\\\[()\\[\\]{}|*$+.?^]|[,&<>])\\s*");
|
||||
rxp.replace(rxp_r, "\\s*\\1\\s*");
|
||||
rxp.replace(" ", "\\s+");
|
||||
|
||||
i = rxp.indexOf("(");
|
||||
|
||||
QString tmp = rxp.mid(i);
|
||||
tmp.replace(
|
||||
QRegularExpression("(\\\\s[+*])[\\w_]+\\\\s\\*(,|\\\\\\)\\\\s\\*$)"),
|
||||
"\\1[\\w_]*\\s*\\2");
|
||||
static QRegularExpression tmp_r(
|
||||
"(\\\\s[+*])[\\w_]+\\\\s\\*(,|\\\\\\)\\\\s\\*$)");
|
||||
tmp.replace(tmp_r, QStringLiteral("\\1[\\w_]*\\s*\\2"));
|
||||
rxp = rxp.left(i) + tmp;
|
||||
|
||||
ptp.replace(QRegularExpression(" (::|[()<>]) "), "\\1");
|
||||
static QRegularExpression ptp_r(" (::|[()<>]) ");
|
||||
ptp.replace(ptp_r, QStringLiteral("\\1"));
|
||||
i = ptp.indexOf("(");
|
||||
|
||||
if (i != -1)
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
#ifndef _QCODE_VIEW_H_
|
||||
#define _QCODE_VIEW_H_
|
||||
|
||||
#include "qcm-config.h"
|
||||
|
||||
/*!
|
||||
\file qcodeview.h
|
||||
\brief Definition of the QCodeView class.
|
||||
|
@ -27,7 +25,7 @@
|
|||
|
||||
class QCodeModel;
|
||||
|
||||
class QCM_EXPORT QCodeView : public QTreeView {
|
||||
class QCodeView : public QTreeView {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
|
|
@ -32,7 +32,7 @@ QSourceCodeWatcher *QSourceCodeWatcher::watcher(QCodeNode *t, QCodeParser *c) {
|
|||
}
|
||||
}
|
||||
|
||||
return c ? new QSourceCodeWatcher(t, c, t->model) : 0;
|
||||
return c ? new QSourceCodeWatcher(t, c, t->model()) : 0;
|
||||
}
|
||||
|
||||
QSourceCodeWatcher::QSourceCodeWatcher(QCodeNode *n, QCodeParser *c, QObject *p)
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
#ifndef _QSOURCE_CODE_WATCHER_H_
|
||||
#define _QSOURCE_CODE_WATCHER_H_
|
||||
|
||||
#include "qcm-config.h"
|
||||
|
||||
#include <QFileSystemWatcher>
|
||||
#include <QHash>
|
||||
#include <QTimer>
|
||||
|
@ -25,7 +23,7 @@
|
|||
struct QCodeNode;
|
||||
class QCodeParser;
|
||||
|
||||
class QCM_EXPORT QSourceCodeWatcher : public QFileSystemWatcher {
|
||||
class QSourceCodeWatcher : public QFileSystemWatcher {
|
||||
friend struct QCodeNode;
|
||||
|
||||
Q_OBJECT
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "editorview.h"
|
||||
|
||||
#include "QHexView/document/buffer/qfilebuffer.h"
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef EDITORVIEW_H
|
||||
#define EDITORVIEW_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "gotowidget.h"
|
||||
#include "ui_gotowidget.h"
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef GOTOWIDGET_H
|
||||
#define GOTOWIDGET_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "huecolorpickerslider.h"
|
||||
#include "dialog/colorpickerdialog.h"
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef HUECOLORPICKERSLIDER_H
|
||||
#define HUECOLORPICKERSLIDER_H
|
||||
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
****************************************************************************/
|
||||
|
||||
#include "qcodecompletionwidget.h"
|
||||
|
||||
#include "control/qcodecompletionwidget_p.h"
|
||||
#include "qcodecompletionwidget_p.h"
|
||||
|
||||
#include "qdocument.h"
|
||||
#include "qdocumentcursor.h"
|
||||
|
@ -25,6 +24,8 @@
|
|||
#include "codemodel/qcodemodel.h"
|
||||
#include "codemodel/qcodenode.h"
|
||||
|
||||
#include "class/ascompletion.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QFocusEvent>
|
||||
#include <QKeyEvent>
|
||||
|
@ -118,9 +119,10 @@ QEditor *QCodeCompletionWidget::editor() const {
|
|||
}
|
||||
|
||||
void QCodeCompletionWidget::setEditor(QEditor *e) {
|
||||
pEditor = dynamic_cast<QObject *>(e);
|
||||
|
||||
setParent(e->viewport());
|
||||
pEditor = e;
|
||||
if (e) {
|
||||
setParent(e->viewport());
|
||||
}
|
||||
// QObject::setParent(pEditor);
|
||||
}
|
||||
|
||||
|
@ -212,7 +214,8 @@ void QCodeCompletionWidget::complete(const QModelIndex &index) {
|
|||
txt.remove(pb + 1, pe - pb - 1);
|
||||
}
|
||||
|
||||
txt.remove(QRegularExpression("(\\bconst\\s*)?(=\\s*0)?$"));
|
||||
static QRegularExpression re("(\\bconst\\s*)?(=\\s*0)?$");
|
||||
txt.remove(re);
|
||||
|
||||
if (prefix.length() && txt.startsWith(prefix))
|
||||
txt.remove(0, prefix.length());
|
||||
|
@ -406,14 +409,14 @@ void QCodeCompletionModel::forceUpdate() const {
|
|||
m_visibles.clear();
|
||||
|
||||
foreach (QCodeNode *n, m_nodes) {
|
||||
foreach (QCodeNode *c, n->children) {
|
||||
foreach (QCodeNode *c, n->children()) {
|
||||
if (match(c, m_filter, m_prefix)) {
|
||||
m_visibles << c;
|
||||
}
|
||||
|
||||
if (c->type() == QCodeNode::Enum) {
|
||||
if (match(c, m_filter))
|
||||
for (QCodeNode *ev : c->children)
|
||||
for (QCodeNode *ev : c->children())
|
||||
if (match(ev, m_filter, m_prefix))
|
||||
m_visibles << ev;
|
||||
}
|
||||
|
@ -423,7 +426,7 @@ void QCodeCompletionModel::forceUpdate() const {
|
|||
// qDebug("model updated");
|
||||
|
||||
bUpdate = false;
|
||||
emit changed();
|
||||
emit const_cast<QCodeCompletionModel *>(this)->changed();
|
||||
}
|
||||
|
||||
QList<QCodeNode *> QCodeCompletionModel::focusNodes() const { return m_nodes; }
|
||||
|
@ -454,7 +457,7 @@ QVariant QCodeCompletionModel::data(const QModelIndex &index, int role) const {
|
|||
int type = n->type();
|
||||
|
||||
if ((role == Qt::DisplayRole) && (type == QCodeNode::Enumerator))
|
||||
return n->parent->data(role).toString() +
|
||||
return n->parent()->data(role).toString() +
|
||||
"::" + n->data(role).toString();
|
||||
|
||||
if (role == Qt::UserRole)
|
||||
|
@ -481,7 +484,7 @@ int QCodeCompletionModel::rowCount(const QModelIndex &parent) const {
|
|||
bool QCodeCompletionModel::match(QCodeNode *n,
|
||||
QCodeCompletionWidget::Filter filter,
|
||||
const QByteArray &prefix) {
|
||||
QByteArray bcxt = n->parent->qualifiedName(),
|
||||
QByteArray bcxt = n->parent()->qualifiedName(),
|
||||
bnn = n->role(QCodeNode::Name);
|
||||
|
||||
if (!n || (prefix.length() && (!bnn.startsWith(prefix)))) {
|
||||
|
@ -537,7 +540,7 @@ bool QCodeCompletionModel::match(QCodeNode *n,
|
|||
((qualifiers & QCodeNode::QUALIFIER_CONST) &&
|
||||
!(filter & QCodeCompletionWidget::KeepConst)) ||
|
||||
((filter & QCodeCompletionWidget::IsStatic) &&
|
||||
(n->parent->type() != QCodeNode::Namespace)) ||
|
||||
(n->parent()->type() != QCodeNode::Namespace)) ||
|
||||
(!(qualifiers & QCodeNode::QUALIFIER_CONST) &&
|
||||
(filter & QCodeCompletionWidget::IsConst)) ||
|
||||
(!qstrcmp(name, ctxt + cxt_off) &&
|
||||
|
|
|
@ -21,14 +21,14 @@
|
|||
#include <QAbstractListModel>
|
||||
#include <QPointer>
|
||||
|
||||
struct QCodeNode;
|
||||
class QCodeNode;
|
||||
class QCodeModel;
|
||||
|
||||
class QCodeCompletionModel : public QAbstractListModel {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QCodeCompletionModel(QObject *p = 0);
|
||||
QCodeCompletionModel(QObject *p = nullptr);
|
||||
|
||||
void clear();
|
||||
void update();
|
||||
|
@ -53,7 +53,7 @@ public:
|
|||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
|
||||
signals:
|
||||
void changed() const;
|
||||
void changed();
|
||||
|
||||
void prefixChanged(const QString &newPrefix);
|
||||
void filterChanged(QCodeCompletionWidget::Filter f);
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include <QPaintEvent>
|
||||
#include <QPainter>
|
||||
#include <QPainterPath>
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef QCOLORPICKERSLIDER_H
|
||||
#define QCOLORPICKERSLIDER_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "qlistviewext.h"
|
||||
|
||||
#include <QScrollBar>
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef QLISTVIEWEXT_H
|
||||
#define QLISTVIEWEXT_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "qtableviewext.h"
|
||||
|
||||
#include <QScrollBar>
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef QTABLEVIEWEXT_H
|
||||
#define QTABLEVIEWEXT_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "scripteditor.h"
|
||||
#include "qeditor.h"
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef SCRIPTEDITOR_H
|
||||
#define SCRIPTEDITOR_H
|
||||
|
||||
|
|
|
@ -1,4 +1,21 @@
|
|||
#include "scriptingconsole.h"
|
||||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "scriptingconsole.h"
|
||||
#include "class/scriptconsolemachine.h"
|
||||
|
||||
#include <QApplication>
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef ScriptingConsole_H
|
||||
#define ScriptingConsole_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "toast.h"
|
||||
|
||||
#include <QColor>
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef TOAST_H
|
||||
#define TOAST_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef DBGHELPER_H
|
||||
#define DBGHELPER_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "aboutsoftwaredialog.h"
|
||||
#include "ui_aboutsoftwaredialog.h"
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef ABOUTSOFTWAREDIALOG_H
|
||||
#define ABOUTSOFTWAREDIALOG_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "checksumdialog.h"
|
||||
#include "utilities.h"
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef CHECKSUMDIALOG_H
|
||||
#define CHECKSUMDIALOG_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "colorpickerdialog.h"
|
||||
#include "ui_colorpickerdialog.h"
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef COLORPICKERDIALOG_H
|
||||
#define COLORPICKERDIALOG_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "driverselectordialog.h"
|
||||
#include "utilities.h"
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef DRIVERSELECTORDIALOG_H
|
||||
#define DRIVERSELECTORDIALOG_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#include "encodingdialog.h"
|
||||
|
||||
#include "../utilities.h"
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*==============================================================================
|
||||
** Copyright (C) 2024-2027 WingSummer
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify it under
|
||||
** the terms of the GNU Affero General Public License as published by the Free
|
||||
** Software Foundation, version 3.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
** details.
|
||||
**
|
||||
** You should have received a copy of the GNU Affero General Public License
|
||||
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
** =============================================================================
|
||||
*/
|
||||
|
||||
#ifndef ENCODINGDIALOG_H
|
||||
#define ENCODINGDIALOG_H
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue