KWidgetsAddons
kcharselect.cpp
190 connect(selectionModel(), &QItemSelectionModel::selectionChanged, this, [this](const QItemSelection &selected, const QItemSelection &deselected) {
194 connect(d->model, &KCharSelectItemModel::showCharRequested, this, &KCharSelectTable::showCharRequested);
209void KCharSelectTablePrivate::slotSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
265 maxCharWidth = qMax(maxCharWidth, fontMetrics.boundingRect(QString::fromUcs4(&thisChar, 1)).width());
364void attachToActionParent(QAction *action, QObject *actionParent, const QList<QKeySequence> &shortcuts)
373 QMetaObject::invokeMethod(actionParent, "addAction", Q_ARG(QString, action->objectName()), Q_ARG(QAction *, action));
374 QMetaObject::invokeMethod(actionParent, "setDefaultShortcuts", Q_ARG(QAction *, action), Q_ARG(QList<QKeySequence>, shortcuts));
391 d->searchLine->setPlaceholderText(tr("Enter a search term or character…", "@info:placeholder"));
412 if ((SearchLine & controls) && ((FontCombo & controls) || (FontSize & controls) || (BlockCombos & controls))) {
447 attachToActionParent(forwardAction, actionParent, QKeySequence::keyBindings(QKeySequence::Forward));
503 if ((HistoryButtons & controls) || (FontCombo & controls) || (FontSize & controls) || (BlockCombos & controls)) {
548 connect(d->charTable, &KCharSelectTable::showCharRequested, this, &KCharSelect::setCurrentCodePoint);
668 // qCDebug(KWidgetsAddonsLog) << "about to add char" << c << "fromSearch" << fromSearch << "searchString" << searchString;
707 // qCDebug(KWidgetsAddonsLog) << "index" << index << "char" << item.c << "fromSearch" << item.fromSearch
773 // we are in search mode or all characters are shown. make the two comboboxes show the section & block for this character (only the blockCombo for the
775 //(when we are not in search mode nor in the all characters mode the current character always belongs to the current section & block.)
796 QString html = QLatin1String("<p>") + tr("Character:") + QLatin1Char(' ') + s_data()->display(c, charTable->font()) + QLatin1Char(' ')
810 if (!(aliases.isEmpty() && notes.isEmpty() && seeAlso.isEmpty() && equivalents.isEmpty() && approxEquivalents.isEmpty() && decomposition.isEmpty())) {
811 html += QLatin1String("<p><b>") + tr("Annotations and Cross References") + QLatin1String("</b></p>");
815 html += QLatin1String("<p style=\"margin-bottom: 0px;\">") + tr("Alias names:") + QLatin1String("</p><ul style=\"margin-top: 0px;\">");
823 html += QLatin1String("<p style=\"margin-bottom: 0px;\">") + tr("Notes:") + QLatin1String("</p><ul style=\"margin-top: 0px;\">");
831 html += QLatin1String("<p style=\"margin-bottom: 0px;\">") + tr("See also:") + QLatin1String("</p><ul style=\"margin-top: 0px;\">");
840 html += s_data()->formatCode(c2) + QLatin1Char(' ') + s_data()->name(c2).toHtmlEscaped() + QLatin1String("</a></li>");
846 html += QLatin1String("<p style=\"margin-bottom: 0px;\">") + tr("Equivalents:") + QLatin1String("</p><ul style=\"margin-top: 0px;\">");
848 html += QLatin1String("<li>") + createLinks(equivalent.toHtmlEscaped()) + QLatin1String("</li>");
854 html += QLatin1String("<p style=\"margin-bottom: 0px;\">") + tr("Approximate equivalents:") + QLatin1String("</p><ul style=\"margin-top: 0px;\">");
856 html += QLatin1String("<li>") + createLinks(approxEquivalent.toHtmlEscaped()) + QLatin1String("</li>");
862 html += QLatin1String("<p style=\"margin-bottom: 0px;\">") + tr("Decomposition:") + QLatin1String("</p><ul style=\"margin-top: 0px;\">");
867 html += QLatin1String("<li>") + createLinks(s_data()->formatCode(c2, 4, QString())) + QLatin1String("</li>");
874 html += QLatin1String("<p><b>") + tr("CJK Ideograph Information") + QLatin1String("</b></p><p>");
925 html += QLatin1String("<p><b>") + tr("General Character Properties") + QLatin1String("</b><br>");
927 html += tr("Unicode category: ") + s_data()->categoryText(s_data()->category(c)) + QLatin1String("</p>");
931 html += QLatin1String("<p><b>") + tr("Various Useful Representations") + QLatin1String("</b><br>");
947 html += QLatin1String("<br>") + tr("XML decimal entity:") + QLatin1String(" &#") + QString::number(c) + QLatin1String(";</p>");
954 static const QRegularExpression rx(QStringLiteral("\\b([\\dABCDEF]{4,5})\\b"), QRegularExpression::UseUnicodePropertiesOption);
1007 // the combo box has been cleared and is about to be filled again (because the section has changed)
1060 contents.erase(std::remove_if(contents.begin(), contents.end(), QChar::requiresSurrogates), contents.end());
1089 if (!index.isValid() || pos < 0 || pos >= m_chars.size() || index.row() < 0 || index.column() < 0) {
1098 QString result = s_data()->display(c, m_font) + QLatin1String("<br />") + s_data()->name(c).toHtmlEscaped() + QLatin1String("<br />")
1099 + tr("Unicode code point:") + QLatin1Char(' ') + s_data()->formatCode(c) + QLatin1String("<br />") + tr("In decimal", "Character")
1124bool KCharSelectItemModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
void setCurrentCodePoint(uint codePoint)
Highlights the character with the specified codePoint.
Definition kcharselect.cpp:643
void displayedCharsChanged()
The currently displayed characters are changed (search results or block).
void currentCharChanged(const QChar &c)
The current character is changed.
void currentFontChanged(const QFont &font)
A new font is selected or the font size changed.
void codePointSelected(uint codePoint)
A character is selected to be inserted somewhere.
void setCurrentFont(const QFont &font)
Sets the font which is displayed to font.
Definition kcharselect.cpp:581
void setAllPlanesEnabled(bool all)
Sets the allowed Unicode code planes.
Definition kcharselect.cpp:588
void charSelected(const QChar &c)
A character is selected to be inserted somewhere.
void currentCodePointChanged(uint codePoint)
The current character is changed.
KCharSelect(QWidget *parent, const Controls controls=AllGuiElements)
Constructor.
Definition kcharselect.cpp:350
KCOREADDONS_EXPORT Result match(QStringView pattern, QStringView str)
KIOCORE_EXPORT CopyJob * link(const QList< QUrl > &src, const QUrl &destDir, JobFlags flags=DefaultFlags)
bool isValid(QStringView ifopt)
QString name(StandardAction id)
Category category(StandardShortcut id)
void animateClick()
void clicked(bool checked)
DragDrop
SelectItems
SingleSelection
virtual void keyPressEvent(QKeyEvent *event) override
virtual void resizeEvent(QResizeEvent *event) override
void setIcon(const QIcon &icon)
void setShortcuts(QKeySequence::StandardKey key)
void setText(const QString &text)
void triggered(bool checked)
void addLayout(QLayout *layout, int stretch)
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
Space
char16_t highSurrogate(char32_t ucs4)
char16_t lowSurrogate(char32_t ucs4)
bool requiresSurrogates(char32_t ucs4)
char16_t & unicode()
void addItem(const QIcon &icon, const QString &text, const QVariant &userData)
void clear()
currentIndex
void currentIndexChanged(int index)
int findData(const QVariant &data, int role, Qt::MatchFlags flags) const const
QVariant itemData(int index, int role) const const
int pointSize() const const
void setPointSize(int pointSize)
currentFont
void currentFontChanged(const QFont &font)
bool inFontUcs4(uint ucs4) const const
Sunken
HLine
void setFrameShadow(Shadow)
void setFrameShape(Shape)
bool isRightToLeft()
Custom
void setMinimumSectionSize(int size)
void resizeSection(int logicalIndex, int size)
QIcon fromTheme(const QString &name)
QModelIndexList indexes() const const
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
int key() const const
QList< QKeySequence > keyBindings(StandardKey key)
void setContentsMargins(const QMargins &margins)
void clear()
void returnPressed()
void selectAll()
text
void textChanged(const QString &text)
void append(QList< T > &&value)
const_reference at(qsizetype i) const const
iterator begin()
qsizetype count() const const
iterator end()
iterator erase(const_iterator begin, const_iterator end)
qsizetype indexOf(const AT &value, qsizetype from) const const
bool isEmpty() const const
T & last()
void removeFirst()
void removeLast()
void reserve(qsizetype size)
qsizetype size() const const
bool invokeMethod(QObject *context, Functor &&function, FunctorReturnType *ret)
UInt
bool hasText() const const
QString text() const const
int column() const const
bool isValid() const const
int row() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool inherits(const char *className) const const
objectName
void setObjectName(QAnyStringView name)
void setParent(QObject *parent)
QString tr(const char *sourceText, const char *disambiguation, int n)
Base
void setColor(ColorGroup group, ColorRole role, const QColor &color)
UseUnicodePropertiesOption
bool hasNext() const const
QRegularExpressionMatch next()
const QSize & oldSize() const const
const QSize & size() const const
iterator insert(const T &value)
int width() const const
MinimumExpanding
value
void valueChanged(int i)
void addWidget(QWidget *widget)
QString fromUcs4(const char32_t *unicode, qsizetype size)
bool isEmpty() const const
QString number(double n, char format, int precision)
QString & replace(QChar before, QChar after, Qt::CaseSensitivity cs)
QString toHtmlEscaped() const const
QList< uint > toUcs4() const const
QByteArray toUtf8() const const
PM_FocusFrameHMargin
AlignHCenter
DropAction
StrongFocus
BackgroundRole
Key_Space
ScrollBarAlwaysOff
ElideNone
QTextStream & hex(QTextStream &stream)
virtual void scrollTo(const QModelIndex &index, ScrollHint hint) override
void anchorClicked(const QUrl &link)
void setHtml(const QString &text)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
void timeout()
QString toString(FormattingOptions options) const const
int toInt(bool *ok) const const
uint toUInt(bool *ok) const const
int userType() const const
void setEnabled(bool)
void setFocusPolicy(Qt::FocusPolicy policy)
font
void hide()
void setFocus()
void setFocusProxy(QWidget *w)
sizeHint
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.