添加了输出结果修饰

This commit is contained in:
codeboss 2024-05-26 12:11:45 +08:00
parent fd493ec599
commit a7488df082
6 changed files with 20 additions and 12 deletions

View File

@ -6,9 +6,9 @@
<LocalDebuggerCommandArguments>-path "D:\手作小说\科学+修仙+创造世界"</LocalDebuggerCommandArguments>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QtLastBackgroundBuild>2024-05-21T04:45:42.0274209Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-05-26T03:00:46.1252886Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QtLastBackgroundBuild>2024-05-21T04:45:42.3032065Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-05-26T03:00:46.2759396Z</QtLastBackgroundBuild>
</PropertyGroup>
</Project>

View File

@ -433,7 +433,7 @@ QString printer::tools_printer::storylines_paint(const QList<std::shared_ptr<Sto
for (auto& story : lines) {
auto story_elem = std::dynamic_pointer_cast<const example_novel::StoryDefine>(story->accessPeers()->element());
node_records[story_elem->signature()] = story;
nodes_description += get_node_name(story) + QString(u8"[fillcolor=pink,label=\"%1\",shape=\"cds\"]\n").arg(story_elem->name());
nodes_description += get_node_name(story) + QString(u8"[fillcolor=pink,label=\"%1{%2}\",shape=\"cds\"]\n").arg(story_elem->name()).arg(story_elem->sort());
for (auto &frag : story->elements()) {
auto fragment_peers = frag->accessPeers()->element();

View File

@ -124,13 +124,20 @@ int main(int argc, char* argv[]) {
dom_storyline.appendChild(dom_storyline_title);
body.appendChild(dom_storyline);
for (auto& inst_line : tool.storyline_defines) {
auto lines = tool.storyline_defines.values();
std::sort(lines.begin(), lines.end(), [](std::shared_ptr<printer::StoryLine> a, std::shared_ptr<printer::StoryLine> b)->bool{
auto a_elm = std::dynamic_pointer_cast<const example_novel::StoryDefine>(a->accessPeers()->element());
auto b_elm = std::dynamic_pointer_cast<const example_novel::StoryDefine>(b->accessPeers()->element());
return a_elm->sort() < b_elm->sort();
});
for (auto& inst_line : lines) {
auto dom_line = doc_inst.createElement("p");
dom_storyline.appendChild(dom_line);
auto line_href = doc_inst.createElement("a");
line_href.setAttribute(u8"href", u8"file:///" + inst_line->pageRefers());
line_href.appendChild(doc_inst.createTextNode(inst_line->accessPeers()->element()->signature()));
auto a_elm = std::dynamic_pointer_cast<const example_novel::StoryDefine>(inst_line->accessPeers()->element());
line_href.appendChild(doc_inst.createTextNode(QString(u8"%1.%2").arg(a_elm->sort()).arg(a_elm->signature())));
dom_line.appendChild(line_href);
}
@ -197,5 +204,6 @@ int main(int argc, char* argv[]) {
delete e;
}
}
return a.exec();
return 0;
//return a.exec();
}

View File

@ -5,9 +5,9 @@
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QtLastBackgroundBuild>2024-05-21T04:45:42.4291618Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-05-26T03:00:46.6593548Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QtLastBackgroundBuild>2024-05-21T04:45:42.6149103Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-05-26T03:00:46.7674012Z</QtLastBackgroundBuild>
</PropertyGroup>
</Project>

View File

@ -5,9 +5,9 @@
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QtLastBackgroundBuild>2024-05-21T04:45:43.0048786Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-05-26T03:00:46.5033717Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QtLastBackgroundBuild>2024-05-21T04:45:43.1820127Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-05-26T03:00:46.6093560Z</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-05-21T04:45:42.7152812Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-05-26T03:00:46.3513401Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QtLastBackgroundBuild>2024-05-21T04:45:42.9136302Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-05-26T03:00:46.4494964Z</QtLastBackgroundBuild>
</PropertyGroup>
</Project>