some progress at the UI
This commit is contained in:
parent
a608702e69
commit
5ac9276193
6 changed files with 68 additions and 27 deletions
|
@ -18,15 +18,29 @@
|
|||
|
||||
#include "SnapmaticWidget.h"
|
||||
#include "ui_SnapmaticWidget.h"
|
||||
#include "SnapmaticPicture.h"
|
||||
#include <QPixmap>
|
||||
|
||||
SnapmaticWidget::SnapmaticWidget(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::SnapmaticWidget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
picPath = "";
|
||||
smpic = 0;
|
||||
}
|
||||
|
||||
SnapmaticWidget::~SnapmaticWidget()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void SnapmaticWidget::setSnapmaticPicture(SnapmaticPicture *picture, QString picturePath)
|
||||
{
|
||||
QPixmap SnapmaticPixmap = picture->getPixmap();
|
||||
SnapmaticPixmap.scaled(ui->labPicture->width(), ui->labPicture->height(), Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
ui->labPicStr->setText(picture->getPictureStr());
|
||||
ui->labPicture->setPixmap(SnapmaticPixmap);
|
||||
smpic = picture;
|
||||
picPath = picturePath;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue