|
|
@ -10,6 +10,7 @@ UBTBDocumentEditWidget::UBTBDocumentEditWidget(UBTeacherBarDataMgr* pDataMgr, QW |
|
|
|
, mpTarget(NULL) |
|
|
|
, mpTarget(NULL) |
|
|
|
, mpMetadataLabel(NULL) |
|
|
|
, mpMetadataLabel(NULL) |
|
|
|
, mpLicenseLabel(NULL) |
|
|
|
, mpLicenseLabel(NULL) |
|
|
|
|
|
|
|
, mpLicenseCombox(NULL) |
|
|
|
{ |
|
|
|
{ |
|
|
|
setObjectName(name); |
|
|
|
setObjectName(name); |
|
|
|
|
|
|
|
|
|
|
@ -31,6 +32,7 @@ UBTBDocumentEditWidget::UBTBDocumentEditWidget(UBTeacherBarDataMgr* pDataMgr, QW |
|
|
|
mpTitle = new QLineEdit(mpContainer); |
|
|
|
mpTitle = new QLineEdit(mpContainer); |
|
|
|
mpTitle->setObjectName("DockPaletteWidgetLineEdit"); |
|
|
|
mpTitle->setObjectName("DockPaletteWidgetLineEdit"); |
|
|
|
mContainerLayout.addWidget(mpTitle, 0); |
|
|
|
mContainerLayout.addWidget(mpTitle, 0); |
|
|
|
|
|
|
|
mContainerLayout.addWidget(&mTitleSeparator); |
|
|
|
|
|
|
|
|
|
|
|
// Target
|
|
|
|
// Target
|
|
|
|
mpTargetLabel = new QLabel(tr("Session Target"), mpContainer); |
|
|
|
mpTargetLabel = new QLabel(tr("Session Target"), mpContainer); |
|
|
@ -39,18 +41,31 @@ UBTBDocumentEditWidget::UBTBDocumentEditWidget(UBTeacherBarDataMgr* pDataMgr, QW |
|
|
|
mpTarget = new QTextEdit(mpContainer); |
|
|
|
mpTarget = new QTextEdit(mpContainer); |
|
|
|
mpTarget->setObjectName("UBTeacherBarTargetBox"); |
|
|
|
mpTarget->setObjectName("UBTeacherBarTargetBox"); |
|
|
|
mContainerLayout.addWidget(mpTarget, 1); |
|
|
|
mContainerLayout.addWidget(mpTarget, 1); |
|
|
|
|
|
|
|
mContainerLayout.addWidget(&mTargetSeparator); |
|
|
|
|
|
|
|
|
|
|
|
// Metadata
|
|
|
|
// Metadata
|
|
|
|
mpMetadataLabel = new QLabel(tr("Metadata"), mpContainer); |
|
|
|
mpMetadataLabel = new QLabel(tr("Metadata"), mpContainer); |
|
|
|
mpMetadataLabel->setAlignment(Qt::AlignLeft); |
|
|
|
mpMetadataLabel->setAlignment(Qt::AlignLeft); |
|
|
|
//mpMetadataLabel->setObjectName("UBTeacherBarPreviewSubtitle");
|
|
|
|
//mpMetadataLabel->setObjectName("UBTeacherBarPreviewSubtitle");
|
|
|
|
mContainerLayout.addWidget(mpMetadataLabel, 0); |
|
|
|
mContainerLayout.addWidget(mpMetadataLabel, 0); |
|
|
|
|
|
|
|
mContainerLayout.addWidget(&mLicenseSeparator); |
|
|
|
|
|
|
|
|
|
|
|
// License
|
|
|
|
// License
|
|
|
|
mpLicenseLabel = new QLabel(tr("License"), mpContainer); |
|
|
|
mpLicenseLabel = new QLabel(tr("License"), mpContainer); |
|
|
|
mpLicenseLabel->setAlignment(Qt::AlignLeft); |
|
|
|
mpLicenseLabel->setAlignment(Qt::AlignLeft); |
|
|
|
//mpLicenseLabel->setObjectName("UBTeacherBarPreviewSubtitle");
|
|
|
|
//mpLicenseLabel->setObjectName("UBTeacherBarPreviewSubtitle");
|
|
|
|
mContainerLayout.addWidget(mpLicenseLabel, 0); |
|
|
|
mContainerLayout.addWidget(mpLicenseLabel, 0); |
|
|
|
|
|
|
|
mpLicenseCombox = new QComboBox(this); |
|
|
|
|
|
|
|
mpLicenseCombox->setObjectName("DockPaletteWidgetComboBox"); |
|
|
|
|
|
|
|
QStringList qslLicenses; |
|
|
|
|
|
|
|
qslLicenses << "CC BY"; |
|
|
|
|
|
|
|
qslLicenses << "CC BY-ND"; |
|
|
|
|
|
|
|
qslLicenses << "CC BY-NC-SA"; |
|
|
|
|
|
|
|
qslLicenses << "CC BY-SA"; |
|
|
|
|
|
|
|
qslLicenses << "CC BY-NC"; |
|
|
|
|
|
|
|
qslLicenses << "CC BY-NC-ND"; |
|
|
|
|
|
|
|
mpLicenseCombox->addItems(qslLicenses); |
|
|
|
|
|
|
|
mContainerLayout.addWidget(mpLicenseCombox); |
|
|
|
|
|
|
|
|
|
|
|
mpPageViewButton = new QPushButton(tr("Page View"), this); |
|
|
|
mpPageViewButton = new QPushButton(tr("Page View"), this); |
|
|
|
mpPageViewButton->setObjectName("DockPaletteWidgetButton"); |
|
|
|
mpPageViewButton->setObjectName("DockPaletteWidgetButton"); |
|
|
@ -65,6 +80,7 @@ UBTBDocumentEditWidget::UBTBDocumentEditWidget(UBTeacherBarDataMgr* pDataMgr, QW |
|
|
|
connect(mpPreviewButton, SIGNAL(clicked()), this, SLOT(onPreview())); |
|
|
|
connect(mpPreviewButton, SIGNAL(clicked()), this, SLOT(onPreview())); |
|
|
|
connect(mpTitle, SIGNAL(textChanged(QString)), this, SLOT(onSessionTitleChanged())); |
|
|
|
connect(mpTitle, SIGNAL(textChanged(QString)), this, SLOT(onSessionTitleChanged())); |
|
|
|
connect(mpTarget, SIGNAL(textChanged()), this, SLOT(onSessionTargetChanged())); |
|
|
|
connect(mpTarget, SIGNAL(textChanged()), this, SLOT(onSessionTargetChanged())); |
|
|
|
|
|
|
|
connect(mpLicenseCombox, SIGNAL(currentIndexChanged(int)), this, SLOT(onLicenseCurrentIndexChanged(int))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
UBTBDocumentEditWidget::~UBTBDocumentEditWidget() |
|
|
|
UBTBDocumentEditWidget::~UBTBDocumentEditWidget() |
|
|
@ -75,6 +91,7 @@ UBTBDocumentEditWidget::~UBTBDocumentEditWidget() |
|
|
|
DELETEPTR(mpTarget); |
|
|
|
DELETEPTR(mpTarget); |
|
|
|
DELETEPTR(mpMetadataLabel); |
|
|
|
DELETEPTR(mpMetadataLabel); |
|
|
|
DELETEPTR(mpLicenseLabel); |
|
|
|
DELETEPTR(mpLicenseLabel); |
|
|
|
|
|
|
|
DELETEPTR(mpLicenseCombox); |
|
|
|
DELETEPTR(mpPageViewButton); |
|
|
|
DELETEPTR(mpPageViewButton); |
|
|
|
DELETEPTR(mpPreviewButton); |
|
|
|
DELETEPTR(mpPreviewButton); |
|
|
|
} |
|
|
|
} |
|
|
@ -101,6 +118,12 @@ void UBTBDocumentEditWidget::onSessionTargetChanged() |
|
|
|
emit valueChanged(); |
|
|
|
emit valueChanged(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UBTBDocumentEditWidget::onLicenseCurrentIndexChanged(int selection) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
mpDataMgr->setSessionLicence((eLicense)selection); |
|
|
|
|
|
|
|
emit valueChanged(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void UBTBDocumentEditWidget::updateFields() |
|
|
|
void UBTBDocumentEditWidget::updateFields() |
|
|
|
{ |
|
|
|
{ |
|
|
|
mpTitle->setText(mpDataMgr->sessionTitle()); |
|
|
|
mpTitle->setText(mpDataMgr->sessionTitle()); |
|
|
|