This commit is contained in:
codeboss 2024-04-02 23:23:21 +08:00
parent 8117f62107
commit 58ed6d6492
6 changed files with 20 additions and 20 deletions

View File

@ -5,9 +5,9 @@
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QtLastBackgroundBuild>2024-03-31T14:11:49.6878635Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-04-02T15:18:58.9876786Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QtLastBackgroundBuild>2024-03-31T14:11:50.2019950Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-04-02T15:18:59.1749926Z</QtLastBackgroundBuild>
</PropertyGroup>
</Project>

View File

@ -16,11 +16,11 @@ QString Access::pageRefers() const { return this->summary_refer_store; }
Element::Element(std::shared_ptr<const ast_gen::ElementAccess> handle) :Access(handle) {}
void printer::Element::setPieceRefer(const QString& href) {
void printer::Element::setSliceRefer(const QString& href) {
this->refer_store = href;
}
QString printer::Element::pieceRefers() const {
QString printer::Element::sliceRefers() const {
return refer_store;
}
@ -70,7 +70,7 @@ QString StoryLine::getPageHTML(QDomElement& parent) const {
case NovelNode::FragmentRefer:
case NovelNode::FragmentDefine: {
auto element_inst = this->getElement(inst_c->element()->signature());
element_inst->getPieceHTML(dom_storyline);
element_inst->getSliceHTML(dom_storyline);
}break;
default:
break;
@ -99,7 +99,7 @@ std::shared_ptr<Fragment> printer::FragmentRef::hostFragment() const
return this->host_inst.lock();
}
QString FragmentRef::getPieceHTML(QDomElement& dom_parent) const {
QString FragmentRef::getSliceHTML(QDomElement& dom_parent) const {
auto syntax_element = this->accessPeers()->element();
auto refer_element = std::dynamic_pointer_cast<const FragmentRefers>(syntax_element);
@ -142,7 +142,7 @@ QString FragmentRef::getPageHTML(QDomElement& parent) const {
refers_dom.appendChild(title_block);
auto title_refer = doc.createElement(u8"a");
title_refer.appendChild(doc.createTextNode(refer_element->signature()));
title_refer.setAttribute("href", this->pieceRefers());
title_refer.setAttribute("href", this->sliceRefers());
title_block.appendChild(title_refer);
std::function<void(QList<std::shared_ptr<const ast_gen::ElementAccess>>)> build_cascade =
@ -175,7 +175,7 @@ QList<std::shared_ptr<FragmentRef>> Fragment::additionals() const {
return this->additionals_store;
}
QString Fragment::getPieceHTML(QDomElement& parent) const {
QString Fragment::getSliceHTML(QDomElement& parent) const {
auto syntax_access = this->accessPeers();
auto fragment_inst = std::dynamic_pointer_cast<const FragmentDefine>(syntax_access->element());
@ -332,7 +332,7 @@ std::function<void(const QList<std::shared_ptr<Element>>&, const QString&)> refe
[&](const QList<std::shared_ptr<Element>>& items, const QString& summary_href) {
for (auto& item : items) {
auto element_addr = QString::number((qulonglong)item->accessPeers()->element().get());
item->setPieceRefer(summary_href + u8"#" + element_addr);
item->setSliceRefer(summary_href + u8"#" + element_addr);
}
};

View File

@ -49,13 +49,13 @@ namespace printer {
/*
* @brief URL
*/
virtual void setPieceRefer(const QString& href);
virtual QString pieceRefers() const;
virtual void setSliceRefer(const QString& href);
virtual QString sliceRefers() const;
/*
* @brief HTML
*/
virtual QString getPieceHTML(QDomElement &doc) const = 0;
virtual QString getSliceHTML(QDomElement &doc) const = 0;
private:
QString refer_store;
@ -109,7 +109,7 @@ namespace printer {
QString getPageHTML(QDomElement& doc) const override;
// 通过 Element 继承
QString getPieceHTML(QDomElement& doc) const override;
QString getSliceHTML(QDomElement& doc) const override;
private:
std::weak_ptr<Fragment> host_inst;
@ -132,7 +132,7 @@ namespace printer {
QString getPageHTML(QDomElement& doc) const override;
// 通过 Element 继承
QString getPieceHTML(QDomElement& doc) const override;
QString getSliceHTML(QDomElement& doc) const override;
};

View File

@ -5,9 +5,9 @@
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QtLastBackgroundBuild>2024-03-31T14:11:50.6102543Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-04-02T15:18:59.4171377Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QtLastBackgroundBuild>2024-03-31T14:11:50.7328441Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-04-02T15:18:59.5628515Z</QtLastBackgroundBuild>
</PropertyGroup>
</Project>

View File

@ -5,9 +5,9 @@
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QtLastBackgroundBuild>2024-03-31T14:11:50.4238856Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-04-02T15:18:59.2348615Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QtLastBackgroundBuild>2024-03-31T14:11:50.5434786Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-04-02T15:18:59.3520172Z</QtLastBackgroundBuild>
</PropertyGroup>
</Project>

View File

@ -2,9 +2,9 @@
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QtLastBackgroundBuild>2024-03-31T14:11:50.7936395Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-04-02T15:18:59.6245932Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QtLastBackgroundBuild>2024-03-31T14:11:50.9152358Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-04-02T15:18:59.7760855Z</QtLastBackgroundBuild>
</PropertyGroup>
</Project>