Merge branch 'main' of http://101.34.228.45:3000/auto/AicsKnowledgeBase_client
commit
3bd491ee5b
|
@ -6,7 +6,7 @@ set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
set(CMAKE_CXX_STANDARD 20)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
|
|
||||||
find_package(Qt6 COMPONENTS Quick WebEngineQuick REQUIRED)
|
find_package(Qt6 COMPONENTS Gui Quick WebEngineQuick REQUIRED)
|
||||||
|
|
||||||
#遍历所有Cpp文件
|
#遍历所有Cpp文件
|
||||||
file(GLOB_RECURSE CPP_FILES src/*.cpp src/*.h)
|
file(GLOB_RECURSE CPP_FILES src/*.cpp src/*.h)
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
#include <QtConcurrent/QtConcurrent>
|
#include <QtConcurrent/QtConcurrent>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <QDesktopServices>
|
||||||
|
|
||||||
static const std::string baseUrl = "https://api.hammer-hfut.tk:233/aics/file/";
|
static const std::string baseUrl = "https://api.hammer-hfut.tk:233/aics/file/";
|
||||||
//static const std::string baseUrl = "http://127.0.0.1:4523/m1/2914957-0-6e5f2db1/";
|
//static const std::string baseUrl = "http://127.0.0.1:4523/m1/2914957-0-6e5f2db1/";
|
||||||
|
@ -426,3 +427,8 @@ void FileTransferManager::getMarkdown(const QString &fileId)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FileTransferManager::openLocalFile(const QString &fileName)
|
||||||
|
{
|
||||||
|
QDesktopServices::openUrl(QUrl::fromLocalFile("D:\\Downloads\\"+ fileName));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,8 @@ public:
|
||||||
|
|
||||||
Q_INVOKABLE void getMarkdown(const QString &fileId);
|
Q_INVOKABLE void getMarkdown(const QString &fileId);
|
||||||
|
|
||||||
|
Q_INVOKABLE void openLocalFile(const QString &fileName);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void transferComplete(bool download, QString fileId, QString fileName);
|
void transferComplete(bool download, QString fileId, QString fileName);
|
||||||
void markdownData(QString data);
|
void markdownData(QString data);
|
||||||
|
|
Loading…
Reference in New Issue