katie/src/gui/qguicommon_p.h

32 lines
1 KiB
C
Raw Normal View History

#ifndef QGUICOMMON_P_H
#define QGUICOMMON_P_H
#include "qwidget.h"
#include "qfactoryloader_p.h"
#include "qiconengineplugin.h"
#include "qimageiohandler.h"
static QColor mergedColors(const QColor &colorA, const QColor &colorB, int factor = 50)
{
const int maxFactor = 100;
QColor tmp = colorA;
tmp.setRed((tmp.red() * factor) / maxFactor + (colorB.red() * (maxFactor - factor)) / maxFactor);
tmp.setGreen((tmp.green() * factor) / maxFactor + (colorB.green() * (maxFactor - factor)) / maxFactor);
tmp.setBlue((tmp.blue() * factor) / maxFactor + (colorB.blue() * (maxFactor - factor)) / maxFactor);
return tmp;
}
Q_GLOBAL_STATIC(QWidget, globalStyleInfoWidget)
#if !defined(QT_NO_LIBRARY)
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, iconloader,
(QIconEngineFactoryInterface_iid, QLatin1String("/iconengines"), Qt::CaseInsensitive))
#endif
#if !defined(QT_NO_LIBRARY)
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, imageloader,
(QImageIOHandlerFactoryInterface_iid, QLatin1String("/imageformats")))
#endif
#endif // QGUICOMMON_P_H