src/polygoncache.h

Sat, 08 Apr 2023 15:08:19 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Sat, 08 Apr 2023 15:08:19 +0300
changeset 346
3e3784c4cd3e
parent 338
719b909a7d2b
permissions
-rw-r--r--

Change color edit coloring to use only stylesheets to colorise the line edit only

#pragma once
#include <QTextDocument>
#include "src/basics.h"
#include "src/model.h"
#include "src/gl/common.h"

template<typename T>
struct WithId : T
{
	std::int32_t linenumber;
};

struct PolygonCache
{
	using vector_type = std::vector<WithId<PolygonElement>>;
	vector_type polygons;
	bool needRecache = true;
};

void recacheIfNeeded(
	PolygonCache* cache,
	QTextDocument* model,
	class DocumentManager* documents);
PolygonCache* findPolygonCacheForModel(QTextDocument* model, DocumentManager* context);

mercurial