12 #include <QToolButton>
15 #if QT_VERSION >= QT_VERSION_CHECK(5,13,0)
16 #include <QRegularExpression>
74 qInfo() <<
"search in commets";
77 qInfo() <<
"is regex";
78 #if QT_VERSION >= QT_VERSION_CHECK(5,13,0)
84 while (mTextEdit->
find(regExp, options))
88 extra.format.setForeground(
QBrush(color));
89 extra.format.setBackground(mBackgroundColor);
91 extraSelections.
append(extra);
96 while (mTextEdit->
find(
string, options))
102 extra.format.setForeground(
QBrush(color));
103 extra.format.setBackground(mBackgroundColor);
105 extraSelections.
append(extra);
117 void CommentItem::init()
122 QSize iconSize(20, 20);
131 mTopWidget =
new QWidget(
this);
139 mCreationDate =
new QLabel(
this);
171 void CommentItem::handleDeleteButtonTriggered()
176 void CommentItem::handleModifyButtonTriggered()
178 CommentDialog dialog(
"Modify Comment", mEntry);
182 mEntry->
setText(dialog.getText());
bool isExactMatch() const
bool isCaseSensitive() const
bool isRegularExpression() const
void handleSearchChanged(const QString &string, int option)
QIcon getStyledSvgIcon(const QString &from_to_colors_enabled, const QString &svg_path, QString from_to_colors_disabled=QString())
CommentManager * gCommentManager
void addStretch(int stretch)
void setSpacing(int spacing)
QDateTime toLocalTime() const const
QString toString(Qt::DateFormat format) const const
void setText(const QString &)
void setMargin(int margin)
void append(const T &value)
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
virtual void polish(QWidget *widget)
virtual void unpolish(QWidget *widget)
bool find(const QString &exp, QTextDocument::FindFlags options)
void setHtml(const QString &text)
void moveCursor(QTextCursor::MoveOperation operation, QTextCursor::MoveMode mode)
void setReadOnly(bool ro)
QTextCursor textCursor() const const