QFramedTextAttribute.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 // Qt
4 #include <QObject> // Required for inheritance
5 #include <QTextObjectInterface> // Required for inheritance
6 
7 class QSyntaxStyle;
8 
13 class QFramedTextAttribute : public QObject,
14  public QTextObjectInterface
15 {
16  Q_OBJECT
17  Q_INTERFACES(QTextObjectInterface)
18 
19 public:
20 
21  enum Property
22  {
24  };
25 
30  static int type();
31 
36  explicit QFramedTextAttribute(QObject* parent=nullptr);
37 
38  // Disable copying
41 
47  QSizeF intrinsicSize(QTextDocument *doc,
48  int posInDocument,
49  const QTextFormat &format) override;
50 
54  void drawObject(QPainter *painter,
55  const QRectF &rect,
56  QTextDocument *doc,
57  int posInDocument,
58  const QTextFormat &format) override;
59 
65  void frame(QTextCursor cursor);
66 
71  void clear(QTextCursor cursor);
72 
77  void setSyntaxStyle(QSyntaxStyle* style);
78 
82  QSyntaxStyle* syntaxStyle() const;
83 
84 private:
85 
87 };
88 
void drawObject(QPainter *painter, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format) override
Method for drawing frame.
QFramedTextAttribute(QObject *parent=nullptr)
Constructor.
void frame(QTextCursor cursor)
Method for creating frame in cursor selection.
QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format) override
Method for getting custom element (frame) size. Though frame symbol has no size, this method returns ...
static int type()
Static method for getting framed text attribute type.
Class, that describes Qt style parser for QCodeEditor.
void clear(QTextCursor cursor)
Method for clearing all frames with desired cursor.
QSyntaxStyle * syntaxStyle() const
Method for getting syntax style.
QFramedTextAttribute & operator=(const QFramedTextAttribute &)=delete
void setSyntaxStyle(QSyntaxStyle *style)
Method for setting syntax style for rendering.
Class, that describes attribute for making text frame.
std::basic_string< Char > format(const text_style &ts, const S &format_str, const Args &... args)
Definition: color.h:583


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Jun 19 2023 03:01:38