10 #include <QHBoxLayout>
13 #include <QToolButton>
16 #if QT_VERSION >= QT_VERSION_CHECK(5,13,0)
17 #include <QRegularExpression>
75 qInfo() <<
"search in commets";
78 qInfo() <<
"is regex";
79 #if QT_VERSION >= QT_VERSION_CHECK(5,13,0)
85 while (mTextEdit->
find(regExp, options))
98 extra.format.setForeground(
QBrush(color));
99 extra.format.setBackground(mBackgroundColor);
101 extraSelections.
append(extra);
106 while (mTextEdit->
find(
string, options))
112 extra.format.setForeground(
QBrush(color));
113 extra.format.setBackground(mBackgroundColor);
115 extraSelections.
append(extra);
127 void CommentItem::init()
132 QSize iconSize(20, 20);
141 mTopWidget =
new QWidget(
this);
149 mCreationDate =
new QLabel(
this);
181 void CommentItem::handleDeleteButtonTriggered()
186 void CommentItem::handleModifyButtonTriggered()
188 CommentDialog dialog(
"Modify Comment", mEntry);
192 mEntry->
setText(dialog.getText());
bool isExactMatch() const
bool isCaseSensitive() const
bool isRegularExpression() const
void handleSearchChanged(const QString &string, int option)
void setMarginWidth(QLayout *layout, int marginWidth)
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 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