-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqmetainfodialog.cpp
52 lines (45 loc) · 1.22 KB
/
qmetainfodialog.cpp
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
41
42
43
44
45
46
47
48
49
50
51
52
#include "qmetainfodialog.h"
QMetaInfoDialog::QMetaInfoDialog(QWidget *parent) :
QDialog(parent)
{
setupUi(this);
imageTimer = new QTimer(this);
imageTimer->setInterval(1000);
connect(imageTimer, SIGNAL(timeout()), this, SLOT(changeImage()));
}
void QMetaInfoDialog::setItem(TDetails value)
{
m_item = value;
init();
}
void QMetaInfoDialog::init()
{
imageIndex = 0;
/*
channelLineEdit->setText(m_item.channelName);
titleLineEdit->setText(m_item.recTitle);
recStartLineEdit->setText(m_item.timerStart);
recEndLineEdit->setText(m_item.timerEnd);
langLineEdit->setText(m_item.contentLang);
catLineEdit->setText(m_item.category);
infoTextBrowser->setText(m_item.info);
if (m_item.pixmapArray.count() == 0) {
return;
}
QPixmap *image = new QPixmap();
image->loadFromData(m_item.pixmapArray.at(imageIndex));
imageLabel->setPixmap(*image);
imageTimer->start();
*/
}
void QMetaInfoDialog::changeImage()
{
/* imageIndex++;
if (imageIndex == m_item.pixmapArray.count()) {
imageIndex = 0;
}
QPixmap *image = new QPixmap();
image->loadFromData(m_item.pixmapArray.at(imageIndex));
imageLabel->setPixmap(*image);
*/
}