itom
Loading...
Searching...
No Matches
widgetPropEditorStyles.h
1/* ********************************************************************
2 itom software
3 URL: http://www.uni-stuttgart.de/ito
4 Copyright (C) 2020, Institut für Technische Optik (ITO),
5 Universität Stuttgart, Germany
6
7 This file is part of itom.
8
9 itom is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Library General Public Licence as published by
11 the Free Software Foundation; either version 2 of the Licence, or (at
12 your option) any later version.
13
14 itom is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
17 General Public Licence for more details.
18
19 You should have received a copy of the GNU Library General Public License
20 along with itom. If not, see <http://www.gnu.org/licenses/>.
21*********************************************************************** */
22
23#ifndef WIDGETPROPEDITORSTYLES_H
24#define WIDGETPROPEDITORSTYLES_H
25
26#include "abstractPropertyPageWidget.h"
27
28#include <QtGui>
29#include <qvector.h>
30#include <qstring.h>
31#include <qfont.h>
32#include <qcolor.h>
33#include <qstring.h>
34#include <qcolor.h>
35
36#include "../codeEditor/syntaxHighlighter/codeEditorStyle.h"
37
38#include "ui_widgetPropEditorStyles.h"
39
40namespace ito
41{
42
43class CodeEditorStyle;
44
46{
47 Q_OBJECT
48
49public:
50 struct StyleNode
51 {
52 ito::StyleItem::StyleType m_index;
53 QString m_name;
54 QFont m_font;
55 QColor m_foregroundColor;
56 QColor m_backgroundColor;
57 };
58
59 WidgetPropEditorStyles(QWidget *parent = NULL);
61
62 void readSettings();
63 void writeSettings();
64
65protected:
66
67private:
68 Ui::WidgetPropEditorStyles ui;
69
70 QVector<StyleNode> m_styles;
71 bool m_changing;
72 CodeEditorStyle* m_pCodeEditorStyle;
73
74 void setFontSizeGeneral(const int fontSizeAdd);
75
76 void writeSettingsInternal(const QString &filename);
77 void readSettingsInternal(const QString &filename);
78
79 QString colorStringMixedWithPaperBgColor(const QColor &color);
80
81 QColor m_paperBgcolor;
82 QColor m_markerScriptErrorBgcolor;
83 QColor m_markerCurrentBgcolor;
84 QColor m_markerInputBgcolor;
85 QColor m_markerErrorBgcolor;
86 QColor m_whitespaceFgcolor;
87 QColor m_whitespaceBgcolor;
88 QColor m_matchedBraceFgcolor;
89 QColor m_matchedBraceBgcolor;
90 QColor m_unmatchedBraceFgcolor;
91 QColor m_unmatchedBraceBgcolor;
92 QColor m_caretBgcolor;
93 QColor m_caretFgcolor;
94 QColor m_selectionBgcolor;
95 QColor m_selectionFgcolor;
96 QColor m_markerSameStringBgcolor;
97
98signals:
99
100public slots:
101
102private slots:
103 void on_listWidget_currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous);
104 void on_btnBackgroundColor_colorChanged(QColor color);
105 void on_btnFont_clicked();
106 void on_btnForegroundColor_colorChanged(QColor color);
107 void on_btnFontSizeDec_clicked();
108 void on_btnFontSizeInc_clicked();
109 void on_btnReset_clicked();
110 void on_btnImport_clicked();
111 void on_btnExport_clicked();
112 void on_btnTextBackgroundsTransparent_clicked();
113};
114
115} //end namespace ito
116
117#endif
Definition abstractPropertyPageWidget.h:33
Definition codeEditorStyle.h:138
Definition widgetPropEditorStyles.h:46
void readSettings()
Definition widgetPropEditorStyles.cpp:115
void writeSettings()
Definition widgetPropEditorStyles.cpp:121
Definition apiFunctionsGraph.cpp:40
Definition widgetPropEditorStyles.h:51