forked from blue/squawk
first working prototype of file upload
This commit is contained in:
parent
a6e48599aa
commit
166a7ac83a
13 changed files with 244 additions and 97 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue