ui: Refactored QtCodeSnippet and added view settings to ApplicationSettings
This change refactors parts of the QtCodeSnippet and places some settings into ApplicationSettings. Additionally Application- and ProjectSettings were abstracted to the common base class Settings, which takes care of the getting and setting values of the Configmanager member.
This commit is contained in:
@@ -4,15 +4,11 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <QFont>
|
||||
|
||||
#include "component/view/CodeView.h"
|
||||
#include "qt/utility/QtThreadedFunctor.h"
|
||||
#include "utility/types.h"
|
||||
|
||||
class QtCodeSnippet;
|
||||
class QtHighlighter;
|
||||
class QTextEdit;
|
||||
|
||||
class QtCodeView: public CodeView
|
||||
{
|
||||
@@ -31,17 +27,10 @@ public:
|
||||
void activateToken(Id tokenId) const;
|
||||
|
||||
private:
|
||||
struct Snippet
|
||||
{
|
||||
std::shared_ptr<QtCodeSnippet> textField;
|
||||
std::shared_ptr<QtHighlighter> highlighter;
|
||||
};
|
||||
std::vector<std::shared_ptr<Snippet>> m_snippets;
|
||||
|
||||
void doAddCodeSnippet(const std::string& str, const TokenLocationFile& locationFile, int startLineNumber);
|
||||
void doClearCodeSnippets();
|
||||
|
||||
QFont m_font;
|
||||
std::vector<std::shared_ptr<QtCodeSnippet> > m_snippets;
|
||||
|
||||
QtThreadedFunctor<void> m_clearCodeSnippetsFunctor;
|
||||
QtThreadedFunctor<const std::string&, const TokenLocationFile&, int> m_addCodeSnippetFunctor;
|
||||
|
||||
Reference in New Issue
Block a user