summary refs log tree commit diff
path: root/include/ui/InfoMessage.hpp
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/InfoMessage.hpp
parentMerge pull request #372 from bebehei/notification (diff)
downloadnheko-0e814da91c8e041897a4c3f7e6e9234bbc7c6f7a.tar.xz
Move all files under src/
Diffstat (limited to 'include/ui/InfoMessage.hpp')
-rw-r--r--include/ui/InfoMessage.hpp47
1 files changed, 0 insertions, 47 deletions
diff --git a/include/ui/InfoMessage.hpp b/include/ui/InfoMessage.hpp
deleted file mode 100644

index 58f98b0c..00000000 --- a/include/ui/InfoMessage.hpp +++ /dev/null
@@ -1,47 +0,0 @@ -#pragma once - -#include <QColor> -#include <QDateTime> -#include <QWidget> - -class InfoMessage : public QWidget -{ - Q_OBJECT - - Q_PROPERTY(QColor textColor WRITE setTextColor READ textColor) - Q_PROPERTY(QColor boxColor WRITE setBoxColor READ boxColor) - -public: - explicit InfoMessage(QWidget *parent = nullptr); - InfoMessage(QString msg, QWidget *parent = nullptr); - - void setTextColor(QColor color) { textColor_ = color; } - void setBoxColor(QColor color) { boxColor_ = color; } - void saveDatetime(QDateTime datetime) { datetime_ = datetime; } - - QColor textColor() const { return textColor_; } - QColor boxColor() const { return boxColor_; } - QDateTime datetime() const { return datetime_; } - -protected: - void paintEvent(QPaintEvent *event) override; - - int width_; - int height_; - - QString msg_; - QFont font_; - - QDateTime datetime_; - - QColor textColor_ = QColor("black"); - QColor boxColor_ = QColor("white"); -}; - -class DateSeparator : public InfoMessage -{ - Q_OBJECT - -public: - DateSeparator(QDateTime datetime, QWidget *parent = nullptr); -};