This repository was archived by the owner on Sep 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOwnerTab.cpp
More file actions
63 lines (46 loc) · 1.62 KB
/
OwnerTab.cpp
File metadata and controls
63 lines (46 loc) · 1.62 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include <QGridLayout>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QIntValidator>
#include "OwnerTab.h"
OwnerTab::OwnerTab(QWidget *parent) :
QWidget(parent)
{
QGridLayout *grid = new QGridLayout;
grid->addWidget(new QLabel(tr("Artist:")), 0, 0);
_artistEdit = new QLineEdit;
grid->addWidget(_artistEdit, 0, 1);
_setButton = new QPushButton(tr("Set"));
connect(_setButton, SIGNAL(clicked()), this, SLOT(setClicked()));
grid->addWidget(_setButton, 0, 2);
_nextButton = new QPushButton(tr(">>"));
connect(_nextButton, SIGNAL(clicked()), this, SLOT(nextClicked()));
grid->addWidget(_nextButton, 0, 3);
grid->addWidget(new QLabel(tr("Copyright:")), 1, 0);
_copyrightEdit = new QLineEdit;
grid->addWidget(_copyrightEdit, 1, 1);
grid->addWidget(new QLabel(tr("Rating:")), 2, 0);
_ratingEdit = new QLineEdit;
_ratingEdit->setValidator(new QIntValidator(0, 100, this));
grid->addWidget(_ratingEdit, 2, 1);
grid->addWidget(new QLabel(tr("ProcessingSoftware:")), 3, 0);
_processingSoftwareEdit = new QLineEdit;
grid->addWidget(_processingSoftwareEdit, 3, 1);
setLayout(grid);
}
void OwnerTab::set(const QString &artist, const QString ©right, const QString &rating, const QString &processingSoftware)
{
_artistEdit->setText(artist);
_copyrightEdit->setText(copyright);
_ratingEdit->setText(rating);
_processingSoftwareEdit->setText(processingSoftware);
}
void OwnerTab::setClicked()
{
emit updated(_artistEdit->text(), _copyrightEdit->text(), _ratingEdit->text(), _processingSoftwareEdit->text());
}
void OwnerTab::nextClicked()
{
emit nextImageSelected();
}