#include <KisTemplate.h>
Definition at line 15 of file KisTemplate.h.
◆ KisTemplate()
| KisTemplate::KisTemplate |
( |
const QString & | name, |
|
|
const QString & | description = QString(), |
|
|
const QString & | file = QString(), |
|
|
const QString & | picture = QString(), |
|
|
const QString & | fileName = QString(), |
|
|
const QString & | _measureSystem = QString(), |
|
|
bool | hidden = false, |
|
|
bool | touched = false ) |
|
explicit |
◆ ~KisTemplate()
| KisTemplate::~KisTemplate |
( |
| ) |
|
|
inline |
◆ description()
| QString KisTemplate::description |
( |
| ) |
const |
|
inline |
◆ file()
| QString KisTemplate::file |
( |
| ) |
const |
|
inline |
◆ fileName()
| QString KisTemplate::fileName |
( |
| ) |
const |
|
inline |
◆ isHidden()
| bool KisTemplate::isHidden |
( |
| ) |
const |
|
inline |
◆ loadPicture()
| const QPixmap & KisTemplate::loadPicture |
( |
| ) |
|
Definition at line 32 of file KisTemplate.cpp.
33{
36
38
41 if (img.isNull()) {
45 }
46 const int maxHeightWidth = 128;
47 if (img.width() > maxHeightWidth || img.height() > maxHeightWidth) {
48 img = img.scaled(maxHeightWidth, maxHeightWidth, Qt::KeepAspectRatio, Qt::SmoothTransformation);
49 }
52 }
53 else {
54
55
56
57 QString themePrefix;
59 themePrefix = "dark_";
60 } else {
61 themePrefix = "light_";
62 }
63
64
65 QString filenameBuilder = themePrefix.append(
m_picture).append(
".png");
67
68 if (filename.isEmpty()) {
69
70 }
73 }
74}
static QString findAsset(const QString &type, const QString &fileName)
References dbgKrita, KoResourcePaths::findAsset(), m_cached, m_picture, m_pixmap, and KisIconUtils::useDarkIcons().
◆ measureSystem()
| QString KisTemplate::measureSystem |
( |
| ) |
const |
|
inline |
◆ name()
| QString KisTemplate::name |
( |
| ) |
const |
|
inline |
◆ picture()
| QString KisTemplate::picture |
( |
| ) |
const |
|
inline |
◆ setHidden()
| void KisTemplate::setHidden |
( |
bool | hidden = true | ) |
|
|
inline |
◆ setMeasureSystem()
| void KisTemplate::setMeasureSystem |
( |
const QString & | system | ) |
|
|
inline |
◆ touched()
| bool KisTemplate::touched |
( |
| ) |
const |
|
inline |
◆ m_cached
| bool KisTemplate::m_cached |
|
private |
◆ m_descr
| QString KisTemplate::m_descr |
|
private |
◆ m_file
| QString KisTemplate::m_file |
|
private |
◆ m_fileName
| QString KisTemplate::m_fileName |
|
private |
◆ m_hidden
| bool KisTemplate::m_hidden |
|
private |
◆ m_measureSystem
| QString KisTemplate::m_measureSystem |
|
private |
◆ m_name
| QString KisTemplate::m_name |
|
private |
◆ m_picture
| QString KisTemplate::m_picture |
|
private |
◆ m_pixmap
| QPixmap KisTemplate::m_pixmap |
|
private |
◆ m_touched
| bool KisTemplate::m_touched |
|
mutableprivate |
The documentation for this class was generated from the following files: