KConfigWidgets
kcommandbar.cpp
169 paintItemText(QPainter *p, const QString &textt, const QRect &rect, const QStyleOptionViewItem &options, QList<QTextLayout::FormatRange> formats)
201 const int y = QStyle::alignedRect(Qt::LeftToRight, Qt::AlignVCenter, textLayout.boundingRect().size().toSize(), rect).y();
208 void paint(QPainter *painter, const QStyleOptionViewItem &opt, const QModelIndex &index) const override
263 std::transform(fmtRanges.begin(), fmtRanges.end(), std::back_inserter(formats), [f, actionNameStart](const KFuzzyMatcher::Range &fr) {
291 void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
439 static int shortcutDrawingWidth(const QStyleOptionViewItem &option, const ShortcutSegments &shortcutSegments, int hMargin)
539 QStringList actionNames = cg.readEntry(QStringLiteral("CommandBarLastUsedActions"), QStringList());
571 d->m_lineEdit.addAction(QIcon::fromTheme(QStringLiteral("search")), QLineEdit::LeadingPosition);
589 connect(&d->m_lineEdit, &QLineEdit::textChanged, &d->m_proxyModel, &CommandBarFilterModel::setFilterString);
590 connect(&d->m_lineEdit, &QLineEdit::textChanged, delegate, &CommandBarStyleDelegate::setFilterString);
605 d->m_treeView.header()->setSectionResizeMode(KCommandBarModel::Column_Command, QHeaderView::Stretch);
606 d->m_treeView.header()->setSectionResizeMode(KCommandBarModel::Column_Shortcut, QHeaderView::ResizeToContents);
634 connect(&d->m_proxyModel, &CommandBarFilterModel::modelReset, this, [this, placeholderLabel]() {
703 const QSize size{std::min(maxWidth, std::max(preferredWidth, minWidth)), std::min(maxHeight, std::max(preferredHeight, minHeight))};
721 const bool forward2list = (key == Qt::Key_Up) || (key == Qt::Key_Down) || (key == Qt::Key_PageUp) || (key == Qt::Key_PageDown);
728 const bool forward2input = (key != Qt::Key_Up) && (key != Qt::Key_Down) && (key != Qt::Key_PageUp) && (key != Qt::Key_PageDown)
744 else if (event->type() == QEvent::FocusOut && isVisible() && !(d->m_lineEdit.hasFocus() || d->m_treeView.hasFocus())) {
void setActions(const QList< ActionGroup > &actions)
actions is a list of {GroupName, QAction}.
Definition kcommandbar.cpp:679
~KCommandBar() override
Destructor defined here to make unique_ptr work.
Definition kcommandbar.cpp:664
void writeEntry(const char *key, const char *value, WriteConfigFlags pFlags=Normal)
static QString removeAcceleratorMarker(const QString &label)
Q_SCRIPTABLE Q_NOREPLY void start()
KCOREADDONS_EXPORT Result match(QStringView pattern, QStringView str)
KCOREADDONS_EXPORT QList< KFuzzyMatcher::Range > matchedRanges(QStringView pattern, QStringView str, RangeType type=RangeType::FullyMatched)
const QList< QKeySequence > & shortcut(StandardShortcut id)
void beginResetModel()
void endResetModel()
void modelAboutToBeReset()
void modelReset()
SingleSelection
void clicked(const QModelIndex &index)
QModelIndex currentIndex() const const
void setCurrentIndex(const QModelIndex &index)
sourceModel
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
bool sendEvent(QObject *receiver, QEvent *event)
KeyPress
Bold
int pointSize() const const
void setPointSize(int pointSize)
Sunken
StyledPanel
virtual bool event(QEvent *e) override
void setFrameStyle(int style)
void setBlurRadius(qreal blurRadius)
void setColor(const QColor &color)
void setOffset(const QPointF &ofs)
void setOpacity(qreal opacity)
Stretch
QIcon fromTheme(const QString &name)
void setAlignment(Qt::Alignment)
void setTextInteractionFlags(Qt::TextInteractionFlags flags)
void setWordWrap(bool on)
void addWidget(QWidget *w)
void setContentsMargins(const QMargins &margins)
virtual void setSpacing(int)
LeadingPosition
void clear()
void returnPressed()
void textChanged(const QString &text)
void append(QList< T > &&value)
const_reference at(qsizetype i) const const
qsizetype count() const const
void reserve(qsizetype size)
qsizetype size() const const
Qt::ToolBarArea toolBarArea(const QToolBar *toolbar) const const
int column() const const
QVariant data(int role) const const
bool isValid() const const
const QAbstractItemModel * model() const const
Q_SLOTQ_SLOT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
void deleteLater()
virtual bool eventFilter(QObject *watched, QEvent *event)
T findChild(const QString &name, Qt::FindChildOptions options) const const
QList< T > findChildren(Qt::FindChildOptions options) const const
void installEventFilter(QObject *filterObj)
QObject * parent() const const
bool setProperty(const char *name, QVariant &&value)
Antialiasing
void drawRoundedRect(const QRect &rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode)
void drawText(const QPoint &position, const QString &text)
void restore()
void save()
void setBrush(Qt::BrushStyle style)
void setPen(Qt::PenStyle style)
void setRenderHint(RenderHint hint, bool on)
Dark
int x() const const
void adjust(int dx1, int dy1, int dx2, int dy2)
int bottom() const const
QPoint center() const const
int height() const const
int left() const const
int right() const const
void setBottom(int y)
void setLeft(int x)
void setRight(int x)
void setTop(int y)
int top() const const
int width() const const
int x() const const
int y() 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
int localeAwareCompare(QStringView s1, QStringView s2)
QStringView mid(qsizetype start, qsizetype length) const const
CE_ItemViewItem
PM_FocusFrameHMargin
PE_PanelItemViewItem
QRect alignedRect(Qt::LayoutDirection direction, Qt::Alignment alignment, const QSize &size, const QRect &rectangle)
virtual void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const const=0
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const const=0
Qt::Alignment visualAlignment(Qt::LayoutDirection direction, Qt::Alignment alignment)
virtual void initStyleOption(QStyleOptionViewItem *option, const QModelIndex &index) const const
virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const const override
AlignVCenter
TopEdge
gray
DisplayRole
Key_Up
LeftToRight
NoPen
ScrollBarAlwaysOff
ElideRight
NoTextInteraction
TopToolBarArea
void keyEvent(KeyAction action, QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier, int delay)
void setFontWeight(int weight)
void setForeground(const QBrush &brush)
bool isValid() const const
void setLineWidth(qreal width)
void setPosition(const QPointF &pos)
void setAlignment(Qt::Alignment alignment)
void setTextDirection(Qt::LayoutDirection direction)
QVariant fromValue(T &&value)
bool isNull() const const
int toInt(bool *ok) const const
QString toString() const const
T value() const const
QList< QAction * > actions() const const
QRect contentsRect() const const
font
geometry
void hide()
QLayout * layout() const const
palette
QWidget * parentWidget() const const
void move(const QPoint &)
void setFixedSize(const QSize &s)
void setFocus()
void setFocusProxy(QWidget *w)
void setGraphicsEffect(QGraphicsEffect *effect)
void setLayout(QLayout *layout)
void show()
size
QStyle * style() const const
bool isVisible() const const
Represents a list of action that belong to the same group.
Definition kcommandbar.h:57
int score
bool matched
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:46 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:07:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.