Plasma
core/units.cpp
64 connect(KIconLoader::global(), &KIconLoader::iconLoaderSettingsChanged, this, &Units::iconLoaderSettingsChanged);
68 connect(m_animationSpeedWatcher.data(), &KConfigWatcher::configChanged, this, [this](const KConfigGroup &group, const QByteArrayList &names) {
69 if (group.name() == QLatin1String("KDE") && names.contains(QByteArrayLiteral("AnimationDurationFactor"))) {
89 const qreal animationSpeedModifier = qMax(0.0, generalCfg.readEntry("AnimationDurationFactor", 1.0));
92 KConfigGroup cfg = KConfigGroup(KSharedConfig::openConfig(QStringLiteral("plasmarc")), QStringLiteral("Units"));
109 m_iconSizes->insert(QStringLiteral("desktop"), devicePixelIconSize(KIconLoader::global()->currentSize(KIconLoader::Desktop)));
113 m_iconSizes->insert(QStringLiteral("smallMedium"), devicePixelIconSize(KIconLoader::SizeSmallMedium));
117 m_iconSizes->insert(QStringLiteral("enormous"), devicePixelIconSize(KIconLoader::SizeEnormous));
120 m_iconSizes->insert(QStringLiteral("sizeForLabels"), roundToIconSize(QFontMetrics(QGuiApplication::font()).height()));
122 m_iconSizeHints->insert(QStringLiteral("panel"), devicePixelIconSize(KIconLoader::global()->currentSize(KIconLoader::Panel)));
123 m_iconSizeHints->insert(QStringLiteral("desktop"), devicePixelIconSize(KIconLoader::global()->currentSize(KIconLoader::Desktop)));
150 multiplier = bestIconScaleForDevicePixelRatio((qreal)primary->logicalDotsPerInchX() / (qreal)96);
262 int gridUnit = QFontMetrics(QGuiApplication::font()).boundingRect(QStringLiteral("M")).height();
int gridUnit
The fundamental unit of space that should be used for sizes, expressed in pixels.
Definition: core/units.h:47
QString readEntry(const char *key, const char *aDefault=nullptr) const
void insert(const QString &key, const QVariant &value)
int shortDuration
units.shortDuration should be used for short animations, such as accentuating a UI event,...
Definition: core/units.h:127
ApplicationFontChange
Q_EMITQ_EMIT
int veryLongDuration
units.veryLongDuration should be used for specialty animations that benefit from being even longer th...
Definition: core/units.h:139
primaryScreen
int longDuration
units.longDuration should be used for longer, screen-covering animations, for opening and closing of ...
Definition: core/units.h:121
void configChanged(const KConfigGroup &group, const QByteArrayList &names)
SizeMedium
QFont font()
QRect boundingRect(QChar ch) const const
SizeSmallMedium
static Q_INVOKABLE int roundToIconSize(int size)
Definition: core/units.cpp:139
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
Desktop
virtual bool eventFilter(QObject *watched, QEvent *event)
Panel
int mediumSpacing
This property holds the amount of spacing that should be used between medium UI elements,...
Definition: core/units.h:100
void installEventFilter(QObject *filterObj)
SizeEnormous
QCoreApplication * instance()
static Ptr create(const KSharedConfig::Ptr &config)
qreal devicePixelRatio
The ratio between physical and device-independent pixels.
Definition: core/units.h:115
static KIconLoader * global()
SizeHuge
AKONADI_CALENDAR_EXPORT KCalendarCore::Event::Ptr event(const Akonadi::Item &item)
int smallSpacing
This property holds the amount of spacing that should be used between smaller UI elements,...
Definition: core/units.h:92
QQmlPropertyMap iconSizeHints
units.iconSizeHints provides access to user-configurable icon size hints, to be used where appropriat...
Definition: core/units.h:82
SizeSmall
void iconLoaderSettingsChanged()
int height() const const
QQmlPropertyMap iconSizes
units.iconSizes provides access to platform-dependent icon sizing
Definition: core/units.h:67
logicalDotsPerInchX
int humanMoment
Time in milliseconds equivalent to the theoretical human moment, which can be used to determine wheth...
Definition: core/units.h:169
SizeLarge
int veryShortDuration
units.veryShortDuration should be used for elements that should animate near instantly,...
Definition: core/units.h:133
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 04:07:39 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 04:07:39 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.