mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-17 09:07:42 +02:00
2014-09-03 Fred Gleason <fredg@paravelsystems.com>
* Added an 'RDLiveWire::loadSettings()' method in 'lib/rdlivewire.cpp' and 'lib/rdlivewire.h'. * Fixed a bug in the 'Configure RDCatch' dialog that caused the 'Switcher Matrix' and 'Switcher Output' dropdowns to fail to be populated for a LiveWire LWRP Audio switcher device in 'rdadmin/edit_decks.cpp' and 'rdadmin/edit_decks.h'.
This commit is contained in:
parent
35b346fc59
commit
c3870ac28f
@ -14410,3 +14410,10 @@
|
||||
2014-09-03 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in 'rdlogedit/rdlogedit.cpp' that caused the
|
||||
'Select Cart' dialog to use a non-default font. [GitHub Issue #1].
|
||||
2014-09-03 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added an 'RDLiveWire::loadSettings()' method in 'lib/rdlivewire.cpp'
|
||||
and 'lib/rdlivewire.h'.
|
||||
* Fixed a bug in the 'Configure RDCatch' dialog that caused
|
||||
the 'Switcher Matrix' and 'Switcher Output' dropdowns to fail to
|
||||
be populated for a LiveWire LWRP Audio switcher device in
|
||||
'rdadmin/edit_decks.cpp' and 'rdadmin/edit_decks.h'.
|
||||
|
@ -22,7 +22,9 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <syslog.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <qsignalmapper.h>
|
||||
|
||||
#include <rd.h>
|
||||
@ -42,6 +44,7 @@ RDLiveWire::RDLiveWire(unsigned id,QObject *parent,const char *name)
|
||||
live_base_output=0;
|
||||
live_ptr=0;
|
||||
live_connected=false;
|
||||
live_load_ver_count=0;
|
||||
|
||||
//
|
||||
// Connection Socket
|
||||
@ -103,6 +106,24 @@ void RDLiveWire::connectToHost(const QString &hostname,Q_UINT16 port,
|
||||
}
|
||||
|
||||
|
||||
bool RDLiveWire::loadSettings(const QString &hostname,Q_UINT16 port,
|
||||
const QString &passwd,unsigned base_output)
|
||||
{
|
||||
int passes=50;
|
||||
|
||||
live_load_ver_count=1;
|
||||
connectToHost(hostname,port,passwd,base_output);
|
||||
while(--passes>0) {
|
||||
usleep(100000);
|
||||
qApp->processEvents();
|
||||
if(live_load_ver_count==0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
QString RDLiveWire::deviceName() const
|
||||
{
|
||||
return live_device_name;
|
||||
@ -593,6 +614,9 @@ void RDLiveWire::ReadVersion(const QString &cmd)
|
||||
live_connected=true;
|
||||
emit connected(live_id);
|
||||
}
|
||||
if(live_load_ver_count>0) {
|
||||
live_load_ver_count--;
|
||||
}
|
||||
if(live_watchdog_state) {
|
||||
live_watchdog_state=false;
|
||||
emit watchdogStateChanged(live_id,QString().sprintf(
|
||||
|
@ -49,6 +49,8 @@ class RDLiveWire : public QObject
|
||||
unsigned baseOutput();
|
||||
void connectToHost(const QString &hostname,Q_UINT16 port,
|
||||
const QString &passwd,unsigned base_output);
|
||||
bool loadSettings(const QString &hostname,Q_UINT16 port,
|
||||
const QString &passwd,unsigned base_output);
|
||||
QString deviceName() const;
|
||||
QString protocolVersion() const;
|
||||
QString systemVersion() const;
|
||||
@ -128,6 +130,7 @@ class RDLiveWire : public QObject
|
||||
QTimer *live_watchdog_timer;
|
||||
QTimer *live_watchdog_timeout_timer;
|
||||
QTimer *live_holdoff_timer;
|
||||
int live_load_ver_count;
|
||||
};
|
||||
|
||||
|
||||
|
@ -2,9 +2,7 @@
|
||||
//
|
||||
// Edit a Rivendell RDCatch Deck Configuration
|
||||
//
|
||||
// (C) Copyright 2002-2004 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// $Id: edit_decks.cpp,v 1.35.2.1 2012/11/28 18:49:36 cvs Exp $
|
||||
// (C) Copyright 2002-2004,2014 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
|
||||
@ -28,15 +26,19 @@
|
||||
#include <qmessagebox.h>
|
||||
#include <qcheckbox.h>
|
||||
#include <qbuttongroup.h>
|
||||
#include <qstringlist.h>
|
||||
|
||||
#include <rd.h>
|
||||
#include <rddb.h>
|
||||
#include <rdescape_string.h>
|
||||
#include <rdlivewire.h>
|
||||
#include <rdmatrix.h>
|
||||
|
||||
#include <edit_decks.h>
|
||||
|
||||
|
||||
EditDecks::EditDecks(RDStation *station,RDStation *cae_station,
|
||||
QWidget *parent,const char *name)
|
||||
: QDialog(parent,name,true)
|
||||
EditDecks::EditDecks(RDStation *station,RDStation *cae_station,QWidget *parent)
|
||||
: QDialog(parent,"",true)
|
||||
{
|
||||
//
|
||||
// Fix the Window Size
|
||||
@ -66,13 +68,12 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,
|
||||
//
|
||||
// Record Deck Selector
|
||||
//
|
||||
edit_record_deck_box=new QComboBox(this,"edit_record_deck_box");
|
||||
edit_record_deck_box=new QComboBox(this);
|
||||
edit_record_deck_box->setGeometry(140,10,60,24);
|
||||
edit_record_deck_box->setInsertionPolicy(QComboBox::NoInsertion);
|
||||
connect(edit_record_deck_box,SIGNAL(activated(int)),
|
||||
this,SLOT(recordDeckActivatedData(int)));
|
||||
QLabel *label=new QLabel(edit_record_deck_box,tr("Record Deck"),this,
|
||||
"edit_deck_label");
|
||||
QLabel *label=new QLabel(edit_record_deck_box,tr("Record Deck"),this);
|
||||
label->setFont(small_font);
|
||||
label->setGeometry(35,14,100,22);
|
||||
label->setAlignment(AlignRight);
|
||||
@ -80,14 +81,14 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,
|
||||
//
|
||||
// Settings Label
|
||||
//
|
||||
label=new QLabel(tr("Settings"),this,"settings_label");
|
||||
label=new QLabel(tr("Settings"),this);
|
||||
label->setGeometry(10,40,100,24);
|
||||
label->setFont(big_font);
|
||||
|
||||
//
|
||||
// Card Selector
|
||||
//
|
||||
edit_record_selector=new RDCardSelector(this,"edit_record_selector");
|
||||
edit_record_selector=new RDCardSelector(this);
|
||||
edit_record_selector->setGeometry(67,68,120,65);
|
||||
connect(edit_record_selector,SIGNAL(cardChanged(int)),
|
||||
this,SLOT(recordCardChangedData(int)));
|
||||
@ -95,37 +96,34 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,
|
||||
//
|
||||
// Monitor Port Selector
|
||||
//
|
||||
edit_monitor_box=new QSpinBox(this,"edit_monitor_box");
|
||||
edit_monitor_box=new QSpinBox(this);
|
||||
edit_monitor_box->setGeometry(127,112,50,19);
|
||||
edit_monitor_box->setRange(-1,RD_MAX_PORTS-1);
|
||||
edit_monitor_box->setSpecialValueText(tr("None"));
|
||||
connect(edit_monitor_box,SIGNAL(valueChanged(int)),
|
||||
this,SLOT(monitorPortChangedData(int)));
|
||||
edit_monitor_label=new QLabel(edit_monitor_box,tr("Monitor Port:"),this,
|
||||
"edit_monitor_label");
|
||||
edit_monitor_label=new QLabel(edit_monitor_box,tr("Monitor Port:"),this);
|
||||
edit_monitor_label->setGeometry(10,112,112,19);
|
||||
edit_monitor_label->setAlignment(AlignRight|AlignVCenter);
|
||||
|
||||
edit_default_on_box=new QComboBox(this,"edit_default_on_box");
|
||||
edit_default_on_box=new QComboBox(this);
|
||||
edit_default_on_box->setGeometry(305,112,60,19);
|
||||
edit_default_on_box->insertItem(tr("Off"));
|
||||
edit_default_on_box->insertItem(tr("On"));
|
||||
edit_default_on_label=new QLabel(edit_default_on_box,
|
||||
tr("Monitor defaults to"),
|
||||
this,"edit_default_on_label");
|
||||
edit_default_on_label=
|
||||
new QLabel(edit_default_on_box,tr("Monitor defaults to"),this);
|
||||
edit_default_on_label->setGeometry(195,112,105,19);
|
||||
edit_default_on_label->setAlignment(AlignRight|AlignVCenter);
|
||||
|
||||
//
|
||||
// Format
|
||||
//
|
||||
edit_format_box=new QComboBox(this,"edit_format_box");
|
||||
edit_format_box=new QComboBox(this);
|
||||
edit_format_box->setGeometry(125,136,150,24);
|
||||
edit_format_box->setInsertionPolicy(QComboBox::NoInsertion);
|
||||
connect(edit_format_box,SIGNAL(activated(int)),
|
||||
this,SLOT(formatActivatedData(int)));
|
||||
label=new QLabel(edit_format_box,tr("Format:"),this,
|
||||
"edit_format_label");
|
||||
label=new QLabel(edit_format_box,tr("Format:"),this);
|
||||
label->setGeometry(10,136,110,24);
|
||||
label->setAlignment(AlignRight|AlignVCenter);
|
||||
|
||||
@ -135,19 +133,17 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,
|
||||
edit_bitrate_box=new QComboBox(this,"edit_bitrate_box");
|
||||
edit_bitrate_box->setGeometry(125,160,140,24);
|
||||
edit_bitrate_box->setInsertionPolicy(QComboBox::NoInsertion);
|
||||
edit_bitrate_label=new QLabel(edit_bitrate_box,tr("Bit Rate:"),this,
|
||||
"edit_bitrate_label");
|
||||
edit_bitrate_label=new QLabel(edit_bitrate_box,tr("Bit Rate:"),this);
|
||||
edit_bitrate_label->setGeometry(10,160,110,24);
|
||||
edit_bitrate_label->setAlignment(AlignRight|AlignVCenter);
|
||||
|
||||
//
|
||||
// Switcher Station
|
||||
//
|
||||
edit_swstation_box=new QComboBox(this,"edit_swstation_box");
|
||||
edit_swstation_box=new QComboBox(this);
|
||||
edit_swstation_box->setGeometry(125,190,250,24);
|
||||
edit_swstation_box->setInsertionPolicy(QComboBox::NoInsertion);
|
||||
edit_swstation_label=new QLabel(edit_swstation_box,tr("Switcher Host:"),this,
|
||||
"edit_swstation_label");
|
||||
edit_swstation_label=new QLabel(edit_swstation_box,tr("Switcher Host:"),this);
|
||||
edit_swstation_label->setGeometry(10,190,110,24);
|
||||
edit_swstation_label->setAlignment(AlignRight|AlignVCenter);
|
||||
connect(edit_swstation_box,SIGNAL(activated(const QString &)),
|
||||
@ -156,12 +152,11 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,
|
||||
//
|
||||
// Switcher Matrix
|
||||
//
|
||||
edit_swmatrix_box=new QComboBox(this,"edit_swmatrix_box");
|
||||
edit_swmatrix_box=new QComboBox(this);
|
||||
edit_swmatrix_box->setGeometry(125,214,250,24);
|
||||
edit_swmatrix_box->setInsertionPolicy(QComboBox::NoInsertion);
|
||||
edit_swmatrix_box->setDisabled(true);
|
||||
edit_swmatrix_label=new QLabel(edit_swmatrix_box,tr("Switcher Matrix:"),this,
|
||||
"edit_swmatrix_label");
|
||||
edit_swmatrix_label=new QLabel(edit_swmatrix_box,tr("Switcher Matrix:"),this);
|
||||
edit_swmatrix_label->setGeometry(10,214,110,24);
|
||||
edit_swmatrix_label->setAlignment(AlignRight|AlignVCenter);
|
||||
edit_swmatrix_label->setDisabled(true);
|
||||
@ -171,12 +166,11 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,
|
||||
//
|
||||
// Switcher Output
|
||||
//
|
||||
edit_swoutput_box=new QComboBox(this,"edit_swoutput_box");
|
||||
edit_swoutput_box=new QComboBox(this);
|
||||
edit_swoutput_box->setGeometry(125,238,250,24);
|
||||
edit_swoutput_box->setInsertionPolicy(QComboBox::NoInsertion);
|
||||
edit_swoutput_box->setDisabled(true);
|
||||
edit_swoutput_label=new QLabel(edit_swoutput_box,tr("Switcher Output:"),this,
|
||||
"edit_swoutput_label");
|
||||
edit_swoutput_label=new QLabel(edit_swoutput_box,tr("Switcher Output:"),this);
|
||||
edit_swoutput_label->setGeometry(10,238,110,24);
|
||||
edit_swoutput_label->setAlignment(AlignRight|AlignVCenter);
|
||||
edit_swoutput_label->setDisabled(true);
|
||||
@ -184,17 +178,15 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,
|
||||
//
|
||||
// Switcher Delay
|
||||
//
|
||||
edit_swdelay_box=new QSpinBox(this,"edit_swdelay_box");
|
||||
edit_swdelay_box=new QSpinBox(this);
|
||||
edit_swdelay_box->setGeometry(125,262,40,24);
|
||||
edit_swdelay_box->setRange(0,20);
|
||||
edit_swdelay_box->setDisabled(true);
|
||||
edit_swdelay_label=new QLabel(edit_swdelay_box,tr("Switcher Delay:"),this,
|
||||
"edit_swdelay_label");
|
||||
edit_swdelay_label=new QLabel(edit_swdelay_box,tr("Switcher Delay:"),this);
|
||||
edit_swdelay_label->setGeometry(10,262,110,24);
|
||||
edit_swdelay_label->setAlignment(AlignRight|AlignVCenter);
|
||||
edit_swdelay_label->setDisabled(true);
|
||||
edit_swdelay_unit=new QLabel(edit_swdelay_box,tr("1/10 sec"),this,
|
||||
"edit_swdelay_unit");
|
||||
edit_swdelay_unit=new QLabel(edit_swdelay_box,tr("1/10 sec"),this);
|
||||
edit_swdelay_unit->setGeometry(170,262,60,24);
|
||||
edit_swdelay_unit->setAlignment(AlignLeft|AlignVCenter);
|
||||
edit_swdelay_unit->setDisabled(true);
|
||||
@ -205,57 +197,53 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,
|
||||
//
|
||||
// Defaults Label
|
||||
//
|
||||
label=new QLabel(tr("Defaults"),this,"settings_label");
|
||||
label=new QLabel(tr("Defaults"),this);
|
||||
label->setGeometry(10,276,100,24);
|
||||
label->setFont(big_font);
|
||||
|
||||
//
|
||||
// Default Channels
|
||||
//
|
||||
edit_channels_box=new QComboBox(this,"edit_channels_box");
|
||||
edit_channels_box=new QComboBox(this);
|
||||
edit_channels_box->setGeometry(125,300,60,24);
|
||||
edit_channels_box->setInsertionPolicy(QComboBox::NoInsertion);
|
||||
label=new QLabel(edit_channels_box,tr("Channels:"),this,
|
||||
"edit_channels_label");
|
||||
label=new QLabel(edit_channels_box,tr("Channels:"),this);
|
||||
label->setGeometry(10,300,110,24);
|
||||
label->setAlignment(AlignRight|AlignVCenter);
|
||||
|
||||
//
|
||||
// Default Autotrim Threshold
|
||||
//
|
||||
edit_threshold_box=new QSpinBox(this,"edit_threshold_box");
|
||||
edit_threshold_box=new QSpinBox(this);
|
||||
edit_threshold_box->setGeometry(125,324,70,24);
|
||||
edit_threshold_box->setSuffix(" dB");
|
||||
edit_threshold_box->setRange(-100,0);
|
||||
label=new QLabel(edit_threshold_box,tr("Trim Threshold:"),this,
|
||||
"edit_threshold_label");
|
||||
label=new QLabel(edit_threshold_box,tr("Trim Threshold:"),this);
|
||||
label->setGeometry(10,324,110,24);
|
||||
label->setAlignment(AlignRight|AlignVCenter);
|
||||
|
||||
//
|
||||
// Host-Wide Settings Label
|
||||
//
|
||||
label=new QLabel(tr("Host-Wide Settings"),this,"settings_label");
|
||||
label=new QLabel(tr("Host-Wide Settings"),this);
|
||||
label->setGeometry(10,369,200,24);
|
||||
label->setFont(big_font);
|
||||
|
||||
edit_errorrml_edit=new QLineEdit(this,"edit_errorrml_edit");
|
||||
edit_errorrml_edit=new QLineEdit(this);
|
||||
edit_errorrml_edit->setGeometry(125,393,248,24);
|
||||
label=new QLabel(edit_errorrml_edit,tr("Error RML:"),this,
|
||||
"edit_errorrml_label");
|
||||
label=new QLabel(edit_errorrml_edit,tr("Error RML:"),this);
|
||||
label->setGeometry(10,393,110,24);
|
||||
label->setAlignment(AlignRight|AlignVCenter);
|
||||
|
||||
//
|
||||
// Play Deck Selector
|
||||
//
|
||||
edit_play_deck_box=new QComboBox(this,"edit_record_deck_box");
|
||||
edit_play_deck_box=new QComboBox(this);
|
||||
edit_play_deck_box->setGeometry(475,10,60,24);
|
||||
edit_play_deck_box->setInsertionPolicy(QComboBox::NoInsertion);
|
||||
connect(edit_play_deck_box,SIGNAL(activated(int)),
|
||||
this,SLOT(playDeckActivatedData(int)));
|
||||
label=new QLabel(edit_play_deck_box,tr("Play Deck"),this,
|
||||
"edit_play_deck_label");
|
||||
label=new QLabel(edit_play_deck_box,tr("Play Deck"),this);
|
||||
label->setFont(small_font);
|
||||
label->setGeometry(390,14,80,22);
|
||||
label->setAlignment(AlignRight);
|
||||
@ -263,13 +251,13 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,
|
||||
//
|
||||
// Play Deck Card Selector
|
||||
//
|
||||
edit_play_selector=new RDCardSelector(this,"edit_play_selector");
|
||||
edit_play_selector=new RDCardSelector(this);
|
||||
edit_play_selector->setGeometry(387,42,120,10);
|
||||
|
||||
//
|
||||
// Close Button
|
||||
//
|
||||
QPushButton *close_button=new QPushButton(this,"close_button");
|
||||
QPushButton *close_button=new QPushButton(this);
|
||||
close_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,
|
||||
80,50);
|
||||
close_button->setFont(small_font);
|
||||
@ -420,9 +408,6 @@ void EditDecks::formatActivatedData(int index)
|
||||
|
||||
void EditDecks::stationActivatedData(const QString &str)
|
||||
{
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
|
||||
if(str=="[none]") {
|
||||
edit_swmatrix_label->setDisabled(true);
|
||||
edit_swmatrix_box->setDisabled(true);
|
||||
@ -442,15 +427,9 @@ void EditDecks::stationActivatedData(const QString &str)
|
||||
edit_swdelay_box->setEnabled(true);
|
||||
|
||||
edit_swmatrix_box->clear();
|
||||
sql=QString().sprintf("select NAME from MATRICES where \
|
||||
(STATION_NAME=\"%s\")&&(OUTPUTS>0)",
|
||||
(const char *)str);
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
edit_swmatrix_box->insertItem(q->value(0).toString());
|
||||
}
|
||||
edit_swmatrix_box->insertStringList(GetActiveOutputMatrices());
|
||||
|
||||
matrixActivatedData(edit_swmatrix_box->currentText());
|
||||
delete q;
|
||||
}
|
||||
|
||||
|
||||
@ -474,10 +453,10 @@ void EditDecks::matrixActivatedData(const QString &str)
|
||||
edit_swdelay_box->setEnabled(true);
|
||||
|
||||
edit_swoutput_box->clear();
|
||||
int matrix=GetMatrix();
|
||||
if(matrix<0) {
|
||||
if(edit_swmatrix_box->currentItem()>=(int)edit_matrix_ids.size()) {
|
||||
return;
|
||||
}
|
||||
int matrix=edit_matrix_ids[edit_swmatrix_box->currentItem()];
|
||||
sql=QString().sprintf("select NAME from OUTPUTS where \
|
||||
STATION_NAME=\"%s\"&&MATRIX=%d",
|
||||
(const char *)edit_swstation_box->currentText(),
|
||||
@ -675,18 +654,10 @@ void EditDecks::WriteRecord(int chan)
|
||||
|
||||
int EditDecks::GetMatrix()
|
||||
{
|
||||
int matrix=-1;
|
||||
|
||||
QString sql=QString().sprintf("select MATRIX from MATRICES where \
|
||||
(STATION_NAME=\"%s\")&&(NAME=\"%s\")",
|
||||
(const char *)edit_swstation_box->currentText(),
|
||||
(const char *)edit_swmatrix_box->currentText());
|
||||
RDSqlQuery *q=new RDSqlQuery(sql);
|
||||
if(q->first()) {
|
||||
matrix=q->value(0).toInt();
|
||||
if(edit_swmatrix_box->currentItem()<(int)edit_matrix_ids.size()) {
|
||||
return edit_matrix_ids[edit_swmatrix_box->currentItem()];
|
||||
}
|
||||
delete q;
|
||||
return matrix;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -707,3 +678,57 @@ int EditDecks::GetOutput()
|
||||
delete q;
|
||||
return output;
|
||||
}
|
||||
|
||||
|
||||
QStringList EditDecks::GetActiveOutputMatrices()
|
||||
{
|
||||
QStringList ret;
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
RDSqlQuery *q1;
|
||||
|
||||
edit_matrix_ids.clear();
|
||||
sql=QString("select TYPE,NAME,OUTPUTS,MATRIX from MATRICES where ")+
|
||||
"STATION_NAME=\""+RDEscapeString(edit_station->name())+"\"";
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
switch((RDMatrix::Type)q->value(0).toInt()) {
|
||||
case RDMatrix::LiveWireLwrpAudio:
|
||||
sql=QString("select HOSTNAME,PASSWORD,TCP_PORT,BASE_OUTPUT ")+
|
||||
"from SWITCHER_NODES "+
|
||||
"where (STATION_NAME=\""+RDEscapeString(edit_station->name())+"\")&& "+
|
||||
QString().sprintf("(MATRIX=%d) ",q->value(3).toInt())+
|
||||
"order by BASE_OUTPUT desc";
|
||||
q1=new RDSqlQuery(sql);
|
||||
if(q1->first()) {
|
||||
RDLiveWire *lw=new RDLiveWire(0,this);
|
||||
if(!lw->loadSettings(q1->value(0).toString(),q1->value(2).toUInt(),
|
||||
q1->value(1).toString(),q1->value(3).toInt())) {
|
||||
QMessageBox::warning(this,tr("RDAdmin - "+tr("Connection Error")),
|
||||
tr("Unable to connect to node at")+" \""+
|
||||
q1->value(0).toString()+"\"."+
|
||||
tr("Check that the unit is online and try again."));
|
||||
delete lw;
|
||||
return ret;
|
||||
}
|
||||
ret.push_back(q->value(1).toString()+
|
||||
" ["+RDMatrix::typeString((RDMatrix::Type)q->value(0).toInt())+"]");
|
||||
delete lw;
|
||||
edit_matrix_ids.push_back(q->value(3).toInt());
|
||||
}
|
||||
delete q1;
|
||||
break;
|
||||
|
||||
default:
|
||||
if(q->value(2).toInt()>0) {
|
||||
ret.push_back(q->value(1).toString()+
|
||||
" ["+RDMatrix::typeString((RDMatrix::Type)q->value(0).toInt())+"]");
|
||||
edit_matrix_ids.push_back(q->value(3).toInt());
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
delete q;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -23,6 +23,8 @@
|
||||
#ifndef EDIT_DECKS_H
|
||||
#define EDIT_DECKS_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <qdialog.h>
|
||||
#include <qsqldatabase.h>
|
||||
#include <qcombobox.h>
|
||||
@ -40,8 +42,7 @@ class EditDecks : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EditDecks(RDStation *station,RDStation *cae_station,
|
||||
QWidget *parent=0,const char *name=0);
|
||||
EditDecks(RDStation *station,RDStation *cae_station,QWidget *parent=0);
|
||||
~EditDecks();
|
||||
QSize sizeHint() const;
|
||||
QSizePolicy sizePolicy() const;
|
||||
@ -64,6 +65,7 @@ class EditDecks : public QDialog
|
||||
void WriteRecord(int chan);
|
||||
int GetMatrix();
|
||||
int GetOutput();
|
||||
QStringList GetActiveOutputMatrices();
|
||||
RDCatchConf *edit_catch_conf;
|
||||
RDDeck *edit_record_deck;
|
||||
RDDeck *edit_play_deck;
|
||||
@ -87,6 +89,7 @@ class EditDecks : public QDialog
|
||||
QComboBox *edit_swstation_box;
|
||||
QLabel *edit_swmatrix_label;
|
||||
QComboBox *edit_swmatrix_box;
|
||||
std::vector<int> edit_matrix_ids;
|
||||
QLabel *edit_swoutput_label;
|
||||
QComboBox *edit_swoutput_box;
|
||||
QLabel *edit_swdelay_label;
|
||||
|
@ -1104,6 +1104,18 @@ nastaveném pro běh služby CAE pro naplnění databáze se zdroji zvuku.</tran
|
||||
<source>Host-Wide Settings</source>
|
||||
<translation>Nastavení serveru-wide</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Connection Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to connect to node at</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Check that the unit is online and try again.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditDropbox</name>
|
||||
|
@ -1076,6 +1076,18 @@ configured to run the CAE service in order to populate the audio resources datab
|
||||
<source>Host-Wide Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Connection Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to connect to node at</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Check that the unit is online and try again.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditDropbox</name>
|
||||
|
@ -1098,6 +1098,18 @@ computador para obtener los recursos de audio de dicho equipo.</translation>
|
||||
<source>Host-Wide Settings</source>
|
||||
<translation>Parám. por equipo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Connection Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to connect to node at</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Check that the unit is online and try again.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditDropbox</name>
|
||||
|
@ -863,6 +863,18 @@ configured to run the CAE service in order to populate the audio resources datab
|
||||
<source>Host-Wide Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Connection Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to connect to node at</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Check that the unit is online and try again.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditDropbox</name>
|
||||
|
@ -1058,6 +1058,18 @@ configured to run the CAE service in order to populate the audio resources datab
|
||||
<source>Host-Wide Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Connection Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to connect to node at</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Check that the unit is online and try again.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditDropbox</name>
|
||||
|
@ -1058,6 +1058,18 @@ configured to run the CAE service in order to populate the audio resources datab
|
||||
<source>Host-Wide Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Connection Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to connect to node at</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Check that the unit is online and try again.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditDropbox</name>
|
||||
|
@ -1059,6 +1059,18 @@ configured to run the CAE service in order to populate the audio resources datab
|
||||
<source>Host-Wide Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Connection Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to connect to node at</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Check that the unit is online and try again.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditDropbox</name>
|
||||
|
@ -50,9 +50,8 @@
|
||||
extern RDStation *rdstation_conf;
|
||||
|
||||
|
||||
AddRecording::AddRecording(int id,QString *filter,
|
||||
QWidget *parent,const char *name)
|
||||
: QDialog(parent,name,true,Qt::WStyle_Customize|Qt::WStyle_DialogBorder)
|
||||
AddRecording::AddRecording(int id,QString *filter,QWidget *parent)
|
||||
: QDialog(parent,"",true,Qt::WStyle_Customize|Qt::WStyle_DialogBorder)
|
||||
{
|
||||
setCaption("");
|
||||
|
||||
@ -192,8 +191,7 @@ void AddRecording::closeEvent(QCloseEvent *e)
|
||||
|
||||
void AddRecording::recordingData()
|
||||
{
|
||||
EditRecording *recording=new EditRecording(add_id,NULL,add_filter,
|
||||
this,"recording");
|
||||
EditRecording *recording=new EditRecording(add_id,NULL,add_filter,this);
|
||||
if(recording->exec()<0) {
|
||||
delete recording;
|
||||
done(-1);
|
||||
@ -206,7 +204,7 @@ void AddRecording::recordingData()
|
||||
|
||||
void AddRecording::playoutData()
|
||||
{
|
||||
EditPlayout *playout=new EditPlayout(add_id,NULL,add_filter,this,"playout");
|
||||
EditPlayout *playout=new EditPlayout(add_id,NULL,add_filter,this);
|
||||
if(playout->exec()<0) {
|
||||
delete playout;
|
||||
done(-1);
|
||||
@ -220,7 +218,7 @@ void AddRecording::playoutData()
|
||||
void AddRecording::downloadData()
|
||||
{
|
||||
EditDownload *recording=
|
||||
new EditDownload(add_id,NULL,add_filter,this,"recording");
|
||||
new EditDownload(add_id,NULL,add_filter,this);
|
||||
if(recording->exec()<0) {
|
||||
delete recording;
|
||||
done(-1);
|
||||
@ -233,8 +231,7 @@ void AddRecording::downloadData()
|
||||
|
||||
void AddRecording::uploadData()
|
||||
{
|
||||
EditUpload *recording=new EditUpload(add_id,NULL,add_filter,
|
||||
this,"recording");
|
||||
EditUpload *recording=new EditUpload(add_id,NULL,add_filter,this);
|
||||
if(recording->exec()<0) {
|
||||
delete recording;
|
||||
done(-1);
|
||||
@ -247,7 +244,7 @@ void AddRecording::uploadData()
|
||||
|
||||
void AddRecording::macroData()
|
||||
{
|
||||
EditCartEvent *recording=new EditCartEvent(add_id,NULL,this,"recording");
|
||||
EditCartEvent *recording=new EditCartEvent(add_id,NULL,this);
|
||||
if(recording->exec()<0) {
|
||||
delete recording;
|
||||
done(-1);
|
||||
@ -260,7 +257,7 @@ void AddRecording::macroData()
|
||||
|
||||
void AddRecording::switchData()
|
||||
{
|
||||
EditSwitchEvent *recording=new EditSwitchEvent(add_id,NULL,this,"recording");
|
||||
EditSwitchEvent *recording=new EditSwitchEvent(add_id,NULL,this);
|
||||
if(recording->exec()<0) {
|
||||
delete recording;
|
||||
done(-1);
|
||||
|
@ -39,7 +39,7 @@ class AddRecording : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AddRecording(int id,QString *filter,QWidget *parent=0,const char *name=0);
|
||||
AddRecording(int id,QString *filter,QWidget *parent=0);
|
||||
~AddRecording();
|
||||
QSize sizeHint() const;
|
||||
QSizePolicy sizePolicy() const;
|
||||
|
@ -2,9 +2,7 @@
|
||||
//
|
||||
// Edit a Rivendell RDCatch Recording
|
||||
//
|
||||
// (C) Copyright 2002-2005 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// $Id: edit_recording.cpp,v 1.53 2012/02/13 19:26:16 cvs Exp $
|
||||
// (C) Copyright 2002-2005,2014 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
|
||||
@ -35,6 +33,7 @@
|
||||
#include <rd.h>
|
||||
#include <rdcut_dialog.h>
|
||||
#include <rdcut_path.h>
|
||||
#include <rdescape_string.h>
|
||||
#include <rdtextvalidator.h>
|
||||
#include <rdmatrix.h>
|
||||
|
||||
@ -43,8 +42,8 @@
|
||||
|
||||
|
||||
EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
QWidget *parent,const char *name)
|
||||
: QDialog(parent,name,true)
|
||||
QWidget *parent)
|
||||
: QDialog(parent,"",true)
|
||||
{
|
||||
QString temp;
|
||||
|
||||
@ -75,7 +74,7 @@ EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
//
|
||||
// Text Validator
|
||||
//
|
||||
RDTextValidator *validator=new RDTextValidator(this,"validator");
|
||||
RDTextValidator *validator=new RDTextValidator(this);
|
||||
|
||||
//
|
||||
// The Recording Record
|
||||
@ -85,7 +84,7 @@ EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
//
|
||||
// Active Button
|
||||
//
|
||||
edit_active_button=new QCheckBox(tr("Event Active"),this,"edit_active_button");
|
||||
edit_active_button=new QCheckBox(tr("Event Active"),this);
|
||||
edit_active_button->setGeometry(10,11,145,20);
|
||||
edit_active_button->setFont(label_font);
|
||||
|
||||
@ -94,8 +93,7 @@ EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
//
|
||||
edit_station_box=new QComboBox(this,"edit_station_box");
|
||||
edit_station_box->setGeometry(200,10,140,23);
|
||||
QLabel * label=new QLabel(edit_station_box,tr("Location:"),this,
|
||||
"edit_station_label");
|
||||
QLabel * label=new QLabel(edit_station_box,tr("Location:"),this);
|
||||
label->setGeometry(125,10,70,23);
|
||||
label->setFont(label_font);
|
||||
label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);
|
||||
@ -110,80 +108,74 @@ EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
connect(edit_starttype_group,SIGNAL(clicked(int)),
|
||||
this,SLOT(startTypeClickedData(int)));
|
||||
|
||||
label=new QLabel(tr("Start Parameters"),this,"start_params_label");
|
||||
label=new QLabel(tr("Start Parameters"),this);
|
||||
label->setGeometry(47,38,120,19);
|
||||
label->setFont(label_font);
|
||||
label->setAlignment(AlignHCenter|ShowPrefix);
|
||||
|
||||
QRadioButton *rbutton=new QRadioButton(tr("Use Hard Time"),this,"hard_button");
|
||||
QRadioButton *rbutton=new QRadioButton(tr("Use Hard Time"),this);
|
||||
rbutton->setGeometry(20,57,100,15);
|
||||
edit_starttype_group->insert(rbutton,RDRecording::HardStart);
|
||||
rbutton->setFont(day_font);
|
||||
|
||||
edit_starttime_edit=new QTimeEdit(this,"edit_starttime_edit");
|
||||
edit_starttime_edit=new QTimeEdit(this);
|
||||
edit_starttime_edit->setGeometry(235,53,80,20);
|
||||
edit_starttime_label=new QLabel(edit_starttime_edit,tr("Record Start Time:"),
|
||||
this,"edit_starttime_label");
|
||||
this);
|
||||
edit_starttime_label->setGeometry(125,57,105,15);
|
||||
edit_starttime_label->setFont(day_font);
|
||||
edit_starttime_label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);
|
||||
|
||||
rbutton=new QRadioButton(tr("Use GPI"),this,"gpi_button");
|
||||
rbutton=new QRadioButton(tr("Use GPI"),this);
|
||||
rbutton->setGeometry(20,81,100,15);
|
||||
rbutton->setFont(day_font);
|
||||
|
||||
edit_start_startwindow_edit=
|
||||
new QTimeEdit(this,"edit_start_startwindow_edit");
|
||||
edit_start_startwindow_edit=new QTimeEdit(this);
|
||||
edit_start_startwindow_edit->setGeometry(235,77,80,20);
|
||||
edit_start_startwindow_label=
|
||||
new QLabel(edit_start_startwindow_edit,tr("Window Start Time:"),
|
||||
this,"edit_start_startwindow_label");
|
||||
new QLabel(edit_start_startwindow_edit,tr("Window Start Time:"),this);
|
||||
edit_start_startwindow_label->setGeometry(125,81,105,15);
|
||||
edit_start_startwindow_label->setFont(day_font);
|
||||
edit_start_startwindow_label->
|
||||
setAlignment(AlignRight|AlignVCenter|ShowPrefix);
|
||||
|
||||
edit_start_endwindow_edit=
|
||||
new QTimeEdit(this,"edit_start_endwindow_edit");
|
||||
edit_start_endwindow_edit=new QTimeEdit(this);
|
||||
edit_start_endwindow_edit->setGeometry(435,77,80,20);
|
||||
edit_start_endwindow_label=
|
||||
new QLabel(edit_start_endwindow_edit,"Window End Time:",
|
||||
this,"edit_start_endwindow_label");
|
||||
new QLabel(edit_start_endwindow_edit,"Window End Time:",this);
|
||||
edit_start_endwindow_label->setGeometry(325,81,105,15);
|
||||
edit_start_endwindow_label->setFont(day_font);
|
||||
edit_start_endwindow_label->
|
||||
setAlignment(AlignRight|AlignVCenter|ShowPrefix);
|
||||
|
||||
edit_startmatrix_spin=new QSpinBox(this,"edit_startmatrix_spin");
|
||||
edit_startmatrix_spin=new QSpinBox(this);
|
||||
edit_startmatrix_spin->setGeometry(185,99,30,20);
|
||||
edit_startmatrix_spin->setRange(0,MAX_MATRICES-1);
|
||||
edit_startmatrix_label=new QLabel(edit_startmatrix_spin,tr("GPI Matrix:"),
|
||||
this,"edit_startmatrix_label");
|
||||
edit_startmatrix_label=
|
||||
new QLabel(edit_startmatrix_spin,tr("GPI Matrix:"),this);
|
||||
edit_startmatrix_label->setGeometry(100,100,80,20);
|
||||
edit_startmatrix_label->setFont(day_font);
|
||||
edit_startmatrix_label->setAlignment(AlignRight|AlignVCenter);
|
||||
|
||||
edit_startline_spin=new QSpinBox(this,"edit_startline_spin");
|
||||
edit_startline_spin=new QSpinBox(this);
|
||||
edit_startline_spin->setGeometry(295,99,30,20);
|
||||
edit_startline_spin->setRange(1,MAX_GPIO_PINS);
|
||||
edit_startline_label=new QLabel(edit_startline_spin,tr("GPI Line:"),
|
||||
this,"edit_startline_label");
|
||||
edit_startline_label=new QLabel(edit_startline_spin,tr("GPI Line:"),this);
|
||||
edit_startline_label->setGeometry(230,100,60,20);
|
||||
edit_startline_label->setFont(day_font);
|
||||
edit_startline_label->setAlignment(AlignRight|AlignVCenter);
|
||||
|
||||
edit_startoffset_edit=
|
||||
new QTimeEdit(this,"edit_startoffset_edit");
|
||||
edit_startoffset_edit=new QTimeEdit(this);
|
||||
edit_startoffset_edit->setGeometry(435,99,80,20);
|
||||
edit_startoffset_label=
|
||||
new QLabel(edit_startoffset_edit,tr("Start Delay:"),
|
||||
this,"edit_startoffset_label");
|
||||
new QLabel(edit_startoffset_edit,tr("Start Delay:"),this);
|
||||
edit_startoffset_label->setGeometry(325,100,105,20);
|
||||
edit_startoffset_label->setFont(day_font);
|
||||
edit_startoffset_label->
|
||||
setAlignment(AlignRight|AlignVCenter|ShowPrefix);
|
||||
|
||||
edit_multirec_box=new QCheckBox(tr("Allow Multiple Recordings within this Window"),this,"edit_multirec_box");
|
||||
edit_multirec_box=
|
||||
new QCheckBox(tr("Allow Multiple Recordings within this Window"),this);
|
||||
edit_multirec_box->setGeometry(140,124,sizeHint().width()-170,15);
|
||||
edit_multirec_box->setFont(day_font);
|
||||
|
||||
@ -192,36 +184,34 @@ EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
//
|
||||
// End Parameters
|
||||
//
|
||||
edit_endtype_group=new QButtonGroup(this,"edit_endtype_group");
|
||||
edit_endtype_group=new QButtonGroup(this);
|
||||
edit_endtype_group->setGeometry(10,171,sizeHint().width()-20,104);
|
||||
connect(edit_endtype_group,SIGNAL(clicked(int)),
|
||||
this,SLOT(endTypeClickedData(int)));
|
||||
|
||||
label=new QLabel(tr("End Parameters"),this,"end_params_label");
|
||||
label=new QLabel(tr("End Parameters"),this);
|
||||
label->setGeometry(47,162,120,19);
|
||||
label->setFont(label_font);
|
||||
label->setAlignment(AlignHCenter|ShowPrefix);
|
||||
|
||||
rbutton=new QRadioButton(tr("Use Length"),this,"length_button");
|
||||
rbutton=new QRadioButton(tr("Use Length"),this);
|
||||
rbutton->setGeometry(20,205,100,15);
|
||||
edit_endtype_group->insert(rbutton,RDRecording::LengthEnd);
|
||||
rbutton->setFont(day_font);
|
||||
edit_endlength_edit=new QTimeEdit(this,"edit_endlength_edit");
|
||||
edit_endlength_edit=new QTimeEdit(this);
|
||||
edit_endlength_edit->setGeometry(235,201,80,20);
|
||||
edit_endlength_label=new QLabel(tr("Record Length:"),
|
||||
this,"edit_endlength_label");
|
||||
edit_endlength_label=new QLabel(tr("Record Length:"),this);
|
||||
edit_endlength_label->setGeometry(125,205,105,15);
|
||||
edit_endlength_label->setFont(day_font);
|
||||
edit_endlength_label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);
|
||||
|
||||
rbutton=new QRadioButton(tr("Use Hard Time"),this,"hard_button");
|
||||
rbutton=new QRadioButton(tr("Use Hard Time"),this);
|
||||
rbutton->setGeometry(20,181,1100,15);
|
||||
edit_endtype_group->insert(rbutton,RDRecording::HardEnd);
|
||||
rbutton->setFont(day_font);
|
||||
edit_endtime_edit=new QTimeEdit(this,"edit_endtime_edit");
|
||||
edit_endtime_edit=new QTimeEdit(this);
|
||||
edit_endtime_edit->setGeometry(235,177,80,20);
|
||||
edit_endtime_label=new QLabel(edit_endtime_edit,tr("Record End Time:"),
|
||||
this,"edit_endtime_label");
|
||||
edit_endtime_label=new QLabel(edit_endtime_edit,tr("Record End Time:"),this);
|
||||
edit_endtime_label->setGeometry(125,177,105,15);
|
||||
edit_endtime_label->setFont(day_font);
|
||||
edit_endtime_label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);
|
||||
@ -229,52 +219,44 @@ EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
rbutton=new QRadioButton(tr("Use GPI"),this,"gpi_button");
|
||||
rbutton->setGeometry(20,229,100,15);
|
||||
rbutton->setFont(day_font);
|
||||
edit_end_startwindow_edit=
|
||||
new QTimeEdit(this,"edit_end_startwindow_edit");
|
||||
edit_end_startwindow_edit=new QTimeEdit(this);
|
||||
edit_end_startwindow_edit->setGeometry(235,225,80,20);
|
||||
edit_end_startwindow_label=
|
||||
new QLabel(edit_end_startwindow_edit,tr("Window Start Time:"),
|
||||
this,"edit_end_startwindow_label");
|
||||
new QLabel(edit_end_startwindow_edit,tr("Window Start Time:"),this);
|
||||
edit_end_startwindow_label->setGeometry(125,229,105,15);
|
||||
edit_end_startwindow_label->setFont(day_font);
|
||||
edit_end_startwindow_label->
|
||||
setAlignment(AlignRight|AlignVCenter|ShowPrefix);
|
||||
|
||||
edit_end_endwindow_edit=
|
||||
new QTimeEdit(this,"edit_end_endwindow_edit");
|
||||
edit_end_endwindow_edit=new QTimeEdit(this);
|
||||
edit_end_endwindow_edit->setGeometry(435,225,80,20);
|
||||
edit_end_endwindow_label=
|
||||
new QLabel(edit_end_endwindow_edit,tr("Window End Time:"),
|
||||
this,"edit_end_endwindow_label");
|
||||
new QLabel(edit_end_endwindow_edit,tr("Window End Time:"),this);
|
||||
edit_end_endwindow_label->setGeometry(325,229,105,15);
|
||||
edit_end_endwindow_label->setFont(day_font);
|
||||
edit_end_endwindow_label->
|
||||
setAlignment(AlignRight|AlignVCenter|ShowPrefix);
|
||||
|
||||
edit_endmatrix_spin=new QSpinBox(this,"edit_endmatrix_spin");
|
||||
edit_endmatrix_spin=new QSpinBox(this);
|
||||
edit_endmatrix_spin->setGeometry(185,247,30,20);
|
||||
edit_endmatrix_spin->setRange(0,MAX_MATRICES-1);
|
||||
edit_endmatrix_label=new QLabel(edit_endmatrix_spin,tr("GPI Matrix:"),
|
||||
this,"edit_endmatrix_label");
|
||||
edit_endmatrix_label=new QLabel(edit_endmatrix_spin,tr("GPI Matrix:"),this);
|
||||
edit_endmatrix_label->setGeometry(100,248,80,20);
|
||||
edit_endmatrix_label->setFont(day_font);
|
||||
edit_endmatrix_label->setAlignment(AlignRight|AlignVCenter);
|
||||
|
||||
edit_endline_spin=new QSpinBox(this,"edit_endline_spin");
|
||||
edit_endline_spin=new QSpinBox(this);
|
||||
edit_endline_spin->setGeometry(295,247,30,20);
|
||||
edit_endline_spin->setRange(1,MAX_GPIO_PINS);
|
||||
edit_endline_label=new QLabel(edit_endline_spin,tr("GPI Line:"),
|
||||
this,"edit_endline_label");
|
||||
edit_endline_label=new QLabel(edit_endline_spin,tr("GPI Line:"),this);
|
||||
edit_endline_label->setGeometry(230,248,60,20);
|
||||
edit_endline_label->setFont(day_font);
|
||||
edit_endline_label->setAlignment(AlignRight|AlignVCenter);
|
||||
|
||||
edit_maxlength_edit=
|
||||
new QTimeEdit(this,"edit_maxlength_edit");
|
||||
edit_maxlength_edit=new QTimeEdit(this);
|
||||
edit_maxlength_edit->setGeometry(435,247,80,20);
|
||||
edit_maxlength_label=
|
||||
new QLabel(edit_maxlength_edit,tr("Max Record Length:"),
|
||||
this,"edit_maxlength_label");
|
||||
new QLabel(edit_maxlength_edit,tr("Max Record Length:"),this);
|
||||
edit_maxlength_label->setGeometry(325,248,105,20);
|
||||
edit_maxlength_label->setFont(day_font);
|
||||
edit_maxlength_label->
|
||||
@ -285,11 +267,10 @@ EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
//
|
||||
// Description
|
||||
//
|
||||
edit_description_edit=new QLineEdit(this,"edit_description_edit");
|
||||
edit_description_edit=new QLineEdit(this);
|
||||
edit_description_edit->setGeometry(105,291,sizeHint().width()-115,20);
|
||||
edit_description_edit->setValidator(validator);
|
||||
label=new QLabel(edit_description_edit,
|
||||
tr("Description:"),this,"edit_description_label");
|
||||
label=new QLabel(edit_description_edit,tr("Description:"),this);
|
||||
label->setGeometry(10,291,90,20);
|
||||
label->setFont(label_font);
|
||||
label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);
|
||||
@ -297,10 +278,9 @@ EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
//
|
||||
// Source Name
|
||||
//
|
||||
edit_source_box=new QComboBox(this,"edit_source_box");
|
||||
edit_source_box=new QComboBox(this);
|
||||
edit_source_box->setGeometry(105,317,sizeHint().width()-115,24);
|
||||
label=new QLabel(edit_source_box,
|
||||
tr("Source:"),this,"edit_source_label");
|
||||
label=new QLabel(edit_source_box,tr("Source:"),this);
|
||||
label->setGeometry(10,317,90,24);
|
||||
label->setFont(label_font);
|
||||
label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);
|
||||
@ -308,15 +288,14 @@ EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
//
|
||||
// Destination
|
||||
//
|
||||
edit_destination_edit=new QLineEdit(this,"edit_destination_edit");
|
||||
edit_destination_edit=new QLineEdit(this);
|
||||
edit_destination_edit->setGeometry(105,345,sizeHint().width()-185,20);
|
||||
edit_destination_edit->setReadOnly(true);
|
||||
label=new QLabel(edit_destination_edit,
|
||||
tr("Destination:"),this,"edit_destination_label");
|
||||
label=new QLabel(edit_destination_edit,tr("Destination:"),this);
|
||||
label->setGeometry(10,345,90,20);
|
||||
label->setFont(label_font);
|
||||
label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);
|
||||
QPushButton *button=new QPushButton(this,"destination_button");
|
||||
QPushButton *button=new QPushButton(this);
|
||||
button->setGeometry(sizeHint().width()-70,344,60,24);
|
||||
button->setFont(day_font);
|
||||
button->setText(tr("&Select"));
|
||||
@ -325,12 +304,11 @@ EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
//
|
||||
// Channels
|
||||
//
|
||||
edit_channels_box=new QComboBox(this,"edit_channels_box");
|
||||
edit_channels_box=new QComboBox(this);
|
||||
edit_channels_box->setGeometry(190,370,40,20);
|
||||
edit_channels_box->insertItem("1");
|
||||
edit_channels_box->insertItem("2");
|
||||
label=
|
||||
new QLabel(edit_channels_box,tr("Channels:"),this,"edit_channels_label");
|
||||
label=new QLabel(edit_channels_box,tr("Channels:"),this);
|
||||
label->setGeometry(120,370,70,20);
|
||||
label->setFont(label_font);
|
||||
label->setAlignment(AlignVCenter|AlignLeft);
|
||||
@ -338,21 +316,21 @@ EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
//
|
||||
// Autotrim Controls
|
||||
//
|
||||
edit_autotrim_box=new QCheckBox(tr("Autotrim"),this,"edit_autotrim_box");
|
||||
edit_autotrim_box=new QCheckBox(tr("Autotrim"),this);
|
||||
edit_autotrim_box->setGeometry(120,395,100,15);
|
||||
edit_autotrim_box->setFont(label_font);
|
||||
connect(edit_autotrim_box,SIGNAL(toggled(bool)),
|
||||
this,SLOT(autotrimToggledData(bool)));
|
||||
edit_autotrim_spin=new QSpinBox(this,"edit_autotrim_spin");
|
||||
edit_autotrim_spin=new QSpinBox(this);
|
||||
edit_autotrim_spin->setGeometry(265,393,40,20);
|
||||
edit_autotrim_spin->setRange(-99,-1);
|
||||
edit_autotrim_label=
|
||||
new QLabel(edit_autotrim_spin,tr("Level:"),this,"edit_autotrim_label");
|
||||
new QLabel(edit_autotrim_spin,tr("Level:"),this);
|
||||
edit_autotrim_label->setGeometry(220,393,40,20);
|
||||
edit_autotrim_label->setFont(label_font);
|
||||
edit_autotrim_label->setAlignment(AlignVCenter|AlignRight);
|
||||
edit_autotrim_unit=
|
||||
new QLabel(edit_autotrim_spin,tr("dBFS"),this,"edit_autotrim_unit");
|
||||
new QLabel(edit_autotrim_spin,tr("dBFS"),this);
|
||||
edit_autotrim_unit->setGeometry(310,393,40,20);
|
||||
edit_autotrim_unit->setFont(label_font);
|
||||
edit_autotrim_unit->setAlignment(AlignVCenter|AlignLeft);
|
||||
@ -360,21 +338,21 @@ EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
//
|
||||
// Normalize Controls
|
||||
//
|
||||
edit_normalize_box=new QCheckBox(tr("Normalize"),this,"edit_normalize_box");
|
||||
edit_normalize_box=new QCheckBox(tr("Normalize"),this);
|
||||
edit_normalize_box->setGeometry(120,420,100,15);
|
||||
connect(edit_normalize_box,SIGNAL(toggled(bool)),
|
||||
this,SLOT(normalizeToggledData(bool)));
|
||||
edit_normalize_box->setFont(label_font);
|
||||
edit_normalize_spin=new QSpinBox(this,"edit_normalize_spin");
|
||||
edit_normalize_spin=new QSpinBox(this);
|
||||
edit_normalize_spin->setGeometry(265,418,40,20);
|
||||
edit_normalize_spin->setRange(-99,-1);
|
||||
edit_normalize_label=
|
||||
new QLabel(edit_normalize_spin,tr("Level:"),this,"edit_normalize_label");
|
||||
new QLabel(edit_normalize_spin,tr("Level:"),this);
|
||||
edit_normalize_label->setGeometry(220,418,40,20);
|
||||
edit_normalize_label->setFont(label_font);
|
||||
edit_normalize_label->setAlignment(AlignVCenter|AlignRight);
|
||||
edit_normalize_unit=
|
||||
new QLabel(edit_normalize_spin,tr("dBFS"),this,"edit_normalize_unit");
|
||||
new QLabel(edit_normalize_spin,tr("dBFS"),this);
|
||||
edit_normalize_unit->setGeometry(310,418,40,20);
|
||||
edit_normalize_unit->setFont(label_font);
|
||||
edit_normalize_unit->setAlignment(AlignVCenter|AlignLeft);
|
||||
@ -382,7 +360,7 @@ EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
//
|
||||
// Button Label
|
||||
//
|
||||
label=new QLabel(tr("Active Days"),this,"active_days_label");
|
||||
label=new QLabel(tr("Active Days"),this);
|
||||
label->setGeometry(47,440,90,19);
|
||||
label->setFont(label_font);
|
||||
label->setAlignment(AlignHCenter|ShowPrefix);
|
||||
@ -390,61 +368,60 @@ EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
//
|
||||
// Monday Button
|
||||
//
|
||||
edit_mon_button=new QCheckBox(tr("Monday"),this,"edit_mon_button");
|
||||
edit_mon_button=new QCheckBox(tr("Monday"),this);
|
||||
edit_mon_button->setGeometry(20,459,135,20);
|
||||
edit_mon_button->setFont(day_font);
|
||||
|
||||
//
|
||||
// Tuesday Button
|
||||
//
|
||||
edit_tue_button=new QCheckBox(tr("Tuesday"),this,"edit_tue_button");
|
||||
edit_tue_button=new QCheckBox(tr("Tuesday"),this);
|
||||
edit_tue_button->setGeometry(115,459,135,20);
|
||||
edit_tue_button->setFont(day_font);
|
||||
|
||||
//
|
||||
// Wednesday Button
|
||||
//
|
||||
edit_wed_button=new QCheckBox(tr("Wednesday"),this,"edit_wed_button");
|
||||
edit_wed_button=new QCheckBox(tr("Wednesday"),this);
|
||||
edit_wed_button->setGeometry(215,459,135,20);
|
||||
edit_wed_button->setFont(day_font);
|
||||
|
||||
//
|
||||
// Thursday Button
|
||||
//
|
||||
edit_thu_button=new QCheckBox(tr("Thursday"),this,"edit_thu_button");
|
||||
edit_thu_button=new QCheckBox(tr("Thursday"),this);
|
||||
edit_thu_button->setGeometry(335,459,135,20);
|
||||
edit_thu_button->setFont(day_font);
|
||||
|
||||
//
|
||||
// Friday Button
|
||||
//
|
||||
edit_fri_button=new QCheckBox(tr("Friday"),this,"edit_fri_button");
|
||||
edit_fri_button=new QCheckBox(tr("Friday"),this);
|
||||
edit_fri_button->setGeometry(440,459,135,20);
|
||||
edit_fri_button->setFont(day_font);
|
||||
|
||||
//
|
||||
// Saturday Button
|
||||
//
|
||||
edit_sat_button=new QCheckBox(tr("Saturday"),this,"edit_sat_button");
|
||||
edit_sat_button=new QCheckBox(tr("Saturday"),this);
|
||||
edit_sat_button->setGeometry(130,484,80,20);
|
||||
edit_sat_button->setFont(day_font);
|
||||
|
||||
//
|
||||
// Sunday Button
|
||||
//
|
||||
edit_sun_button=new QCheckBox(tr("Sunday"),this,"edit_sun_button");
|
||||
edit_sun_button=new QCheckBox(tr("Sunday"),this);
|
||||
edit_sun_button->setGeometry(300,484,80,20);
|
||||
edit_sun_button->setFont(day_font);
|
||||
|
||||
//
|
||||
// Start Date Offset
|
||||
//
|
||||
edit_startoffset_box=new QSpinBox(this,"edit_startoffset_box");
|
||||
edit_startoffset_box=new QSpinBox(this);
|
||||
edit_startoffset_box->setGeometry(140,516,55,24);
|
||||
edit_startoffset_box->setRange(0,355);
|
||||
edit_startoffset_box->setSpecialValueText(tr("None"));
|
||||
label=new QLabel(edit_startoffset_box,
|
||||
tr("Start Date Offset:"),this,"edit_startoffset_label");
|
||||
label=new QLabel(edit_startoffset_box,tr("Start Date Offset:"),this);
|
||||
label->setGeometry(10,516,125,24);
|
||||
label->setFont(label_font);
|
||||
label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);
|
||||
@ -452,12 +429,11 @@ EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
//
|
||||
// End Date Offset
|
||||
//
|
||||
edit_endoffset_box=new QSpinBox(this,"edit_endoffset_box");
|
||||
edit_endoffset_box=new QSpinBox(this);
|
||||
edit_endoffset_box->setGeometry(440,516,55,24);
|
||||
edit_endoffset_box->setRange(0,355);
|
||||
edit_endoffset_box->setSpecialValueText(tr("None"));
|
||||
label=new QLabel(edit_endoffset_box,
|
||||
tr("End Date Offset:"),this,"edit_endoffset_label");
|
||||
label=new QLabel(edit_endoffset_box,tr("End Date Offset:"),this);
|
||||
label->setGeometry(310,516,125,24);
|
||||
label->setFont(label_font);
|
||||
label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);
|
||||
@ -465,14 +441,14 @@ EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
//
|
||||
// OneShot Button
|
||||
//
|
||||
edit_oneshot_box=new QCheckBox(tr("Make OneShot"),this,"edit_oneshot_box");
|
||||
edit_oneshot_box=new QCheckBox(tr("Make OneShot"),this);
|
||||
edit_oneshot_box->setGeometry(20,553,125,15);
|
||||
edit_oneshot_box->setFont(label_font);
|
||||
|
||||
//
|
||||
// Save As Button
|
||||
//
|
||||
button=new QPushButton(this,"saveas_button");
|
||||
button=new QPushButton(this);
|
||||
button->setGeometry(sizeHint().width()-300,sizeHint().height()-60,80,50);
|
||||
button->setFont(button_font);
|
||||
button->setText(tr("&Save As\nNew"));
|
||||
@ -484,7 +460,7 @@ EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
//
|
||||
// Ok Button
|
||||
//
|
||||
button=new QPushButton(this,"ok_button");
|
||||
button=new QPushButton(this);
|
||||
button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50);
|
||||
button->setDefault(true);
|
||||
button->setFont(button_font);
|
||||
@ -494,7 +470,7 @@ EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
//
|
||||
// Cancel Button
|
||||
//
|
||||
button=new QPushButton(this,"cancel_button");
|
||||
button=new QPushButton(this);
|
||||
button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50);
|
||||
button->setFont(button_font);
|
||||
button->setText(tr("&Cancel"));
|
||||
@ -626,6 +602,7 @@ void EditRecording::activateStationData(int id,bool use_temp)
|
||||
char station[65];
|
||||
char gunk[3];
|
||||
int chan;
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
|
||||
if(edit_station_box->currentText().isEmpty()) {
|
||||
@ -642,10 +619,11 @@ void EditRecording::activateStationData(int id,bool use_temp)
|
||||
edit_channels_box->setCurrentItem(edit_deck->defaultChannels()-1);
|
||||
}
|
||||
edit_source_box->clear();
|
||||
q=new RDSqlQuery(QString().sprintf("select NAME from INPUTS where \
|
||||
(STATION_NAME=\"%s\")&&(MATRIX=%d)",
|
||||
(const char *)edit_deck->switchStation(),
|
||||
edit_deck->switchMatrix()));
|
||||
sql=QString("select NAME from INPUTS where ")+
|
||||
"(STATION_NAME=\""+RDEscapeString(edit_deck->switchStation())+"\")&&"+
|
||||
QString().sprintf("(MATRIX=%d)",edit_deck->switchMatrix());
|
||||
q=new RDSqlQuery(sql);
|
||||
|
||||
while(q->next()) {
|
||||
edit_source_box->insertItem(q->value(0).toString());
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ class EditRecording : public QDialog
|
||||
Q_OBJECT
|
||||
public:
|
||||
EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
QWidget *parent=0,const char *name=0);
|
||||
QWidget *parent=0);
|
||||
~EditRecording();
|
||||
QSize sizeHint() const;
|
||||
QSizePolicy sizePolicy() const;
|
||||
|
@ -693,7 +693,7 @@ void MainWidget::addData()
|
||||
}
|
||||
EnableScroll(false);
|
||||
int n=AddRecord();
|
||||
AddRecording *recording=new AddRecording(n,&catch_filter,this,"recording");
|
||||
AddRecording *recording=new AddRecording(n,&catch_filter,this);
|
||||
switch((RDRecording::Type)recording->exec()) {
|
||||
case RDRecording::Recording:
|
||||
case RDRecording::Playout:
|
||||
@ -768,8 +768,7 @@ void MainWidget::editData()
|
||||
}
|
||||
switch((RDRecording::Type)item->text(29).toInt()) {
|
||||
case RDRecording::Recording:
|
||||
recording=new EditRecording(id,&new_events,&catch_filter,
|
||||
this,"recording");
|
||||
recording=new EditRecording(id,&new_events,&catch_filter,this);
|
||||
if(recording->exec()>=0) {
|
||||
RefreshLine(item);
|
||||
new_conn=GetConnection(item->text(24));
|
||||
|
Loading…
x
Reference in New Issue
Block a user