4#ifndef MESSAGEEDITORWIDGETS_H
5#define MESSAGEEDITORWIDGETS_H
7#include <QAbstractButton>
19class QContextMenuEvent;
29
30
42 void reallyEnsureCursorVisible();
49
50
71
72
78 void setLabel(
const QString &label) { m_label->setText(label); }
93 void slotTextChanged();
102
103
109 void setLabel(
const QString &label) { m_label->setText(label); }
110 void setTranslation(
const QString &text,
bool userAction =
false);
125 bool eventFilter(QObject *watched, QEvent *event)
override;
129 void slotSelectionChanged();
130 void minusButtonClicked();
131 void plusButtonClicked();
134 void addEditor(
int idx);
137 template<
typename Func>
138 QAbstractButton *makeButton(
const QIcon &icon, Func slot)
140 auto *button = makeButton(icon);
141 connect(button, &QAbstractButton::clicked,
145 QAbstractButton *makeButton(
const QIcon &icon);
146 void insertEditor(
int idx);
147 void deleteEditor(
int idx);
150 QList<FormatTextEdit *> m_editors;
151 QList<QWidget *> m_plusButtons;
152 QList<QAbstractButton *> m_minusButtons;
153 bool m_hideWhenEmpty;
155 QIcon m_plusIcon, m_minusIcon;
QSize minimumSizeHint() const override
QSize sizeHint() const override
void setVisualizeWhitespace(bool value)
void setEditable(bool editable)
void setLengthVariants(bool on)
void setVisualizeWhitespace(bool value)
void setEditorFocusForModel(int model)
void setFontSize(const float fontSize)
void setUnfinishedEditorFocus()
bool focusNextUnfinished()
void showMessage(const MultiDataIndex &index)
bool eventFilter(QObject *, QEvent *) override
const TranslatorMessage & message() const
TranslatorMessage::Type type() const
MessageItem * messageItem(const MultiDataIndex &index, int model) const
bool isModelWritable(int model) const
static void clearSelection(QTextEdit *t)
Combined button and popup list for selecting options.
FormWidget * transCommentText