summary refs log tree commit diff
path: root/include/ui/Avatar.h
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-07-17 16:37:25 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-07-17 16:37:25 +0300
commit0e814da91c8e041897a4c3f7e6e9234bbc7c6f7a (patch)
tree21f655d30630fe77ba48d07e4b357e2b6c6a5730 /include/ui/Avatar.h
parentMerge pull request #372 from bebehei/notification (diff)
downloadnheko-0e814da91c8e041897a4c3f7e6e9234bbc7c6f7a.tar.xz
Move all files under src/
Diffstat (limited to 'include/ui/Avatar.h')
-rw-r--r--include/ui/Avatar.h47
1 files changed, 0 insertions, 47 deletions
diff --git a/include/ui/Avatar.h b/include/ui/Avatar.h
deleted file mode 100644

index 41967af5..00000000 --- a/include/ui/Avatar.h +++ /dev/null
@@ -1,47 +0,0 @@ -#pragma once - -#include <QIcon> -#include <QImage> -#include <QPixmap> -#include <QWidget> - -#include "Theme.h" - -class Avatar : public QWidget -{ - Q_OBJECT - - Q_PROPERTY(QColor textColor WRITE setTextColor READ textColor) - Q_PROPERTY(QColor backgroundColor WRITE setBackgroundColor READ backgroundColor) - -public: - explicit Avatar(QWidget *parent = 0); - - void setBackgroundColor(const QColor &color); - void setIcon(const QIcon &icon); - void setImage(const QImage &image); - void setLetter(const QString &letter); - void setSize(int size); - void setTextColor(const QColor &color); - - QColor backgroundColor() const; - QColor textColor() const; - int size() const; - - QSize sizeHint() const override; - -protected: - void paintEvent(QPaintEvent *event) override; - -private: - void init(); - - ui::AvatarType type_; - QString letter_; - QColor background_color_; - QColor text_color_; - QIcon icon_; - QImage image_; - QPixmap pixmap_; - int size_; -};