mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-12 07:42:35 +02:00
2018-02-06 Fred Gleason <fredg@paravelsystems.com>
* Refactored the RDExportSettingDialog class to use RDApplication.
This commit is contained in:
parent
bf38fd3c9f
commit
6c976c71d7
@ -16687,3 +16687,5 @@
|
||||
* Refactored the RDAudioInfo class to use RDApplication.
|
||||
2018-02-06 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Refactored the RDEditAudio class to use RDApplication.
|
||||
2018-02-06 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Refactored the RDExportSettingDialog class to use RDApplication.
|
||||
|
@ -1,8 +1,8 @@
|
||||
// rdexport_settings_dialog.cpp
|
||||
//
|
||||
// Edit RDLibrary Settings
|
||||
// Edit Audio Export Settings
|
||||
//
|
||||
// (C) Copyright 2002-2015 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2018 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,22 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include <qdialog.h>
|
||||
#include <qstring.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qlistbox.h>
|
||||
#include <qtextedit.h>
|
||||
#include <qevent.h>
|
||||
#include <qmessagebox.h>
|
||||
#include <qcheckbox.h>
|
||||
#include <qbuttongroup.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <rdexport_settings_dialog.h>
|
||||
#include <qbuttongroup.h>
|
||||
#include <qcheckbox.h>
|
||||
#include <qevent.h>
|
||||
#include <qmessagebox.h>
|
||||
#include <qpushbutton.h>
|
||||
|
||||
#include "rdapplication.h"
|
||||
#include "rdexport_settings_dialog.h"
|
||||
|
||||
RDExportSettingsDialog::RDExportSettingsDialog(RDSettings *settings,
|
||||
RDStation *station,
|
||||
QWidget *parent)
|
||||
: QDialog(parent,"",true)
|
||||
{
|
||||
lib_settings=settings;
|
||||
lib_station=station;
|
||||
|
||||
//
|
||||
// Generate Fonts
|
||||
@ -54,7 +49,7 @@ RDExportSettingsDialog::RDExportSettingsDialog(RDSettings *settings,
|
||||
//
|
||||
// Custom Encoders
|
||||
//
|
||||
lib_encoders=new RDEncoderList(station->name());
|
||||
lib_encoders=new RDEncoderList(rda->station()->name());
|
||||
|
||||
//
|
||||
// Default Format
|
||||
@ -141,7 +136,7 @@ RDExportSettingsDialog::RDExportSettingsDialog(RDSettings *settings,
|
||||
if(settings->format()==RDSettings::Pcm24) {
|
||||
lib_format_box->setCurrentItem(lib_format_box->count()-1);
|
||||
}
|
||||
if(station->haveCapability(RDStation::HaveFlac)) {
|
||||
if(rda->station()->haveCapability(RDStation::HaveFlac)) {
|
||||
lib_format_box->insertItem(tr("FLAC"));
|
||||
if(settings->format()==RDSettings::Flac) {
|
||||
lib_format_box->setCurrentItem(lib_format_box->count()-1);
|
||||
@ -151,13 +146,13 @@ RDExportSettingsDialog::RDExportSettingsDialog(RDSettings *settings,
|
||||
if(settings->format()==RDSettings::MpegL2) {
|
||||
lib_format_box->setCurrentItem(lib_format_box->count()-1);
|
||||
}
|
||||
if(station->haveCapability(RDStation::HaveLame)) {
|
||||
if(rda->station()->haveCapability(RDStation::HaveLame)) {
|
||||
lib_format_box->insertItem(tr("MPEG Layer 3"));
|
||||
if(settings->format()==RDSettings::MpegL3) {
|
||||
lib_format_box->setCurrentItem(lib_format_box->count()-1);
|
||||
}
|
||||
}
|
||||
if(station->haveCapability(RDStation::HaveOggenc)) {
|
||||
if(rda->station()->haveCapability(RDStation::HaveOggenc)) {
|
||||
lib_format_box->insertItem(tr("OggVorbis"));
|
||||
if(settings->format()==RDSettings::OggVorbis) {
|
||||
lib_format_box->setCurrentItem(lib_format_box->count()-1);
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Edit Rivendell Audio Settings
|
||||
//
|
||||
// (C) Copyright 2002-2015 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2018 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
|
||||
@ -22,22 +22,19 @@
|
||||
#define RDEXPORT_SETTINGS_DIALOG_H
|
||||
|
||||
#include <qdialog.h>
|
||||
#include <qsqldatabase.h>
|
||||
#include <qlineedit.h>
|
||||
#include <qcombobox.h>
|
||||
#include <qspinbox.h>
|
||||
#include <qlabel.h>
|
||||
|
||||
#include <rdsettings.h>
|
||||
#include <rdstation.h>
|
||||
#include <rdencoderlist.h>
|
||||
|
||||
class RDExportSettingsDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
RDExportSettingsDialog(RDSettings *settings,RDStation *station,
|
||||
QWidget *parent=0);
|
||||
RDExportSettingsDialog(RDSettings *settings,QWidget *parent=0);
|
||||
~RDExportSettingsDialog();
|
||||
QSize sizeHint() const;
|
||||
QSizePolicy sizePolicy() const;
|
||||
@ -55,7 +52,6 @@ class RDExportSettingsDialog : public QDialog
|
||||
RDSettings::Format GetFormat(QString str);
|
||||
RDEncoderList *lib_encoders;
|
||||
RDSettings *lib_settings;
|
||||
RDStation *lib_station;
|
||||
QComboBox *lib_format_box;
|
||||
QComboBox *lib_channels_box;
|
||||
QLabel *lib_bitrate_label;
|
||||
@ -66,5 +62,4 @@ class RDExportSettingsDialog : public QDialog
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif // RDEXPORT_SETTINGS_DIALOG_H
|
||||
|
@ -32,13 +32,13 @@
|
||||
#include <qcheckbox.h>
|
||||
#include <qpainter.h>
|
||||
|
||||
#include <rd.h>
|
||||
#include <rdapplication.h>
|
||||
#include <rdcart.h>
|
||||
#include <rdconf.h>
|
||||
#include <rdcut.h>
|
||||
#include <rdescape_string.h>
|
||||
#include <rdimport_audio.h>
|
||||
#include "rd.h"
|
||||
#include "rdapplication.h"
|
||||
#include "rdcart.h"
|
||||
#include "rdconf.h"
|
||||
#include "rdcut.h"
|
||||
#include "rdescape_string.h"
|
||||
#include "rdimport_audio.h"
|
||||
|
||||
RDImportAudio::RDImportAudio(QString cutname,QString *path,
|
||||
RDSettings *settings,bool *import_metadata,
|
||||
@ -456,7 +456,7 @@ void RDImportAudio::selectOutputFileData()
|
||||
void RDImportAudio::selectOutputFormatData()
|
||||
{
|
||||
RDExportSettingsDialog *dialog=
|
||||
new RDExportSettingsDialog(import_settings,rda->station(),this);
|
||||
new RDExportSettingsDialog(import_settings,this);
|
||||
dialog->exec();
|
||||
delete dialog;
|
||||
import_format_edit->setText(import_settings->description());
|
||||
|
@ -535,7 +535,7 @@ void EditFeed::purgeUsernameChangedData(const QString &username)
|
||||
void EditFeed::setFormatData()
|
||||
{
|
||||
RDExportSettingsDialog *dialog=
|
||||
new RDExportSettingsDialog(&feed_settings,rda->station(),this);
|
||||
new RDExportSettingsDialog(&feed_settings,this);
|
||||
dialog->exec();
|
||||
delete dialog;
|
||||
feed_format_edit->setText(feed_settings.description());
|
||||
|
@ -292,12 +292,9 @@ QSizePolicy EditReplicator::sizePolicy() const
|
||||
|
||||
void EditReplicator::setFormatData()
|
||||
{
|
||||
RDStation *station=new RDStation(rda->config()->stationName());
|
||||
RDExportSettingsDialog *dialog=
|
||||
new RDExportSettingsDialog(repl_settings,station,this);
|
||||
RDExportSettingsDialog *dialog=new RDExportSettingsDialog(repl_settings,this);
|
||||
dialog->exec();
|
||||
delete dialog;
|
||||
delete station;
|
||||
repl_format_edit->setText(repl_settings->description());
|
||||
}
|
||||
|
||||
|
@ -507,12 +507,10 @@ void EditUpload::selectCartData()
|
||||
|
||||
void EditUpload::setFormatData()
|
||||
{
|
||||
RDStation *station=new RDStation(edit_station_box->currentText());
|
||||
RDExportSettingsDialog *dialog=
|
||||
new RDExportSettingsDialog(&edit_settings,station,this);
|
||||
new RDExportSettingsDialog(&edit_settings,this);
|
||||
dialog->exec();
|
||||
delete dialog;
|
||||
delete station;
|
||||
edit_format_edit->setText(edit_settings.description());
|
||||
}
|
||||
|
||||
|
@ -680,7 +680,6 @@ void MainWidget::logDoubleclickedData(QListViewItem *,const QPoint &,int)
|
||||
|
||||
void MainWidget::quitMainWidget()
|
||||
{
|
||||
log_db->removeDatabase(rda->config()->mysqlDbname());
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,6 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
|
||||
#ifndef RDLOGEDIT_H
|
||||
#define RDLOGEDIT_H
|
||||
|
||||
@ -27,7 +26,6 @@
|
||||
#include <qmainwindow.h>
|
||||
#include <qsize.h>
|
||||
#include <qsizepolicy.h>
|
||||
#include <qsqldatabase.h>
|
||||
#include <qcheckbox.h>
|
||||
#include <qlineedit.h>
|
||||
#include <qlistview.h>
|
||||
@ -36,11 +34,8 @@
|
||||
#include <qcombobox.h>
|
||||
#include <qlabel.h>
|
||||
|
||||
#include <rdlibrary_conf.h>
|
||||
#include <rdlog_line.h>
|
||||
#include <rdlogfilter.h>
|
||||
#include <rdripc.h>
|
||||
#include <rduser.h>
|
||||
|
||||
#include "list_listviewitem.h"
|
||||
|
||||
@ -76,7 +71,7 @@ class MainWidget : public QMainWindow
|
||||
void RefreshList();
|
||||
unsigned SelectedLogs(std::vector<ListListViewItem *> *items,
|
||||
int *tracks=NULL) const;
|
||||
QSqlDatabase *log_db;
|
||||
// QSqlDatabase *log_db;
|
||||
QString log_filename;
|
||||
QString log_import_path;
|
||||
QLabel *log_user_label;
|
||||
|
@ -256,8 +256,7 @@ void RenderDialog::starttimeSourceData(int item)
|
||||
|
||||
void RenderDialog::audiosettingsData()
|
||||
{
|
||||
RDExportSettingsDialog *d=
|
||||
new RDExportSettingsDialog(render_settings,render_station);
|
||||
RDExportSettingsDialog *d=new RDExportSettingsDialog(render_settings);
|
||||
if(d->exec()==0) {
|
||||
render_audiosettings_edit->setText(render_settings->description());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user