KTextEditor
katevariableexpansionhelpers.cpp
198 const int topMargin = 0; // style()->pixelMetric(QStyle::PM_LayoutTopMargin, &sopt, parentWidget());
199 const int rightMargin = 0; // style()->pixelMetric(QStyle::PM_LayoutRightMargin, &sopt, parentWidget());
213 , m_showAction(new QAction(QIcon::fromTheme(QStringLiteral("code-context")), i18n("Insert variable"), this))
238 connect(m_filterEdit, &QLineEdit::textChanged, m_filterModel, &QSortFilterProxyModel::setFilterWildcard);
256 auto activeView = KTextEditor::Editor::instance()->application()->activeMainWindow()->activeView();
338 const bool forward2list = (keyEvent->key() == Qt::Key_Up) || (keyEvent->key() == Qt::Key_Down) || (keyEvent->key() == Qt::Key_PageUp)
339 || (keyEvent->key() == Qt::Key_PageDown) || (keyEvent->key() == Qt::Key_Enter) || (keyEvent->key() == Qt::Key_Return);
380 auto activeView = KTextEditor::Editor::instance()->application()->activeMainWindow()->activeView();
KTextEditor::MainWindow * activeMainWindow()
Accessor to the active main window.
Definition application.cpp:40
QString expandText(const QString &text, KTextEditor::View *view) const
Expands arbitrary text that may contain arbitrary many variables.
Definition ktexteditor.cpp:123
virtual KTextEditor::Application * application() const =0
Current hosting application, if any set.
bool isValid() const
Returns true, if the name is non-empty and the function provided in the constructor is not a nullptr.
Definition variable.cpp:19
void addWidget(QWidget *widget)
Adds widget to the list of widgets that trigger showing this dialog.
Definition katevariableexpansionhelpers.cpp:316
void onObjectDeleted(QObject *object)
Called whenever a widget was deleted.
Definition katevariableexpansionhelpers.cpp:324
void addVariable(const KTextEditor::Variable &variable)
Adds variable to the expansion list view.
Definition katevariableexpansionhelpers.cpp:303
bool eventFilter(QObject *watched, QEvent *event) override
Reimplemented for the following reasons:
Definition katevariableexpansionhelpers.cpp:332
int isEmpty() const
Returns true if no variables were added at all to the dialog.
Definition katevariableexpansionhelpers.cpp:311
QString i18n(const char *text, const TYPE &arg...)
QWidget * window(QObject *job)
QString name(StandardAction id)
QString expandMacro(const QString &input, KTextEditor::View *view)
Expands the input text based on the view.
Definition katevariableexpansionhelpers.cpp:57
void beginResetModel()
QModelIndex createIndex(int row, int column, const void *ptr) const const
void endResetModel()
void activated(const QModelIndex &index)
void triggered(bool checked)
bool sendEvent(QObject *receiver, QEvent *event)
virtual bool eventFilter(QObject *o, QEvent *e) override
Resize
iterator begin()
void clear()
bool contains(const Key &key) const const
iterator end()
bool remove(const Key &key)
void currentRowChanged(const QModelIndex ¤t, const QModelIndex &previous)
TrailingPosition
void textChanged(const QString &text)
bool contains(const AT &value) const const
bool isEmpty() const const
void push_back(parameter_type value)
qsizetype removeAll(const AT &t)
qsizetype size() const const
bool isValid() const const
int row() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
void deleteLater()
void destroyed(QObject *obj)
virtual bool eventFilter(QObject *watched, QEvent *event)
void installEventFilter(QObject *filterObj)
QObject * parent() const const
T qobject_cast(QObject *object)
int width() const const
void setFilterWildcard(const QString &pattern)
qsizetype indexOf(QChar ch, qsizetype from, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
QString mid(qsizetype position, qsizetype n) const const
QString & replace(QChar before, QChar after, Qt::CaseSensitivity cs)
qsizetype size() const const
CC_ToolButton
virtual void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget) const const=0
void initFrom(const QWidget *widget)
CaseInsensitive
DisplayRole
Key_Up
Tool
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
void setAutoRaise(bool enable)
virtual bool event(QEvent *event) override
virtual void initStyleOption(QStyleOptionToolButton *option) const const
void setDefaultAction(QAction *action)
void showText(const QPoint &pos, const QString &text, QWidget *w, const QRect &rect, int msecDisplayTime)
virtual bool event(QEvent *event) override
void hide()
isActiveWindow
QWidget * parentWidget() const const
void move(const QPoint &)
virtual void resizeEvent(QResizeEvent *event)
void show()
size
toolTip
width
QWidget * window() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:11:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:11:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.