KTextEditor
katemessagewidget.cpp
46 m_animation = new KateAnimation(m_messageWidget, applyFadeEffect ? KateAnimation::FadeEffect : KateAnimation::GrowEffect);
89 connect(m_currentMessage, &KTextEditor::Message::textChanged, m_messageWidget, &KMessageWidget::setText, Qt::UniqueConnection);
90 connect(m_currentMessage, &KTextEditor::Message::iconChanged, m_messageWidget, &KMessageWidget::setIcon, Qt::UniqueConnection);
130 connect(m_autoHideTimer, &QTimer::timeout, m_currentMessage, &QObject::deleteLater, Qt::UniqueConnection);
182void KateMessageWidget::postMessage(KTextEditor::Message *message, QList<std::shared_ptr<QAction>> actions)
214 // a bit unnice: disconnect textChanged() and iconChanged() signals of previously visible message
215 disconnect(m_currentMessage, &KTextEditor::Message::textChanged, m_messageWidget, &KMessageWidget::setText);
216 disconnect(m_currentMessage, &KTextEditor::Message::iconChanged, m_messageWidget, &KMessageWidget::setIcon);
void removeAction(QAction *action)
void setCloseButtonVisible(bool visible)
QString text() const
void linkHovered(const QString &contents)
void addAction(QAction *action)
void setMessageType(KMessageWidget::MessageType type)
Information
Positive
Warning
void setIcon(const QIcon &icon)
void setWordWrap(bool wordWrap)
void setPosition(Position position)
bool wordWrap() const
Footer
Inline
Header
void setText(const QString &text)
void closed(KTextEditor::Message *message)
This signal is emitted before the message is deleted.
void textChanged(const QString &text)
This signal is emitted whenever setText() was called.
void iconChanged(const QIcon &icon)
This signal is emitted whenever setIcon() was called.
This class provides a fade in/out effect for KMessageWidgets.
Definition kateanimation.h:28
bool isHideAnimationRunning() const
Returns true, if the hide animation is running, otherwise false.
Definition kateanimation.cpp:36
void widgetHidden()
This signal is emitted when the hiding animation is finished.
bool isShowAnimationRunning() const
Returns true, if the how animation is running, otherwise false.
Definition kateanimation.cpp:41
void setWordWrap(KTextEditor::Message *message)
Helper that enables word wrap to avoid breaking the layout.
Definition katemessagewidget.cpp:141
void linkHovered(const QString &link)
User hovers on a link in the message widget.
Definition katemessagewidget.cpp:278
void messageDestroyed(KTextEditor::Message *message)
catch when a message is deleted, then show next one, if applicable.
Definition katemessagewidget.cpp:226
void postMessage(KTextEditor::Message *message, QList< std::shared_ptr< QAction > > actions)
Post a new incoming message.
Definition katemessagewidget.cpp:182
KateMessageWidget(QWidget *parent, bool applyFadeEffect=false)
Constructor.
Definition katemessagewidget.cpp:24
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
QPoint pos()
bool contains(const Key &key) const const
bool remove(const Key &key)
void getContentsMargins(int *left, int *top, int *right, int *bottom) const const
void setContentsMargins(const QMargins &margins)
qsizetype count() const const
iterator insert(const_iterator before, parameter_type value)
void removeAt(qsizetype i)
qsizetype size() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
void deleteLater()
bool disconnect(const QMetaObject::Connection &connection)
Preferred
UniqueConnection
bool isActive() const const
void setSingleShot(bool singleShot)
void start()
void stop()
void timeout()
void showText(const QPoint &pos, const QString &text, QWidget *w, const QRect &rect, int msecDisplayTime)
QList< QAction * > actions() const const
void adjustSize()
void ensurePolished() const const
void hide()
QLayout * layout() const const
QWidget * parentWidget() const const
void show()
void setSizePolicy(QSizePolicy)
width
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.