forked from IENT/YUView
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathframeobjectdialog.cpp
44 lines (39 loc) · 1.09 KB
/
frameobjectdialog.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
#include "frameobjectdialog.h"
#include "ui_frameobjectdialog.h"
FrameObjectDialog::FrameObjectDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::FrameObjectDialog)
{
currentFont.setPointSize(20);
currentText="Frame";
currentDuration=3.0;
ui->setupUi(this);
ui->textEdit->setText(currentText);
ui->doubleSpinBox->setValue(currentDuration);
}
FrameObjectDialog::~FrameObjectDialog()
{
delete ui;
}
void FrameObjectDialog::editFont()
{
bool ok;
QFont font = QFontDialog::getFont(
&ok, currentFont, this);
if (ok) {
currentFont=font;
}
}
void FrameObjectDialog::loadItemStettings(PlaylistItemText* item)
{
currentFont = item->displayObject()->font();
currentText = item->displayObject()->text();
currentDuration=item->displayObject()->duration();
ui->textEdit->setText(currentText);
ui->doubleSpinBox->setValue(currentDuration);
}
void FrameObjectDialog::saveState()
{
currentText=ui->textEdit->toPlainText();
currentDuration=ui->doubleSpinBox->value();
}