Commit b462cba3 authored by scuq's avatar scuq

added new files to cmake

parent 051fa950
......@@ -24,6 +24,8 @@ set(CPP_SOURCE_FILES
rostermodel.cpp
idledetector.cpp
rostersortfilterproxymodel.cpp
widgetattachment.cpp
qplainchatedit.cpp
statuslabel.cpp
res.qrc
)
......
......@@ -878,10 +878,6 @@ void dialogChat::slFileDropped(const QString &filepath)
file.open(QFile::ReadOnly);
QByteArray ba = file.readAll();
qDebug() << "dropped file";
qDebug() << ba.size();
this->session->uploadFile(this->contact->getDirectChannelId(),filename,ba);
this->ui->wAttachment->setPreviewImage(QImage::fromData(ba));
this->ui->wAttachment->setHidden(false);
......@@ -912,6 +908,9 @@ void dialogChat::setAttachmentIds(const QStringList &attachmentIds)
void dialogChat::resetAttachmentIds()
{
this->m_attachmentIds.empty();
this->ui->wAttachment->resetPreviewImage();
this->ui->wAttachment->setHidden(true);
this->ui->plainTextEditChatInput->setPlaceholderText("");
}
QColor dialogChat::getColorChatNick() const
......
......@@ -30,6 +30,11 @@ void widgetAttachment::setPreviewImage(const QImage &PreviewImage)
this->ui->labelPreview->setPixmap(_pxmp);
}
void widgetAttachment::resetPreviewImage()
{
this->ui->labelPreview->clear();
}
int widgetAttachment::getProgress() const
{
return m_progress;
......
......@@ -19,6 +19,7 @@ public:
QImage getPreviewImage() const;
void setPreviewImage(const QImage &PreviewImage);
void resetPreviewImage();
int getProgress() const;
void setProgress(int progress);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment