KWidgetsAddons
kmessagewidget.cpp
79 q->setFocusProxy(textLabel); // Make sure calling q->setFocus() moves focus to a sensible item. This is useful for accessibility, because when the focus
80 // is moved to the textLabel, screen readers will first announce the accessible name of the messageWidget e.g. "Error" and
185 const QColor parentTextColor = (q->parentWidget() ? q->parentWidget()->palette() : qApp->palette()).color(QPalette::WindowText);
285 // The accessible names are announced like a title before the actual message of the box is read out.
288 setAccessibleName(KMessageWidget::tr("Success", "accessible name of positively-colored (e.g. green) message box"));
291 setAccessibleName(KMessageWidget::tr("Note", "accessible name of info-colored (e.g. blue) message box"));
294 setAccessibleName(KMessageWidget::tr("Warning", "accessible name of warning-colored (e.g. orange) message box"));
297 setAccessibleName(KMessageWidget::tr("Error", "accessible name of error-colored (e.g. red) message box"));
346 if (d->timeLine->state() == QTimeLine::NotRunning && d->ignoreShowAndResizeEventDoingAnimatedShow) {
368 const QColor parentWindowColor = (parentWidget() ? parentWidget()->palette() : qApp->palette()).color(QPalette::Window);
465 if (!style()->styleHint(QStyle::SH_Widget_Animate, nullptr, this) || (parentWidget() && !parentWidget()->isVisible())) {
471 if (isVisible() && (d->timeLine->state() == QTimeLine::NotRunning) && (height() == d->bestContentHeight())) {
518 return (d->timeLine->direction() == QTimeLine::Backward) && (d->timeLine->state() == QTimeLine::Running);
523 return (d->timeLine->direction() == QTimeLine::Forward) && (d->timeLine->state() == QTimeLine::Running);
A widget to provide feedback or propose opportunistic interactions.
Definition kmessagewidget.h:88
void removeAction(QAction *action)
Remove action from the message widget.
Definition kmessagewidget.cpp:442
bool isShowAnimationRunning() const
Check whether the show animation started by calling animatedShow() is still running.
Definition kmessagewidget.cpp:521
void setCloseButtonVisible(bool visible)
Set the visibility of the close button.
Definition kmessagewidget.cpp:430
bool isHideAnimationRunning() const
Check whether the hide animation started by calling animatedHide() is still running.
Definition kmessagewidget.cpp:516
void linkActivated(const QString &contents)
This signal is emitted when the user clicks a link in the text label.
void showAnimationFinished()
This signal is emitted when the show animation is finished, started by calling animatedShow().
void linkHovered(const QString &contents)
This signal is emitted when the user hovers over a link in the text label.
void hideAnimationFinished()
This signal is emitted when the hide animation is finished, started by calling animatedHide().
int heightForWidth(int width) const override
Returns the required height for width.
Definition kmessagewidget.cpp:351
void setMessageType(KMessageWidget::MessageType type)
Set the message type to type.
Definition kmessagewidget.cpp:280
void setTextFormat(Qt::TextFormat textFormat)
Set the text format of the message widget's label.
Definition kmessagewidget.cpp:270
void setIcon(const QIcon &icon)
Define an icon to be shown on the left of the text.
Definition kmessagewidget.cpp:531
KMessageWidget(QWidget *parent=nullptr)
Constructs a KMessageWidget with the specified parent.
Definition kmessagewidget.cpp:237
bool isCloseButtonVisible() const
Check whether the close button is visible.
Definition kmessagewidget.cpp:425
QSize sizeHint() const override
Returns the preferred size of the message widget.
Definition kmessagewidget.cpp:301
void setPosition(Position position)
Set the position of this message.
Definition kmessagewidget.cpp:419
QSize minimumSizeHint() const override
Returns the minimum size of the message widget.
Definition kmessagewidget.cpp:307
void setText(const QString &text)
Set the text of the message widget to text.
Definition kmessagewidget.cpp:259
AKONADI_CALENDAR_EXPORT KCalendarCore::Event::Ptr event(const Akonadi::Item &item)
const QList< QKeySequence > & back()
void setIcon(const QIcon &icon)
void setText(const QString &text)
void setToolTip(const QString &tip)
void triggered(bool checked)
void addStretch(int stretch)
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
int blue() const const
int green() const const
int red() const const
void setRgb(QRgb rgb)
Polish
virtual bool event(QEvent *e) override
virtual QSize sizeHint() const const override
virtual void addItem(QLayoutItem *item) override
void addWidget(QWidget *widget, int fromRow, int fromColumn, int rowSpan, int columnSpan, Qt::Alignment alignment)
void linkActivated(const QString &link)
void linkHovered(const QString &link)
void setTextInteractionFlags(Qt::TextInteractionFlags flags)
QMargins contentsMargins() const const
void setContentsMargins(const QMargins &margins)
void append(QList< T > &&value)
void clear()
bool isEmpty() const const
void reserve(qsizetype size)
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QString tr(const char *sourceText, const char *disambiguation, int n)
Antialiasing
Window
void setColor(ColorGroup group, ColorRole role, const QColor &color)
QRect marginsRemoved(const QMargins &margins) const const
int height() const const
Fixed
void setHeightForWidth(bool dependent)
PM_ToolBarIconSize
SP_DialogCloseButton
SH_Widget_Animate
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const const=0
virtual QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const const=0
void initFrom(const QWidget *widget)
AlignCenter
NoPen
TextFormat
TextBrowserInteraction
ToolButtonTextBesideIcon
Forward
NotRunning
direction
void finished()
void valueChanged(qreal value)
void setAutoRaise(bool enable)
void setDefaultAction(QAction *action)
void setToolButtonStyle(Qt::ToolButtonStyle style)
void setAccessibleName(const QString &name)
QList< QAction * > actions() const const
QAction * addAction(const QIcon &icon, const QString &text)
void ensurePolished() const const
geometry
height
virtual int heightForWidth(int w) const const
void hide()
QLayout * layout() const const
void setMinimumHeight(int minh)
minimumSizeHint
palette
QWidget * parentWidget() const const
rect
void removeAction(QAction *action)
virtual void resizeEvent(QResizeEvent *event)
void setFixedHeight(int h)
void setFocusProxy(QWidget *w)
void setTabOrder(QWidget *first, QWidget *second)
void show()
void resize(const QSize &)
void setSizePolicy(QSizePolicy)
QStyle * style() const const
void update()
void updateGeometry()
bool isVisible() const const
width
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:52 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:09:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.