KTextEditor
katestatusbar.cpp
114 m_cursorPosition->setWhatsThis(i18n("Current cursor position. Click to go to a specific line."));
115 connect(m_cursorPosition, &StatusBarButton::clicked, m_view, &KTextEditor::ViewPrivate::gotoLine);
127 m_inputMode->setWhatsThis(i18n("Insert mode and VI input mode indicator. Click to change the mode."));
139 m_dictionaryMenu->addAction(m_view->action(QStringLiteral("tools_toggle_automatic_spell_checking")));
209 "Here you can choose which mode should be used for the current document. This will influence the highlighting and folding being used, for example."));
214 m_modeMenuList->setButton(m_mode, KateModeMenuList::AlignHInverse, KateModeMenuList::AlignTop, KateModeMenuList::AutoUpdateTextButton(false));
219 connect(m_view, &KTextEditor::View::cursorPositionChanged, this, &KateStatusBar::cursorPositionChanged);
222 connect(m_view->doc(), &KTextEditor::Document::configChanged, this, &KateStatusBar::documentConfigChanged);
223 connect(m_view->document(), &KTextEditor::DocumentPrivate::modeChanged, this, &KateStatusBar::modeChanged);
225 connect(m_view->doc(), &KTextEditor::DocumentPrivate::defaultDictionaryChanged, this, &KateStatusBar::updateDictionary);
226 connect(m_view->doc(), &KTextEditor::DocumentPrivate::dictionaryRangesPresent, this, &KateStatusBar::updateDictionary);
227 connect(m_view, &KTextEditor::ViewPrivate::caretChangedRange, this, &KateStatusBar::updateDictionary);
244 if (QAction *inputModesAction = m_view->actionCollection()->action(QStringLiteral("view_input_modes"))) {
255 QAction *showLines = menu.addAction(i18n("Show line count"), this, &KateStatusBar::toggleShowLines);
258 QAction *showWords = menu.addAction(i18n("Show word count"), this, &KateStatusBar::toggleShowWords);
265 a->setChecked(KateViewConfig::global()->value(KateViewConfig::StatusbarLineColumnCompact).toBool());
323 text = i18n("%1/%2:%3", QLocale().toString(l), QLocale().toString(m_view->doc()->lines()), QLocale().toString(c));
329 text = i18n("Line %1 of %2, Column %3", QLocale().toString(l), QLocale().toString(m_view->doc()->lines()), QLocale().toString(c));
353 const QList<QPair<KTextEditor::MovingRange *, QString>> dictRanges = m_view->doc()->dictionaryRanges();
369 if (!m_dictionaryGroup->checkedAction() || (m_dictionaryGroup->checkedAction()->data().toString() != newDict) || m_dictionary->text().isEmpty()) {
440 m_mode->setText(KTextEditor::EditorPrivate::self()->modeManager()->fileType(m_view->document()->mode()).nameTranslated());
489 val = QInputDialog::getInt(this, i18n("Tab Width"), i18n("Please specify the wanted tab width:"), config->tabWidth(), 1, 200, 1, &ok);
563void KateStatusBar::wordCountChanged(int wordsInDocument, int wordsInSelection, int charsInDocument, int charsInSelection)
567 m_wordCount = i18nc("%1 and %3 are the selected words/chars count, %2 and %4 are the total words/chars count.",
574 m_wordCount = i18nc("%1 and %2 are the total words/chars count.", "Words %1, Chars %2", wordsInDocument, charsInDocument);
586 const int zoom = m_view->rendererConfig()->baseFont().pointSizeF() / KateRendererConfig::global()->baseFont().pointSizeF() * 100;
static void setNoAccel(QWidget *widget)
Q_INVOKABLE QAction * action(const QString &name) const
QString toString() const
KLocalizedString subs(const KLocalizedString &a, int fieldWidth=0, QChar fillChar=QLatin1Char(' ')) const
Backend of KTextEditor::Document related public KTextEditor interfaces.
Definition katedocument.h:68
void configChanged(KTextEditor::Document *document)
This signal is emitted whenever the current document configuration is changed.
void modeChanged(KTextEditor::Document *document)
Warn anyone listening that the current document's mode has changed.
virtual QString mode() const =0
Return the name of the currently used mode.
A range that is bound to a specific Document, and maintains its position.
Definition movingrange.h:131
virtual const MovingCursor & end() const =0
Retrieve end cursor of this range, read-only.
bool contains(const Range &range) const
Check whether the this range wholly encompasses range.
Definition movingrange.h:422
An object representing a section of text, from one Cursor to another.
Definition include/ktexteditor/range.h:49
constexpr bool isEmpty() const noexcept
Returns true if this range contains no characters, ie.
Definition include/ktexteditor/range.h:301
void configChanged(KTextEditor::View *view)
This signal is emitted whenever the current view configuration is changed.
void cursorPositionChanged(KTextEditor::View *view, KTextEditor::Cursor newPosition)
This signal is emitted whenever the view's cursor position changed.
void viewModeChanged(KTextEditor::View *view, KTextEditor::View::ViewMode mode)
This signal is emitted whenever the view mode of view changes.
void selectionChanged(KTextEditor::View *view)
This signal is emitted whenever the view's selection changes.
virtual KActionCollection * actionCollection() const
void configEnd()
End a config change transaction, update the concerned KateDocumentConfig/KateDocumentConfig/KateDocum...
Definition kateconfig.cpp:103
Class of menu to select the syntax highlighting language (mode menu).
Definition katemodemenulist.h:58
QMap< QString, QString > availableDictionaries() const
For convenience an own button class to ensure a unified look&feel.
Definition katestatusbar.h:42
KLocalizedString KI18N_EXPORT ki18n(const char *text)
QString i18np(const char *singular, const char *plural, const TYPE &arg...)
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
char * toString(const EngineQuery &query)
GeoCoordinates geo(const QVariant &location)
QAction * zoom(const QObject *recvr, const char *slot, QObject *parent)
KGuiItem ok()
void clicked(bool checked)
void setCheckable(bool)
void setChecked(bool)
QVariant data() const const
void setActionGroup(QActionGroup *group)
void setData(const QVariant &data)
text
void setToolTip(const QString &tip)
QList< QAction * > actions() const const
QAction * addAction(QAction *action)
QAction * checkedAction() const const
void setEnabled(bool)
void addStretch(int stretch)
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
virtual void setSpacing(int spacing) override
qreal pointSizeF() const const
int getInt(QWidget *parent, const QString &title, const QString &label, int value, int min, int max, int step, bool *ok, Qt::WindowFlags flags)
void setContentsMargins(const QMargins &margins)
const_reference at(qsizetype i) const const
qsizetype count() const const
bool isEmpty() const const
bool blockSignals(bool block)
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
virtual bool eventFilter(QObject *watched, QEvent *event)
virtual void initStyleOption(QStyleOptionButton *option) const const
virtual QSize sizeHint() const const override
QString & append(QChar ch)
void clear()
bool isEmpty() const const
QString section(QChar sep, qsizetype start, qsizetype end, SectionFlags flags) const const
CE_PushButton
PM_FocusFrameVMargin
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const const=0
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
int toInt(bool *ok) const const
QString toString() const const
QList< QAction * > actions() const const
QWidget * childAt(const QPoint &p) const const
virtual bool event(QEvent *event) override
font
geometry
void hide()
bool isHidden() const const
QPoint mapToGlobal(const QPoint &pos) const const
QWidget * parentWidget() const const
pos
size
QStyle * style() const const
virtual void setVisible(bool visible)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:56 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 17:01:56 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.