Clang: float -> qreal where it matches Qt API
This commit is contained in:
parent
297e97da19
commit
cb57de2e65
@ -53,14 +53,14 @@ ImageRegistry::icon( const QString& image, CalamaresUtils::ImageMode mode )
|
|||||||
|
|
||||||
|
|
||||||
qint64
|
qint64
|
||||||
ImageRegistry::cacheKey( const QSize& size, float opacity, QColor tint )
|
ImageRegistry::cacheKey( const QSize& size, qreal opacity, QColor tint )
|
||||||
{
|
{
|
||||||
return size.width() * 100 + size.height() * 10 + int( opacity * 100.0 ) + tint.value();
|
return size.width() * 100 + size.height() * 10 + int( opacity * 100.0 ) + tint.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QPixmap
|
QPixmap
|
||||||
ImageRegistry::pixmap( const QString& image, const QSize& size, CalamaresUtils::ImageMode mode, float opacity, QColor tint )
|
ImageRegistry::pixmap( const QString& image, const QSize& size, CalamaresUtils::ImageMode mode, qreal opacity, QColor tint )
|
||||||
{
|
{
|
||||||
QHash< qint64, QPixmap > subsubcache;
|
QHash< qint64, QPixmap > subsubcache;
|
||||||
QHash< int, QHash< qint64, QPixmap > > subcache;
|
QHash< int, QHash< qint64, QPixmap > > subcache;
|
||||||
@ -136,7 +136,7 @@ ImageRegistry::pixmap( const QString& image, const QSize& size, CalamaresUtils::
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ImageRegistry::putInCache( const QString& image, const QSize& size, CalamaresUtils::ImageMode mode, float opacity, const QPixmap& pixmap, QColor tint )
|
ImageRegistry::putInCache( const QString& image, const QSize& size, CalamaresUtils::ImageMode mode, qreal opacity, const QPixmap& pixmap, QColor tint )
|
||||||
{
|
{
|
||||||
// cDebug( LOGVERBOSE ) << Q_FUNC_INFO << "Adding to image cache:" << image << size << mode;
|
// cDebug( LOGVERBOSE ) << Q_FUNC_INFO << "Adding to image cache:" << image << size << mode;
|
||||||
|
|
||||||
|
@ -35,11 +35,11 @@ public:
|
|||||||
explicit ImageRegistry();
|
explicit ImageRegistry();
|
||||||
|
|
||||||
QIcon icon( const QString& image, CalamaresUtils::ImageMode mode = CalamaresUtils::Original );
|
QIcon icon( const QString& image, CalamaresUtils::ImageMode mode = CalamaresUtils::Original );
|
||||||
QPixmap pixmap( const QString& image, const QSize& size, CalamaresUtils::ImageMode mode = CalamaresUtils::Original, float opacity = 1.0, QColor tint = QColor( 0, 0, 0, 0 ) );
|
QPixmap pixmap( const QString& image, const QSize& size, CalamaresUtils::ImageMode mode = CalamaresUtils::Original, qreal opacity = 1.0, QColor tint = QColor( 0, 0, 0, 0 ) );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
qint64 cacheKey( const QSize& size, float opacity, QColor tint );
|
qint64 cacheKey( const QSize& size, qreal opacity, QColor tint );
|
||||||
void putInCache( const QString& image, const QSize& size, CalamaresUtils::ImageMode mode, float opacity, const QPixmap& pixmap, QColor tint );
|
void putInCache( const QString& image, const QSize& size, CalamaresUtils::ImageMode mode, qreal opacity, const QPixmap& pixmap, QColor tint );
|
||||||
|
|
||||||
static ImageRegistry* s_instance;
|
static ImageRegistry* s_instance;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user