KTextEditor
screenshotdialog.cpp
107 if ((m_dragStartCandidatePos == noDragStartCandidatePos) || (event->buttons() != Qt::LeftButton)
108 || ((event->pos() - m_dragStartCandidatePos).manhattanLength() < QApplication::startDragDistance())) {
173ScreenshotDialog::ScreenshotDialog(KTextEditor::Range selRange, KTextEditor::ViewPrivate *parent)
178 , m_saveButton(new QPushButton(QIcon::fromTheme(QStringLiteral("document-save")), i18n("Save")))
180 , m_changeBGColor(new QPushButton(QIcon::fromTheme(QStringLiteral("color-fill")), i18nc("@action:button", "Background Color…")))
201 const int color = cg.readEntry("BackgroundColor", EditorPrivate::self()->theme().textColor(KSyntaxHighlighting::Theme::Normal));
260 addMenuAction(i18n("Don't Show Line Numbers"), DontShowLineNums)->setChecked(i == DontShowLineNums);
261 addMenuAction(i18n("Show Line Numbers From 1"), ShowAbsoluteLineNums)->setChecked(i == ShowAbsoluteLineNums);
262 addMenuAction(i18n("Show Actual Line Numbers"), ShowActualLineNums)->setChecked(i == ShowActualLineNums);
309 int width = std::min(1024, std::max(400, this->width() - (m_scrollArea->horizontalScrollBar()->height())));
352 const int lnNoWidth = renderer.currentFontMetrics().horizontalAdvance(QString::number(lastLine));
423 QMessageBox::warning(this, i18nc("@title:window", "Screenshot saving failed"), i18n("Screenshot saving failed: %1", writer.errorString()));
constexpr int line() const noexcept
Retrieve the line on which this cursor is situated.
Definition cursor.h:174
An object representing a section of text, from one Cursor to another.
Definition include/ktexteditor/range.h:49
constexpr Cursor end() const noexcept
Get the end position of this range.
Definition include/ktexteditor/range.h:163
constexpr Cursor start() const noexcept
Get the start position of this range.
Definition include/ktexteditor/range.h:153
constexpr bool isEmpty() const noexcept
Returns true if this range contains no characters, ie.
Definition include/ktexteditor/range.h:301
Handles all of the work of rendering the text (used for the views and printing)
Definition katerenderer.h:56
Kate::TextFolding & folding() const
Returns the folding info to which this renderer is bound.
Definition katerenderer.h:98
KTextEditor::ViewPrivate * view() const
Returns the view to which this renderer is bound.
Definition katerenderer.h:106
@ SkipDrawLineSelection
Skip drawing the line selection This is useful when we are drawing the draggable pixmap for drag even...
Definition katerenderer.h:342
@ SkipDrawFirstInvisibleLineUnderlined
Skip drawing the dashed underline at the start of a folded block of text?
Definition katerenderer.h:337
KTextEditor::DocumentPrivate * doc() const
Returns the document to which this renderer is bound.
Definition katerenderer.h:89
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
QString name(GameStandardAction id)
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...
Definition katetextblock.h:20
bool isChecked() const const
void clicked(bool checked)
void toggled(bool checked)
QScrollBar * horizontalScrollBar() const const
void triggered(bool checked)
startDragDistance
bool isEmpty() const const
Clipboard
QColor fromRgba(QRgb rgba)
QRgb rgba() const const
Accepted
virtual void resizeEvent(QResizeEvent *) override
QString getSaveFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, Options options)
QFlags< T > & setFlag(Enum flag, bool on)
bool fixedPitch() const const
NoFrame
void setBlurRadius(qreal blurRadius)
void setColor(const QColor &color)
void setOffset(const QPointF &ofs)
void setPixmap(const QPixmap &)
void addWidget(QWidget *w)
StandardButton warning(QWidget *parent, const QString &title, const QString &text, StandardButtons buttons, StandardButton defaultButton)
void setImageData(const QVariant &image)
QObject * parent() const const
Antialiasing
Base
QPixmap scaled(const QSize &size, Qt::AspectRatioMode aspectRatioMode, Qt::TransformationMode transformMode) const const
QSize size() const const
QImage toImage() const const
virtual void scrollContentsBy(int dx, int dy) override
int height() const const
int width() const const
bool isEmpty() const const
QString number(double n, char format, int precision)
AlignRight
KeepAspectRatio
CopyAction
yellow
LeftButton
NoPen
TextDontClip
SmoothTransformation
WA_Hover
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
QMetaObject::Connection callOnTimeout(Functor &&slot)
void setInterval(int msec)
void setSingleShot(bool singleShot)
void start()
void stop()
InstantPopup
void setAutoFillBackground(bool enabled)
QWidget * childAt(const QPoint &p) const const
virtual bool event(QEvent *event) override
geometry
QPixmap grab(const QRect &rectangle)
height
QLayout * layout() const const
virtual void mouseMoveEvent(QMouseEvent *event)
virtual void mousePressEvent(QMouseEvent *event)
palette
QWidget * parentWidget() const const
void setContentsMargins(const QMargins &margins)
void setGraphicsEffect(QGraphicsEffect *effect)
width
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Sep 27 2024 11:56:36 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Sep 27 2024 11:56:36 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.