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))
97 extra.format.setForeground(
QBrush(color));
98 extra.format.setBackground(mBackgroundColor);
100 extraSelections.
append(extra);
105 while (mTextEdit->
find(
string, options))
111 extra.format.setForeground(
QBrush(color));
112 extra.format.setBackground(mBackgroundColor);
114 extraSelections.
append(extra);
126 void CommentItem::init()
131 QSize iconSize(20, 20);
140 mTopWidget =
new QWidget(
this);
148 mCreationDate =
new QLabel(
this);
180 void CommentItem::handleDeleteButtonTriggered()
185 void CommentItem::handleModifyButtonTriggered()
187 CommentDialog dialog(
"Modify Comment", mEntry);
191 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 movePosition(QTextCursor::MoveOperation operation, QTextCursor::MoveMode mode, int n)
int position() const const
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)
void setTextCursor(const QTextCursor &cursor)
QTextCursor textCursor() const const