mirror of
https://github.com/juzzlin/Heimer.git
synced 2025-05-09 04:41:10 +08:00
Introduce Core namespace
This commit is contained in:
parent
0eff4abc5a
commit
a5ed832a2c
@ -28,7 +28,6 @@ set(HEIMER_LIB_SRC
|
||||
editor_scene.cpp
|
||||
editor_view.cpp
|
||||
grid.cpp
|
||||
hash_seed.cpp
|
||||
image.cpp
|
||||
image_manager.cpp
|
||||
item_filter.cpp
|
||||
@ -36,26 +35,27 @@ set(HEIMER_LIB_SRC
|
||||
magic_zoom.cpp
|
||||
main_window.cpp
|
||||
mediator.cpp
|
||||
mind_map_data.cpp
|
||||
mind_map_data_base.cpp
|
||||
mouse_action.cpp
|
||||
node_action.hpp
|
||||
recent_files_manager.cpp
|
||||
selection_group.cpp
|
||||
state_machine.cpp
|
||||
test_mode.cpp
|
||||
types.hpp
|
||||
undo_stack.cpp
|
||||
user_exception.hpp
|
||||
utils.cpp
|
||||
version.hpp
|
||||
version_checker.cpp
|
||||
|
||||
core/graph.cpp
|
||||
core/hash_seed.cpp
|
||||
core/mind_map_data.cpp
|
||||
core/mind_map_data_base.cpp
|
||||
core/settings.cpp
|
||||
core/settings_proxy.cpp
|
||||
core/shadow_effect_params.hpp
|
||||
core/single_instance_container.cpp
|
||||
core/test_mode.cpp
|
||||
core/user_exception.hpp
|
||||
core/version.hpp
|
||||
core/version_checker.cpp
|
||||
|
||||
dialogs/about_dialog.cpp
|
||||
dialogs/color_dialog.cpp
|
||||
|
@ -25,12 +25,12 @@
|
||||
#include "node_action.hpp"
|
||||
#include "recent_files_manager.hpp"
|
||||
#include "state_machine.hpp"
|
||||
#include "user_exception.hpp"
|
||||
#include "version_checker.hpp"
|
||||
|
||||
#include "core/settings.hpp"
|
||||
#include "core/settings_proxy.hpp"
|
||||
#include "core/single_instance_container.hpp"
|
||||
#include "core/user_exception.hpp"
|
||||
#include "core/version_checker.hpp"
|
||||
|
||||
#include "dialogs/layout_optimization_dialog.hpp"
|
||||
#include "dialogs/png_export_dialog.hpp"
|
||||
@ -144,7 +144,7 @@ void Application::parseArgs(int argc, char ** argv)
|
||||
Application::Application(int & argc, char ** argv)
|
||||
: m_app(argc, argv)
|
||||
, m_stateMachine(std::make_unique<StateMachine>())
|
||||
, m_versionChecker(std::make_unique<VersionChecker>())
|
||||
, m_versionChecker(std::make_unique<Core::VersionChecker>())
|
||||
{
|
||||
parseArgs(argc, argv);
|
||||
|
||||
@ -211,7 +211,7 @@ Application::Application(int & argc, char ** argv)
|
||||
}
|
||||
}
|
||||
|
||||
connect(m_versionChecker.get(), &VersionChecker::newVersionFound, this, [this](Version version, QString downloadUrl) {
|
||||
connect(m_versionChecker.get(), &Core::VersionChecker::newVersionFound, this, [this](Core::Version version, QString downloadUrl) {
|
||||
m_mainWindow->showStatusText(QString(tr("A new version %1 available at <a href='%2'>%2</a>")).arg(version.toString(), downloadUrl));
|
||||
});
|
||||
m_versionChecker->checkForNewReleases();
|
||||
|
@ -30,8 +30,10 @@ class EditorView;
|
||||
class ImageManager;
|
||||
class MainWindow;
|
||||
class Mediator;
|
||||
class Node;
|
||||
|
||||
namespace Core {
|
||||
class VersionChecker;
|
||||
}
|
||||
|
||||
namespace Dialogs {
|
||||
class PngExportDialog;
|
||||
@ -120,7 +122,7 @@ private:
|
||||
|
||||
std::unique_ptr<Dialogs::SvgExportDialog> m_svgExportDialog;
|
||||
|
||||
std::unique_ptr<VersionChecker> m_versionChecker;
|
||||
std::unique_ptr<Core::VersionChecker> m_versionChecker;
|
||||
};
|
||||
|
||||
#endif // APPLICATION_HPP
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include "graph.hpp"
|
||||
|
||||
#include "../test_mode.hpp"
|
||||
#include "test_mode.hpp"
|
||||
|
||||
#include "simple_logger.hpp"
|
||||
|
||||
@ -27,6 +27,8 @@
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
namespace Core {
|
||||
|
||||
namespace rv = ranges::views;
|
||||
|
||||
namespace {
|
||||
@ -180,3 +182,5 @@ Graph::~Graph()
|
||||
|
||||
juzzlin::L().debug() << "Graph deleted";
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
|
@ -25,6 +25,8 @@
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
namespace Core {
|
||||
|
||||
class Graph
|
||||
{
|
||||
public:
|
||||
@ -95,4 +97,6 @@ private:
|
||||
int m_count = 0;
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
|
||||
#endif // GRAPH_HPP
|
||||
|
@ -15,6 +15,8 @@
|
||||
|
||||
#include "hash_seed.hpp"
|
||||
|
||||
namespace Core {
|
||||
|
||||
void HashSeed::init()
|
||||
{
|
||||
#if QT_VERSION >= 0x50600
|
||||
@ -23,3 +25,5 @@ void HashSeed::init()
|
||||
qt_qhash_seed.store(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace Core
|
@ -22,10 +22,10 @@
|
||||
extern Q_CORE_EXPORT QBasicAtomicInt qt_qhash_seed;
|
||||
#endif
|
||||
|
||||
namespace HashSeed {
|
||||
namespace Core::HashSeed {
|
||||
|
||||
void init();
|
||||
|
||||
}
|
||||
} // namespace Core::HashSeed
|
||||
|
||||
#endif // HASH_SEED_HPP
|
@ -15,15 +15,17 @@
|
||||
|
||||
#include "mind_map_data.hpp"
|
||||
|
||||
#include "grid.hpp"
|
||||
#include "image_manager.hpp"
|
||||
#include "graph.hpp"
|
||||
#include "settings_proxy.hpp"
|
||||
#include "shadow_effect_params.hpp"
|
||||
#include "single_instance_container.hpp"
|
||||
|
||||
#include "core/settings_proxy.hpp"
|
||||
#include "core/shadow_effect_params.hpp"
|
||||
#include "core/single_instance_container.hpp"
|
||||
#include "../grid.hpp"
|
||||
#include "../image_manager.hpp"
|
||||
|
||||
#include "core/graph.hpp"
|
||||
#include "scene_items/node.hpp"
|
||||
#include "../scene_items/node.hpp"
|
||||
|
||||
namespace Core {
|
||||
|
||||
struct MindMapData::Style
|
||||
{
|
||||
@ -307,3 +309,5 @@ void MindMapData::setVersion(const QString & version)
|
||||
}
|
||||
|
||||
MindMapData::~MindMapData() = default;
|
||||
|
||||
} // namespace Core
|
@ -24,12 +24,15 @@
|
||||
#include "constants.hpp"
|
||||
#include "mind_map_data_base.hpp"
|
||||
|
||||
class Graph;
|
||||
class Grid;
|
||||
class ImageManager;
|
||||
class ObjectModelLoader;
|
||||
struct ShadowEffectParams;
|
||||
|
||||
namespace Core {
|
||||
|
||||
class Graph;
|
||||
|
||||
class MindMapData : public MindMapDataBase
|
||||
{
|
||||
public:
|
||||
@ -125,6 +128,6 @@ private:
|
||||
LayoutOptimizerParameters m_layoutOptimizerParameters;
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<MindMapData> MindMapDataPtr;
|
||||
} // namespace Core
|
||||
|
||||
#endif // MIND_MAP_DATA_HPP
|
@ -14,8 +14,11 @@
|
||||
// along with Heimer. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "test_mode.hpp"
|
||||
|
||||
#include "simple_logger.hpp"
|
||||
|
||||
namespace Core {
|
||||
|
||||
bool TestMode::m_enabled = false;
|
||||
|
||||
bool TestMode::enabled()
|
||||
@ -32,3 +35,5 @@ void TestMode::logDisabledCode(const std::string & message)
|
||||
{
|
||||
juzzlin::L().debug() << "TestMode: '" << message << "' disabled";
|
||||
}
|
||||
|
||||
} // namespace Core
|
@ -18,6 +18,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace Core {
|
||||
|
||||
class TestMode
|
||||
{
|
||||
public:
|
||||
@ -31,4 +33,6 @@ private:
|
||||
static bool m_enabled;
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
|
||||
#endif // TEST_MODE_HPP
|
@ -19,6 +19,8 @@
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
namespace Core {
|
||||
|
||||
class UserException : public std::runtime_error
|
||||
{
|
||||
public:
|
||||
@ -28,4 +30,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
|
||||
#endif // USER_EXCEPTION_HPP
|
@ -26,6 +26,8 @@
|
||||
#undef minor
|
||||
#undef patch
|
||||
|
||||
namespace Core {
|
||||
|
||||
struct Version
|
||||
{
|
||||
Version()
|
||||
@ -120,4 +122,6 @@ inline std::ostream & operator<<(std::ostream & os, const Version & version)
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
|
||||
#endif // VERSION_HPP
|
@ -23,6 +23,8 @@
|
||||
|
||||
using juzzlin::L;
|
||||
|
||||
namespace Core {
|
||||
|
||||
VersionChecker::VersionChecker(QObject * parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
@ -64,3 +66,5 @@ void VersionChecker::checkForNewReleases()
|
||||
});
|
||||
manager->get(QNetworkRequest({ Constants::Application::RELEASES_URL }));
|
||||
}
|
||||
|
||||
} // namespace Core
|
@ -20,6 +20,8 @@
|
||||
|
||||
#include "version.hpp"
|
||||
|
||||
namespace Core {
|
||||
|
||||
class VersionChecker : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -33,4 +35,6 @@ signals:
|
||||
void newVersionFound(Version version, QString downloadUrl);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
|
||||
#endif // VERSION_CHECKER_HPP
|
@ -17,7 +17,8 @@
|
||||
|
||||
#include "../constants.hpp"
|
||||
#include "../layout_optimizer.hpp"
|
||||
#include "../mind_map_data.hpp"
|
||||
|
||||
#include "../core/mind_map_data.hpp"
|
||||
|
||||
#include "widget_factory.hpp"
|
||||
|
||||
@ -35,7 +36,7 @@
|
||||
|
||||
namespace Dialogs {
|
||||
|
||||
LayoutOptimizationDialog::LayoutOptimizationDialog(QWidget & parent, MindMapData & mindMapData, LayoutOptimizer & layoutOptimizer)
|
||||
LayoutOptimizationDialog::LayoutOptimizationDialog(QWidget & parent, MindMapDataR mindMapData, LayoutOptimizer & layoutOptimizer)
|
||||
: QDialog(&parent)
|
||||
, m_mindMapData(mindMapData)
|
||||
, m_layoutOptimizer(layoutOptimizer)
|
||||
@ -68,7 +69,7 @@ void LayoutOptimizationDialog::finishOptimization()
|
||||
QTimer::singleShot(500, this, &QDialog::accept);
|
||||
}
|
||||
|
||||
void LayoutOptimizationDialog::initWidgets(const MindMapData & mindMapData)
|
||||
void LayoutOptimizationDialog::initWidgets(MindMapDataCR mindMapData)
|
||||
{
|
||||
const auto mainLayout = new QVBoxLayout(this);
|
||||
|
||||
|
@ -18,8 +18,9 @@
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include "../types.hpp"
|
||||
|
||||
class LayoutOptimizer;
|
||||
class MindMapData;
|
||||
class QDoubleSpinBox;
|
||||
class QProgressBar;
|
||||
|
||||
@ -31,7 +32,7 @@ class LayoutOptimizationDialog : public QDialog
|
||||
|
||||
public:
|
||||
//! Constructor.
|
||||
explicit LayoutOptimizationDialog(QWidget & parent, MindMapData & mindMapData, LayoutOptimizer & layoutOptimizer);
|
||||
explicit LayoutOptimizationDialog(QWidget & parent, MindMapDataR mindMapData, LayoutOptimizer & layoutOptimizer);
|
||||
|
||||
int exec() override;
|
||||
|
||||
@ -44,9 +45,9 @@ private slots:
|
||||
void finishOptimization();
|
||||
|
||||
private:
|
||||
void initWidgets(const MindMapData & mindMapData);
|
||||
void initWidgets(MindMapDataCR mindMapData);
|
||||
|
||||
MindMapData & m_mindMapData;
|
||||
MindMapDataR m_mindMapData;
|
||||
|
||||
LayoutOptimizer & m_layoutOptimizer;
|
||||
|
||||
|
@ -19,14 +19,15 @@
|
||||
#include "constants.hpp"
|
||||
#include "recent_files_manager.hpp"
|
||||
#include "selection_group.hpp"
|
||||
#include "test_mode.hpp"
|
||||
|
||||
#include "core/graph.hpp"
|
||||
#include "core/mind_map_data.hpp"
|
||||
#include "core/settings_proxy.hpp"
|
||||
#include "core/single_instance_container.hpp"
|
||||
#include "core/test_mode.hpp"
|
||||
|
||||
#include "io/alz_file_io.hpp"
|
||||
|
||||
#include "core/graph.hpp"
|
||||
#include "scene_items/edge.hpp"
|
||||
#include "scene_items/node.hpp"
|
||||
|
||||
@ -87,10 +88,10 @@ void EditorData::loadMindMapData(QString fileName)
|
||||
|
||||
m_selectedEdge = nullptr;
|
||||
|
||||
if (!TestMode::enabled()) {
|
||||
if (!Core::TestMode::enabled()) {
|
||||
setMindMapData(m_alzFileIO->fromFile(fileName));
|
||||
} else {
|
||||
TestMode::logDisabledCode("setMindMapData");
|
||||
Core::TestMode::logDisabledCode("setMindMapData");
|
||||
}
|
||||
|
||||
m_fileName = fileName;
|
||||
@ -167,7 +168,7 @@ bool EditorData::saveMindMap(bool async)
|
||||
|
||||
void EditorData::saveUndoPoint(bool dontClearRedoStack)
|
||||
{
|
||||
if (!TestMode::enabled()) {
|
||||
if (!Core::TestMode::enabled()) {
|
||||
if (m_undoTimer.isActive()) {
|
||||
L().debug() << "Saving undo point skipped..";
|
||||
m_undoTimer.start();
|
||||
@ -250,7 +251,7 @@ void EditorData::setTextColorForSelectedNodes(QColor color)
|
||||
}
|
||||
}
|
||||
|
||||
void EditorData::setMindMapData(MindMapDataPtr mindMapData)
|
||||
void EditorData::setMindMapData(MindMapDataS mindMapData)
|
||||
{
|
||||
m_mindMapData = mindMapData;
|
||||
|
||||
@ -467,7 +468,7 @@ NodeS EditorData::getNodeByIndex(int index)
|
||||
void EditorData::initializeNewMindMap()
|
||||
{
|
||||
requestAutosave(false);
|
||||
setMindMapData(std::make_shared<MindMapData>());
|
||||
setMindMapData(std::make_shared<Core::MindMapData>());
|
||||
}
|
||||
|
||||
bool EditorData::isInSelectionGroup(NodeR node)
|
||||
@ -475,7 +476,7 @@ bool EditorData::isInSelectionGroup(NodeR node)
|
||||
return m_selectionGroup->hasNode(node);
|
||||
}
|
||||
|
||||
MindMapDataPtr EditorData::mindMapData()
|
||||
MindMapDataS EditorData::mindMapData()
|
||||
{
|
||||
return m_mindMapData;
|
||||
}
|
||||
|
@ -28,7 +28,6 @@
|
||||
|
||||
#include "copy_context.hpp"
|
||||
#include "grid.hpp"
|
||||
#include "mind_map_data.hpp"
|
||||
#include "mouse_action.hpp"
|
||||
#include "types.hpp"
|
||||
#include "undo_stack.hpp"
|
||||
@ -117,7 +116,7 @@ public:
|
||||
|
||||
void loadMindMapData(QString fileName);
|
||||
|
||||
MindMapDataPtr mindMapData();
|
||||
MindMapDataS mindMapData();
|
||||
|
||||
void mirror(bool vertically);
|
||||
|
||||
@ -143,7 +142,7 @@ public:
|
||||
|
||||
void setGridSize(int size, bool autoSnap);
|
||||
|
||||
void setMindMapData(MindMapDataPtr newMindMapData);
|
||||
void setMindMapData(MindMapDataS newMindMapData);
|
||||
|
||||
void setSelectedEdge(EdgeP edge);
|
||||
|
||||
@ -190,7 +189,7 @@ private:
|
||||
|
||||
MouseAction m_mouseAction;
|
||||
|
||||
MindMapDataPtr m_mindMapData;
|
||||
MindMapDataS m_mindMapData;
|
||||
|
||||
std::unique_ptr<IO::AlzFileIO> m_alzFileIO;
|
||||
|
||||
|
@ -31,10 +31,10 @@
|
||||
#include "item_filter.hpp"
|
||||
#include "magic_zoom.hpp"
|
||||
#include "mediator.hpp"
|
||||
#include "mind_map_data.hpp"
|
||||
#include "mouse_action.hpp"
|
||||
#include "node_action.hpp"
|
||||
|
||||
#include "core/mind_map_data.hpp"
|
||||
#include "core/single_instance_container.hpp"
|
||||
|
||||
#include "menus/edge_context_menu.hpp"
|
||||
|
@ -16,12 +16,12 @@
|
||||
#include "alz_file_io.hpp"
|
||||
#include "alz_file_io_worker.hpp"
|
||||
|
||||
#include "../mind_map_data.hpp"
|
||||
#include "../core/mind_map_data.hpp"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QThread>
|
||||
|
||||
Q_DECLARE_METATYPE(std::shared_ptr<MindMapData>)
|
||||
Q_DECLARE_METATYPE(MindMapDataS)
|
||||
|
||||
namespace IO {
|
||||
|
||||
@ -29,7 +29,7 @@ AlzFileIO::AlzFileIO()
|
||||
: m_worker(std::make_unique<AlzFileIOWorker>())
|
||||
, m_workerThread(std::make_unique<QThread>())
|
||||
{
|
||||
qRegisterMetaType<std::shared_ptr<MindMapData>>();
|
||||
qRegisterMetaType<MindMapDataS>();
|
||||
|
||||
if (!m_workerThread->isRunning()) {
|
||||
m_workerThread->start();
|
||||
@ -43,26 +43,26 @@ void AlzFileIO::finish()
|
||||
m_workerThread->wait();
|
||||
}
|
||||
|
||||
std::unique_ptr<MindMapData> AlzFileIO::fromFile(QString path) const
|
||||
MindMapDataU AlzFileIO::fromFile(QString path) const
|
||||
{
|
||||
return m_worker->fromFile(path);
|
||||
}
|
||||
|
||||
bool AlzFileIO::toFile(std::shared_ptr<MindMapData> mindMapData, QString path, bool async) const
|
||||
bool AlzFileIO::toFile(MindMapDataS mindMapData, QString path, bool async) const
|
||||
{
|
||||
const auto connectionType = async ? Qt::QueuedConnection : Qt::BlockingQueuedConnection;
|
||||
|
||||
return QMetaObject::invokeMethod(m_worker.get(), "toFile", connectionType,
|
||||
Q_ARG(std::shared_ptr<MindMapData>, mindMapData),
|
||||
Q_ARG(MindMapDataS, mindMapData),
|
||||
Q_ARG(QString, path));
|
||||
}
|
||||
|
||||
std::unique_ptr<MindMapData> AlzFileIO::fromXml(QString xml) const
|
||||
MindMapDataU AlzFileIO::fromXml(QString xml) const
|
||||
{
|
||||
return m_worker->fromXml(xml);
|
||||
}
|
||||
|
||||
QString AlzFileIO::toXml(std::shared_ptr<MindMapData> mindMapData) const
|
||||
QString AlzFileIO::toXml(MindMapDataS mindMapData) const
|
||||
{
|
||||
return m_worker->toXml(mindMapData);
|
||||
}
|
||||
|
@ -17,10 +17,10 @@
|
||||
#define ALZ_FILE_IO_HPP
|
||||
|
||||
#include "file_io.hpp"
|
||||
#include "types.hpp"
|
||||
|
||||
#include <memory>
|
||||
|
||||
class MindMapData;
|
||||
class QThread;
|
||||
|
||||
namespace IO {
|
||||
@ -36,13 +36,13 @@ public:
|
||||
|
||||
void finish() override;
|
||||
|
||||
std::unique_ptr<MindMapData> fromFile(QString path) const override;
|
||||
MindMapDataU fromFile(QString path) const override;
|
||||
|
||||
bool toFile(std::shared_ptr<MindMapData> mindMapData, QString path, bool async) const override;
|
||||
bool toFile(MindMapDataS mindMapData, QString path, bool async) const override;
|
||||
|
||||
std::unique_ptr<MindMapData> fromXml(QString xml) const;
|
||||
MindMapDataU fromXml(QString xml) const;
|
||||
|
||||
QString toXml(std::shared_ptr<MindMapData> mindMapData) const;
|
||||
QString toXml(MindMapDataS mindMapData) const;
|
||||
|
||||
private:
|
||||
std::unique_ptr<AlzFileIOWorker> m_worker;
|
||||
|
@ -20,10 +20,11 @@
|
||||
|
||||
#include "../constants.hpp"
|
||||
#include "../image_manager.hpp"
|
||||
#include "../test_mode.hpp"
|
||||
#include "../types.hpp"
|
||||
|
||||
#include "../core/graph.hpp"
|
||||
#include "../core/mind_map_data.hpp"
|
||||
#include "../core/test_mode.hpp"
|
||||
|
||||
#include "../scene_items/edge.hpp"
|
||||
#include "../scene_items/node.hpp"
|
||||
@ -40,6 +41,8 @@
|
||||
#include <QFile>
|
||||
#include <QTemporaryDir>
|
||||
|
||||
using Core::TestMode;
|
||||
|
||||
namespace IO {
|
||||
|
||||
namespace DataKeywords::MindMap {
|
||||
@ -175,7 +178,7 @@ static void writeImageRef(QDomElement & parent, QDomDocument & doc, size_t image
|
||||
parent.appendChild(colorElement);
|
||||
}
|
||||
|
||||
static void writeNodes(std::shared_ptr<MindMapData> mindMapData, QDomElement & root, QDomDocument & doc)
|
||||
static void writeNodes(MindMapDataS mindMapData, QDomElement & root, QDomDocument & doc)
|
||||
{
|
||||
for (auto && node : mindMapData->graph().getNodes()) {
|
||||
auto nodeElement = doc.createElement(DataKeywords::MindMap::Graph::NODE);
|
||||
@ -206,7 +209,7 @@ static void writeNodes(std::shared_ptr<MindMapData> mindMapData, QDomElement & r
|
||||
}
|
||||
}
|
||||
|
||||
static void writeEdges(std::shared_ptr<MindMapData> mindMapData, QDomElement & root, QDomDocument & doc)
|
||||
static void writeEdges(MindMapDataS mindMapData, QDomElement & root, QDomDocument & doc)
|
||||
{
|
||||
for (auto && node : mindMapData->graph().getNodes()) {
|
||||
for (auto && edge : mindMapData->graph().getEdgesFromNode(node)) {
|
||||
@ -261,7 +264,7 @@ static QImage base64ToQImage(const std::string & base64, size_t imageId, std::st
|
||||
return in;
|
||||
}
|
||||
|
||||
static void writeImages(std::shared_ptr<MindMapData> mindMapData, QDomElement & root, QDomDocument & doc)
|
||||
static void writeImages(MindMapDataS mindMapData, QDomElement & root, QDomDocument & doc)
|
||||
{
|
||||
std::set<size_t> writtenImageRefs;
|
||||
for (auto && node : mindMapData->graph().getNodes()) {
|
||||
@ -294,7 +297,7 @@ static void writeImages(std::shared_ptr<MindMapData> mindMapData, QDomElement &
|
||||
}
|
||||
}
|
||||
|
||||
static void writeLayoutOptimizer(std::shared_ptr<MindMapData> mindMapData, QDomElement & root, QDomDocument & doc)
|
||||
static void writeLayoutOptimizer(MindMapDataS mindMapData, QDomElement & root, QDomDocument & doc)
|
||||
{
|
||||
auto layoutOptimizerElement = doc.createElement(DataKeywords::MindMap::LayoutOptimizer::LAYOUT_OPTIMIZER);
|
||||
layoutOptimizerElement.setAttribute(DataKeywords::MindMap::LayoutOptimizer::ASPECT_RATIO, mindMapData->aspectRatio() * SCALE);
|
||||
@ -384,7 +387,7 @@ static NodeU readNode(const QDomElement & element)
|
||||
return node;
|
||||
}
|
||||
|
||||
static EdgeU readEdge(const QDomElement & element, MindMapData & data)
|
||||
static EdgeU readEdge(const QDomElement & element, Core::MindMapData & data)
|
||||
{
|
||||
const int arrowMode = element.attribute(DataKeywords::MindMap::Graph::Edge::ARROW_MODE, "0").toInt();
|
||||
const bool dashedLine = element.attribute(DataKeywords::MindMap::Graph::Edge::DASHED_LINE, "0").toInt();
|
||||
@ -405,7 +408,7 @@ static EdgeU readEdge(const QDomElement & element, MindMapData & data)
|
||||
return edge;
|
||||
}
|
||||
|
||||
static void readLayoutOptimizer(const QDomElement & element, MindMapData & data)
|
||||
static void readLayoutOptimizer(const QDomElement & element, Core::MindMapData & data)
|
||||
{
|
||||
double aspectRatio = element.attribute(DataKeywords::MindMap::LayoutOptimizer::ASPECT_RATIO, "-1").toDouble() / SCALE;
|
||||
aspectRatio = std::min(aspectRatio, Constants::LayoutOptimizer::MAX_ASPECT_RATIO);
|
||||
@ -418,7 +421,7 @@ static void readLayoutOptimizer(const QDomElement & element, MindMapData & data)
|
||||
data.setMinEdgeLength(minEdgeLength);
|
||||
}
|
||||
|
||||
static void readGraph(const QDomElement & graph, MindMapData & data)
|
||||
static void readGraph(const QDomElement & graph, Core::MindMapData & data)
|
||||
{
|
||||
readChildren(graph, {
|
||||
{ QString(DataKeywords::MindMap::Graph::NODE), [&data](const QDomElement & e) {
|
||||
@ -430,10 +433,10 @@ static void readGraph(const QDomElement & graph, MindMapData & data)
|
||||
});
|
||||
}
|
||||
|
||||
std::unique_ptr<MindMapData> fromXml(QDomDocument document)
|
||||
MindMapDataU fromXml(QDomDocument document)
|
||||
{
|
||||
const auto root = document.documentElement();
|
||||
auto data = std::make_unique<MindMapData>();
|
||||
auto data = std::make_unique<Core::MindMapData>();
|
||||
data->setVersion(root.attribute(DataKeywords::MindMap::APPLICATION_VERSION, "UNDEFINED"));
|
||||
|
||||
readChildren(root, { { QString(DataKeywords::MindMap::GRAPH), [&data](const QDomElement & e) {
|
||||
@ -485,7 +488,7 @@ std::unique_ptr<MindMapData> fromXml(QDomDocument document)
|
||||
return data;
|
||||
}
|
||||
|
||||
QDomDocument toXml(std::shared_ptr<MindMapData> mindMapData)
|
||||
QDomDocument toXml(MindMapDataS mindMapData)
|
||||
{
|
||||
QDomDocument doc;
|
||||
|
||||
@ -543,24 +546,24 @@ QDomDocument toXml(std::shared_ptr<MindMapData> mindMapData)
|
||||
|
||||
AlzFileIOWorker::~AlzFileIOWorker() = default;
|
||||
|
||||
std::unique_ptr<MindMapData> AlzFileIOWorker::fromFile(QString path) const
|
||||
MindMapDataU AlzFileIOWorker::fromFile(QString path) const
|
||||
{
|
||||
return IO::fromXml(XmlReader::readFromFile(path));
|
||||
}
|
||||
|
||||
bool AlzFileIOWorker::toFile(std::shared_ptr<MindMapData> mindMapData, QString path) const
|
||||
bool AlzFileIOWorker::toFile(MindMapDataS mindMapData, QString path) const
|
||||
{
|
||||
return XmlWriter::writeToFile(IO::toXml(mindMapData), path);
|
||||
}
|
||||
|
||||
std::unique_ptr<MindMapData> AlzFileIOWorker::fromXml(QString xml) const
|
||||
MindMapDataU AlzFileIOWorker::fromXml(QString xml) const
|
||||
{
|
||||
QDomDocument document;
|
||||
document.setContent(xml, false);
|
||||
return IO::fromXml(document);
|
||||
}
|
||||
|
||||
QString AlzFileIOWorker::toXml(std::shared_ptr<MindMapData> mindMapData) const
|
||||
QString AlzFileIOWorker::toXml(MindMapDataS mindMapData) const
|
||||
{
|
||||
return IO::toXml(mindMapData).toString();
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "../mind_map_data.hpp"
|
||||
#include "../types.hpp"
|
||||
|
||||
namespace IO {
|
||||
|
||||
@ -34,13 +34,13 @@ public:
|
||||
|
||||
public slots:
|
||||
|
||||
std::unique_ptr<MindMapData> fromFile(QString path) const;
|
||||
MindMapDataU fromFile(QString path) const;
|
||||
|
||||
bool toFile(std::shared_ptr<MindMapData> mindMapData, QString path) const;
|
||||
bool toFile(MindMapDataS mindMapData, QString path) const;
|
||||
|
||||
std::unique_ptr<MindMapData> fromXml(QString xml) const;
|
||||
MindMapDataU fromXml(QString xml) const;
|
||||
|
||||
QString toXml(std::shared_ptr<MindMapData> mindMapData) const;
|
||||
QString toXml(MindMapDataS mindMapData) const;
|
||||
};
|
||||
|
||||
} // namespace IO
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include <QString>
|
||||
|
||||
class MindMapData;
|
||||
#include "types.hpp"
|
||||
|
||||
namespace IO {
|
||||
|
||||
@ -29,9 +29,9 @@ class FileIO
|
||||
public:
|
||||
virtual void finish() = 0;
|
||||
|
||||
virtual std::unique_ptr<MindMapData> fromFile(QString path) const = 0;
|
||||
virtual MindMapDataU fromFile(QString path) const = 0;
|
||||
|
||||
virtual bool toFile(std::shared_ptr<MindMapData> mindMapData, QString path, bool async) const = 0;
|
||||
virtual bool toFile(MindMapDataS mindMapData, QString path, bool async) const = 0;
|
||||
};
|
||||
|
||||
} // namespace IO
|
||||
|
@ -18,9 +18,10 @@
|
||||
#include "constants.hpp"
|
||||
#include "contrib/SimpleLogger/src/simple_logger.hpp"
|
||||
#include "grid.hpp"
|
||||
#include "mind_map_data.hpp"
|
||||
|
||||
#include "core/graph.hpp"
|
||||
#include "core/mind_map_data.hpp"
|
||||
|
||||
#include "scene_items/node.hpp"
|
||||
|
||||
#include <cassert>
|
||||
@ -48,7 +49,7 @@ inline double dot(double x1, double y1, double x2, double y2)
|
||||
class LayoutOptimizer::Impl
|
||||
{
|
||||
public:
|
||||
Impl(MindMapDataPtr mindMapData, const Grid & grid)
|
||||
Impl(MindMapDataS mindMapData, const Grid & grid)
|
||||
: m_mindMapData(mindMapData)
|
||||
, m_grid(grid)
|
||||
{
|
||||
@ -220,7 +221,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
QRectF calculateLayoutDimensions(const Graph::NodeVector & nodes) const
|
||||
QRectF calculateLayoutDimensions(const Core::Graph::NodeVector & nodes) const
|
||||
{
|
||||
if (nodes.empty()) {
|
||||
return {};
|
||||
@ -349,7 +350,7 @@ private:
|
||||
return change;
|
||||
}
|
||||
|
||||
MindMapDataPtr m_mindMapData;
|
||||
MindMapDataS m_mindMapData;
|
||||
|
||||
const Grid & m_grid;
|
||||
|
||||
@ -595,7 +596,7 @@ private:
|
||||
|
||||
size_t LayoutOptimizer::Impl::Cell::globalMoveId = 0;
|
||||
|
||||
LayoutOptimizer::LayoutOptimizer(MindMapDataPtr mindMapData, const Grid & grid)
|
||||
LayoutOptimizer::LayoutOptimizer(MindMapDataS mindMapData, const Grid & grid)
|
||||
: m_impl(std::make_unique<Impl>(mindMapData, grid))
|
||||
{
|
||||
}
|
||||
|
@ -19,13 +19,14 @@
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
#include "types.hpp"
|
||||
|
||||
class Grid;
|
||||
class MindMapData;
|
||||
|
||||
class LayoutOptimizer
|
||||
{
|
||||
public:
|
||||
LayoutOptimizer(std::shared_ptr<MindMapData> mindMapData, const Grid & grid);
|
||||
LayoutOptimizer(MindMapDataS mindMapData, const Grid & grid);
|
||||
|
||||
~LayoutOptimizer();
|
||||
|
||||
|
@ -18,11 +18,12 @@
|
||||
|
||||
#include "application.hpp"
|
||||
#include "constants.hpp"
|
||||
#include "hash_seed.hpp"
|
||||
#include "simple_logger.hpp"
|
||||
#include "user_exception.hpp"
|
||||
#include "utils.hpp"
|
||||
|
||||
#include "core/hash_seed.hpp"
|
||||
#include "core/user_exception.hpp"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
|
||||
@ -61,7 +62,7 @@ static void initLogger()
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
HashSeed::init();
|
||||
Core::HashSeed::init();
|
||||
|
||||
#if QT_VERSION >= 0x50600 && QT_VERSION > 0x60000
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
@ -76,7 +77,7 @@ int main(int argc, char ** argv)
|
||||
initLogger();
|
||||
return Application(argc, argv).run();
|
||||
} catch (std::exception & e) {
|
||||
if (!dynamic_cast<UserException *>(&e)) {
|
||||
if (!dynamic_cast<Core::UserException *>(&e)) {
|
||||
std::cerr << e.what() << std::endl;
|
||||
}
|
||||
return EXIT_FAILURE;
|
||||
|
@ -445,7 +445,7 @@ void Mediator::moveSelectionGroup(NodeR reference, QPointF location)
|
||||
m_editorData->moveSelectionGroup(reference, location);
|
||||
}
|
||||
|
||||
MindMapDataPtr Mediator::mindMapData() const
|
||||
MindMapDataS Mediator::mindMapData() const
|
||||
{
|
||||
return m_editorData->mindMapData();
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
#include "types.hpp"
|
||||
|
||||
#include "mind_map_data.hpp"
|
||||
#include "core/mind_map_data.hpp"
|
||||
|
||||
#include "scene_items/node.hpp"
|
||||
|
||||
@ -131,7 +131,7 @@ public:
|
||||
|
||||
NodeS pasteNodeAt(NodeR source, QPointF pos);
|
||||
|
||||
MindMapDataPtr mindMapData() const;
|
||||
MindMapDataS mindMapData() const;
|
||||
|
||||
bool openMindMap(QString fileName);
|
||||
|
||||
|
@ -27,8 +27,7 @@
|
||||
#include "../core/settings_proxy.hpp"
|
||||
#include "../core/shadow_effect_params.hpp"
|
||||
#include "../core/single_instance_container.hpp"
|
||||
|
||||
#include "../test_mode.hpp"
|
||||
#include "../core/test_mode.hpp"
|
||||
|
||||
#include "simple_logger.hpp"
|
||||
|
||||
@ -47,6 +46,8 @@
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
|
||||
using Core::TestMode;
|
||||
|
||||
namespace SceneItems {
|
||||
|
||||
Edge::Edge(NodeP sourceNode, NodeP targetNode, bool enableAnimations, bool enableLabel)
|
||||
|
@ -38,7 +38,6 @@ struct ShadowEffectParams;
|
||||
namespace SceneItems {
|
||||
|
||||
class EdgeDot;
|
||||
class Graph;
|
||||
class Node;
|
||||
|
||||
//! A graphic representation of a graph edge between nodes.
|
||||
|
@ -23,12 +23,12 @@
|
||||
|
||||
#include "../constants.hpp"
|
||||
#include "../image.hpp"
|
||||
#include "../test_mode.hpp"
|
||||
#include "../utils.hpp"
|
||||
|
||||
#include "../core/settings_proxy.hpp"
|
||||
#include "../core/shadow_effect_params.hpp"
|
||||
#include "../core/single_instance_container.hpp"
|
||||
#include "../core/test_mode.hpp"
|
||||
|
||||
#include "simple_logger.hpp"
|
||||
|
||||
@ -45,6 +45,8 @@
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
||||
using Core::TestMode;
|
||||
|
||||
namespace SceneItems {
|
||||
|
||||
NodeP Node::m_lastHoveredNode = nullptr;
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include "text_edit.hpp"
|
||||
|
||||
#include "../test_mode.hpp"
|
||||
#include "../core/test_mode.hpp"
|
||||
|
||||
#include <QKeyEvent>
|
||||
#include <QMouseEvent>
|
||||
@ -24,6 +24,8 @@
|
||||
#include <QTextDocument>
|
||||
#include <QTextOption>
|
||||
|
||||
using Core::TestMode;
|
||||
|
||||
namespace SceneItems {
|
||||
|
||||
TextEdit::TextEdit(QGraphicsItem * parentItem)
|
||||
|
@ -32,11 +32,22 @@ using EdgeS = std::shared_ptr<SceneItems::Edge>;
|
||||
|
||||
using EdgeU = std::unique_ptr<SceneItems::Edge>;
|
||||
|
||||
namespace Core {
|
||||
class Graph;
|
||||
class MindMapData;
|
||||
} // namespace Core
|
||||
|
||||
using GraphCR = const Graph &;
|
||||
using GraphCR = const Core::Graph &;
|
||||
|
||||
using GraphR = Graph &;
|
||||
using GraphR = Core::Graph &;
|
||||
|
||||
using MindMapDataR = Core::MindMapData &;
|
||||
|
||||
using MindMapDataCR = const Core::MindMapData &;
|
||||
|
||||
using MindMapDataS = std::shared_ptr<Core::MindMapData>;
|
||||
|
||||
using MindMapDataU = std::unique_ptr<Core::MindMapData>;
|
||||
|
||||
namespace SceneItems {
|
||||
class Node;
|
||||
|
@ -15,23 +15,25 @@
|
||||
|
||||
#include "undo_stack.hpp"
|
||||
|
||||
#include "core/mind_map_data.hpp"
|
||||
|
||||
UndoStack::UndoStack(size_t maxHistorySize)
|
||||
: m_maxHistorySize(maxHistorySize)
|
||||
{
|
||||
}
|
||||
|
||||
void UndoStack::pushUndoPoint(const MindMapData & mindMapData)
|
||||
void UndoStack::pushUndoPoint(MindMapDataCR mindMapData)
|
||||
{
|
||||
m_undoStack.push_back(std::make_unique<MindMapData>(mindMapData));
|
||||
m_undoStack.push_back(std::make_unique<Core::MindMapData>(mindMapData));
|
||||
|
||||
if (m_undoStack.size() > m_maxHistorySize && m_maxHistorySize) {
|
||||
m_undoStack.pop_front();
|
||||
}
|
||||
}
|
||||
|
||||
void UndoStack::pushRedoPoint(const MindMapData & mindMapData)
|
||||
void UndoStack::pushRedoPoint(MindMapDataCR mindMapData)
|
||||
{
|
||||
m_redoStack.push_back(std::make_unique<MindMapData>(mindMapData));
|
||||
m_redoStack.push_back(std::make_unique<Core::MindMapData>(mindMapData));
|
||||
|
||||
if (m_redoStack.size() > m_maxHistorySize && m_maxHistorySize) {
|
||||
m_redoStack.pop_front();
|
||||
@ -54,7 +56,7 @@ bool UndoStack::isUndoable() const
|
||||
return !m_undoStack.empty();
|
||||
}
|
||||
|
||||
std::unique_ptr<MindMapData> UndoStack::undo()
|
||||
MindMapDataU UndoStack::undo()
|
||||
{
|
||||
if (isUndoable()) {
|
||||
auto head = std::move(m_undoStack.back());
|
||||
@ -70,7 +72,7 @@ bool UndoStack::isRedoable() const
|
||||
return !m_redoStack.empty();
|
||||
}
|
||||
|
||||
std::unique_ptr<MindMapData> UndoStack::redo()
|
||||
MindMapDataU UndoStack::redo()
|
||||
{
|
||||
if (isRedoable()) {
|
||||
auto head = std::move(m_redoStack.back());
|
||||
|
@ -16,7 +16,7 @@
|
||||
#ifndef UNDO_STACK_HPP
|
||||
#define UNDO_STACK_HPP
|
||||
|
||||
#include "mind_map_data.hpp"
|
||||
#include "types.hpp"
|
||||
|
||||
#include <list>
|
||||
#include <memory>
|
||||
@ -27,9 +27,9 @@ public:
|
||||
//! \param maxHistorySize The size of undo stack or 0 for "unlimited".
|
||||
UndoStack(size_t maxHistorySize = 0);
|
||||
|
||||
void pushUndoPoint(const MindMapData & mindMapData);
|
||||
void pushUndoPoint(MindMapDataCR mindMapData);
|
||||
|
||||
void pushRedoPoint(const MindMapData & mindMapData);
|
||||
void pushRedoPoint(MindMapDataCR mindMapData);
|
||||
|
||||
void clear();
|
||||
|
||||
@ -37,14 +37,14 @@ public:
|
||||
|
||||
bool isUndoable() const;
|
||||
|
||||
std::unique_ptr<MindMapData> undo();
|
||||
MindMapDataU undo();
|
||||
|
||||
bool isRedoable() const;
|
||||
|
||||
std::unique_ptr<MindMapData> redo();
|
||||
MindMapDataU redo();
|
||||
|
||||
private:
|
||||
using MindMapDataVector = std::list<std::unique_ptr<MindMapData>>;
|
||||
using MindMapDataVector = std::list<MindMapDataU>;
|
||||
|
||||
MindMapDataVector m_undoStack;
|
||||
|
||||
|
@ -16,8 +16,9 @@
|
||||
#include "alz_file_io_test.hpp"
|
||||
|
||||
#include "../../image_manager.hpp"
|
||||
#include "../../mind_map_data.hpp"
|
||||
#include "../../test_mode.hpp"
|
||||
|
||||
#include "../../core/mind_map_data.hpp"
|
||||
#include "../../core/test_mode.hpp"
|
||||
|
||||
#include "../../io/alz_file_io.hpp"
|
||||
#include "../../io/xml_reader.hpp"
|
||||
@ -25,6 +26,8 @@
|
||||
|
||||
#include "../../core/graph.hpp"
|
||||
|
||||
using Core::MindMapData;
|
||||
|
||||
using SceneItems::Edge;
|
||||
using SceneItems::EdgeModel;
|
||||
using SceneItems::Node;
|
||||
@ -32,7 +35,7 @@ using SceneItems::NodeModel;
|
||||
|
||||
AlzFileIOTest::AlzFileIOTest()
|
||||
{
|
||||
TestMode::setEnabled(true);
|
||||
Core::TestMode::setEnabled(true);
|
||||
}
|
||||
|
||||
void AlzFileIOTest::testEmptyDesign()
|
||||
|
@ -16,10 +16,12 @@
|
||||
#include "editor_data_test.hpp"
|
||||
|
||||
#include "../../editor_data.hpp"
|
||||
#include "../../mind_map_data.hpp"
|
||||
#include "../../test_mode.hpp"
|
||||
|
||||
#include "../../core/graph.hpp"
|
||||
#include "../../core/mind_map_data.hpp"
|
||||
#include "../../core/test_mode.hpp"
|
||||
|
||||
using Core::MindMapData;
|
||||
|
||||
using SceneItems::Edge;
|
||||
using SceneItems::EdgeModel;
|
||||
@ -28,7 +30,7 @@ using SceneItems::NodeModel;
|
||||
|
||||
EditorDataTest::EditorDataTest()
|
||||
{
|
||||
TestMode::setEnabled(true);
|
||||
Core::TestMode::setEnabled(true);
|
||||
}
|
||||
|
||||
void EditorDataTest::testAddAndDeleteEdge()
|
||||
|
@ -15,9 +15,8 @@
|
||||
|
||||
#include "graph_test.hpp"
|
||||
|
||||
#include "../../test_mode.hpp"
|
||||
|
||||
#include "../../core/graph.hpp"
|
||||
#include "../../core/test_mode.hpp"
|
||||
|
||||
#include "../../scene_items/node.hpp"
|
||||
|
||||
@ -26,12 +25,14 @@
|
||||
|
||||
using std::make_shared;
|
||||
|
||||
using Core::Graph;
|
||||
|
||||
using SceneItems::Edge;
|
||||
using SceneItems::Node;
|
||||
|
||||
GraphTest::GraphTest()
|
||||
{
|
||||
TestMode::setEnabled(true);
|
||||
Core::TestMode::setEnabled(true);
|
||||
}
|
||||
|
||||
void GraphTest::testAddEdge()
|
||||
|
@ -17,22 +17,24 @@
|
||||
|
||||
#include "../../grid.hpp"
|
||||
#include "../../layout_optimizer.hpp"
|
||||
#include "../../mind_map_data.hpp"
|
||||
#include "../../test_mode.hpp"
|
||||
|
||||
#include "../../core/graph.hpp"
|
||||
#include "../../core/mind_map_data.hpp"
|
||||
#include "../../core/test_mode.hpp"
|
||||
|
||||
#include "simple_logger.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <random>
|
||||
|
||||
using Core::MindMapData;
|
||||
|
||||
using SceneItems::Edge;
|
||||
using SceneItems::Node;
|
||||
|
||||
LayoutOptimizerTest::LayoutOptimizerTest()
|
||||
{
|
||||
TestMode::setEnabled(true);
|
||||
Core::TestMode::setEnabled(true);
|
||||
}
|
||||
|
||||
void LayoutOptimizerTest::testNoNodes_ShouldNotInitialize()
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include "node_test.hpp"
|
||||
|
||||
#include "../../test_mode.hpp"
|
||||
#include "../../core/test_mode.hpp"
|
||||
|
||||
#include "../../scene_items/node.hpp"
|
||||
|
||||
@ -23,7 +23,7 @@ using SceneItems::Node;
|
||||
|
||||
NodeTest::NodeTest()
|
||||
{
|
||||
TestMode::setEnabled(true);
|
||||
Core::TestMode::setEnabled(true);
|
||||
}
|
||||
|
||||
void NodeTest::testContainsText()
|
||||
|
@ -16,7 +16,8 @@
|
||||
#include "selection_group_test.hpp"
|
||||
|
||||
#include "selection_group.hpp"
|
||||
#include "test_mode.hpp"
|
||||
|
||||
#include "../../core/test_mode.hpp"
|
||||
|
||||
#include "../../scene_items/node.hpp"
|
||||
|
||||
@ -25,7 +26,7 @@ using SceneItems::Node;
|
||||
|
||||
SelectionGroupTest::SelectionGroupTest()
|
||||
{
|
||||
TestMode::setEnabled(true);
|
||||
Core::TestMode::setEnabled(true);
|
||||
}
|
||||
|
||||
void SelectionGroupTest::testAddNodes_Explicit()
|
||||
|
@ -14,9 +14,10 @@
|
||||
// along with Heimer. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "version_test.hpp"
|
||||
#include "test_mode.hpp"
|
||||
|
||||
#include "../../version.hpp"
|
||||
#include "../../core/version.hpp"
|
||||
|
||||
using Core::Version;
|
||||
|
||||
void VersionTest::testInitialization_defaultShouldNotBeValid()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user