refactoring

This commit is contained in:
fourtf
2017-04-12 17:46:44 +02:00
parent 8ef492d7ae
commit 96db82e867
114 changed files with 5554 additions and 3703 deletions
+14 -28
View File
@@ -10,19 +10,14 @@ namespace messages {
class LazyLoadedImage : QObject
{
public:
explicit LazyLoadedImage(const QString &url, qreal scale = 1,
const QString &name = "",
const QString &tooltip = "",
const QMargins &margin = QMargins(),
explicit LazyLoadedImage(const QString &url, qreal scale = 1, const QString &name = "",
const QString &tooltip = "", const QMargins &margin = QMargins(),
bool isHat = false);
explicit LazyLoadedImage(QPixmap *currentPixmap, qreal scale = 1,
const QString &name = "",
const QString &tooltip = "",
const QMargins &margin = QMargins(),
explicit LazyLoadedImage(QPixmap *currentPixmap, qreal scale = 1, const QString &name = "",
const QString &tooltip = "", const QMargins &margin = QMargins(),
bool isHat = false);
const QPixmap *
getPixmap()
const QPixmap *getPixmap()
{
if (!isLoading) {
isLoading = true;
@@ -32,50 +27,42 @@ public:
return currentPixmap;
}
qreal
getScale() const
qreal getScale() const
{
return scale;
}
const QString &
getUrl() const
const QString &getUrl() const
{
return url;
}
const QString &
getName() const
const QString &getName() const
{
return name;
}
const QString &
getTooltip() const
const QString &getTooltip() const
{
return tooltip;
}
const QMargins &
getMargin() const
const QMargins &getMargin() const
{
return margin;
}
bool
getAnimated() const
bool getAnimated() const
{
return animated;
}
bool
getIsHat() const
bool getIsHat() const
{
return ishat;
}
int
getWidth() const
int getWidth() const
{
if (currentPixmap == NULL) {
return 16;
@@ -83,8 +70,7 @@ public:
return currentPixmap->width();
}
int
getHeight() const
int getHeight() const
{
if (currentPixmap == NULL) {
return 16;