Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+56
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* HMI Plugin for Observer Controller - BaseDownloaderMessage Dialog
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Patric Karwat, SLSE, 2018-03-17
|
||||
*/
|
||||
|
||||
#include "obd_base_downloader_message.h"
|
||||
#include "ui_obd_base_downloader_message.h"
|
||||
|
||||
#include <LtsWidgets/lts_frameless_dialog.h>
|
||||
|
||||
namespace OcBaseDownload
|
||||
{
|
||||
|
||||
BaseDownloaderMessage::BaseDownloaderMessage(QWidget *parent)
|
||||
: LtsWidgets::LtsFramelessDialog(parent, LtsWidgets::Behaviour::Modal)
|
||||
, m_ui(new Ui::BaseDownloaderMessage)
|
||||
, m_logger(getLogger("BaseDownloaderMessageDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
connect(m_ui->pbClose, &QPushButton::clicked, this, &BaseDownloaderMessage::close);
|
||||
setCloseable(false);
|
||||
}
|
||||
|
||||
BaseDownloaderMessage::~BaseDownloaderMessage()
|
||||
{
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
|
||||
void BaseDownloaderMessage::setText(const QString &text)
|
||||
{
|
||||
m_ui->lblText->setText(text);
|
||||
}
|
||||
|
||||
void BaseDownloaderMessage::setCloseable(bool closable)
|
||||
{
|
||||
m_ui->pbClose->setEnabled(closable);
|
||||
}
|
||||
|
||||
void BaseDownloaderMessage::setProgress(int value)
|
||||
{
|
||||
m_ui->prbProgress->setValue(value);
|
||||
}
|
||||
|
||||
void BaseDownloaderMessage::keyPressEvent(QKeyEvent *e)
|
||||
{
|
||||
if(e->key() != Qt::Key_Escape)
|
||||
QDialog::keyPressEvent(e);
|
||||
}
|
||||
|
||||
|
||||
} // namespace OcBaseDownload
|
||||
Reference in new issue
Block a user