6#include "QskMessageSubWindow.h"
7#include "QskTextLabel.h"
16 setObjectName( QStringLiteral(
"QskMessageSubWindowTextLabel" ) );
18 initSizePolicy( QskSizePolicy::Ignored, QskSizePolicy::ConstrainedExpanding );
21 setAlignment( Qt::AlignLeft | Qt::AlignTop );
22 setWrapMode( QskTextOptions::WordWrap );
23 setElideMode( Qt::ElideRight );
28QskMessageSubWindow::QskMessageSubWindow( QQuickItem* parent )
31 auto label =
new TextLabel();
33 connect( label, &QskTextLabel::textChanged,
34 this, &QskMessageSubWindow::textChanged );
36 connect( label, &QskTextLabel::textOptionsChanged,
37 this, &QskMessageSubWindow::textOptionsChanged );
39 setContentItem( label );
42QskMessageSubWindow::~QskMessageSubWindow()
46void QskMessageSubWindow::setText(
const QString& text )
48 if (
auto label = qobject_cast< QskTextLabel* >( contentItem() ) )
49 label->setText( text );
52QString QskMessageSubWindow::text()
const
54 if (
auto label = qobject_cast< const QskTextLabel* >( contentItem() ) )
60void QskMessageSubWindow::setTextOptions(
const QskTextOptions& options )
62 if (
auto label = qobject_cast< QskTextLabel* >( contentItem() ) )
63 label->setTextOptions( options );
68 if (
auto label = qobject_cast< const QskTextLabel* >( contentItem() ) )
69 return label->textOptions();
74#include "moc_QskMessageSubWindow.cpp"
void setLayoutAlignmentHint(Qt::Alignment)
void initSizePolicy(QskSizePolicy::Policy, QskSizePolicy::Policy)