mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-12 15:45:59 +01:00
2025-12-02 Fred Gleason <fredg@paravelsystems.com>
* Added a 'DROPBOXES.DROP_BOX_SCAN_COUNT' field to the database. * Added a 'DROPBOXES.DROP_BOX_SCAN_INTERVAL' field to the database. * Incremented the database version to 377. * Added '--drop-box-scan-count' and '--drop-box-scan-interval' switches to rdimport(1). * Added 'RDDropbox::dropBoxScanCount()', 'RDDropbox::setDropBoxScanCount()', 'RDDropbox::dropBoxScanInterval()' and 'RDDropbox::setDropBoxScanInterval()' methods. * Added an 'Advanced Settings' button to the 'Edit Dropbox' dialog in rdadmin(1). Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -62,6 +62,7 @@ dist_rdadmin_SOURCES = add_feed.cpp add_feed.h\
|
||||
edit_channelgpios.cpp edit_channelgpios.h\
|
||||
edit_decks.cpp edit_decks.h\
|
||||
edit_dropbox.cpp edit_dropbox.h\
|
||||
edit_dropbox_advanced.cpp edit_dropbox_advanced.h\
|
||||
edit_endpoint.cpp edit_endpoint.h\
|
||||
edit_feed.cpp edit_feed.h\
|
||||
edit_feed_perms.cpp edit_feed_perms.h\
|
||||
@@ -146,6 +147,7 @@ nodist_rdadmin_SOURCES = global_credits.cpp\
|
||||
moc_edit_channelgpios.cpp\
|
||||
moc_edit_decks.cpp\
|
||||
moc_edit_dropbox.cpp\
|
||||
moc_edit_dropbox_advanced.cpp\
|
||||
moc_edit_endpoint.cpp\
|
||||
moc_edit_feed.cpp\
|
||||
moc_edit_feed_perms.cpp\
|
||||
|
||||
@@ -50,6 +50,7 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent)
|
||||
// Dialogs
|
||||
//
|
||||
box_schedcodes_dialog=new RDSchedCodesDialog(this);
|
||||
box_advanced_dialog=new EditDropboxAdvanced(this);
|
||||
|
||||
//
|
||||
// Group Name
|
||||
@@ -161,13 +162,21 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent)
|
||||
box_log_path_button,SLOT(setDisabled(bool)));
|
||||
|
||||
//
|
||||
// Scheduler Codes
|
||||
// Scheduler Codes Button
|
||||
//
|
||||
box_schedcodes_button=new QPushButton(tr("Scheduler Codes"),this);
|
||||
box_schedcodes_button->setGeometry(110,165,200,25);
|
||||
box_schedcodes_button->setGeometry(60,165,150,25);
|
||||
box_schedcodes_button->setFont(buttonFont());
|
||||
connect(box_schedcodes_button,SIGNAL(clicked()),this,SLOT(schedcodesData()));
|
||||
|
||||
//
|
||||
// Advanced Settings Button
|
||||
//
|
||||
box_advanced_button=new QPushButton(tr("Advanced Settings"),this);
|
||||
box_advanced_button->setGeometry(280,165,150,25);
|
||||
box_advanced_button->setFont(buttonFont());
|
||||
connect(box_advanced_button,SIGNAL(clicked()),this,SLOT(advancedData()));
|
||||
|
||||
//
|
||||
// Delete Source
|
||||
//
|
||||
@@ -540,6 +549,12 @@ void EditDropbox::schedcodesData()
|
||||
}
|
||||
|
||||
|
||||
void EditDropbox::advancedData()
|
||||
{
|
||||
box_advanced_dialog->exec(box_dropbox);
|
||||
}
|
||||
|
||||
|
||||
void EditDropbox::normalizationToggledData(bool state)
|
||||
{
|
||||
box_normalization_level_spin->setEnabled(state);
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
#include <rdgrouplistmodel.h>
|
||||
#include <rdschedcodes_dialog.h>
|
||||
|
||||
#include "edit_dropbox_advanced.h"
|
||||
|
||||
class EditDropbox : public RDDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -44,6 +46,7 @@ class EditDropbox : public RDDialog
|
||||
void selectCartData();
|
||||
void selectLogPathData();
|
||||
void schedcodesData();
|
||||
void advancedData();
|
||||
void normalizationToggledData(bool state);
|
||||
void autotrimToggledData(bool state);
|
||||
void segueToggledData(bool state);
|
||||
@@ -53,6 +56,7 @@ class EditDropbox : public RDDialog
|
||||
void cancelData();
|
||||
|
||||
private:
|
||||
EditDropboxAdvanced *box_advanced_dialog;
|
||||
RDDropbox *box_dropbox;
|
||||
QComboBox *box_group_name_box;
|
||||
RDGroupListModel *box_group_name_model;
|
||||
@@ -60,6 +64,7 @@ class EditDropbox : public RDDialog
|
||||
QString box_path;
|
||||
QLineEdit *box_to_cart_edit;
|
||||
QPushButton *box_schedcodes_button;
|
||||
QPushButton *box_advanced_button;
|
||||
QCheckBox *box_delete_cuts_box;
|
||||
QLabel *box_delete_cuts_label;
|
||||
QCheckBox *box_force_to_mono_box;
|
||||
|
||||
132
rdadmin/edit_dropbox_advanced.cpp
Normal file
132
rdadmin/edit_dropbox_advanced.cpp
Normal file
@@ -0,0 +1,132 @@
|
||||
// edit_dropbox_advanced.cpp
|
||||
//
|
||||
// Edit a Rivendell Dropbox Advanced Configuration
|
||||
//
|
||||
// (C) Copyright 2002-2025 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
|
||||
// published by the Free Software Foundation.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public
|
||||
// License along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include <rdapplication.h>
|
||||
|
||||
#include "globals.h"
|
||||
#include "edit_dropbox_advanced.h"
|
||||
|
||||
EditDropboxAdvanced::EditDropboxAdvanced(QWidget *parent)
|
||||
: RDDialog(parent)
|
||||
{
|
||||
//
|
||||
// Fix the Window Size
|
||||
//
|
||||
setMinimumSize(sizeHint());
|
||||
setMaximumSize(sizeHint());
|
||||
|
||||
box_dropbox=NULL;
|
||||
|
||||
//
|
||||
// Scan Count
|
||||
//
|
||||
box_scan_count_spin=new QSpinBox(this);
|
||||
box_scan_count_spin->setRange(3,20);
|
||||
box_scan_count_spin->setSpecialValueText(tr("[default]"));
|
||||
box_scan_count_label=new QLabel(tr("Dropbox Scan Count")+":",this);
|
||||
box_scan_count_label->setFont(labelFont());
|
||||
box_scan_count_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Scan Interval
|
||||
//
|
||||
box_scan_interval_label=new QLabel(tr("Dropbox Scan Interval")+":",this);
|
||||
box_scan_interval_label->setFont(labelFont());
|
||||
box_scan_interval_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
box_scan_interval_spin=new QSpinBox(this);
|
||||
box_scan_interval_spin->setRange(5,60);
|
||||
box_scan_interval_spin->setSpecialValueText(tr("[default]"));
|
||||
box_scan_interval_unit=new QLabel(tr("seconds"),this);
|
||||
box_scan_interval_unit->setFont(labelFont());
|
||||
box_scan_interval_unit->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Ok Button
|
||||
//
|
||||
box_ok_button=new QPushButton(this);
|
||||
box_ok_button->setDefault(true);
|
||||
box_ok_button->setFont(buttonFont());
|
||||
box_ok_button->setText(tr("OK"));
|
||||
connect(box_ok_button,SIGNAL(clicked()),this,SLOT(okData()));
|
||||
|
||||
//
|
||||
// Cancel Button
|
||||
//
|
||||
box_cancel_button=new QPushButton(this);
|
||||
box_cancel_button->setFont(buttonFont());
|
||||
box_cancel_button->setText(tr("Cancel"));
|
||||
connect(box_cancel_button,SIGNAL(clicked()),this,SLOT(cancelData()));
|
||||
}
|
||||
|
||||
|
||||
QSize EditDropboxAdvanced::sizeHint() const
|
||||
{
|
||||
return QSize(350,110);
|
||||
}
|
||||
|
||||
|
||||
QSizePolicy EditDropboxAdvanced::sizePolicy() const
|
||||
{
|
||||
return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
|
||||
}
|
||||
|
||||
|
||||
int EditDropboxAdvanced::exec(RDDropbox *dropbox)
|
||||
{
|
||||
box_dropbox=dropbox;
|
||||
|
||||
setWindowTitle("RDAdmin - "+tr("Dropbox Advanced Settings")+" ["+
|
||||
tr("ID")+QString::asprintf(": %d]",dropbox->id()));
|
||||
box_scan_count_spin->setValue(dropbox->dropBoxScanCount());
|
||||
box_scan_interval_spin->setValue(dropbox->dropBoxScanInterval());
|
||||
|
||||
return QDialog::exec();
|
||||
}
|
||||
|
||||
|
||||
void EditDropboxAdvanced::okData()
|
||||
{
|
||||
box_dropbox->setDropBoxScanCount(box_scan_count_spin->value());
|
||||
box_dropbox->setDropBoxScanInterval(box_scan_interval_spin->value());
|
||||
done(true);
|
||||
}
|
||||
|
||||
|
||||
void EditDropboxAdvanced::cancelData()
|
||||
{
|
||||
done(false);
|
||||
}
|
||||
|
||||
|
||||
void EditDropboxAdvanced::resizeEvent(QResizeEvent *e)
|
||||
{
|
||||
int w=size().width();
|
||||
int h=size().height();
|
||||
|
||||
box_scan_count_label->setGeometry(10,3,150,20);
|
||||
box_scan_count_spin->setGeometry(215-50,3,80,20);
|
||||
|
||||
box_scan_interval_label->setGeometry(10,23,150,20);
|
||||
box_scan_interval_spin->setGeometry(215-50,23,80,20);
|
||||
box_scan_interval_unit->setGeometry(320-50-20,23,100,20);
|
||||
|
||||
box_ok_button->setGeometry(w-180,h-60,80,50);
|
||||
box_cancel_button->setGeometry(w-90,h-60,80,50);
|
||||
}
|
||||
60
rdadmin/edit_dropbox_advanced.h
Normal file
60
rdadmin/edit_dropbox_advanced.h
Normal file
@@ -0,0 +1,60 @@
|
||||
// edit_dropbox_advanced.h
|
||||
//
|
||||
// Edit a Rivendell Dropbox Configuration
|
||||
//
|
||||
// (C) Copyright 2002-2021 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
|
||||
// published by the Free Software Foundation.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public
|
||||
// License along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#ifndef EDIT_DROPBOX_ADVANCED_H
|
||||
#define EDIT_DROPBOX_ADVANCED_H
|
||||
|
||||
#include <QLabel>
|
||||
#include <QSpinBox>
|
||||
|
||||
#include <rddialog.h>
|
||||
#include <rddropbox.h>
|
||||
|
||||
class EditDropboxAdvanced : public RDDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EditDropboxAdvanced(QWidget *parent=0);
|
||||
QSize sizeHint() const;
|
||||
QSizePolicy sizePolicy() const;
|
||||
|
||||
public slots:
|
||||
int exec(RDDropbox *dropbox);
|
||||
|
||||
private slots:
|
||||
void okData();
|
||||
void cancelData();
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *e);
|
||||
|
||||
private:
|
||||
RDDropbox *box_dropbox;
|
||||
QLabel *box_scan_count_label;
|
||||
QSpinBox *box_scan_count_spin;
|
||||
QLabel *box_scan_interval_label;
|
||||
QSpinBox *box_scan_interval_spin;
|
||||
QLabel *box_scan_interval_unit;
|
||||
QPushButton *box_ok_button;
|
||||
QPushButton *box_cancel_button;
|
||||
};
|
||||
|
||||
|
||||
#endif // EDIT_DROPBOX_ADVANCED_H
|
||||
Reference in New Issue
Block a user