Krita Source Code Documentation
Loading...
Searching...
No Matches
KisWarningWidget Class Reference

#include <KisWarningWidget.h>

+ Inheritance diagram for KisWarningWidget:

Public Member Functions

 KisWarningWidget (QWidget *parent)
 
void setText (const QString &text)
 

Static Public Member Functions

static QString changeImageProfileWarningText ()
 

Private Attributes

QLabel * m_warningIcon = 0
 
QLabel * m_warningText = 0
 

Detailed Description

Definition at line 15 of file KisWarningWidget.h.

Constructor & Destructor Documentation

◆ KisWarningWidget()

KisWarningWidget::KisWarningWidget ( QWidget * parent)

Definition at line 15 of file KisWarningWidget.cpp.

16 : QWidget(parent)
17{
18 QHBoxLayout *hLayout = new QHBoxLayout(this);
19
20 m_warningIcon = new QLabel(this);
21 m_warningIcon->setPixmap(KisIconUtils::loadIcon("warning").pixmap(32, 32));
22 m_warningIcon->setAlignment(Qt::AlignTop);
23 hLayout->addWidget(m_warningIcon);
24
25 m_warningText = new QLabel(this);
26 m_warningText->setWordWrap(true);
27 m_warningText->setOpenExternalLinks(true);
28 hLayout->addWidget(m_warningText, 1);
29
30 setLayout(hLayout);
31}
QIcon loadIcon(const QString &name)

References KisIconUtils::loadIcon(), m_warningIcon, and m_warningText.

Member Function Documentation

◆ changeImageProfileWarningText()

QString KisWarningWidget::changeImageProfileWarningText ( )
static

The default warning message for a case when the user tries to change color profile for a multilayered image

Definition at line 38 of file KisWarningWidget.cpp.

39{
40 return i18nc("warning message when changing image color space",
41 "<html><body>"
42 "<p><b>WARNING:</b> the image will look different after changing the color profile because it contains either:"
43 "<ul>"
44 "<li>more than one layer</li>"
45 "<li>one or more layers with transparent pixels</li>"
46 "<li>layers with blending modes other than \"Normal\"</li>"
47 "</ul></p>"
48 "<p>"
49 "<a href=\"https://docs.krita.org/en/general_concepts/colors/color_managed_workflow.html\">More information</a>"
50 "</p></body></html>");
51}

◆ setText()

void KisWarningWidget::setText ( const QString & text)

Definition at line 33 of file KisWarningWidget.cpp.

34{
35 m_warningText->setText(text);
36}

References m_warningText.

Member Data Documentation

◆ m_warningIcon

QLabel* KisWarningWidget::m_warningIcon = 0
private

Definition at line 30 of file KisWarningWidget.h.

◆ m_warningText

QLabel* KisWarningWidget::m_warningText = 0
private

Definition at line 31 of file KisWarningWidget.h.


The documentation for this class was generated from the following files: