kleopatra
resultitemwidget.cpp
Go to the documentation of this file.
79 explicit Private( const shared_ptr<const Task::Result> result, ResultItemWidget* qq ) : q( qq ), m_result( result ), m_detailsLabel( 0 ), m_showDetailsLabel( 0 ), m_closeButton( 0 ) { assert( m_result ); }
104 m_showDetailsLabel->setText( QString::fromLatin1( "<a href=\"kleoresultitem://toggledetails/\">%1</a><br/>%2" ).arg( detailsVisible ? i18n( "Hide Details" ) : i18n( "Show Details" ), auditLogLink ) );
105 m_showDetailsLabel->setAccessibleDescription( detailsVisible ? i18n( "Hide Details" ) : i18n( "Show Details" ) );
108 ResultItemWidget::ResultItemWidget( const shared_ptr<const Task::Result> & result, QWidget * parent, Qt::WindowFlags flags ) : QWidget( parent, flags ), d( new Private( result, this ) )
111 setStyleSheet( QString::fromLatin1( "* { background-color: %1; margin: 0px; } QFrame#resultFrame{ border-color: %2; border-style: solid; border-radius: 3px; border-width: 2px } QLabel { padding: 5px; border-radius: 3px }" ).arg( color.lighter( 150 ).name(), color.name() ) );
138 connect( d->m_showDetailsLabel, SIGNAL(linkActivated(QString)), this, SLOT(slotLinkActivated(QString)) );
150 connect( d->m_detailsLabel, SIGNAL(linkActivated(QString)), this, SLOT(slotLinkActivated(QString)) );
192 kWarning() << "key link invalid, or nonce not matching! link=" << link << " nonce" << m_result->nonce();
QLayout * layout() const
void linkActivated(const QString &link)
void setStyleSheet(const QString &styleSheet)
bool detailsVisible() const
Definition: resultitemwidget.cpp:174
void closeButtonClicked()
QString name() const
void setFocusPolicy(Qt::FocusPolicy policy)
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
Definition: task.h:132
int size() const
T value(int i) const
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
void detailsToggled(bool)
void setObjectName(const QString &name)
bool isEmpty() const
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
void setTextFormat(Qt::TextFormat)
~ResultItemWidget()
Definition: resultitemwidget.cpp:165
void setText(const QString &)
void setMargin(int margin)
void showAuditLog()
Definition: resultitemwidget.cpp:209
QColor lighter(int factor) const
void showDetails(bool show=true)
Definition: resultitemwidget.cpp:213
Definition: task.h:131
QWidget * parentWidget() const
QWidget(QWidget *parent, QFlags< Qt::WindowType > f)
ResultItemWidget(const boost::shared_ptr< const Task::Result > &result, QWidget *parent=0, Qt::WindowFlags flags=0)
Definition: resultitemwidget.cpp:108
Definition: task.h:130
void showCloseButton(bool show)
Definition: resultitemwidget.cpp:169
QString fromLatin1(const char *str, int size)
typedef WindowFlags
bool hasErrorResult() const
Definition: resultitemwidget.cpp:179
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void setWordWrap(bool on)
void setSpacing(int spacing)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:33:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:33:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.