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 
QFramedTextAttribute::intrinsicSize
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 ...
Definition: QFramedTextAttribute.cpp:33
QFramedTextAttribute::setSyntaxStyle
void setSyntaxStyle(QSyntaxStyle *style)
Method for setting syntax style for rendering.
Definition: QFramedTextAttribute.cpp:23
QFramedTextAttribute::syntaxStyle
QSyntaxStyle * syntaxStyle() const
Method for getting syntax style.
Definition: QFramedTextAttribute.cpp:28
QFramedTextAttribute::QFramedTextAttribute
QFramedTextAttribute(QObject *parent=nullptr)
Constructor.
Definition: QFramedTextAttribute.cpp:16
QFramedTextAttribute::Property
Property
Definition: QFramedTextAttribute.hpp:21
QFramedTextAttribute::frame
void frame(QTextCursor cursor)
Method for creating frame in cursor selection.
Definition: QFramedTextAttribute.cpp:66
QFramedTextAttribute
Class, that describes attribute for making text frame.
Definition: QFramedTextAttribute.hpp:13
QFramedTextAttribute::FramedString
@ FramedString
Definition: QFramedTextAttribute.hpp:23
QFramedTextAttribute::drawObject
void drawObject(QPainter *painter, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format) override
Method for drawing frame.
Definition: QFramedTextAttribute.cpp:38
format
auto format(const text_style &ts, const S &format_str, const Args &... args) -> std::basic_string< Char >
Definition: color.h:543
QFramedTextAttribute::type
static int type()
Static method for getting framed text attribute type.
Definition: QFramedTextAttribute.cpp:11
QSyntaxStyle
Class, that describes Qt style parser for QCodeEditor.
Definition: QSyntaxStyle.hpp:13
QFramedTextAttribute::m_style
QSyntaxStyle * m_style
Definition: QFramedTextAttribute.hpp:86
QFramedTextAttribute::operator=
QFramedTextAttribute & operator=(const QFramedTextAttribute &)=delete
QFramedTextAttribute::clear
void clear(QTextCursor cursor)
Method for clearing all frames with desired cursor.
Definition: QFramedTextAttribute.cpp:89


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:45