2016-09-06 06:05:43 +00:00
|
|
|
#ifndef QGUICOMMON_P_H
|
|
|
|
#define QGUICOMMON_P_H
|
|
|
|
|
|
|
|
#include "qwidget.h"
|
|
|
|
#include "qfactoryloader_p.h"
|
|
|
|
#include "qiconengineplugin.h"
|
|
|
|
#include "qimageiohandler.h"
|
|
|
|
|
2016-09-06 18:00:28 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2016-09-06 06:05:43 +00:00
|
|
|
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
|