mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-11 07:05:48 +01:00
2020-05-20 Fred Gleason <fredg@paravelsystems.com>
* Added 'RDPodcast::itemExplicit()', 'RDPodcast::setItemExplicit()', 'RDPodcast::itemImageId()', and 'RDPodcast::setItemImageId()' methods. * Added a 'Post contains explicit content' checkbox to the 'Edit Podcast' dialog in rdcastmanager(1). * Added an 'Image' control to the 'Edit Podcast dialog in rdcastmanager(1). Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -19961,3 +19961,11 @@
|
|||||||
'Edit Feed' dialog box in rdadmin(1).
|
'Edit Feed' dialog box in rdadmin(1).
|
||||||
* Added a 'Channel contains explicit content' checkbox to the
|
* Added a 'Channel contains explicit content' checkbox to the
|
||||||
'Edit Feed' dialog box in rdadmin(1).
|
'Edit Feed' dialog box in rdadmin(1).
|
||||||
|
2020-05-20 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Added 'RDPodcast::itemExplicit()', 'RDPodcast::setItemExplicit()',
|
||||||
|
'RDPodcast::itemImageId()', and 'RDPodcast::setItemImageId()'
|
||||||
|
methods.
|
||||||
|
* Added a 'Post contains explicit content' checkbox to the 'Edit
|
||||||
|
Podcast' dialog in rdcastmanager(1).
|
||||||
|
* Added an 'Image' control to the 'Edit Podcast dialog in
|
||||||
|
rdcastmanager(1).
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// Abstract a Rivendell Podcast
|
// Abstract a Rivendell Podcast
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2002-2020 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// This program is free software; you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License version 2 as
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@@ -130,6 +130,31 @@ void RDPodcast::setItemDescription(const QString &str) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool RDPodcast::itemExplicit() const
|
||||||
|
{
|
||||||
|
return RDBool(RDGetSqlValue("PODCASTS","ID",podcast_id,
|
||||||
|
"ITEM_EXPLICIT").toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void RDPodcast::setItemExplicit(bool state) const
|
||||||
|
{
|
||||||
|
SetRow("ITEM_EXPLICIT",RDYesNo(state));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int RDPodcast::itemImageId() const
|
||||||
|
{
|
||||||
|
return RDGetSqlValue("PODCASTS","ID",podcast_id,"ITEM_IMAGE_ID").toInt();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void RDPodcast::setItemImageId(int img_id) const
|
||||||
|
{
|
||||||
|
SetRow("ITEM_IMAGE_ID",img_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QString RDPodcast::itemCategory() const
|
QString RDPodcast::itemCategory() const
|
||||||
{
|
{
|
||||||
return RDGetSqlValue("PODCASTS","ID",podcast_id,"ITEM_CATEGORY").
|
return RDGetSqlValue("PODCASTS","ID",podcast_id,"ITEM_CATEGORY").
|
||||||
|
|||||||
@@ -18,8 +18,6 @@
|
|||||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <qsqldatabase.h>
|
|
||||||
|
|
||||||
#include <rdconfig.h>
|
#include <rdconfig.h>
|
||||||
#include <rdfeed.h>
|
#include <rdfeed.h>
|
||||||
|
|
||||||
@@ -40,6 +38,10 @@ class RDPodcast
|
|||||||
void setItemTitle(const QString &str) const;
|
void setItemTitle(const QString &str) const;
|
||||||
QString itemDescription() const;
|
QString itemDescription() const;
|
||||||
void setItemDescription(const QString &str) const;
|
void setItemDescription(const QString &str) const;
|
||||||
|
bool itemExplicit() const;
|
||||||
|
void setItemExplicit(bool state) const;
|
||||||
|
int itemImageId() const;
|
||||||
|
void setItemImageId(int img_id) const;
|
||||||
QString itemCategory() const;
|
QString itemCategory() const;
|
||||||
void setItemCategory(const QString &str) const;
|
void setItemCategory(const QString &str) const;
|
||||||
QString itemLink() const;
|
QString itemLink() const;
|
||||||
|
|||||||
@@ -100,6 +100,20 @@ EditCast::EditCast(unsigned cast_id,QWidget *parent)
|
|||||||
cast_item_description_label->
|
cast_item_description_label->
|
||||||
setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Item Explicit
|
||||||
|
//
|
||||||
|
cast_item_explicit_check=new QCheckBox(this);
|
||||||
|
cast_item_explicit_label=new QLabel(cast_item_explicit_check,
|
||||||
|
tr("Post contains explicit content"),this);
|
||||||
|
cast_item_explicit_label->setFont(labelFont());
|
||||||
|
cast_item_explicit_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||||
|
|
||||||
|
cast_item_image_box=new RDImagePickerBox("FEED_IMAGES","FEED_ID","ID",this);
|
||||||
|
cast_item_image_label=new QLabel(cast_item_image_box,tr("Image")+":",this);
|
||||||
|
cast_item_image_label->setFont(labelFont());
|
||||||
|
cast_item_image_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Item Comments
|
// Item Comments
|
||||||
//
|
//
|
||||||
@@ -169,8 +183,6 @@ EditCast::EditCast(unsigned cast_id,QWidget *parent)
|
|||||||
cast_item_expiration_button->
|
cast_item_expiration_button->
|
||||||
setEnabled(cast_status!=RDPodcast::StatusExpired);
|
setEnabled(cast_status!=RDPodcast::StatusExpired);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Cast Status
|
// Cast Status
|
||||||
//
|
//
|
||||||
@@ -238,6 +250,9 @@ EditCast::EditCast(unsigned cast_id,QWidget *parent)
|
|||||||
cast_item_category_edit->setText(cast_cast->itemCategory());
|
cast_item_category_edit->setText(cast_cast->itemCategory());
|
||||||
cast_item_link_edit->setText(cast_cast->itemLink());
|
cast_item_link_edit->setText(cast_cast->itemLink());
|
||||||
cast_item_description_edit->setText(cast_cast->itemDescription());
|
cast_item_description_edit->setText(cast_cast->itemDescription());
|
||||||
|
cast_item_explicit_check->setChecked(cast_cast->itemExplicit());
|
||||||
|
cast_item_image_box->setCategoryId(cast_feed->id());
|
||||||
|
cast_item_image_box->setCurrentImageId(cast_cast->itemImageId());
|
||||||
cast_item_comments_edit->setText(cast_cast->itemComments());
|
cast_item_comments_edit->setText(cast_cast->itemComments());
|
||||||
cast_item_effective_edit->
|
cast_item_effective_edit->
|
||||||
setDateTime(RDUtcToLocal(cast_cast->effectiveDateTime()));
|
setDateTime(RDUtcToLocal(cast_cast->effectiveDateTime()));
|
||||||
@@ -279,7 +294,7 @@ EditCast::~EditCast()
|
|||||||
|
|
||||||
QSize EditCast::sizeHint() const
|
QSize EditCast::sizeHint() const
|
||||||
{
|
{
|
||||||
return QSize(640,420);
|
return QSize(640,442);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -345,6 +360,8 @@ void EditCast::okData()
|
|||||||
cast_cast->setItemCategory(cast_item_category_edit->text());
|
cast_cast->setItemCategory(cast_item_category_edit->text());
|
||||||
cast_cast->setItemLink(cast_item_link_edit->text());
|
cast_cast->setItemLink(cast_item_link_edit->text());
|
||||||
cast_cast->setItemDescription(cast_item_description_edit->text());
|
cast_cast->setItemDescription(cast_item_description_edit->text());
|
||||||
|
cast_cast->setItemExplicit(cast_item_explicit_check->isChecked());
|
||||||
|
cast_cast->setItemImageId(cast_item_image_box->currentImageId());
|
||||||
cast_cast->setItemComments(cast_item_comments_edit->text());
|
cast_cast->setItemComments(cast_item_comments_edit->text());
|
||||||
cast_cast->
|
cast_cast->
|
||||||
setEffectiveDateTime(RDLocalToUtc(cast_item_effective_edit->dateTime()));
|
setEffectiveDateTime(RDLocalToUtc(cast_item_effective_edit->dateTime()));
|
||||||
@@ -391,7 +408,6 @@ void EditCast::cancelData()
|
|||||||
void EditCast::resizeEvent(QResizeEvent *e)
|
void EditCast::resizeEvent(QResizeEvent *e)
|
||||||
{
|
{
|
||||||
int ypos=0;
|
int ypos=0;
|
||||||
int w=size().width();
|
|
||||||
int h=size().height();
|
int h=size().height();
|
||||||
|
|
||||||
cast_item_medialink_edit->setGeometry(135,10,size().width()-145,20);
|
cast_item_medialink_edit->setGeometry(135,10,size().width()-145,20);
|
||||||
@@ -412,7 +428,14 @@ void EditCast::resizeEvent(QResizeEvent *e)
|
|||||||
cast_item_link_label->setGeometry(20,ypos+66,110,20);
|
cast_item_link_label->setGeometry(20,ypos+66,110,20);
|
||||||
cast_item_description_label->setGeometry(20,ypos+88,110,20);
|
cast_item_description_label->setGeometry(20,ypos+88,110,20);
|
||||||
cast_item_description_edit->
|
cast_item_description_edit->
|
||||||
setGeometry(135,ypos+88,size().width()-145,h-ypos-297);
|
setGeometry(135,ypos+88,size().width()-145,h-ypos-359);
|
||||||
|
|
||||||
|
cast_item_explicit_check->setGeometry(140,h-266,15,15);
|
||||||
|
cast_item_explicit_label->setGeometry(160,h-269,size().width()-145,20);
|
||||||
|
|
||||||
|
cast_item_image_label->setGeometry(20,h-247,110,20);
|
||||||
|
cast_item_image_box->setIconSize(QSize(36,36));
|
||||||
|
cast_item_image_box->setGeometry(135,h-247,300,38);
|
||||||
|
|
||||||
// "Comments URL"
|
// "Comments URL"
|
||||||
cast_item_comments_edit->setGeometry(135,h-207,size().width()-145,20);
|
cast_item_comments_edit->setGeometry(135,h-207,size().width()-145,20);
|
||||||
|
|||||||
@@ -21,8 +21,8 @@
|
|||||||
#ifndef EDIT_CAST_H
|
#ifndef EDIT_CAST_H
|
||||||
#define EDIT_CAST_H
|
#define EDIT_CAST_H
|
||||||
|
|
||||||
|
|
||||||
#include <qbuttongroup.h>
|
#include <qbuttongroup.h>
|
||||||
|
#include <qcheckbox.h>
|
||||||
#include <qcombobox.h>
|
#include <qcombobox.h>
|
||||||
#include <qdatetimeedit.h>
|
#include <qdatetimeedit.h>
|
||||||
#include <qlabel.h>
|
#include <qlabel.h>
|
||||||
@@ -33,6 +33,7 @@
|
|||||||
|
|
||||||
#include <rddialog.h>
|
#include <rddialog.h>
|
||||||
#include <rdfeed.h>
|
#include <rdfeed.h>
|
||||||
|
#include <rdimagepickerbox.h>
|
||||||
#include <rdpodcast.h>
|
#include <rdpodcast.h>
|
||||||
|
|
||||||
class EditCast : public RDDialog
|
class EditCast : public RDDialog
|
||||||
@@ -70,6 +71,10 @@ class EditCast : public RDDialog
|
|||||||
QLineEdit *cast_item_link_edit;
|
QLineEdit *cast_item_link_edit;
|
||||||
QLabel *cast_item_description_label;
|
QLabel *cast_item_description_label;
|
||||||
QTextEdit *cast_item_description_edit;
|
QTextEdit *cast_item_description_edit;
|
||||||
|
QCheckBox *cast_item_explicit_check;
|
||||||
|
QLabel *cast_item_explicit_label;
|
||||||
|
QLabel *cast_item_image_label;
|
||||||
|
RDImagePickerBox *cast_item_image_box;
|
||||||
QLabel *cast_item_comments_label;
|
QLabel *cast_item_comments_label;
|
||||||
QLineEdit *cast_item_comments_edit;
|
QLineEdit *cast_item_comments_edit;
|
||||||
QLabel *cast_item_origin_label;
|
QLabel *cast_item_origin_label;
|
||||||
|
|||||||
@@ -101,6 +101,14 @@ dílu</translation>
|
|||||||
<source>Expires On:</source>
|
<source>Expires On:</source>
|
||||||
<translation>Přestane platit:</translation>
|
<translation>Přestane platit:</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Post contains explicit content</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Image</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ListCasts</name>
|
<name>ListCasts</name>
|
||||||
|
|||||||
@@ -101,6 +101,14 @@
|
|||||||
<source>Expires On:</source>
|
<source>Expires On:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Post contains explicit content</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Image</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ListCasts</name>
|
<name>ListCasts</name>
|
||||||
|
|||||||
@@ -97,6 +97,14 @@ Episodios</translation>
|
|||||||
<source>Expires On:</source>
|
<source>Expires On:</source>
|
||||||
<translation>Expira el:</translation>
|
<translation>Expira el:</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Post contains explicit content</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Image</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ListCasts</name>
|
<name>ListCasts</name>
|
||||||
|
|||||||
@@ -88,6 +88,14 @@
|
|||||||
<source>Expires On:</source>
|
<source>Expires On:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Post contains explicit content</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Image</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ListCasts</name>
|
<name>ListCasts</name>
|
||||||
|
|||||||
@@ -101,6 +101,14 @@
|
|||||||
<source>Expires On:</source>
|
<source>Expires On:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Post contains explicit content</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Image</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ListCasts</name>
|
<name>ListCasts</name>
|
||||||
|
|||||||
@@ -101,6 +101,14 @@
|
|||||||
<source>Expires On:</source>
|
<source>Expires On:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Post contains explicit content</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Image</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ListCasts</name>
|
<name>ListCasts</name>
|
||||||
|
|||||||
@@ -101,6 +101,14 @@ Episódio</translation>
|
|||||||
<source>Expires On:</source>
|
<source>Expires On:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Post contains explicit content</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Image</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ListCasts</name>
|
<name>ListCasts</name>
|
||||||
|
|||||||
Reference in New Issue
Block a user