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
QString text(KTextEditor::Range range, bool blockwise=false) const override
Get the document content within the given range.
Definition katedocument.cpp:442
bool setHighlightingMode(const QString &name) override
Set the current mode of the document by giving its name.
Definition katedocument.cpp:1836
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()
SingleSelection
QModelIndex currentIndex() const const
void doubleClicked(const QModelIndex &index)
void setCurrentIndex(const QModelIndex &index)
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
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 setAlignment(Qt::Alignment)
void setText(const QString &)
void setTextInteractionFlags(Qt::TextInteractionFlags flags)
void setWordWrap(bool on)
void setContentsMargins(const QMargins &margins)
void clear()
void setPlaceholderText(const QString &)
void returnPressed()
void textChanged(const QString &text)
void append(QList< T > &&value)
const_reference at(qsizetype i) const const
qsizetype size() const const
void swap(QList< T > &other)
QVariant data(int role) const const
bool isValid() const const
int row() const const
virtual bool eventFilter(QObject *watched, QEvent *event)
QObject * parent() const const
int height() const const
int width() const const
virtual QVariant data(const QModelIndex &index, int role) const const override
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
qsizetype indexOf(QChar ch, qsizetype from, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
QString trimmed() const const
void truncate(qsizetype position)
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)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
int toInt(bool *ok) const const
QString toString() const const
bool hasFocus() const const
void setFont(const QFont &)
void hide()
void move(const QPoint &)
void setFixedSize(const QSize &s)
void setGraphicsEffect(QGraphicsEffect *effect)
void setLayout(QLayout *layout)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:53:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:53:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.