mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-09 14:33:28 +02:00
2019-10-03 Fred Gleason <fredg@paravelsystems.com>
* Added support for posting podcast content via SFTP. * Refactored rdcastmanager(1) to use the 'RDDialog' and 'RDWidget' base classes.
This commit is contained in:
parent
44a0941df9
commit
e63c1a64a9
@ -19138,3 +19138,7 @@
|
||||
2019-10-02 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Refactored rdairplay(1) to use the 'RDDialog' and 'RDWidget'
|
||||
base classes.
|
||||
2019-10-03 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added support for posting podcast content via SFTP.
|
||||
* Refactored rdcastmanager(1) to use the 'RDDialog' and 'RDWidget'
|
||||
base classes.
|
||||
|
@ -22,6 +22,8 @@
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
#include <qurl.h>
|
||||
|
||||
#include "rdapplication.h"
|
||||
#include "rddb.h"
|
||||
#include "rdpodcast.h"
|
||||
@ -301,7 +303,7 @@ bool RDPodcast::removeAudio(RDFeed *feed,QString *err_text,bool log_debug) const
|
||||
CURL *curl=NULL;
|
||||
struct curl_slist *cmds=NULL;
|
||||
CURLcode err;
|
||||
Q3Url *url;
|
||||
QUrl *url;
|
||||
bool ret=true;
|
||||
QString currentdir;
|
||||
char urlstr[1024];
|
||||
@ -311,7 +313,7 @@ bool RDPodcast::removeAudio(RDFeed *feed,QString *err_text,bool log_debug) const
|
||||
rda->syslog(LOG_ERR,"unable to initialize curl library\n");
|
||||
return false;
|
||||
}
|
||||
url=new Q3Url(feed->purgeUrl());
|
||||
url=new QUrl(feed->purgeUrl());
|
||||
strncpy(urlstr,(const char *)(url->protocol()+"://"+url->host()+"/").utf8(),
|
||||
1024);
|
||||
curl_easy_setopt(curl,CURLOPT_URL,urlstr);
|
||||
@ -324,19 +326,32 @@ bool RDPodcast::removeAudio(RDFeed *feed,QString *err_text,bool log_debug) const
|
||||
curl_easy_setopt(curl,CURLOPT_VERBOSE,1);
|
||||
curl_easy_setopt(curl,CURLOPT_DEBUGFUNCTION,PodcastErrorCallback);
|
||||
}
|
||||
currentdir="";
|
||||
if(!url->dirPath().right(url->dirPath().length()-1).isEmpty()) {
|
||||
currentdir=url->dirPath().right(url->dirPath().length()-1)+"/";
|
||||
if(url->scheme()=="ftp") {
|
||||
currentdir="";
|
||||
if(!url->dirPath().right(url->dirPath().length()-1).isEmpty()) {
|
||||
currentdir=url->dirPath().right(url->dirPath().length()-1)+"/";
|
||||
}
|
||||
if(!url->fileName().isEmpty()) {
|
||||
currentdir+=url->fileName()+"/";
|
||||
}
|
||||
if(!currentdir.isEmpty()) {
|
||||
cmds=curl_slist_append(cmds,QString().sprintf("cwd %s",
|
||||
(const char *)currentdir));
|
||||
}
|
||||
cmds=curl_slist_append(cmds, QString().sprintf("dele %s",
|
||||
(const char *)audioFilename()));
|
||||
}
|
||||
if(!url->fileName().isEmpty()) {
|
||||
currentdir+=url->fileName()+"/";
|
||||
if(url->scheme()=="sftp") {
|
||||
cmds=curl_slist_append(cmds,("rm "+url->path()+"/"+audioFilename()).toUtf8());
|
||||
}
|
||||
if(!currentdir.isEmpty()) {
|
||||
cmds=curl_slist_append(cmds,QString().sprintf("cwd %s",
|
||||
(const char *)currentdir));
|
||||
if(cmds==NULL) {
|
||||
if(err_text!=NULL) {
|
||||
*err_text="\""+url->scheme()+"\" scheme does not support remote deletion";
|
||||
delete url;
|
||||
curl_easy_cleanup(curl);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
cmds=curl_slist_append(cmds, QString().sprintf("dele %s",
|
||||
(const char *)audioFilename()));
|
||||
curl_easy_setopt(curl,CURLOPT_QUOTE,cmds);
|
||||
switch((err=curl_easy_perform(curl))) {
|
||||
case CURLE_OK:
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Edit a Rivendell Cast
|
||||
//
|
||||
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// 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
|
||||
@ -18,33 +18,18 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <qpainter.h>
|
||||
#include <qevent.h>
|
||||
#include <qmessagebox.h>
|
||||
#include <qpainter.h>
|
||||
#include <qdatetime.h>
|
||||
#include <qradiobutton.h>
|
||||
//Added by qt3to4:
|
||||
#include <QLabel>
|
||||
|
||||
#include <rdapplication.h>
|
||||
#include <rddb.h>
|
||||
#include <rddatedialog.h>
|
||||
#include <rdfeed.h>
|
||||
#include <rdescape_string.h>
|
||||
#include <rdconf.h>
|
||||
#include <rddatedialog.h>
|
||||
|
||||
#include "edit_cast.h"
|
||||
#include "globals.h"
|
||||
#include "pick_report_dates.h"
|
||||
|
||||
EditCast::EditCast(unsigned cast_id,QWidget *parent)
|
||||
: QDialog(parent)
|
||||
: RDDialog(parent)
|
||||
{
|
||||
setModal(true);
|
||||
|
||||
int ypos=0;
|
||||
|
||||
cast_cast=new RDPodcast(rda->config(),cast_id);
|
||||
@ -52,24 +37,16 @@ EditCast::EditCast(unsigned cast_id,QWidget *parent)
|
||||
cast_status=cast_cast->status();
|
||||
setWindowTitle("RDCastManager - "+tr("Editing PodCast"));
|
||||
|
||||
//
|
||||
// Create Fonts
|
||||
//
|
||||
QFont font=QFont("Helvetica",12,QFont::Bold);
|
||||
font.setPixelSize(12);
|
||||
QFont select_font=QFont("Helvetica",12,QFont::Normal);
|
||||
select_font.setPixelSize(12);
|
||||
|
||||
//
|
||||
// Item Media Link
|
||||
//
|
||||
cast_item_medialink_edit=new QLineEdit(this);
|
||||
cast_item_medialink_edit->setGeometry(115,10,sizeHint().width()-125,20);
|
||||
cast_item_medialink_edit->setGeometry(135,10,sizeHint().width()-145,20);
|
||||
cast_item_medialink_edit->setReadOnly(true);
|
||||
QLabel *cast_item_medialink_label=
|
||||
new QLabel(cast_item_medialink_edit,tr("Media Link:"),this);
|
||||
cast_item_medialink_label->setGeometry(20,10,90,20);
|
||||
cast_item_medialink_label->setFont(font);
|
||||
cast_item_medialink_label->setGeometry(20,10,110,20);
|
||||
cast_item_medialink_label->setFont(labelFont());
|
||||
cast_item_medialink_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
if(cast_feed->mediaLinkMode()==RDFeed::LinkNone) {
|
||||
cast_item_medialink_edit->hide();
|
||||
@ -84,36 +61,36 @@ EditCast::EditCast(unsigned cast_id,QWidget *parent)
|
||||
// Item Title
|
||||
//
|
||||
cast_item_title_edit=new QLineEdit(this);
|
||||
cast_item_title_edit->setGeometry(115,ypos,sizeHint().width()-125,20);
|
||||
cast_item_title_edit->setGeometry(135,ypos,sizeHint().width()-145,20);
|
||||
cast_item_title_edit->setMaxLength(255);
|
||||
QLabel *cast_item_title_label=
|
||||
new QLabel(cast_item_title_edit,tr("Title:"),this);
|
||||
cast_item_title_label->setGeometry(20,ypos,90,20);
|
||||
cast_item_title_label->setFont(font);
|
||||
cast_item_title_label->setGeometry(20,ypos,110,20);
|
||||
cast_item_title_label->setFont(labelFont());
|
||||
cast_item_title_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Item Author
|
||||
//
|
||||
cast_item_author_edit=new QLineEdit(this);
|
||||
cast_item_author_edit->setGeometry(115,ypos+22,sizeHint().width()-125,20);
|
||||
cast_item_author_edit->setGeometry(135,ypos+22,sizeHint().width()-145,20);
|
||||
cast_item_author_edit->setMaxLength(255);
|
||||
QLabel *cast_item_author_label=
|
||||
new QLabel(cast_item_author_edit,tr("Author E-Mail:"),this);
|
||||
cast_item_author_label->setGeometry(20,ypos+22,90,20);
|
||||
cast_item_author_label->setFont(font);
|
||||
cast_item_author_label->setGeometry(20,ypos+22,110,20);
|
||||
cast_item_author_label->setFont(labelFont());
|
||||
cast_item_author_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Item Category
|
||||
//
|
||||
cast_item_category_edit=new QLineEdit(this);
|
||||
cast_item_category_edit->setGeometry(115,ypos+44,sizeHint().width()-125,20);
|
||||
cast_item_category_edit->setGeometry(135,ypos+44,sizeHint().width()-145,20);
|
||||
cast_item_category_edit->setMaxLength(64);
|
||||
QLabel *cast_item_category_label=
|
||||
new QLabel(cast_item_category_edit,tr("Category:"),this);
|
||||
cast_item_category_label->setGeometry(20,ypos+44,90,20);
|
||||
cast_item_category_label->setFont(font);
|
||||
cast_item_category_label->setGeometry(20,ypos+44,110,20);
|
||||
cast_item_category_label->setFont(labelFont());
|
||||
cast_item_category_label->
|
||||
setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
@ -121,24 +98,24 @@ EditCast::EditCast(unsigned cast_id,QWidget *parent)
|
||||
// Item Link
|
||||
//
|
||||
cast_item_link_edit=new QLineEdit(this);
|
||||
cast_item_link_edit->setGeometry(115,ypos+66,sizeHint().width()-125,20);
|
||||
cast_item_link_edit->setGeometry(135,ypos+66,sizeHint().width()-145,20);
|
||||
cast_item_link_edit->setMaxLength(255);
|
||||
QLabel *cast_item_link_label=
|
||||
new QLabel(cast_item_link_edit,tr("Link URL:"),this);
|
||||
cast_item_link_label->setGeometry(20,ypos+66,90,20);
|
||||
cast_item_link_label->setFont(font);
|
||||
cast_item_link_label->setGeometry(20,ypos+66,110,20);
|
||||
cast_item_link_label->setFont(labelFont());
|
||||
cast_item_link_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Item Description
|
||||
//
|
||||
cast_item_description_edit=new Q3TextEdit(this);
|
||||
cast_item_description_edit=new QTextEdit(this);
|
||||
cast_item_description_edit->
|
||||
setGeometry(115,ypos+88,sizeHint().width()-125,76);
|
||||
setGeometry(135,ypos+88,sizeHint().width()-145,76);
|
||||
QLabel *cast_item_description_label=
|
||||
new QLabel(cast_item_description_edit,tr("Description:"),this);
|
||||
cast_item_description_label->setGeometry(20,ypos+88,90,20);
|
||||
cast_item_description_label->setFont(font);
|
||||
cast_item_description_label->setGeometry(20,ypos+88,110,20);
|
||||
cast_item_description_label->setFont(labelFont());
|
||||
cast_item_description_label->
|
||||
setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
@ -146,36 +123,37 @@ EditCast::EditCast(unsigned cast_id,QWidget *parent)
|
||||
// Item Source Text
|
||||
//
|
||||
cast_item_sourcetext_edit=new QLineEdit(this);
|
||||
cast_item_sourcetext_edit->setGeometry(115,ypos+169,sizeHint().width()-125,20);
|
||||
cast_item_sourcetext_edit->
|
||||
setGeometry(135,ypos+169,sizeHint().width()-145,20);
|
||||
cast_item_sourcetext_edit->setMaxLength(64);
|
||||
QLabel *cast_item_sourcetext_label=
|
||||
new QLabel(cast_item_sourcetext_edit,tr("Source Text:"),this);
|
||||
cast_item_sourcetext_label->setGeometry(20,ypos+169,90,20);
|
||||
cast_item_sourcetext_label->setFont(font);
|
||||
cast_item_sourcetext_label->setGeometry(20,ypos+169,110,20);
|
||||
cast_item_sourcetext_label->setFont(labelFont());
|
||||
cast_item_sourcetext_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Item Source URL
|
||||
//
|
||||
cast_item_sourceurl_edit=new QLineEdit(this);
|
||||
cast_item_sourceurl_edit->setGeometry(115,ypos+191,sizeHint().width()-125,20);
|
||||
cast_item_sourceurl_edit->setGeometry(135,ypos+191,sizeHint().width()-145,20);
|
||||
cast_item_sourceurl_edit->setMaxLength(64);
|
||||
QLabel *cast_item_sourceurl_label=
|
||||
new QLabel(cast_item_sourceurl_edit,tr("Source URL:"),this);
|
||||
cast_item_sourceurl_label->setGeometry(20,ypos+191,90,20);
|
||||
cast_item_sourceurl_label->setFont(font);
|
||||
cast_item_sourceurl_label->setGeometry(20,ypos+191,110,20);
|
||||
cast_item_sourceurl_label->setFont(labelFont());
|
||||
cast_item_sourceurl_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Item Comments
|
||||
//
|
||||
cast_item_comments_edit=new QLineEdit(this);
|
||||
cast_item_comments_edit->setGeometry(115,ypos+213,sizeHint().width()-125,20);
|
||||
cast_item_comments_edit->setGeometry(135,ypos+213,sizeHint().width()-145,20);
|
||||
cast_item_comments_edit->setMaxLength(64);
|
||||
QLabel *cast_item_comments_label=
|
||||
new QLabel(cast_item_comments_edit,tr("Comments URL:"),this);
|
||||
cast_item_comments_label->setGeometry(10,ypos+213,100,20);
|
||||
cast_item_comments_label->setFont(font);
|
||||
cast_item_comments_label->setGeometry(10,ypos+213,120,20);
|
||||
cast_item_comments_label->setFont(labelFont());
|
||||
cast_item_comments_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
cast_ypos=233+ypos;
|
||||
@ -183,16 +161,16 @@ EditCast::EditCast(unsigned cast_id,QWidget *parent)
|
||||
//
|
||||
// Effective DateTime
|
||||
//
|
||||
cast_item_effective_edit=new Q3DateTimeEdit(this);
|
||||
cast_item_effective_edit=new QDateTimeEdit(this);
|
||||
cast_item_effective_edit->
|
||||
setGeometry(115,cast_ypos,165,20);
|
||||
setGeometry(135,cast_ypos,165,20);
|
||||
QLabel *label=new QLabel(cast_item_effective_edit,tr("Air Date/Time:"),this);
|
||||
label->setGeometry(20,cast_ypos,90,20);
|
||||
label->setFont(font);
|
||||
label->setGeometry(20,cast_ypos,110,20);
|
||||
label->setFont(labelFont());
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
QPushButton *button=new QPushButton(this);
|
||||
button->setGeometry(290,cast_ypos-3,50,25);
|
||||
button->setFont(select_font);
|
||||
button->setGeometry(310,cast_ypos,50,20);
|
||||
button->setFont(subButtonFont());
|
||||
button->setText(tr("&Select"));
|
||||
connect(button,SIGNAL(clicked()),this,SLOT(effectiveSelectData()));
|
||||
cast_ypos+=22;
|
||||
@ -202,12 +180,12 @@ EditCast::EditCast(unsigned cast_id,QWidget *parent)
|
||||
//
|
||||
cast_item_origin_edit=new QLineEdit(this);
|
||||
cast_item_origin_edit->setReadOnly(true);
|
||||
cast_item_origin_edit->setGeometry(115,cast_ypos,165,20);
|
||||
cast_item_origin_edit->setGeometry(135,cast_ypos,165,20);
|
||||
cast_item_origin_edit->setMaxLength(64);
|
||||
QLabel *cast_item_origin_label=
|
||||
new QLabel(cast_item_origin_edit,tr("Posted At:"),this);
|
||||
cast_item_origin_label->setGeometry(20,cast_ypos,90,20);
|
||||
cast_item_origin_label->setFont(font);
|
||||
cast_item_origin_label->setGeometry(20,cast_ypos,110,20);
|
||||
cast_item_origin_label->setFont(labelFont());
|
||||
cast_item_origin_label->
|
||||
setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
cast_ypos+=22;
|
||||
@ -216,31 +194,31 @@ EditCast::EditCast(unsigned cast_id,QWidget *parent)
|
||||
// Item Expiration
|
||||
//
|
||||
cast_item_expiration_box=new QComboBox(this);
|
||||
cast_item_expiration_box->setGeometry(115,cast_ypos,50,20);
|
||||
cast_item_expiration_box->setGeometry(135,cast_ypos,50,20);
|
||||
cast_item_expiration_box->insertItem(tr("No"));
|
||||
cast_item_expiration_box->insertItem(tr("Yes"));
|
||||
connect(cast_item_expiration_box,SIGNAL(activated(int)),
|
||||
this,SLOT(expirationSelectedData(int)));
|
||||
label=new QLabel(cast_item_expiration_box,tr("Cast Expires:"),this);
|
||||
label->setGeometry(20,cast_ypos,90,20);
|
||||
label->setFont(font);
|
||||
label->setGeometry(20,cast_ypos,110,20);
|
||||
label->setFont(labelFont());
|
||||
label->
|
||||
setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
cast_ypos+=22;
|
||||
cast_item_expiration_box->setEnabled(cast_status!=RDPodcast::StatusExpired);
|
||||
label->setEnabled(cast_status!=RDPodcast::StatusExpired);
|
||||
|
||||
cast_item_expiration_edit=new Q3DateEdit(this);
|
||||
cast_item_expiration_edit->setGeometry(115,cast_ypos,95,20);
|
||||
cast_item_expiration_edit=new QDateEdit(this);
|
||||
cast_item_expiration_edit->setGeometry(135,cast_ypos,95,20);
|
||||
cast_item_expiration_label=
|
||||
new QLabel(cast_item_expiration_edit,tr("Expires On:"),this);
|
||||
cast_item_expiration_label->setGeometry(20,cast_ypos,90,20);
|
||||
cast_item_expiration_label->setFont(font);
|
||||
cast_item_expiration_label->setGeometry(20,cast_ypos,110,20);
|
||||
cast_item_expiration_label->setFont(labelFont());
|
||||
cast_item_expiration_label->
|
||||
setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
cast_item_expiration_button=new QPushButton(this);
|
||||
cast_item_expiration_button->setGeometry(220,cast_ypos-3,50,25);
|
||||
cast_item_expiration_button->setFont(select_font);
|
||||
cast_item_expiration_button->setGeometry(240,cast_ypos,50,20);
|
||||
cast_item_expiration_button->setFont(subButtonFont());
|
||||
cast_item_expiration_button->setText(tr("&Select"));
|
||||
connect(cast_item_expiration_button,SIGNAL(clicked()),
|
||||
this,SLOT(expirationSelectData()));
|
||||
@ -254,32 +232,32 @@ EditCast::EditCast(unsigned cast_id,QWidget *parent)
|
||||
//
|
||||
// Cast Status
|
||||
//
|
||||
cast_item_status_group=new Q3ButtonGroup(this);
|
||||
cast_item_status_group=new QButtonGroup(this);
|
||||
cast_item_status_group->setExclusive(true);
|
||||
cast_item_status_group->hide();
|
||||
// cast_item_status_group->hide();
|
||||
|
||||
QRadioButton *rbutton=new QRadioButton(this);
|
||||
rbutton->setGeometry(120,cast_ypos,15,15);
|
||||
cast_item_status_group->insert(rbutton);
|
||||
rbutton->setGeometry(140,cast_ypos,15,15);
|
||||
cast_item_status_group->addButton(rbutton,0);
|
||||
label=new QLabel(rbutton,tr("Hold"),this);
|
||||
label->setFont(select_font);
|
||||
label->setGeometry(140,cast_ypos,30,15);
|
||||
label->setFont(subButtonFont());
|
||||
label->setGeometry(160,cast_ypos,30,15);
|
||||
label->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
|
||||
rbutton->setChecked(true);
|
||||
label->setEnabled(cast_status!=RDPodcast::StatusExpired);
|
||||
rbutton->setEnabled(cast_status!=RDPodcast::StatusExpired);
|
||||
|
||||
rbutton=new QRadioButton(this);
|
||||
rbutton->setGeometry(190,cast_ypos,15,15);
|
||||
cast_item_status_group->insert(rbutton);
|
||||
rbutton->setGeometry(210,cast_ypos,15,15);
|
||||
cast_item_status_group->addButton(rbutton,1);
|
||||
label=new QLabel(rbutton,tr("Active"),this);
|
||||
label->setFont(select_font);
|
||||
label->setGeometry(210,cast_ypos,80,15);
|
||||
label->setFont(subLabelFont());
|
||||
label->setGeometry(230,cast_ypos,80,15);
|
||||
label->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
|
||||
label->setEnabled(cast_status!=RDPodcast::StatusExpired);
|
||||
label=new QLabel(cast_item_status_group,tr("Posting Status:"),this);
|
||||
label->setGeometry(20,cast_ypos-1,90,20);
|
||||
label->setFont(font);
|
||||
label=new QLabel(tr("Posting Status:"),this);
|
||||
label->setGeometry(20,cast_ypos-1,110,20);
|
||||
label->setFont(labelFont());
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
label->setEnabled(cast_status!=RDPodcast::StatusExpired);
|
||||
rbutton->setEnabled(cast_status!=RDPodcast::StatusExpired);
|
||||
@ -289,7 +267,7 @@ EditCast::EditCast(unsigned cast_id,QWidget *parent)
|
||||
//
|
||||
button=new QPushButton(this);
|
||||
button->setGeometry(10,sizeHint().height()-60,80,50);
|
||||
button->setFont(font);
|
||||
button->setFont(buttonFont());
|
||||
button->setText(tr("Episode\n&Report"));
|
||||
connect(button,SIGNAL(clicked()),this,SLOT(reportData()));
|
||||
|
||||
@ -299,7 +277,7 @@ EditCast::EditCast(unsigned cast_id,QWidget *parent)
|
||||
button=new QPushButton(this);
|
||||
button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50);
|
||||
button->setDefault(true);
|
||||
button->setFont(font);
|
||||
button->setFont(buttonFont());
|
||||
button->setText(tr("&OK"));
|
||||
connect(button,SIGNAL(clicked()),this,SLOT(okData()));
|
||||
|
||||
@ -309,7 +287,7 @@ EditCast::EditCast(unsigned cast_id,QWidget *parent)
|
||||
button=new QPushButton(this);
|
||||
button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,
|
||||
80,50);
|
||||
button->setFont(font);
|
||||
button->setFont(buttonFont());
|
||||
button->setText(tr("&Cancel"));
|
||||
connect(button,SIGNAL(clicked()),this,SLOT(cancelData()));
|
||||
|
||||
@ -340,15 +318,16 @@ EditCast::EditCast(unsigned cast_id,QWidget *parent)
|
||||
expirationSelectedData(cast_item_expiration_box->currentItem());
|
||||
switch(cast_status) {
|
||||
case RDPodcast::StatusActive:
|
||||
cast_item_status_group->setButton(1);
|
||||
cast_item_status_group->button(1)->setChecked(true);
|
||||
break;
|
||||
|
||||
case RDPodcast::StatusPending:
|
||||
cast_item_status_group->setButton(0);
|
||||
cast_item_status_group->button(0)->setChecked(true);
|
||||
break;
|
||||
|
||||
case RDPodcast::StatusExpired:
|
||||
cast_item_status_group->setDisabled(true);
|
||||
cast_item_status_group->button(0)->setDisabled(true);
|
||||
cast_item_status_group->button(1)->setDisabled(true);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -440,7 +419,7 @@ void EditCast::okData()
|
||||
cast_cast->setItemComments(cast_item_comments_edit->text());
|
||||
cast_cast->
|
||||
setEffectiveDateTime(RDLocalToUtc(cast_item_effective_edit->dateTime()));
|
||||
if(cast_item_status_group->isEnabled()) {
|
||||
if(cast_item_status_group->button(0)->isEnabled()) {
|
||||
if(cast_item_expiration_box->currentItem()) {
|
||||
int shelf_life=RDUtcToLocal(cast_cast->originDateTime()).date().
|
||||
daysTo(cast_item_expiration_edit->date());
|
||||
@ -452,7 +431,7 @@ void EditCast::okData()
|
||||
else {
|
||||
cast_cast->setShelfLife(0);
|
||||
}
|
||||
switch(cast_item_status_group->selectedId()) {
|
||||
switch(cast_item_status_group->checkedId()) {
|
||||
case 0:
|
||||
cast_cast->setStatus(RDPodcast::StatusPending);
|
||||
break;
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Edit a Rivendell Cast
|
||||
//
|
||||
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// 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
|
||||
@ -21,23 +21,20 @@
|
||||
#ifndef EDIT_CAST_H
|
||||
#define EDIT_CAST_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <qdialog.h>
|
||||
#include <q3textedit.h>
|
||||
#include <qspinbox.h>
|
||||
#include <qlineedit.h>
|
||||
#include <qsqldatabase.h>
|
||||
#include <qbuttongroup.h>
|
||||
#include <qcombobox.h>
|
||||
#include <q3datetimeedit.h>
|
||||
#include <qdatetimeedit.h>
|
||||
#include <qlabel.h>
|
||||
#include <qlineedit.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <q3buttongroup.h>
|
||||
#include <qtextedit.h>
|
||||
|
||||
#include <rddialog.h>
|
||||
#include <rdfeed.h>
|
||||
#include <rdpodcast.h>
|
||||
|
||||
class EditCast : public QDialog
|
||||
class EditCast : public RDDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@ -61,7 +58,7 @@ class EditCast : public QDialog
|
||||
QLineEdit *cast_item_title_edit;
|
||||
QLineEdit *cast_item_author_edit;
|
||||
QLineEdit *cast_item_origin_edit;
|
||||
Q3TextEdit *cast_item_description_edit;
|
||||
QTextEdit *cast_item_description_edit;
|
||||
QLineEdit *cast_item_category_edit;
|
||||
QLineEdit *cast_item_comments_edit;
|
||||
QLineEdit *cast_item_sourcetext_edit;
|
||||
@ -70,9 +67,9 @@ class EditCast : public QDialog
|
||||
QComboBox *cast_item_expiration_box;
|
||||
QLabel *cast_item_expiration_label;
|
||||
QPushButton *cast_item_expiration_button;
|
||||
Q3DateEdit *cast_item_expiration_edit;
|
||||
Q3DateTimeEdit *cast_item_effective_edit;
|
||||
Q3ButtonGroup *cast_item_status_group;
|
||||
QDateEdit *cast_item_expiration_edit;
|
||||
QDateTimeEdit *cast_item_effective_edit;
|
||||
QButtonGroup *cast_item_status_group;
|
||||
int cast_ypos;
|
||||
RDPodcast::Status cast_status;
|
||||
};
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// List Rivendell Casts
|
||||
//
|
||||
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// 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
|
||||
@ -18,38 +18,15 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <qdialog.h>
|
||||
#include <qstring.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <q3listbox.h>
|
||||
#include <q3textedit.h>
|
||||
#include <qlabel.h>
|
||||
#include <qpainter.h>
|
||||
#include <qevent.h>
|
||||
#include <qmessagebox.h>
|
||||
#include <q3buttongroup.h>
|
||||
#include <qdatetime.h>
|
||||
#include <qfile.h>
|
||||
#include <qapplication.h>
|
||||
#include <q3filedialog.h>
|
||||
#include <qfiledialog.h>
|
||||
#include <qmessagebox.h>
|
||||
|
||||
#include <rdapplication.h>
|
||||
#include <rdcastsearch.h>
|
||||
#include <rdconf.h>
|
||||
#include <rdcut.h>
|
||||
#include <rdcut_dialog.h>
|
||||
#include <rddb.h>
|
||||
#include <rdescape_string.h>
|
||||
#include <rdfeedlog.h>
|
||||
#include <rdpodcast.h>
|
||||
#include <rdsettings.h>
|
||||
#include <rdtextfile.h>
|
||||
#include <rdwavefile.h>
|
||||
#include <rdurl.h>
|
||||
|
||||
#include "edit_cast.h"
|
||||
#include "globals.h"
|
||||
@ -64,7 +41,7 @@
|
||||
#include "../icons/whiteball.xpm"
|
||||
|
||||
ListCasts::ListCasts(unsigned feed_id,QWidget *parent)
|
||||
: QDialog(parent)
|
||||
: RDDialog(parent)
|
||||
{
|
||||
setModal(true);
|
||||
|
||||
@ -73,21 +50,10 @@ ListCasts::ListCasts(unsigned feed_id,QWidget *parent)
|
||||
//
|
||||
// Fix the Window Size
|
||||
//
|
||||
setMinimumWidth(sizeHint().width());
|
||||
setMinimumHeight(sizeHint().height());
|
||||
setMinimumSize(sizeHint());
|
||||
|
||||
setWindowTitle("RDCastManager - "+tr("Podcast List"));
|
||||
|
||||
//
|
||||
// Create Fonts
|
||||
//
|
||||
QFont font=QFont("Helvetica",12,QFont::Bold);
|
||||
font.setPixelSize(12);
|
||||
QFont list_font=QFont("Helvetica",12,QFont::Normal);
|
||||
list_font.setPixelSize(12);
|
||||
QFont small_font=QFont("Helvetica",10,QFont::Normal);
|
||||
small_font.setPixelSize(10);
|
||||
|
||||
//
|
||||
// Create Icons
|
||||
//
|
||||
@ -104,10 +70,9 @@ ListCasts::ListCasts(unsigned feed_id,QWidget *parent)
|
||||
// Progress Dialog
|
||||
//
|
||||
list_progress_dialog=
|
||||
new Q3ProgressDialog(tr("Uploading Audio..."),"Cancel",4,this,NULL);
|
||||
list_progress_dialog->setCaption(tr("Progress"));
|
||||
new QProgressDialog(tr("Uploading Audio..."),tr("Cancel"),0,list_feed->totalPostSteps(),this);
|
||||
list_progress_dialog->setWindowTitle("RDCastManager - "+tr("Progress"));
|
||||
list_progress_dialog->setMinimumDuration(0);
|
||||
list_progress_dialog->setTotalSteps(list_feed->totalPostSteps());
|
||||
connect(list_feed,SIGNAL(postProgressChanged(int)),
|
||||
this,SLOT(postProgressChangedData(int)));
|
||||
|
||||
@ -117,7 +82,7 @@ ListCasts::ListCasts(unsigned feed_id,QWidget *parent)
|
||||
list_filter_edit=new QLineEdit(this);
|
||||
list_filter_label=
|
||||
new QLabel(list_filter_edit,tr("Filter:"),this);
|
||||
list_filter_label->setFont(font);
|
||||
list_filter_label->setFont(labelFont());
|
||||
list_filter_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
connect(list_filter_edit,SIGNAL(textChanged(const QString &)),
|
||||
this,SLOT(filterChangedData(const QString &)));
|
||||
@ -128,7 +93,7 @@ ListCasts::ListCasts(unsigned feed_id,QWidget *parent)
|
||||
list_unexpired_check=new QCheckBox(this);
|
||||
list_unexpired_label=
|
||||
new QLabel(list_unexpired_check,tr("Only Show Unexpired Casts"),this);
|
||||
list_unexpired_label->setFont(font);
|
||||
list_unexpired_label->setFont(labelFont());
|
||||
list_unexpired_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||
connect(list_unexpired_check,SIGNAL(toggled(bool)),
|
||||
this,SLOT(notexpiredToggledData(bool)));
|
||||
@ -139,7 +104,7 @@ ListCasts::ListCasts(unsigned feed_id,QWidget *parent)
|
||||
list_active_check=new QCheckBox(this);
|
||||
list_active_label=
|
||||
new QLabel(list_active_check,tr("Only Show Active Casts"),this);
|
||||
list_active_label->setFont(font);
|
||||
list_active_label->setFont(labelFont());
|
||||
list_active_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||
connect(list_active_check,SIGNAL(toggled(bool)),
|
||||
this,SLOT(activeToggledData(bool)));
|
||||
@ -175,7 +140,7 @@ ListCasts::ListCasts(unsigned feed_id,QWidget *parent)
|
||||
// Post Cart Button
|
||||
//
|
||||
list_cart_button=new QPushButton(this);
|
||||
list_cart_button->setFont(font);
|
||||
list_cart_button->setFont(buttonFont());
|
||||
list_cart_button->setText(tr("Post From\nCar&t/Cut"));
|
||||
connect(list_cart_button,SIGNAL(clicked()),this,SLOT(addCartData()));
|
||||
|
||||
@ -183,7 +148,7 @@ ListCasts::ListCasts(unsigned feed_id,QWidget *parent)
|
||||
// Post File Button
|
||||
//
|
||||
list_file_button=new QPushButton(this);
|
||||
list_file_button->setFont(font);
|
||||
list_file_button->setFont(buttonFont());
|
||||
list_file_button->setText(tr("Post From\n&File"));
|
||||
connect(list_file_button,SIGNAL(clicked()),this,SLOT(addFileData()));
|
||||
|
||||
@ -191,7 +156,7 @@ ListCasts::ListCasts(unsigned feed_id,QWidget *parent)
|
||||
// Edit Button
|
||||
//
|
||||
list_edit_button=new QPushButton(this);
|
||||
list_edit_button->setFont(font);
|
||||
list_edit_button->setFont(buttonFont());
|
||||
list_edit_button->setText(tr("&Edit"));
|
||||
connect(list_edit_button,SIGNAL(clicked()),this,SLOT(editData()));
|
||||
|
||||
@ -199,7 +164,7 @@ ListCasts::ListCasts(unsigned feed_id,QWidget *parent)
|
||||
// Delete Button
|
||||
//
|
||||
list_delete_button=new QPushButton(this);
|
||||
list_delete_button->setFont(font);
|
||||
list_delete_button->setFont(buttonFont());
|
||||
list_delete_button->setText(tr("&Delete"));
|
||||
connect(list_delete_button,SIGNAL(clicked()),this,SLOT(deleteData()));
|
||||
|
||||
@ -207,7 +172,7 @@ ListCasts::ListCasts(unsigned feed_id,QWidget *parent)
|
||||
// Report Button
|
||||
//
|
||||
list_report_button=new QPushButton(this);
|
||||
list_report_button->setFont(font);
|
||||
list_report_button->setFont(buttonFont());
|
||||
list_report_button->setText(tr("Subscription\n&Report"));
|
||||
connect(list_report_button,SIGNAL(clicked()),this,SLOT(reportData()));
|
||||
|
||||
@ -216,7 +181,7 @@ ListCasts::ListCasts(unsigned feed_id,QWidget *parent)
|
||||
//
|
||||
list_close_button=new QPushButton(this);
|
||||
list_close_button->setDefault(true);
|
||||
list_close_button->setFont(font);
|
||||
list_close_button->setFont(buttonFont());
|
||||
list_close_button->setText(tr("&Close"));
|
||||
connect(list_close_button,SIGNAL(clicked()),this,SLOT(closeData()));
|
||||
|
||||
@ -277,7 +242,8 @@ void ListCasts::addCartData()
|
||||
|
||||
void ListCasts::addFileData()
|
||||
{
|
||||
QString srcfile=Q3FileDialog::getOpenFileName("",RD_AUDIO_FILE_FILTER,this);
|
||||
QString srcfile=
|
||||
QFileDialog::getOpenFileName(this,"RDCastManager","",RD_AUDIO_FILE_FILTER);
|
||||
if(srcfile.isNull()) {
|
||||
return;
|
||||
}
|
||||
@ -330,11 +296,11 @@ void ListCasts::deleteData()
|
||||
return;
|
||||
}
|
||||
|
||||
Q3ProgressDialog *pd=
|
||||
new Q3ProgressDialog(tr("Deleting Podcast..."),"Cancel",2,this,NULL);
|
||||
QProgressDialog *pd=
|
||||
new QProgressDialog(tr("Deleting Podcast..."),"Cancel",0,2,this);
|
||||
pd->setCaption(tr("Progress"));
|
||||
pd->setMinimumDuration(0);
|
||||
pd->setProgress(0);
|
||||
pd->setValue(0);
|
||||
qApp->processEvents();
|
||||
sleep(1);
|
||||
qApp->processEvents();
|
||||
@ -350,7 +316,7 @@ void ListCasts::deleteData()
|
||||
return;
|
||||
}
|
||||
}
|
||||
pd->setProgress(1);
|
||||
pd->setValue(1);
|
||||
qApp->processEvents();
|
||||
sql=QString().sprintf("delete from PODCASTS where ID=%u",item->id());
|
||||
q=new RDSqlQuery(sql);
|
||||
@ -414,8 +380,8 @@ void ListCasts::activeToggledData(bool state)
|
||||
|
||||
void ListCasts::postProgressChangedData(int step)
|
||||
{
|
||||
list_progress_dialog->setProgress(step);
|
||||
if(step==list_progress_dialog->totalSteps()) {
|
||||
list_progress_dialog->setValue(step);
|
||||
if(step==list_progress_dialog->maximum()) {
|
||||
list_progress_dialog->reset();
|
||||
}
|
||||
qApp->processEvents();
|
||||
@ -441,7 +407,7 @@ void ListCasts::resizeEvent(QResizeEvent *e)
|
||||
list_file_button->setGeometry(100,size().height()-60,80,50);
|
||||
list_edit_button->setGeometry(190,size().height()-60,80,50);
|
||||
list_delete_button->setGeometry(280,size().height()-60,80,50);
|
||||
list_report_button->setGeometry(415,size().height()-60,80,50);
|
||||
list_report_button->setGeometry(400,size().height()-60,110,50);
|
||||
list_close_button->setGeometry(size().width()-90,size().height()-60,80,50);
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// List Rivendell Casts
|
||||
//
|
||||
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// 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
|
||||
@ -21,19 +21,14 @@
|
||||
#ifndef LIST_CASTS_H
|
||||
#define LIST_CASTS_H
|
||||
|
||||
#include <qdialog.h>
|
||||
#include <qpixmap.h>
|
||||
#include <qradiobutton.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qlineedit.h>
|
||||
#include <qcheckbox.h>
|
||||
#include <qlabel.h>
|
||||
#include <q3progressdialog.h>
|
||||
#include <qprogressdialog.h>
|
||||
|
||||
#include <rddialog.h>
|
||||
#include <rdfeed.h>
|
||||
#include <rdlistviewitem.h>
|
||||
|
||||
class ListCasts : public QDialog
|
||||
class ListCasts : public RDDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@ -81,7 +76,7 @@ class ListCasts : public QDialog
|
||||
QCheckBox *list_unexpired_check;
|
||||
QLabel *list_active_label;
|
||||
QCheckBox *list_active_check;
|
||||
Q3ProgressDialog *list_progress_dialog;
|
||||
QProgressDialog *list_progress_dialog;
|
||||
RDFeed *list_feed;
|
||||
};
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Select a Set of Dates for a Rivendell Report
|
||||
//
|
||||
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// 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
|
||||
@ -19,16 +19,10 @@
|
||||
//
|
||||
|
||||
#include <qpushbutton.h>
|
||||
#include <qlabel.h>
|
||||
#include <qmessagebox.h>
|
||||
#include <qfile.h>
|
||||
|
||||
#include <rdapplication.h>
|
||||
#include <rddb.h>
|
||||
#include <rddatedecode.h>
|
||||
#include <rddatedialog.h>
|
||||
#include <rdescape_string.h>
|
||||
#include <rdfeed.h>
|
||||
#include <rdpodcast.h>
|
||||
#include <rdreport.h>
|
||||
#include <rdtextfile.h>
|
||||
@ -38,10 +32,8 @@
|
||||
|
||||
PickReportDates::PickReportDates(unsigned feed_id,unsigned cast_id,
|
||||
QWidget *parent)
|
||||
: QDialog(parent)
|
||||
: RDDialog(parent)
|
||||
{
|
||||
setModal(true);
|
||||
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
QDate yesterday_date=QDate::currentDate().addDays(-1);
|
||||
@ -60,48 +52,40 @@ PickReportDates::PickReportDates(unsigned feed_id,unsigned cast_id,
|
||||
//
|
||||
// Fix the Window Size
|
||||
//
|
||||
setMaximumWidth(sizeHint().width());
|
||||
setMaximumHeight(sizeHint().height());
|
||||
setMinimumWidth(sizeHint().width());
|
||||
setMinimumHeight(sizeHint().height());
|
||||
|
||||
//
|
||||
// Create Fonts
|
||||
//
|
||||
QFont bold_font=QFont("Helvetica",12,QFont::Bold);
|
||||
bold_font.setPixelSize(12);
|
||||
QFont font=QFont("Helvetica",12,QFont::Normal);
|
||||
font.setPixelSize(12);
|
||||
setMaximumSize(sizeHint());
|
||||
setMaximumSize(sizeHint());
|
||||
|
||||
//
|
||||
// Start Date
|
||||
//
|
||||
edit_startdate_edit=new Q3DateEdit(this);
|
||||
edit_startdate_edit=new QDateEdit(this);
|
||||
edit_startdate_edit->setGeometry(150,10,100,20);
|
||||
edit_startdate_edit->setDisplayFormat("MM/dd/yyyy");
|
||||
edit_startdate_edit->setDate(yesterday_date.addMonths(-1));
|
||||
QLabel *label=new QLabel(edit_startdate_edit,tr("&Start Date:"),this);
|
||||
label->setGeometry(75,10,70,20);
|
||||
label->setFont(bold_font);
|
||||
label->setFont(labelFont());
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
QPushButton *button=new QPushButton(this);
|
||||
button->setGeometry(260,7,50,27);
|
||||
button->setFont(font);
|
||||
button->setFont(subButtonFont());
|
||||
button->setText(tr("&Select"));
|
||||
connect(button,SIGNAL(clicked()),this,SLOT(selectStartDateData()));
|
||||
|
||||
//
|
||||
// End Date
|
||||
//
|
||||
edit_enddate_edit=new Q3DateEdit(this);
|
||||
edit_enddate_edit=new QDateEdit(this);
|
||||
edit_enddate_edit->setGeometry(150,40,100,20);
|
||||
edit_enddate_edit->setDisplayFormat("MM/dd/yyyy");
|
||||
edit_enddate_edit->setDate(yesterday_date);
|
||||
label=new QLabel(edit_enddate_edit,tr("&End Date:"),this);
|
||||
label->setGeometry(75,40,70,20);
|
||||
label->setFont(bold_font);
|
||||
label->setFont(labelFont());
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
button=new QPushButton(this);
|
||||
button->setGeometry(260,37,50,27);
|
||||
button->setFont(font);
|
||||
button->setFont(subButtonFont());
|
||||
button->setText(tr("&Select"));
|
||||
connect(button,SIGNAL(clicked()),this,SLOT(selectEndDateData()));
|
||||
|
||||
@ -110,7 +94,7 @@ PickReportDates::PickReportDates(unsigned feed_id,unsigned cast_id,
|
||||
//
|
||||
button=new QPushButton(this);
|
||||
button->setGeometry(10,sizeHint().height()-60,80,50);
|
||||
button->setFont(bold_font);
|
||||
button->setFont(buttonFont());
|
||||
button->setText(tr("&Generate\nReport"));
|
||||
connect(button,SIGNAL(clicked()),this,SLOT(generateData()));
|
||||
|
||||
@ -120,7 +104,7 @@ PickReportDates::PickReportDates(unsigned feed_id,unsigned cast_id,
|
||||
button=new QPushButton(this);
|
||||
button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50);
|
||||
button->setDefault(true);
|
||||
button->setFont(bold_font);
|
||||
button->setFont(buttonFont());
|
||||
button->setText(tr("C&lose"));
|
||||
connect(button,SIGNAL(clicked()),this,SLOT(closeData()));
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Select a Set of Dates for a Rivendell Podcast Report
|
||||
//
|
||||
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// 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
|
||||
@ -21,12 +21,11 @@
|
||||
#ifndef PICK_REPORT_DATE_H
|
||||
#define PICK_REPORT_DATE_H
|
||||
|
||||
#include <qdialog.h>
|
||||
#include <qsqldatabase.h>
|
||||
#include <qcombobox.h>
|
||||
#include <q3datetimeedit.h>
|
||||
#include <qdatetimeedit.h>
|
||||
|
||||
class PickReportDates : public QDialog
|
||||
#include <rddialog.h>
|
||||
|
||||
class PickReportDates : public RDDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@ -45,8 +44,8 @@ class PickReportDates : public QDialog
|
||||
void GenerateSubscriptionReport(const QString &keyname,QString *rpt);
|
||||
void GenerateEpisodeReport(const QString &keyname,unsigned cast_id,
|
||||
QString *rpt);
|
||||
Q3DateEdit *edit_startdate_edit;
|
||||
Q3DateEdit *edit_enddate_edit;
|
||||
QDateEdit *edit_startdate_edit;
|
||||
QDateEdit *edit_enddate_edit;
|
||||
QString edit_keyname;
|
||||
unsigned edit_feed_id;
|
||||
unsigned edit_cast_id;
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// A PodCast Management Utility for Rivendell.
|
||||
//
|
||||
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// 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
|
||||
@ -18,27 +18,10 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include <signal.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <qwindowsstyle.h>
|
||||
#include <qwidget.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qlabel.h>
|
||||
#include <qtextcodec.h>
|
||||
#include <qtranslator.h>
|
||||
#include <qsettings.h>
|
||||
#include <qpainter.h>
|
||||
#include <qmessagebox.h>
|
||||
|
||||
#include <dbversion.h>
|
||||
#include <rd.h>
|
||||
#include <rdapplication.h>
|
||||
#include <rdconf.h>
|
||||
#include <rddb.h>
|
||||
#include <rdescape_string.h>
|
||||
#include <rdpodcast.h>
|
||||
|
||||
@ -60,8 +43,8 @@ QString cast_filter;
|
||||
QString cast_group;
|
||||
QString cast_schedcode;
|
||||
|
||||
MainWidget::MainWidget(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
||||
: RDWidget(c,parent)
|
||||
{
|
||||
QString str1;
|
||||
QString str2;
|
||||
@ -72,8 +55,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
// Fix the Window Size
|
||||
//
|
||||
setMinimumWidth(sizeHint().width());
|
||||
setMinimumHeight(sizeHint().height());
|
||||
setMinimumSize(sizeHint());
|
||||
|
||||
//
|
||||
// Open the Database/
|
||||
@ -105,16 +87,8 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
// RIPC Connection
|
||||
//
|
||||
connect(rda,SIGNAL(userChanged()),this,SLOT(userChangedData()));
|
||||
rda->ripc()->connectHost("localhost",RIPCD_TCP_PORT,rda->config()->password());
|
||||
|
||||
//
|
||||
// Create Fonts
|
||||
//
|
||||
QFont default_font("Helvetica",12,QFont::Normal);
|
||||
default_font.setPixelSize(12);
|
||||
qApp->setFont(default_font);
|
||||
QFont button_font=QFont("Helvetica",12,QFont::Bold);
|
||||
button_font.setPixelSize(12);
|
||||
rda->ripc()->
|
||||
connectHost("localhost",RIPCD_TCP_PORT,rda->config()->password());
|
||||
|
||||
//
|
||||
// Create Icons
|
||||
@ -128,7 +102,6 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
// Feed List
|
||||
//
|
||||
cast_feed_list=new RDListView(this);
|
||||
cast_feed_list->setFont(default_font);
|
||||
cast_feed_list->setAllColumnsShowFocus(true);
|
||||
cast_feed_list->setItemMargin(5);
|
||||
connect(cast_feed_list,
|
||||
@ -150,7 +123,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
// Open Button
|
||||
//
|
||||
cast_open_button=new QPushButton(this);
|
||||
cast_open_button->setFont(button_font);
|
||||
cast_open_button->setFont(buttonFont());
|
||||
cast_open_button->setText(tr("&View\nFeed"));
|
||||
connect(cast_open_button,SIGNAL(clicked()),this,SLOT(openData()));
|
||||
|
||||
@ -158,7 +131,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
// Close Button
|
||||
//
|
||||
cast_close_button=new QPushButton(this);
|
||||
cast_close_button->setFont(button_font);
|
||||
cast_close_button->setFont(buttonFont());
|
||||
cast_close_button->setText(tr("&Close"));
|
||||
connect(cast_close_button,SIGNAL(clicked()),this,SLOT(quitMainWidget()));
|
||||
|
||||
@ -345,7 +318,9 @@ int main(int argc,char *argv[])
|
||||
//
|
||||
// Start Event Loop
|
||||
//
|
||||
MainWidget *w=new MainWidget();
|
||||
RDConfig *config=new RDConfig();
|
||||
config->load();
|
||||
MainWidget *w=new MainWidget(config);
|
||||
a.setMainWidget(w);
|
||||
w->setGeometry(w->geometry().x(),w->geometry().y(),w->sizeHint().width(),w->sizeHint().height());
|
||||
w->show();
|
||||
|
@ -21,29 +21,19 @@
|
||||
#ifndef RDCASTMANAGER_H
|
||||
#define RDCASTMANAGER_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <qsize.h>
|
||||
#include <qsizepolicy.h>
|
||||
#include <qsqldatabase.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qpixmap.h>
|
||||
#include <qwidget.h>
|
||||
|
||||
#include <rdlistview.h>
|
||||
#include <rduser.h>
|
||||
#include <rdripc.h>
|
||||
#include <rdlibrary_conf.h>
|
||||
#include <rdlog_line.h>
|
||||
#include <rdconfig.h>
|
||||
#include <rdlog_line.h>
|
||||
#include <rdwidget.h>
|
||||
|
||||
#define RDCASTMANAGER_USAGE "\n"
|
||||
|
||||
class MainWidget : public QWidget
|
||||
class MainWidget : public RDWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MainWidget(QWidget *parent=0);
|
||||
MainWidget(RDConfig *c,QWidget *parent=0);
|
||||
QSize sizeHint() const;
|
||||
QSizePolicy sizePolicy() const;
|
||||
|
||||
|
@ -288,6 +288,10 @@ Podcast trotzdem löschen?</translation>
|
||||
<source>Continue deleting cast?</source>
|
||||
<translation>Pokračovat v mazání podcastu?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWidget</name>
|
||||
|
@ -277,6 +277,10 @@ Podcast trotzdem löschen?</translation>
|
||||
<source>Continue deleting cast?</source>
|
||||
<translation>Löschen des Podcasts fortsetzen?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWidget</name>
|
||||
|
@ -228,6 +228,10 @@ Suscripción</translation>
|
||||
<source>Continue deleting cast?</source>
|
||||
<translation> ¿Continuar eliminando podcasts?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWidget</name>
|
||||
|
@ -223,6 +223,10 @@ Car&t/Cut</source>
|
||||
<source>Continue deleting cast?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWidget</name>
|
||||
|
@ -276,6 +276,10 @@ Vil du halda fram med å sletta podkasten?</translation>
|
||||
<source>Continue deleting cast?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWidget</name>
|
||||
|
@ -276,6 +276,10 @@ Vil du halda fram med å sletta podkasten?</translation>
|
||||
<source>Continue deleting cast?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWidget</name>
|
||||
|
@ -242,6 +242,10 @@ Continuar deletando cast?</translation>
|
||||
<source>Continue deleting cast?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWidget</name>
|
||||
|
Loading…
x
Reference in New Issue
Block a user