forked from utat-uav/cv16-interface
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtargetwindow.cpp
More file actions
40 lines (33 loc) · 1.02 KB
/
targetwindow.cpp
File metadata and controls
40 lines (33 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include "targetwindow.h"
#include "ui_targetwindow.h"
TargetWindow::TargetWindow(TargetListItem *targetListItem, QWidget *parent) :
QDialog(parent),
ui(new Ui::TargetWindow)
{
this->targetListItem = targetListItem;
ui->setupUi(this);
// Set image
QPixmap *pix = new QPixmap();
QPixmap pic;
pix->load(targetListItem->imageFilePath);
pic = pix->scaled(280, 280, Qt::KeepAspectRatioByExpanding, Qt::FastTransformation) ;
ui->targetPic->setPixmap(pic);
delete pix;
// Set all other information
ui->nameLabel->setText(targetListItem->name->text());
ui->coordinatesLabel->setText(targetListItem->coord->text());
ui->description->setText(targetListItem->desc->text());
}
TargetWindow::~TargetWindow()
{
delete ui;
}
void TargetWindow::on_testButton_clicked()
{
/*
QProcess process;
QString scriptFile = QCoreApplication::applicationDirPath() + "../../scriptPath/script.py";
QString pythonCommand = "python " + scriptFile;
process.start (pythonCommand);
*/
}