KTextAddons
textautogeneratelistviewdelegate.cpp
29 connect(mTextSelection, &TextAutogenerateListViewTextSelection::repaintNeeded, this, &TextAutogenerateListViewDelegate::updateView);
34void TextAutogenerateListViewDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
52void TextAutogenerateListViewDelegate::draw(QPainter *painter, QRect rect, const QModelIndex &index, const QStyleOptionViewItem &option) const
64 const QList<QAbstractTextDocumentLayout::Selection> selections = TextAutogenerateDelegateUtils::selection(mTextSelection, doc, index, option);
76QSize TextAutogenerateListViewDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
82 qCDebug(TEXTAUTOGENERATETEXT_WIDGET_LOG) << "TextAutogenerateListViewDelegate: SizeHint found in cache: " << result;
111TextAutogenerateListViewDelegate::MessageLayout TextAutogenerateListViewDelegate::doLayout(const QStyleOptionViewItem &option, const QModelIndex &index) const
115 const TextAutoGenerateMessage::Sender sender = index.data(TextAutoGenerateChatModel::SenderRole).value<TextAutoGenerateMessage::Sender>();
123QSize TextAutogenerateListViewDelegate::sizeHint(const QModelIndex &index, int maxWidth, const QStyleOptionViewItem &option, qreal *pBaseLine) const
135 const QSize size(doc->idealWidth(), doc->size().height()); // do the layouting, required by lineAt(0) below
143void TextAutogenerateListViewDelegate::selectAll(const QStyleOptionViewItem &option, const QModelIndex &index)
151bool TextAutogenerateListViewDelegate::mouseEvent(QEvent *event, const QStyleOptionViewItem &option, const QModelIndex &index)
160 } else if (eventType == QEvent::MouseButtonPress || eventType == QEvent::MouseMove || eventType == QEvent::MouseButtonDblClick) {
172bool TextAutogenerateListViewDelegate::helpEvent(QHelpEvent *helpEvent, QAbstractItemView *view, const QStyleOptionViewItem &option, const QModelIndex &index)
198QTextDocument *TextAutogenerateListViewDelegate::documentForIndex(const QModelIndex &index, int width) const
222std::unique_ptr<QTextDocument> TextAutogenerateListViewDelegate::createTextDocument(const QString &text, int width) const
243bool TextAutogenerateListViewDelegate::maybeStartDrag(QMouseEvent *event, const QStyleOptionViewItem &option, const QModelIndex &index)
252bool TextAutogenerateListViewDelegate::maybeStartDrag(QMouseEvent *mouseEvent, QRect messageRect, const QStyleOptionViewItem &option, const QModelIndex &index)
263 mimeData->setHtml(mTextSelection->selectedText(TextAutogenerateListViewTextSelection::Format::Html));
264 mimeData->setText(mTextSelection->selectedText(TextAutogenerateListViewTextSelection::Format::Text));
297 if (mTextSelection->contains(index, charPos) && doc->documentLayout()->hitTest(pos, Qt::ExactHit) != -1) {
302 // QWidgetTextControl also has code to support selectBlockOnTripleClick, shift to extend selection
316 // QWidgetTextControl also has code to support isPreediting()/commitPreedit(), selectBlockOnTripleClick
339 // don't return true here, we need to send mouse release events to other helpers (ex: click on image)
KIOCORE_EXPORT CopyJob * link(const QList< QUrl > &src, const QUrl &destDir, JobFlags flags=DefaultFlags)
QString anchorAt(const QPointF &position) const const
virtual int hitTest(const QPointF &point, Qt::HitTestAccuracy accuracy) const const=0
bool isEmpty() const const
bool openUrl(const QUrl &url)
Type
void drawBackground(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const const
QVariant data(int role) const const
bool isValid() const const
virtual bool event(QEvent *e)
QObject * sender() const const
void drawRect(const QRect &rectangle)
void restore()
void save()
void setClipRect(const QRect &rectangle, Qt::ClipOperation operation)
void setPen(Qt::PenStyle style)
void translate(const QPoint &offset)
bool contains(const QPoint &point, bool proper) const const
int height() const const
int left() const const
int top() const const
QPoint topLeft() const const
int width() const const
int height() const const
bool isEmpty() const const
bool isEmpty() const const
CopyAction
red
FuzzyHit
LeftButton
QTextLayout * layout() const const
QAbstractTextDocumentLayout * documentLayout() const const
QTextBlock firstBlock() const const
qreal idealWidth() const const
void setHtml(const QString &html)
void setTextWidth(qreal width)
QTextFrameFormat frameFormat() const const
void setFrameFormat(const QTextFrameFormat &format)
void setMargin(qreal margin)
QTextLine lineAt(int i) const const
qreal ascent() const const
qreal y() const const
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
void showText(const QPoint &pos, const QString &text, QWidget *w, const QRect &rect, int msecDisplayTime)
QByteArray toByteArray() const const
QString toString() const const
T value() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Apr 18 2025 12:00:52 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Apr 18 2025 12:00:52 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.