KTextEditor
clipboardhistorydialog.cpp
137 , m_newLineRegExp(QStringLiteral("\\n|\\r|\u2028"), QRegularExpression::UseUnicodePropertiesOption)
163ClipboardHistoryDialog::ClipboardHistoryDialog(QWidget *mainWindow, KTextEditor::ViewPrivate *viewPrivate)
188 connect(&m_lineEdit, &QLineEdit::returnPressed, this, &ClipboardHistoryDialog::slotReturnPressed);
194 connect(&m_treeView, &QTreeView::doubleClicked, this, &ClipboardHistoryDialog::slotReturnPressed);
231 connect(m_treeView.selectionModel(), &QItemSelectionModel::currentRowChanged, this, [this](const QModelIndex ¤t, const QModelIndex &previous) {
253 QString fileName = m_proxyModel->data(idx, ClipboardHistoryModel::Role::HighlightingRole).toString();
257 const auto mode = KTextEditor::Editor::instance()->repository().definitionForFileName(fileName).name();
267void ClipboardHistoryDialog::openDialog(const QList<KTextEditor::EditorPrivate::ClipboardEntry> &clipboardHistory)
318 // catch key presses + shortcut overrides to allow to have ESC as application wide shortcut, too, see bug 409856
322 const bool forward2list = (keyEvent->key() == Qt::Key_Up) || (keyEvent->key() == Qt::Key_Down) || (keyEvent->key() == Qt::Key_PageUp)
336 const bool forward2input = (keyEvent->key() != Qt::Key_Up) && (keyEvent->key() != Qt::Key_Down) && (keyEvent->key() != Qt::Key_PageUp)
337 && (keyEvent->key() != Qt::Key_PageDown) && (keyEvent->key() != Qt::Key_Tab) && (keyEvent->key() != Qt::Key_Backtab);
346 else if (event->type() == QEvent::FocusOut && !(m_lineEdit.hasFocus() || m_treeView.hasFocus() || m_selectedView->hasFocus())) {
QString name() const
Q_INVOKABLE KSyntaxHighlighting::Definition definitionForFileName(const QString &fileName) const
const KSyntaxHighlighting::Repository & repository() const
Get read-only access to the syntax highlighting repository the editor uses.
Definition ktexteditor.cpp:143
QString i18n(const char *text, const TYPE &arg...)
const QList< QKeySequence > & endOfLine()
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...
Definition katetextblock.h:18
void beginResetModel()
void endResetModel()
virtual QModelIndex parent(const QModelIndex &index) const const=0
SingleSelection
void doubleClicked(const QModelIndex &index)
QAbstractTableModel(QObject *parent)
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
virtual void setSpacing(int spacing) override
bool sendEvent(QObject *receiver, QEvent *event)
KeyPress
int pointSize() const const
void setPointSize(int pointSize)
QIcon fromTheme(const QString &name)
void currentRowChanged(const QModelIndex ¤t, const QModelIndex &previous)
void setContentsMargins(const QMargins &margins)
void returnPressed()
void textChanged(const QString &text)
void append(QList< T > &&value)
const_reference at(qsizetype i) const const
qsizetype size() const const
QVariant data(int role) const const
bool isValid() const const
int row() const const
QObject(QObject *parent)
virtual bool event(QEvent *e)
virtual bool eventFilter(QObject *watched, QEvent *event)
int height() const const
int width() const const
QSortFilterProxyModel(QObject *parent)
QChar * data()
qsizetype indexOf(QChar ch, qsizetype from, Qt::CaseSensitivity cs) const const
QString trimmed() const const
void truncate(qsizetype position)
QStyledItemDelegate(QObject *parent)
virtual QString displayText(const QVariant &value, const QLocale &locale) const const
virtual void initStyleOption(QStyleOptionViewItem *option, const QModelIndex &index) const const
AlignCenter
CaseInsensitive
UserRole
Key_Up
ScrollBarAlwaysOff
ElideLeft
NoTextInteraction
void keyEvent(KeyAction action, QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier, int delay)
int toInt(bool *ok) const const
void hide()
void move(const QPoint &)
void setFixedSize(const QSize &s)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:55:24 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:55:24 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.