Farbvorschau und Farbauswahl hinter Farbwerten implementiert
This commit is contained in:
@@ -3,10 +3,12 @@
|
||||
#include <QPlainTextEdit>
|
||||
#include <QFont>
|
||||
#include <QString>
|
||||
#include <QTextBlock>
|
||||
|
||||
class LineNumberArea;
|
||||
class Settings;
|
||||
class SyntaxHighlighter;
|
||||
class ColorIndicator;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// CodeEditor – Core editing widget.
|
||||
@@ -39,6 +41,12 @@ public:
|
||||
QString filePath() const;
|
||||
bool isModified() const;
|
||||
|
||||
// Öffentliche Hilfsmethoden für ColorIndicator
|
||||
// (die Qt-Originale sind protected und von außen nicht erreichbar)
|
||||
QTextBlock firstVisibleBlockPublic() const { return firstVisibleBlock(); }
|
||||
QRectF blockBoundingGeometryPublic(const QTextBlock &b) const { return blockBoundingGeometry(b); }
|
||||
QPointF contentOffsetPublic() const { return contentOffset(); }
|
||||
|
||||
signals:
|
||||
void fileSaved(const QString &filePath);
|
||||
|
||||
@@ -46,6 +54,7 @@ protected:
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
void keyPressEvent(QKeyEvent *event) override;
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
|
||||
private slots:
|
||||
void updateLineNumberAreaWidth(int newBlockCount);
|
||||
@@ -60,5 +69,6 @@ private:
|
||||
Settings *m_settings = nullptr;
|
||||
LineNumberArea *m_lineNumberArea = nullptr;
|
||||
SyntaxHighlighter *m_highlighter = nullptr;
|
||||
ColorIndicator *m_colorIndicator = nullptr;
|
||||
QString m_filePath;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user