Make sure that the style menu shows the right style name for code and quote.
Also when in quote mode the valid styles are now transformed to how they look in quote to show they are valid. Clicking quote style again in a quote block will return to paragrpah style from heading now
This commit is contained in:
@@ -23,6 +23,11 @@ class ChatButtonHelper : public QObject
|
||||
*/
|
||||
Q_PROPERTY(ChatTextItemHelper *textItem READ textItem WRITE setTextItem NOTIFY textItemChanged)
|
||||
|
||||
/**
|
||||
* @brief Whether the current block is a Quote block.
|
||||
*/
|
||||
Q_PROPERTY(bool inQuote READ inQuote WRITE setInQuote NOTIFY inQuoteChanged)
|
||||
|
||||
/**
|
||||
* @brief Whether rich formating is enabled at the current cursor location.
|
||||
*/
|
||||
@@ -94,6 +99,9 @@ public:
|
||||
ChatTextItemHelper *textItem() const;
|
||||
void setTextItem(ChatTextItemHelper *textItem);
|
||||
|
||||
bool inQuote() const;
|
||||
void setInQuote(bool inQuote);
|
||||
|
||||
bool richFormatEnabled() const;
|
||||
bool styleFormatEnabled() const;
|
||||
bool bold() const;
|
||||
@@ -140,6 +148,7 @@ public:
|
||||
|
||||
Q_SIGNALS:
|
||||
void textItemChanged();
|
||||
void inQuoteChanged();
|
||||
void richFormatEnabledChanged();
|
||||
void charFormatChanged();
|
||||
void styleChanged();
|
||||
@@ -147,6 +156,7 @@ Q_SIGNALS:
|
||||
|
||||
private:
|
||||
QPointer<ChatTextItemHelper> m_textItem;
|
||||
bool m_inQuote = false;
|
||||
|
||||
void selectLinkText(QTextCursor &cursor) const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user