SILICON
Toggle main menu visibility
Loading...
Searching...
No Matches
projectSession.hpp
Go to the documentation of this file.
1
/*
2
Copyright (c) 2026. Giulio Cocconi
3
4
This program is free software: you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation, either version 3 of the License, or
7
(at your option) any later version.
8
*/
9
10
#pragma once
11
12
#include <optional>
13
#include <string>
14
#include <string_view>
15
16
#include <QString>
17
18
#include <
core/projectCircuitResolver.hpp
>
19
#include <
core/projectContext.hpp
>
20
#include <
core/serialization/component_registry.hpp
>
21
#include <
core/serialization/projectFile.hpp
>
22
23
namespace
SILICON::ui
{
24
26
struct
ProjectSession
{
27
QString
currentFileName
;
28
std::optional<SILICON::project::ProjectMetadata>
currentProjectMetadata
;
29
std::optional<SILICON::project::ProjectInfo>
currentProjectInfo
;
30
std::string
activeDocumentPath
;
31
32
SILICON::project::ProjectContext
projectContext
;
33
SILICON::project::ProjectCircuitResolver
circuitResolver
{
34
projectContext
,
SILICON::core::ComponentRegistry::instance
()};
35
36
[[nodiscard]] std::optional<std::string>
37
firstCircuitPath
(std::string_view excludedPath = {})
const
;
38
};
39
40
}
// namespace SILICON::ui
SILICON::core::ComponentRegistry::instance
static ComponentRegistry & instance()
Definition
component_registry.cpp:34
SILICON::project::ProjectCircuitResolver
Definition
projectCircuitResolver.hpp:33
SILICON::project::ProjectContext
Definition
projectContext.hpp:30
component_registry.hpp
SILICON::ui
Definition
actionGroups.hpp:14
projectCircuitResolver.hpp
projectContext.hpp
projectFile.hpp
SILICON::ui::ProjectSession
Definition
projectSession.hpp:26
SILICON::ui::ProjectSession::projectContext
SILICON::project::ProjectContext projectContext
Definition
projectSession.hpp:32
SILICON::ui::ProjectSession::currentProjectMetadata
std::optional< SILICON::project::ProjectMetadata > currentProjectMetadata
Definition
projectSession.hpp:28
SILICON::ui::ProjectSession::currentFileName
QString currentFileName
Definition
projectSession.hpp:27
SILICON::ui::ProjectSession::circuitResolver
SILICON::project::ProjectCircuitResolver circuitResolver
Definition
projectSession.hpp:33
SILICON::ui::ProjectSession::firstCircuitPath
std::optional< std::string > firstCircuitPath(std::string_view excludedPath={}) const
Definition
projectSession.cpp:8
SILICON::ui::ProjectSession::currentProjectInfo
std::optional< SILICON::project::ProjectInfo > currentProjectInfo
Definition
projectSession.hpp:29
SILICON::ui::ProjectSession::activeDocumentPath
std::string activeDocumentPath
Definition
projectSession.hpp:30
src
ui
project
projectSession.hpp
Generated by
1.17.0