summaryrefslogtreecommitdiff
path: root/src/infowidget/infowidget.cpp
blob: 9541b291a09cac58027c224b0725eed3a3cde4d0 (plain)
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
#include "infowidget.h"
#include "ui_infowidget.h"

InfoForm::InfoForm(QWidget *parent)
    : QWidget(parent)
      , ui(new Ui::InfoForm)
{
    ui->setupUi(this);
}

InfoForm::~InfoForm()
{
    delete ui;
}

void InfoForm::setMetadata(Metadata which, const QString &value)
{
    switch(which) {
        case InfoForm::Title:
            ui->title->setText(value);
            return;
        case InfoForm::Subject:
            ui->subject->setText(value);
            return;
        case InfoForm::Author:
            ui->author->setText(value);
            return;
        case InfoForm::Creator:
            ui->creator->setText(value);
            return;
        case InfoForm::CreationDate:
            ui->creationDate->setText(value);
            return;
        case InfoForm::ModificationDate:
            ui->modificationDate->setText(value);
            return;
        case InfoForm::Producer:
            ui->producer->setText(value);
            return;
    }
}