first working prototype of file upload

This commit is contained in:
Blue 2019-11-12 16:38:01 +03:00
parent a6e48599aa
commit 166a7ac83a
13 changed files with 244 additions and 97 deletions

View file

@ -47,13 +47,16 @@ public:
void setSender(const QString& sender);
QString getId() const;
QString getFileUrl() const;
const Shared::Message& getMessage() const;
void addButton(const QIcon& icon, const QString& buttonText, const QString& comment = "");
void addButton(const QIcon& icon, const QString& buttonText);
void showComment(const QString& comment, bool wordWrap = false);
void hideComment();
void showFile(const QString& path);
void setProgress(qreal value, const QString& label = "");
void setProgress(qreal value);
signals:
void downloadFile();
void buttonClicked();
private:
Shared::Message msg;
@ -63,20 +66,19 @@ private:
QLabel* sender;
QLabel* text;
QGraphicsDropShadowEffect* shadow;
QPushButton* downloadButton;
QPushButton* button;
QLabel* file;
QProgressBar* progress;
QLabel* fileComment;
bool hasDownloadButton;
bool hasButton;
bool hasProgress;
bool hasFile;
bool commentAdded;
private:
void hideDownload();
void hideButton();
void hideProgress();
void hideFile();
void hideComment();
};
#endif // MESSAGE_H