Initial import of CVS-v2_8_branch

This commit is contained in:
Fred Gleason
2014-08-12 15:13:02 -04:00
commit afd67c7af8
1508 changed files with 405304 additions and 0 deletions

99
rdlogedit/Makefile.am Normal file
View File

@@ -0,0 +1,99 @@
## automake.am
##
## Automake.am for rivendell/rdlogedit
##
## Use automake to process this into a Makefile.in
##
## (C) Copyright 2002-2005 Fred Gleason <fredg@paravelsystems.com>
##
## $Id: Makefile.am,v 1.37.8.4 2013/12/27 22:12:28 cvs Exp $
##
## 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.
##
AM_CPPFLAGS = -Wall -DPREFIX=\"$(prefix)\" -DQTDIR=\"@QT_DIR@\" @QT_CXXFLAGS@
INCLUDES = -I$(top_srcdir)/lib
LIBS = @QT_LIBS@ -L$(top_srcdir)/lib
MOC = @QT_MOC@
# The dependency for qt's Meta Object Compiler (moc)
moc_%.cpp: %.h
$(MOC) $< -o $@
# I18N Stuff
install-exec-local:
mkdir -p $(DESTDIR)$(prefix)/share/rivendell
cp rdlogedit_*.qm $(DESTDIR)$(prefix)/share/rivendell
uninstall:
rm -f $(DESTDIR)$(prefix)/share/rivendell/rdlogedit_*.qm
all:
@QT_BIN@/lupdate rdlogedit.pro
@QT_BIN@/lrelease rdlogedit.pro
bin_PROGRAMS = rdlogedit
dist_rdlogedit_SOURCES = add_meta.cpp add_meta.h\
drop_listview.cpp drop_listview.h\
edit_chain.cpp edit_chain.h\
edit_log.cpp edit_log.h\
edit_logline.cpp edit_logline.h\
edit_marker.cpp edit_marker.h\
edit_track.cpp edit_track.h\
import_track.cpp import_track.h\
list_listviewitem.cpp list_listviewitem.h\
list_reports.cpp list_reports.h\
list_logs.cpp list_logs.h\
log_listview.cpp log_listview.h\
rdlogedit.cpp rdlogedit.h globals.h\
voice_tracker.cpp voice_tracker.h
nodist_rdlogedit_SOURCES = moc_add_meta.cpp\
moc_drop_listview.cpp\
moc_edit_chain.cpp\
moc_edit_log.cpp\
moc_edit_logline.cpp\
moc_edit_marker.cpp\
moc_edit_track.cpp\
moc_import_track.cpp\
moc_list_logs.cpp\
moc_list_reports.cpp\
moc_log_listview.cpp\
moc_rdlogedit.cpp\
moc_voice_tracker.cpp
rdlogedit_LDADD = @LIB_RDLIBS@ @LIBVORBIS@
EXTRA_DIST = rdlogedit.pro\
rdlogedit_cs.ts\
rdlogedit_de.ts\
rdlogedit_es.ts\
rdlogedit_fr.ts\
rdlogedit_nb.ts\
rdlogedit_nn.ts\
rdlogedit_pt_BR.ts
CLEANFILES = *~\
*.exe\
*.idb\
*ilk\
*.obj\
*.pdb\
*.qm\
moc_*
MAINTAINERCLEANFILES = *~\
Makefile.in\
moc_*

154
rdlogedit/add_meta.cpp Normal file
View File

@@ -0,0 +1,154 @@
// add_meta.cpp
//
// Add a Rivendell RDCatch Event
//
// (C) Copyright 2002-2004 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: add_meta.cpp,v 1.9 2010/07/29 19:32:37 cvs Exp $
//
// 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 <qdialog.h>
#include <qstring.h>
#include <qpushbutton.h>
#include <qlistbox.h>
#include <qtextedit.h>
#include <qpainter.h>
#include <qevent.h>
#include <qmessagebox.h>
#include <qcheckbox.h>
#include <qsqldatabase.h>
#include <rd.h>
#include <rdlog_line.h>
#include <add_meta.h>
AddMeta::AddMeta(QWidget *parent,const char *name)
: QDialog(parent,name,true,Qt::WStyle_Customize|Qt::WStyle_DialogBorder)
{
setCaption("");
//
// Fix the Window Size
//
setMinimumWidth(sizeHint().width());
setMaximumWidth(sizeHint().width());
setMinimumHeight(sizeHint().height());
setMaximumHeight(sizeHint().height());
//
// Generate Fonts
//
QFont button_font=QFont("Helvetica",12,QFont::Bold);
button_font.setPixelSize(12);
QFont label_font=QFont("Helvetica",12,QFont::Bold);
label_font.setPixelSize(12);
QFont day_font=QFont("Helvetica",12,QFont::Normal);
day_font.setPixelSize(12);
//
// Title Label
//
QLabel *label=new QLabel(tr("Insert a:"),this,"title_label");
label->setGeometry(0,0,sizeHint().width(),30);
label->setFont(label_font);
label->setAlignment(AlignCenter);
//
// Marker Button
//
QPushButton *button=new QPushButton(this,"marker_button");
button->setGeometry(10,30,sizeHint().width()-20,50);
button->setFont(button_font);
button->setText(tr("&Marker"));
connect(button,SIGNAL(clicked()),this,SLOT(markerData()));
//
// Voice Track Button
//
button=new QPushButton(this,"track_button");
button->setGeometry(10,80,sizeHint().width()-20,50);
button->setFont(button_font);
button->setText(tr("Voice &Track"));
connect(button,SIGNAL(clicked()),this,SLOT(trackData()));
//
// Chain Button
//
button=new QPushButton(this,"chain_button");
button->setGeometry(10,130,sizeHint().width()-20,50);
button->setFont(button_font);
button->setText(tr("Log C&hain"));
connect(button,SIGNAL(clicked()),this,SLOT(chainData()));
//
// Cancel Button
//
button=new QPushButton(this,"cancel_button");
button->setGeometry(10,sizeHint().height()-60,sizeHint().width()-20,50);
button->setFont(button_font);
button->setText(tr("&Cancel"));
button->setDefault(true);
connect(button,SIGNAL(clicked()),this,SLOT(cancelData()));
}
AddMeta::~AddMeta()
{
}
QSize AddMeta::sizeHint() const
{
return QSize(200,240);
}
QSizePolicy AddMeta::sizePolicy() const
{
return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
}
void AddMeta::closeEvent(QCloseEvent *e)
{
cancelData();
}
void AddMeta::markerData()
{
done(RDLogLine::Marker);
}
void AddMeta::chainData()
{
done(RDLogLine::Chain);
}
void AddMeta::trackData()
{
done(RDLogLine::Track);
}
void AddMeta::cancelData()
{
done(-1);
}

57
rdlogedit/add_meta.h Normal file
View File

@@ -0,0 +1,57 @@
// add_meta.h
//
// Add a Rivendell RDCatch Event
//
// (C) Copyright 2002-2004 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: add_meta.h,v 1.6 2010/07/29 19:32:37 cvs Exp $
//
// 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 ADD_META_H
#define ADD_META_H
#include <qdialog.h>
#include <qsqldatabase.h>
#include <qlineedit.h>
#include <qdatetimeedit.h>
#include <qcombobox.h>
#include <qcheckbox.h>
#include <qspinbox.h>
#include <qlabel.h>
class AddMeta : public QDialog
{
Q_OBJECT
public:
AddMeta(QWidget *parent=0,const char *name=0);
~AddMeta();
QSize sizeHint() const;
QSizePolicy sizePolicy() const;
protected:
void closeEvent(QCloseEvent *e);
private slots:
void markerData();
void chainData();
void trackData();
void cancelData();
};
#endif

View File

@@ -0,0 +1,56 @@
// drop_listview.cpp
//
// The Log ListView widget for RDLogEdit.
//
// (C) Copyright 2002-2013 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: drop_listview.cpp,v 1.1.2.1 2013/12/27 22:12:28 cvs Exp $
//
// 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 <qheader.h>
#include <rdcartdrag.h>
#include <drop_listview.h>
DropListView::DropListView(QWidget *parent,const char *name)
: RDListView(parent,name)
{
setAcceptDrops(true);
}
void DropListView::dragEnterEvent(QDragEnterEvent *e)
{
e->accept(RDCartDrag::canDecode(e));
}
void DropListView::dropEvent(QDropEvent *e)
{
RDLogLine ll;
int line=-1;
QPoint pos(e->pos().x(),e->pos().y()-header()->sectionRect(0).height());
if(RDCartDrag::decode(e,&ll)) {
RDListViewItem *item=(RDListViewItem *)itemAt(pos);
if(item!=NULL) {
line=item->text(13).toInt();
}
emit cartDropped(line,&ll);
}
}

45
rdlogedit/drop_listview.h Normal file
View File

@@ -0,0 +1,45 @@
// drop_listview.h
//
// The Log ListView widget for RDLogEdit.
//
// (C) Copyright 2002-2013 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: drop_listview.h,v 1.1.2.1 2013/12/27 22:12:28 cvs Exp $
//
// 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 DROP_LISTVIEW_H
#define DROP_LISTVIEW_H
#include <rdlistview.h>
#include <rdlog_line.h>
class DropListView : public RDListView
{
Q_OBJECT
public:
DropListView(QWidget *parent,const char *name=0);
signals:
void cartDropped(int line,RDLogLine *ll);
protected:
void dragEnterEvent(QDragEnterEvent *e);
void dropEvent(QDropEvent *e);
};
#endif // DROP_LISTVIEW_H

362
rdlogedit/edit_chain.cpp Normal file
View File

@@ -0,0 +1,362 @@
// edit_chain.cpp
//
// Edit a Rivendell Log Chain Entry
//
// (C) Copyright 2002-2004 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: edit_chain.cpp,v 1.14 2010/07/29 19:32:37 cvs Exp $
//
// 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 <qpushbutton.h>
#include <qmessagebox.h>
#include <rddb.h>
#include <edit_chain.h>
#include <list_logs.h>
EditChain::EditChain(RDLogLine *line,QWidget *parent,const char *name)
: QDialog(parent,name,true)
{
//
// Fix the Window Size
//
setMinimumWidth(sizeHint().width());
setMaximumWidth(sizeHint().width());
setMinimumHeight(sizeHint().height());
setMaximumHeight(sizeHint().height());
setCaption(tr("Edit Log Chain"));
edit_logline=line;
//
// Create Fonts
//
QFont button_font=QFont("Helvetica",12,QFont::Bold);
button_font.setPixelSize(12);
QFont label_font=QFont("Helvetica",12,QFont::Bold);
label_font.setPixelSize(12);
QFont radio_font=QFont("Helvetica",10,QFont::Normal);
radio_font.setPixelSize(10);
//
// Time Type
//
edit_timetype_box=new QCheckBox(this,"edit_timetype_box");
edit_timetype_box->setGeometry(10,22,15,15);
edit_timetype_label=new QLabel(edit_timetype_box,tr("Start at:"),
this,"edit_timetype_label");
edit_timetype_label->setGeometry(30,21,85,17);
edit_timetype_label->setFont(label_font);
edit_timetype_label->setAlignment(AlignLeft|AlignVCenter);
//
// Start Time
//
edit_time_edit=new RDTimeEdit(this,"edit_time_edit");
edit_time_edit->setGeometry(85,19,85,20);
edit_time_edit->setDisplay(RDTimeEdit::Hours|RDTimeEdit::Minutes|
RDTimeEdit::Seconds|RDTimeEdit::Tenths);
connect(edit_time_edit,SIGNAL(valueChanged(const QTime &)),
this,SLOT(timeChangedData(const QTime &)));
//
// Grace Time
//
edit_grace_group
=new QButtonGroup(1,Qt::Vertical,
tr("Action If Previous Event Still Playing"),
this,"edit_grace_group");
edit_grace_group->setGeometry(175,11,435,50);
edit_grace_group->setFont(label_font);
edit_grace_group->setRadioButtonExclusive(true);
QRadioButton *radio_button=
new QRadioButton(tr("Start Immediately"),edit_grace_group);
edit_grace_group->insert(radio_button);
radio_button->setFont(radio_font);
radio_button=new QRadioButton(tr("Make Next"),edit_grace_group);
edit_grace_group->insert(radio_button);
radio_button->setFont(radio_font);
radio_button=new QRadioButton(tr("Wait up to"),edit_grace_group);
edit_grace_group->insert(radio_button);
radio_button->setFont(radio_font);
edit_grace_box=new QTimeEdit(this,"edit_grace_box");
edit_grace_box->setGeometry(543,31,60,20);
edit_grace_box->setDisplay(QTimeEdit::Minutes|QTimeEdit::Seconds);
connect(edit_timetype_box,SIGNAL(toggled(bool)),
this,SLOT(timeToggledData(bool)));
connect(edit_grace_group,SIGNAL(clicked(int)),
this,SLOT(graceClickedData(int)));
//
// Transition Type
//
edit_transtype_box=new QComboBox(this,"edit_transtype_box");
edit_transtype_box->setGeometry(385,68,110,26);
edit_transtype_box->insertItem(tr("Play"));
edit_transtype_box->insertItem(tr("Segue"));
edit_transtype_box->insertItem(tr("Stop"));
edit_time_label=new QLabel(edit_transtype_box,tr("Transition Type:"),
this,"edit_transtype_label");
edit_time_label->setGeometry(10,68,370,26);
edit_time_label->setFont(label_font);
edit_time_label->setAlignment(AlignRight|AlignVCenter);
//
// Label
//
edit_label_edit=new QLineEdit(this,"edit_label_edit");
edit_label_edit->setGeometry(10,116,sizeHint().width()-90,18);
edit_label_edit->setMaxLength(64);
QLabel *label=new QLabel(tr("Log Name"),this,"label_label");
label->setFont(label_font);
label->setGeometry(12,100,160,14);
connect(edit_label_edit,SIGNAL(textChanged(const QString &)),
this,SLOT(labelChangedData(const QString &)));
//
// Select Log Button
//
QPushButton *button=new QPushButton(this,"select_button");
button->setGeometry(sizeHint().width()-70,111,60,28);
button->setDefault(true);
button->setFont(radio_font);
button->setText(tr("Select"));
connect(button,SIGNAL(clicked()),this,SLOT(selectLogData()));
//
// Comment
//
edit_comment_edit=new QLineEdit(this,"edit_comment_edit");
edit_comment_edit->setGeometry(10,156,sizeHint().width()-20,18);
edit_comment_edit->setReadOnly(true);
label=new QLabel(tr("Log Description"),this,"comment_label");
label->setFont(label_font);
label->setGeometry(12,140,160,14);
//
// Ok Button
//
button=new QPushButton(this,"ok_button");
button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50);
button->setDefault(true);
button->setFont(button_font);
button->setText(tr("&OK"));
connect(button,SIGNAL(clicked()),this,SLOT(okData()));
//
// Cancel Button
//
button=new QPushButton(this,"cancel_button");
button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,
80,50);
button->setFont(button_font);
button->setText(tr("&Cancel"));
connect(button,SIGNAL(clicked()),this,SLOT(cancelData()));
//
// Populate Data
//
edit_time_edit->setTime(edit_logline->startTime(RDLogLine::Logged));
if(edit_logline->timeType()==RDLogLine::Hard) {
edit_timetype_box->setChecked(true);
timeToggledData(true);
}
else {
timeToggledData(false);
}
timeChangedData(edit_time_edit->time());
switch(edit_logline->graceTime()) {
case -1:
edit_grace_group->setButton(1);
graceClickedData(1);
break;
case 0:
edit_grace_group->setButton(0);
graceClickedData(0);
break;
default:
edit_grace_group->setButton(2);
edit_grace_box->setTime(QTime().addMSecs(edit_logline->graceTime()));
//edit_grace_box->setValue(edit_logline->graceTime());
graceClickedData(2);
break;
}
edit_transtype_box->setCurrentItem(edit_logline->transType());
edit_label_edit->setText(edit_logline->markerLabel());
labelChangedData(edit_label_edit->text());
}
EditChain::~EditChain()
{
}
QSize EditChain::sizeHint() const
{
return QSize(625,260);
}
QSizePolicy EditChain::sizePolicy() const
{
return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
}
void EditChain::timeChangedData(const QTime &time)
{
QString str;
if(edit_timetype_box->isChecked()) {
str=QString(tr("Transition If Previous Cart Ends Before"));
edit_time_label->
setText(QString().sprintf("%s %s:",(const char *)str,
(const char *)edit_time_edit->time().
toString("hh:mm:ss.zzz").left(10)));
}
}
void EditChain::timeToggledData(bool state)
{
QString str;
edit_time_edit->setEnabled(state);
edit_grace_group->setEnabled(state);
if(state) {
graceClickedData(edit_grace_group->selectedId());
str=QString(tr("Transition If Previous Cart Ends Before"));
edit_time_label->
setText(QString().sprintf("%s %s:",(const char *)str,
(const char *)edit_time_edit->time().
toString("hh:mm:ss.zzz").left(10)));
}
else {
edit_grace_box->setDisabled(true);
edit_time_label->setText(tr("Transition Type:"));
}
}
void EditChain::graceClickedData(int id)
{
switch(id) {
case 0:
edit_grace_box->setDisabled(true);
break;
case 1:
edit_grace_box->setDisabled(true);
break;
case 2:
edit_grace_box->setEnabled(true);
break;
}
}
void EditChain::selectTimeData(int id)
{
if(id==RDLogLine::Relative) {
edit_time_edit->setDisabled(true);
edit_time_label->setDisabled(true);
edit_grace_box->setDisabled(true);
}
else {
edit_time_edit->setEnabled(true);
edit_time_label->setEnabled(true);
}
}
void EditChain::selectLogData()
{
QString logname;
ListLogs *list=new ListLogs(&logname,this,"list_log_dialog");
if(list->exec()<0) {
delete list;
return;
}
delete list;
edit_label_edit->setText(logname);
labelChangedData(logname);
}
void EditChain::labelChangedData(const QString &logname)
{
QString sql=
QString().sprintf("select DESCRIPTION from LOGS where NAME=\"%s\"",
(const char *)logname);
RDSqlQuery *q=new RDSqlQuery(sql);
if(!q->first()) {
delete q;
edit_comment_edit->clear();
return;
}
edit_comment_edit->setText(q->value(0).toString());
delete q;
}
void EditChain::okData()
{
if(edit_timetype_box->isChecked()) {
edit_logline->setTimeType(RDLogLine::Hard);
edit_logline->setStartTime(RDLogLine::Logged,edit_time_edit->time());
switch(edit_grace_group->selectedId()) {
case 0:
edit_logline->setGraceTime(0);
break;
case 1:
edit_logline->setGraceTime(-1);
break;
case 2:
edit_logline->setGraceTime(QTime().msecsTo(edit_grace_box->time()));
//edit_logline->setGraceTime(edit_grace_box->value());
break;
}
}
else {
edit_logline->setTimeType(RDLogLine::Relative);
edit_logline->setStartTime(RDLogLine::Logged,QTime());
edit_logline->setGraceTime(0);
}
edit_logline->
setTransType((RDLogLine::TransType)edit_transtype_box->currentItem());
edit_logline->setMarkerLabel(edit_label_edit->text());
edit_logline->setMarkerComment(edit_comment_edit->text());
done(edit_logline->id());
}
void EditChain::cancelData()
{
done(-1);
}
void EditChain::closeEvent(QCloseEvent *e)
{
cancelData();
}

78
rdlogedit/edit_chain.h Normal file
View File

@@ -0,0 +1,78 @@
// edit_chain.h
//
// Edit a Rivendell Log Entry
//
// (C) Copyright 2002-2003 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: edit_chain.h,v 1.8 2010/07/29 19:32:37 cvs Exp $
//
// 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_CHAIN_H
#define EDIT_CHAIN_H
#include <qdialog.h>
#include <qdatetimeedit.h>
#include <qcombobox.h>
#include <qlineedit.h>
#include <qlabel.h>
#include <qcheckbox.h>
#include <qbuttongroup.h>
#include <qradiobutton.h>
#include <qspinbox.h>
#include <rdlog_line.h>
#include <rdtimeedit.h>
class EditChain : public QDialog
{
Q_OBJECT
public:
EditChain(RDLogLine *,QWidget *parent=0,const char *name=0);
~EditChain();
QSize sizeHint() const;
QSizePolicy sizePolicy() const;
private slots:
void timeChangedData(const QTime &);
void timeToggledData(bool state);
void graceClickedData(int id);
void selectTimeData(int);
void selectLogData();
void labelChangedData(const QString &);
void okData();
void cancelData();
protected:
void closeEvent(QCloseEvent *e);
private:
RDLogLine *edit_logline;
RDTimeEdit *edit_time_edit;
QLabel *edit_time_label;
QCheckBox *edit_timetype_box;
QLabel *edit_timetype_label;
QCheckBox *edit_time_box;
QComboBox *edit_transtype_box;
QLineEdit *edit_comment_edit;
QLineEdit *edit_label_edit;
QButtonGroup *edit_grace_group;
QFont normal_font;
QTimeEdit *edit_grace_box;
};
#endif

1748
rdlogedit/edit_log.cpp Normal file

File diff suppressed because it is too large Load Diff

183
rdlogedit/edit_log.h Normal file
View File

@@ -0,0 +1,183 @@
// edit_log.h
//
// Create a Rivendell Log
//
// (C) Copyright 2002-2004 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: edit_log.h,v 1.36.8.2 2014/02/20 16:33:55 cvs Exp $
//
// 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_LOG_H
#define EDIT_LOG_H
#include <vector>
#include <qdialog.h>
#include <rdlistview.h>
#include <qsqldatabase.h>
#include <qlineedit.h>
#include <qcombobox.h>
#include <qdatetimeedit.h>
#include <qcheckbox.h>
#include <qlabel.h>
#include <rdtransportbutton.h>
#include <rdlog.h>
#include <rdlog_event.h>
#include <rduser.h>
#include <rdgroup_list.h>
#include <rdsimpleplayer.h>
#include <drop_listview.h>
#include <list_reports.h>
//
// Widget Settings
//
#define END_MARKER_ID -2
class EditLog : public QDialog
{
Q_OBJECT
public:
EditLog(QString logname,vector<RDLogLine> *clipboard,
vector<QString> *new_logs,QWidget *parent=0,const char *name=0);
~EditLog();
QSize sizeHint() const;
QSizePolicy sizePolicy() const;
private slots:
void descriptionChangedData(const QString &);
void selectPurgeDateData();
void serviceActivatedData(const QString &svcname);
void dateValueChangedData(const QDate &);
void startDateEnabledData(bool);
void endDateEnabledData(bool);
void insertCartButtonData();
void insertMarkerButtonData();
void clickedData(QListViewItem *item);
void selectionChangedData();
void doubleClickData(QListViewItem *item);
void editButtonData();
void deleteButtonData();
void upButtonData();
void downButtonData();
void cutButtonData();
void copyButtonData();
void pasteButtonData();
void cartDroppedData(int line,RDLogLine *ll);
void saveData();
void saveasData();
void reportsData();
void okData();
void cancelData();
protected:
void closeEvent(QCloseEvent *e);
void resizeEvent(QResizeEvent *e);
void paintEvent(QPaintEvent *);
private:
void DeleteLines(int line,int count);
void SaveLog();
void RefreshLine(RDListViewItem *item);
void RefreshList();
void UpdateSelection();
void RenumberList(int line);
bool UpdateColor(RDListViewItem *item,RDLogLine *logline);
void SelectRecord(int id);
void UpdateTracks();
bool DeleteTracks();
bool ValidateSvc();
RDListViewItem *SingleSelection();
RDLog *edit_log;
RDLogEvent *edit_log_event;
std::vector<RDLogLine> *edit_clipboard;
std::vector<unsigned> edit_deleted_tracks;
std::vector<QString> *edit_newlogs;
QString edit_logname;
QLabel *edit_description_label;
QLineEdit *edit_description_edit;
QLabel *edit_service_label;
QComboBox *edit_service_box;
QLineEdit *edit_service_edit;
QLabel *edit_autorefresh_label;
QComboBox *edit_autorefresh_box;
QLineEdit *edit_autorefresh_edit;
QDateEdit *edit_startdate_edit;
QDateEdit *edit_enddate_edit;
QLabel *edit_startdate_label;
QLabel *edit_startdate_box_label;
QLabel *edit_enddate_box_label;
QCheckBox *edit_startdate_box;
QLabel *edit_enddate_label;
QCheckBox *edit_enddate_box;
DropListView *edit_log_list;
QString edit_filter;
QString edit_group;
QPixmap *edit_playout_map;
QPixmap *edit_macro_map;
QPixmap *edit_marker_map;
QPixmap *edit_chain_map;
QPixmap *edit_track_cart_map;
QPixmap *edit_notemarker_map;
QPixmap *edit_music_map;
QPixmap *edit_mic16_map;
QPixmap *edit_traffic_map;
QLabel *edit_logname_label_label;
QLabel *edit_logname_label;
QLabel *edit_origin_label_label;
QLabel *edit_origin_label;
QLabel *edit_track_label_label;
QLabel *edit_track_label;
bool edit_changed;
QPushButton *edit_cart_button;
QPushButton *edit_marker_button;
QPushButton *edit_edit_button;
QPushButton *edit_delete_button;
RDTransportButton *edit_up_button;
RDTransportButton *edit_down_button;
QPushButton *edit_cut_button;
QPushButton *edit_copy_button;
QPushButton *edit_paste_button;
QPushButton *edit_save_button;
QPushButton *edit_saveas_button;
QPushButton *edit_reports_button;
RDTransportButton *edit_play_button;
RDTransportButton *edit_stop_button;
QPushButton *edit_ok_button;
QPushButton *edit_cancel_button;
RDGroupList edit_group_list;
RDLogLine::TransType edit_default_trans;
int edit_output_card;
int edit_output_port;
unsigned edit_start_macro;
unsigned edit_end_macro;
RDSimplePlayer *edit_player;
QLabel *edit_time_label;
QLabel *edit_stoptime_label;
QLineEdit *edit_stoptime_edit;
QLabel *edit_endtime_label;
QLineEdit *edit_endtime_edit;
QCheckBox *edit_purgedate_box;
QLabel *edit_purgedate_label;
QDateEdit *edit_purgedate_edit;
QPushButton *edit_purgedate_button;
};
#endif

421
rdlogedit/edit_logline.cpp Normal file
View File

@@ -0,0 +1,421 @@
// edit_logline.cpp
//
// Edit a Rivendell Log Entry
//
// (C) Copyright 2002-2004 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: edit_logline.cpp,v 1.40.8.1 2012/11/26 20:19:41 cvs Exp $
//
// 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 <qpushbutton.h>
#include <qmessagebox.h>
#include <qradiobutton.h>
#include <rd.h>
#include <rdcart.h>
#include <rdcart_dialog.h>
#include <globals.h>
#include <edit_logline.h>
EditLogLine::EditLogLine(RDLogLine *line,QString *filter,QString *group,
QString svcname,RDGroupList *grplist,
RDLogEvent *log,int lineno,
QWidget *parent,const char *name)
: QDialog(parent,name,true)
{
//
// Fix the Window Size
//
setMinimumWidth(sizeHint().width());
setMaximumWidth(sizeHint().width());
setMinimumHeight(sizeHint().height());
setMaximumHeight(sizeHint().height());
setCaption(tr("Edit Log Entry"));
edit_logline=line;
edit_filter=filter;
edit_group=group;
edit_service=svcname;
edit_group_list=grplist;
edit_log_event=log;
edit_line=lineno;
//
// Create Fonts
//
QFont button_font=QFont("Helvetica",12,QFont::Bold);
button_font.setPixelSize(12);
QFont label_font=QFont("Helvetica",12,QFont::Bold);
label_font.setPixelSize(12);
QFont normal_font=QFont("Helvetica",12,QFont::Normal);
normal_font.setPixelSize(12);
QFont radio_font=QFont("Helvetica",10,QFont::Normal);
radio_font.setPixelSize(10);
//
// Time Type
//
edit_timetype_box=new QCheckBox(this,"edit_timetype_box");
edit_timetype_box->setGeometry(10,22,15,15);
edit_timetype_label=new QLabel(edit_timetype_box,tr("Start at:"),
this,"edit_timetype_label");
edit_timetype_label->setGeometry(30,21,80,17);
edit_timetype_label->setFont(label_font);
edit_timetype_label->setAlignment(AlignLeft|AlignVCenter);
//
// Start Time
//
edit_time_edit=new RDTimeEdit(this,"edit_time_edit");
edit_time_edit->setGeometry(85,19,85,20);
edit_time_edit->setDisplay(RDTimeEdit::Hours|RDTimeEdit::Minutes|
RDTimeEdit::Seconds|RDTimeEdit::Tenths);
connect(edit_time_edit,SIGNAL(valueChanged(const QTime &)),
this,SLOT(timeChangedData(const QTime &)));
//
// Grace Time
//
edit_grace_group
=new QButtonGroup(1,Qt::Vertical,
tr("Action If Previous Event Still Playing"),
this,"edit_grace_group");
edit_grace_group->setGeometry(175,11,435,50);
edit_grace_group->setFont(label_font);
edit_grace_group->setRadioButtonExclusive(true);
QRadioButton *radio_button=
new QRadioButton(tr("Start Immediately"),edit_grace_group);
edit_grace_group->insert(radio_button);
radio_button->setFont(radio_font);
radio_button=new QRadioButton(tr("Make Next"),edit_grace_group);
edit_grace_group->insert(radio_button);
radio_button->setFont(radio_font);
radio_button=new QRadioButton(tr("Wait up to"),edit_grace_group);
edit_grace_group->insert(radio_button);
radio_button->setFont(radio_font);
edit_grace_edit=new RDTimeEdit(this,"edit_grace_edit");
edit_grace_edit->setGeometry(538,31,65,20);
edit_grace_edit->
setDisplay(RDTimeEdit::Minutes|RDTimeEdit::Seconds|RDTimeEdit::Tenths);
connect(edit_timetype_box,SIGNAL(toggled(bool)),
this,SLOT(timeToggledData(bool)));
connect(edit_grace_group,SIGNAL(clicked(int)),
this,SLOT(graceClickedData(int)));
//
// Transition Type
//
edit_transtype_box=new QComboBox(this,"edit_transtype_box");
edit_transtype_box->setGeometry(485,68,110,26);
edit_transtype_box->insertItem(tr("Play"));
edit_transtype_box->insertItem(tr("Segue"));
edit_transtype_box->insertItem(tr("Stop"));
edit_time_label=new QLabel(edit_transtype_box,tr("Transition Type:"),
this,"edit_transtype_label");
edit_time_label->setGeometry(190,68,290,26);
edit_time_label->setFont(label_font);
edit_time_label->setAlignment(AlignRight|AlignVCenter);
// Overlap Box
edit_overlap_box=new QCheckBox(this,"edit_overlap_box");
edit_overlap_box->setGeometry(30,72,15,15);
edit_overlap_label=new QLabel(edit_overlap_box,tr("No Fade on Segue Out"),
this,"edit_overlap_label");
edit_overlap_label->setGeometry(50,68,130,26);
edit_overlap_label->setFont(button_font);
edit_overlap_label->setAlignment(AlignLeft|AlignVCenter|ShowPrefix);
//
// Cart Number
//
edit_cart_edit=new QLineEdit(this,"edit_cart_edit");
edit_cart_edit->setGeometry(10,116,60,18);
QLabel *label=new QLabel(tr("Cart"),this,"cart_label");
label->setFont(label_font);
label->setGeometry(12,100,60,14);
//
// Title
//
edit_title_edit=new QLineEdit(this,"edit_title_edit");
edit_title_edit->setGeometry(75,116,260,18);
edit_title_edit->setReadOnly(true);
label=new QLabel(tr("Title"),this,"title_label");
label->setFont(label_font);
label->setGeometry(77,100,110,14);
//
// Artist
//
edit_artist_edit=new QLineEdit(this,"edit_artist_edit");
edit_artist_edit->setGeometry(340,116,sizeHint().width()-350,18);
edit_artist_edit->setReadOnly(true);
label=new QLabel(tr("Artist"),this,"artist_label");
label->setFont(label_font);
label->setGeometry(342,100,110,14);
//
// Cart Button
//
QPushButton *button=new QPushButton(this,"cart_button");
button->setGeometry(20,144,80,50);
button->setFont(button_font);
button->setText(tr("Select\nCart"));
connect(button,SIGNAL(clicked()),this,SLOT(selectCartData()));
//
// Ok Button
//
button=new QPushButton(this,"ok_button");
button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50);
button->setDefault(true);
button->setFont(button_font);
button->setText(tr("&OK"));
connect(button,SIGNAL(clicked()),this,SLOT(okData()));
//
// Cancel Button
//
button=new QPushButton(this,"cancel_button");
button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,
80,50);
button->setFont(button_font);
button->setText(tr("&Cancel"));
connect(button,SIGNAL(clicked()),this,SLOT(cancelData()));
//
// Populate Data
//
edit_time_edit->setTime(edit_logline->startTime(RDLogLine::Logged));
if(edit_logline->timeType()==RDLogLine::Hard) {
edit_timetype_box->setChecked(true);
timeToggledData(true);
}
else {
timeToggledData(false);
}
timeChangedData(edit_time_edit->time());
switch(edit_logline->graceTime()) {
case -1:
edit_grace_group->setButton(1);
graceClickedData(1);
break;
case 0:
edit_grace_group->setButton(0);
graceClickedData(0);
break;
default:
edit_grace_group->setButton(2);
graceClickedData(2);
edit_grace_edit->setTime(QTime().addMSecs(edit_logline->graceTime()));
break;
}
edit_transtype_box->setCurrentItem(edit_logline->transType());
if(edit_logline->segueStartPoint(RDLogLine::LogPointer)<0
&& edit_logline->segueEndPoint(RDLogLine::LogPointer)<0
&& edit_logline->endPoint(RDLogLine::LogPointer)<0
&& edit_logline->fadedownPoint(RDLogLine::LogPointer)<0) {
edit_overlap_box->setEnabled(true);
edit_overlap_label->setEnabled(true);
if(edit_logline->segueGain()==0) {
edit_overlap_box->setChecked(true);
}
else {
edit_overlap_box->setChecked(false);
}
}
else {
edit_overlap_box->setEnabled(false);
edit_overlap_label->setEnabled(false);
}
FillCart(edit_logline->cartNumber());
}
EditLogLine::~EditLogLine()
{
}
QSize EditLogLine::sizeHint() const
{
return QSize(625,230);
}
QSizePolicy EditLogLine::sizePolicy() const
{
return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
}
void EditLogLine::selectCartData()
{
bool ok;
int cartnum=edit_cart_edit->text().toInt(&ok);
if(!ok) {
cartnum=-1;
}
if(log_cart_dialog->exec(&cartnum,RDCart::All,&edit_service,1,
rduser->name(),rduser->password())==0) {
FillCart(cartnum);
}
}
void EditLogLine::timeChangedData(const QTime &time)
{
QString str;
if(edit_timetype_box->isChecked()) {
str=QString(tr("Transition If Previous Cart Ends Before"));
edit_time_label->
setText(QString().sprintf("%s %s:",(const char *)str,
(const char *)edit_time_edit->time().
toString("hh:mm:ss.zzz").left(10)));
}
}
void EditLogLine::timeToggledData(bool state)
{
QString str;
edit_time_edit->setEnabled(state);
edit_grace_group->setEnabled(state);
if(state) {
graceClickedData(edit_grace_group->selectedId());
str=QString(tr("Transition If Previous Cart Ends Before"));
edit_time_label->
setText(QString().sprintf("%s %s:",(const char *)str,
(const char *)edit_time_edit->time().
toString("hh:mm:ss.zzz").left(10)));
}
else {
edit_grace_edit->setDisabled(true);
edit_time_label->setText(tr("Transition Type:"));
}
}
void EditLogLine::graceClickedData(int id)
{
switch(id) {
case 0:
edit_grace_edit->setDisabled(true);
break;
case 1:
edit_grace_edit->setDisabled(true);
break;
case 2:
edit_grace_edit->setEnabled(true);
break;
}
}
void EditLogLine::okData()
{
if(edit_cart_edit->text().isEmpty()) {
QMessageBox::warning(this,tr("Missing Cart"),
tr("You must supply a cart number!"));
return;
}
RDCart *cart=new RDCart(edit_cart_edit->text().toUInt());
if(cart->exists()) {
if(!edit_group_list->isGroupValid(cart->groupName())) {
delete cart;
QMessageBox::warning(this,tr("Disabled Cart"),
tr("This cart belongs to a disabled\ngroup for the specified service!"));
return;
}
}
delete cart;
if(edit_timetype_box->isChecked()&&
edit_log_event->exists(edit_time_edit->time(),edit_line)) {
QMessageBox::warning(this,tr("Duplicate Start Time"),
tr("An event is already scheduled with this start time!"));
return;
}
if(edit_timetype_box->isChecked()) {
edit_logline->setTimeType(RDLogLine::Hard);
edit_logline->setStartTime(RDLogLine::Logged,edit_time_edit->time());
switch(edit_grace_group->selectedId()) {
case 0:
edit_logline->setGraceTime(0);
break;
case 1:
edit_logline->setGraceTime(-1);
break;
case 2:
edit_logline->setGraceTime(QTime().msecsTo(edit_grace_edit->time()));
break;
}
}
else {
edit_logline->setTimeType(RDLogLine::Relative);
edit_logline->setStartTime(RDLogLine::Logged,QTime());
edit_logline->setGraceTime(0);
}
edit_logline->
setTransType((RDLogLine::TransType)edit_transtype_box->currentItem());
edit_logline->setCartNumber(edit_cart_edit->text().toUInt());
if(edit_logline->segueStartPoint(RDLogLine::LogPointer)<0
&& edit_logline->segueEndPoint(RDLogLine::LogPointer)<0
&& edit_logline->endPoint(RDLogLine::LogPointer)<0
&& edit_logline->fadedownPoint(RDLogLine::LogPointer)<0) {
if(edit_overlap_box->isChecked()) {
edit_logline->setSegueGain(0);
}
else {
edit_logline->setSegueGain(RD_FADE_DEPTH);
}
}
done(edit_logline->id());
}
void EditLogLine::cancelData()
{
done(-1);
}
void EditLogLine::closeEvent(QCloseEvent *e)
{
cancelData();
}
void EditLogLine::FillCart(int cartnum)
{
RDCart *cart=new RDCart(cartnum);
if(cartnum!=0) {
edit_cart_edit->setText(QString().sprintf("%05u",cartnum));
}
edit_title_edit->setText(cart->title());
edit_artist_edit->setText(cart->artist());
delete cart;
}

88
rdlogedit/edit_logline.h Normal file
View File

@@ -0,0 +1,88 @@
// edit_logline.h
//
// Edit a Rivendell Log Entry
//
// (C) Copyright 2002-2003 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: edit_logline.h,v 1.17 2010/07/29 19:32:37 cvs Exp $
//
// 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_LOGLINE_H
#define EDIT_LOGLINE_H
#include <qdialog.h>
#include <qdatetimeedit.h>
#include <qcombobox.h>
#include <qlineedit.h>
#include <qlabel.h>
#include <qcheckbox.h>
#include <qbuttongroup.h>
#include <qspinbox.h>
#include <rdlog_event.h>
#include <rdlog_line.h>
#include <rdgroup_list.h>
#include <rdtimeedit.h>
class EditLogLine : public QDialog
{
Q_OBJECT
public:
EditLogLine(RDLogLine *,QString *filter,QString *group,QString svcname,
RDGroupList *grplist,RDLogEvent *log,int lineno,
QWidget *parent=0,const char *name=0);
~EditLogLine();
QSize sizeHint() const;
QSizePolicy sizePolicy() const;
private slots:
void selectCartData();
void timeChangedData(const QTime &);
void timeToggledData(bool state);
void graceClickedData(int id);
void okData();
void cancelData();
protected:
void closeEvent(QCloseEvent *e);
private:
void FillCart(int cartnum);
RDLogLine *edit_logline;
RDTimeEdit *edit_time_edit;
QLabel *edit_time_label;
QCheckBox *edit_timetype_box;
QLabel *edit_timetype_label;
QCheckBox *edit_time_box;
QComboBox *edit_transtype_box;
QCheckBox *edit_overlap_box;
QLabel *edit_overlap_label;
QLineEdit *edit_cart_edit;
QLineEdit *edit_title_edit;
QLineEdit *edit_artist_edit;
QString *edit_filter;
QString *edit_group;
QButtonGroup *edit_grace_group;
RDTimeEdit *edit_grace_edit;
QString edit_service;
RDGroupList *edit_group_list;
RDLogEvent *edit_log_event;
int edit_line;
};
#endif

318
rdlogedit/edit_marker.cpp Normal file
View File

@@ -0,0 +1,318 @@
// edit_marker.cpp
//
// Edit a Rivendell Log Marker Entry
//
// (C) Copyright 2002-2004 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: edit_marker.cpp,v 1.20 2010/07/29 19:32:37 cvs Exp $
//
// 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 <qpushbutton.h>
#include <qmessagebox.h>
#include <edit_marker.h>
EditMarker::EditMarker(RDLogLine *line,QWidget *parent,const char *name)
: QDialog(parent,name,true)
{
//
// Fix the Window Size
//
setMinimumWidth(sizeHint().width());
setMaximumWidth(sizeHint().width());
setMinimumHeight(sizeHint().height());
setMaximumHeight(sizeHint().height());
setCaption(tr("Edit Log Marker"));
edit_logline=line;
//
// Create Fonts
//
QFont button_font=QFont("Helvetica",12,QFont::Bold);
button_font.setPixelSize(12);
QFont label_font=QFont("Helvetica",12,QFont::Bold);
label_font.setPixelSize(12);
QFont radio_font=QFont("Helvetica",10,QFont::Normal);
radio_font.setPixelSize(10);
//
// Time Type
//
edit_timetype_box=new QCheckBox(this,"edit_timetype_box");
edit_timetype_box->setGeometry(10,22,15,15);
edit_timetype_label=new QLabel(edit_timetype_box,tr("Start at:"),
this,"edit_timetype_label");
edit_timetype_label->setGeometry(30,21,85,17);
edit_timetype_label->setFont(label_font);
edit_timetype_label->setAlignment(AlignLeft|AlignVCenter);
//
// Start Time
//
edit_time_edit=new RDTimeEdit(this,"edit_time_edit");
edit_time_edit->setGeometry(85,19,85,20);
edit_time_edit->setDisplay(RDTimeEdit::Hours|RDTimeEdit::Minutes|
RDTimeEdit::Seconds|RDTimeEdit::Tenths);
connect(edit_time_edit,SIGNAL(valueChanged(const QTime &)),
this,SLOT(timeChangedData(const QTime &)));
//
// Grace Time
//
edit_grace_group
=new QButtonGroup(1,Qt::Vertical,
tr("Action If Previous Event Still Playing"),
this,"edit_grace_group");
edit_grace_group->setGeometry(175,11,435,50);
edit_grace_group->setFont(label_font);
edit_grace_group->setRadioButtonExclusive(true);
QRadioButton *radio_button=
new QRadioButton(tr("Start Immediately"),edit_grace_group);
edit_grace_group->insert(radio_button);
radio_button->setFont(radio_font);
radio_button=new QRadioButton(tr("Make Next"),edit_grace_group);
edit_grace_group->insert(radio_button);
radio_button->setFont(radio_font);
radio_button=new QRadioButton(tr("Wait up to"),edit_grace_group);
edit_grace_group->insert(radio_button);
radio_button->setFont(radio_font);
edit_grace_box=new QTimeEdit(this,"edit_grace_box");
edit_grace_box->setGeometry(543,31,60,20);
edit_grace_box->setDisplay(QTimeEdit::Minutes|QTimeEdit::Seconds);
connect(edit_timetype_box,SIGNAL(toggled(bool)),
this,SLOT(timeToggledData(bool)));
connect(edit_grace_group,SIGNAL(clicked(int)),
this,SLOT(graceClickedData(int)));
//
// Transition Type
//
edit_transtype_box=new QComboBox(this,"edit_transtype_box");
edit_transtype_box->setGeometry(385,68,110,26);
edit_transtype_box->insertItem(tr("Play"));
edit_transtype_box->insertItem(tr("Segue"));
edit_transtype_box->insertItem(tr("Stop"));
edit_time_label=new QLabel(edit_transtype_box,"Transition Type:",
this,"edit_transtype_label");
edit_time_label->setGeometry(10,68,370,26);
edit_time_label->setFont(label_font);
edit_time_label->setAlignment(AlignRight|AlignVCenter);
//
// Comment
//
edit_comment_edit=new QLineEdit(this,"edit_comment_edit");
edit_comment_edit->setGeometry(10,116,sizeHint().width()-20,18);
edit_comment_edit->setMaxLength(255);
QLabel *label=new QLabel(tr("Comment"),this,"comment_label");
label->setFont(label_font);
label->setGeometry(12,100,70,14);
//
// Label
//
edit_label_edit=new QLineEdit(this,"edit_label_edit");
edit_label_edit->setGeometry(10,156,100,18);
edit_label_edit->setMaxLength(10);
label=new QLabel(tr("Label"),this,"label_label");
label->setFont(label_font);
label->setGeometry(12,140,60,14);
//
// Ok Button
//
QPushButton *button=new QPushButton(this,"ok_button");
button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50);
button->setDefault(true);
button->setFont(button_font);
button->setText(tr("&OK"));
connect(button,SIGNAL(clicked()),this,SLOT(okData()));
//
// Cancel Button
//
button=new QPushButton(this,"cancel_button");
button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,
80,50);
button->setFont(button_font);
button->setText(tr("&Cancel"));
connect(button,SIGNAL(clicked()),this,SLOT(cancelData()));
//
// Populate Data
//
edit_time_edit->setTime(edit_logline->startTime(RDLogLine::Logged));
if(edit_logline->timeType()==RDLogLine::Hard) {
edit_timetype_box->setChecked(true);
timeToggledData(true);
}
else {
timeToggledData(false);
}
timeChangedData(edit_time_edit->time());
switch(edit_logline->graceTime()) {
case -1:
edit_grace_group->setButton(1);
graceClickedData(1);
break;
case 0:
edit_grace_group->setButton(0);
graceClickedData(0);
break;
default:
edit_grace_group->setButton(2);
edit_grace_box->setTime(QTime().addMSecs(edit_logline->graceTime()));
//edit_grace_box->setValue(edit_logline->graceTime());
graceClickedData(2);
break;
}
edit_transtype_box->setCurrentItem(edit_logline->transType());
edit_comment_edit->setText(edit_logline->markerComment());
edit_label_edit->setText(edit_logline->markerLabel());
}
EditMarker::~EditMarker()
{
}
QSize EditMarker::sizeHint() const
{
return QSize(625,230);
}
QSizePolicy EditMarker::sizePolicy() const
{
return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
}
void EditMarker::timeChangedData(const QTime &time)
{
QString str;
if(edit_timetype_box->isChecked()) {
str=QString(tr("Transition If Previous Cart Ends Before"));
edit_time_label->
setText(QString().sprintf("%s %s:",(const char *)str,
(const char *)edit_time_edit->time().
toString("hh:mm:ss.zzz").left(10)));
}
}
void EditMarker::timeToggledData(bool state)
{
QString str;
edit_time_edit->setEnabled(state);
edit_grace_group->setEnabled(state);
if(state) {
graceClickedData(edit_grace_group->selectedId());
str=QString(tr("Transition If Previous Cart Ends Before"));
edit_time_label->
setText(QString().sprintf("%s %s:",(const char *)str,
(const char *)edit_time_edit->time().
toString("hh:mm:ss.zzz").left(10)));
}
else {
edit_grace_box->setDisabled(true);
edit_time_label->setText(tr("Transition Type:"));
}
}
void EditMarker::graceClickedData(int id)
{
switch(id) {
case 0:
edit_grace_box->setDisabled(true);
break;
case 1:
edit_grace_box->setDisabled(true);
break;
case 2:
edit_grace_box->setEnabled(true);
break;
}
}
void EditMarker::selectTimeData(int id)
{
if(id==RDLogLine::Relative) {
edit_time_edit->setDisabled(true);
edit_time_label->setDisabled(true);
edit_grace_box->setDisabled(true);
}
else {
edit_time_edit->setEnabled(true);
edit_time_label->setEnabled(true);
}
}
void EditMarker::okData()
{
if(edit_timetype_box->isChecked()) {
edit_logline->setTimeType(RDLogLine::Hard);
edit_logline->setStartTime(RDLogLine::Logged,edit_time_edit->time());
switch(edit_grace_group->selectedId()) {
case 0:
edit_logline->setGraceTime(0);
break;
case 1:
edit_logline->setGraceTime(-1);
break;
case 2:
edit_logline->setGraceTime(QTime().msecsTo(edit_grace_box->time()));
//edit_logline->setGraceTime(edit_grace_box->value());
break;
}
}
else {
edit_logline->setTimeType(RDLogLine::Relative);
edit_logline->setStartTime(RDLogLine::Logged,QTime());
edit_logline->setGraceTime(0);
}
edit_logline->
setTransType((RDLogLine::TransType)edit_transtype_box->currentItem());
edit_logline->setMarkerComment(edit_comment_edit->text());
edit_logline->setMarkerLabel(edit_label_edit->text());
done(edit_logline->id());
}
void EditMarker::cancelData()
{
done(-1);
}
void EditMarker::closeEvent(QCloseEvent *e)
{
cancelData();
}

76
rdlogedit/edit_marker.h Normal file
View File

@@ -0,0 +1,76 @@
// edit_marker.h
//
// Edit a Rivendell Log Entry
//
// (C) Copyright 2002-2003 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: edit_marker.h,v 1.10 2010/07/29 19:32:37 cvs Exp $
//
// 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_MARKER_H
#define EDIT_MARKER_H
#include <qdialog.h>
#include <qdatetimeedit.h>
#include <qcombobox.h>
#include <qlineedit.h>
#include <qlabel.h>
#include <qcheckbox.h>
#include <qbuttongroup.h>
#include <qradiobutton.h>
#include <qspinbox.h>
#include <rdlog_line.h>
#include <rdtimeedit.h>
class EditMarker : public QDialog
{
Q_OBJECT
public:
EditMarker(RDLogLine *,QWidget *parent=0,const char *name=0);
~EditMarker();
QSize sizeHint() const;
QSizePolicy sizePolicy() const;
private slots:
void timeChangedData(const QTime &);
void timeToggledData(bool state);
void graceClickedData(int id);
void selectTimeData(int);
void okData();
void cancelData();
protected:
void closeEvent(QCloseEvent *e);
private:
RDLogLine *edit_logline;
RDTimeEdit *edit_time_edit;
QLabel *edit_time_label;
QCheckBox *edit_timetype_box;
QLabel *edit_timetype_label;
QCheckBox *edit_time_box;
QComboBox *edit_transtype_box;
QLineEdit *edit_comment_edit;
QLineEdit *edit_label_edit;
QButtonGroup *edit_grace_group;
QFont normal_font;
QTimeEdit *edit_grace_box;
};
#endif

306
rdlogedit/edit_track.cpp Normal file
View File

@@ -0,0 +1,306 @@
// edit_track.cpp
//
// Edit a Rivendell Voice Track Log Entry
//
// (C) Copyright 2002-2005 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: edit_track.cpp,v 1.9 2010/07/29 19:32:37 cvs Exp $
//
// 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 <qpushbutton.h>
#include <qmessagebox.h>
#include <edit_track.h>
EditTrack::EditTrack(RDLogLine *line,QWidget *parent,const char *name)
: QDialog(parent,name,true)
{
//
// Fix the Window Size
//
setMinimumWidth(sizeHint().width());
setMaximumWidth(sizeHint().width());
setMinimumHeight(sizeHint().height());
setMaximumHeight(sizeHint().height());
setCaption(tr("Edit Voice Track Marker"));
edit_logline=line;
//
// Create Fonts
//
QFont button_font=QFont("Helvetica",12,QFont::Bold);
button_font.setPixelSize(12);
QFont label_font=QFont("Helvetica",12,QFont::Bold);
label_font.setPixelSize(12);
QFont radio_font=QFont("Helvetica",10,QFont::Normal);
radio_font.setPixelSize(10);
//
// Time Type
//
edit_timetype_box=new QCheckBox(this,"edit_timetype_box");
edit_timetype_box->setGeometry(10,22,15,15);
edit_timetype_label=new QLabel(edit_timetype_box,tr("Start at:"),
this,"edit_timetype_label");
edit_timetype_label->setGeometry(30,21,85,17);
edit_timetype_label->setFont(label_font);
edit_timetype_label->setAlignment(AlignLeft|AlignVCenter);
//
// Start Time
//
edit_time_edit=new RDTimeEdit(this,"edit_time_edit");
edit_time_edit->setGeometry(85,19,85,20);
edit_time_edit->setDisplay(RDTimeEdit::Hours|RDTimeEdit::Minutes|
RDTimeEdit::Seconds|RDTimeEdit::Tenths);
connect(edit_time_edit,SIGNAL(valueChanged(const QTime &)),
this,SLOT(timeChangedData(const QTime &)));
//
// Grace Time
//
edit_grace_group
=new QButtonGroup(1,Qt::Vertical,
tr("Action If Previous Event Still Playing"),
this,"edit_grace_group");
edit_grace_group->setGeometry(175,11,435,50);
edit_grace_group->setFont(label_font);
edit_grace_group->setRadioButtonExclusive(true);
QRadioButton *radio_button=
new QRadioButton(tr("Start Immediately"),edit_grace_group);
edit_grace_group->insert(radio_button);
radio_button->setFont(radio_font);
radio_button=new QRadioButton(tr("Make Next"),edit_grace_group);
edit_grace_group->insert(radio_button);
radio_button->setFont(radio_font);
radio_button=new QRadioButton(tr("Wait up to"),edit_grace_group);
edit_grace_group->insert(radio_button);
radio_button->setFont(radio_font);
edit_grace_box=new QTimeEdit(this,"edit_grace_box");
edit_grace_box->setGeometry(543,31,60,20);
edit_grace_box->setDisplay(QTimeEdit::Minutes|QTimeEdit::Seconds);
connect(edit_timetype_box,SIGNAL(toggled(bool)),
this,SLOT(timeToggledData(bool)));
connect(edit_grace_group,SIGNAL(clicked(int)),
this,SLOT(graceClickedData(int)));
//
// Transition Type
//
edit_transtype_box=new QComboBox(this,"edit_transtype_box");
edit_transtype_box->setGeometry(385,68,110,26);
edit_transtype_box->insertItem(tr("Play"));
edit_transtype_box->insertItem(tr("Segue"));
edit_transtype_box->insertItem(tr("Stop"));
edit_time_label=new QLabel(edit_transtype_box,"Transition Type:",
this,"edit_transtype_label");
edit_time_label->setGeometry(10,68,370,26);
edit_time_label->setFont(label_font);
edit_time_label->setAlignment(AlignRight|AlignVCenter);
//
// Comment
//
edit_comment_edit=new QLineEdit(this,"edit_comment_edit");
edit_comment_edit->setGeometry(10,116,sizeHint().width()-20,18);
edit_comment_edit->setMaxLength(255);
QLabel *label=new QLabel(tr("Comment"),this,"comment_label");
label->setFont(label_font);
label->setGeometry(12,100,70,14);
//
// Ok Button
//
QPushButton *button=new QPushButton(this,"ok_button");
button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50);
button->setDefault(true);
button->setFont(button_font);
button->setText(tr("&OK"));
connect(button,SIGNAL(clicked()),this,SLOT(okData()));
//
// Cancel Button
//
button=new QPushButton(this,"cancel_button");
button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,
80,50);
button->setFont(button_font);
button->setText(tr("&Cancel"));
connect(button,SIGNAL(clicked()),this,SLOT(cancelData()));
//
// Populate Data
//
edit_time_edit->setTime(edit_logline->startTime(RDLogLine::Logged));
if(edit_logline->timeType()==RDLogLine::Hard) {
edit_timetype_box->setChecked(true);
timeToggledData(true);
}
else {
timeToggledData(false);
}
timeChangedData(edit_time_edit->time());
switch(edit_logline->graceTime()) {
case -1:
edit_grace_group->setButton(1);
graceClickedData(1);
break;
case 0:
edit_grace_group->setButton(0);
graceClickedData(0);
break;
default:
edit_grace_group->setButton(2);
edit_grace_box->setTime(QTime().addMSecs(edit_logline->graceTime()));
//edit_grace_box->setValue(edit_logline->graceTime());
graceClickedData(2);
break;
}
edit_transtype_box->setCurrentItem(edit_logline->transType());
edit_comment_edit->setText(edit_logline->markerComment());
}
EditTrack::~EditTrack()
{
}
QSize EditTrack::sizeHint() const
{
return QSize(625,230);
}
QSizePolicy EditTrack::sizePolicy() const
{
return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
}
void EditTrack::timeChangedData(const QTime &time)
{
QString str;
if(edit_timetype_box->isChecked()) {
str=QString(tr("Transition If Previous Cart Ends Before"));
edit_time_label->
setText(QString().sprintf("%s %s:",(const char *)str,
(const char *)edit_time_edit->time().
toString("hh:mm:ss.zzz").left(10)));
}
}
void EditTrack::timeToggledData(bool state)
{
QString str;
edit_time_edit->setEnabled(state);
edit_grace_group->setEnabled(state);
if(state) {
graceClickedData(edit_grace_group->selectedId());
str=QString(tr("Transition If Previous Cart Ends Before"));
edit_time_label->
setText(QString().sprintf("%s %s:",(const char *)str,
(const char *)edit_time_edit->time().
toString("hh:mm:ss.zzz").left(10)));
}
else {
edit_grace_box->setDisabled(true);
edit_time_label->setText(tr("Transition Type:"));
}
}
void EditTrack::graceClickedData(int id)
{
switch(id) {
case 0:
edit_grace_box->setDisabled(true);
break;
case 1:
edit_grace_box->setDisabled(true);
break;
case 2:
edit_grace_box->setEnabled(true);
break;
}
}
void EditTrack::selectTimeData(int id)
{
if(id==RDLogLine::Relative) {
edit_time_edit->setDisabled(true);
edit_time_label->setDisabled(true);
edit_grace_box->setDisabled(true);
}
else {
edit_time_edit->setEnabled(true);
edit_time_label->setEnabled(true);
}
}
void EditTrack::okData()
{
if(edit_timetype_box->isChecked()) {
edit_logline->setTimeType(RDLogLine::Hard);
edit_logline->setStartTime(RDLogLine::Logged,edit_time_edit->time());
switch(edit_grace_group->selectedId()) {
case 0:
edit_logline->setGraceTime(0);
break;
case 1:
edit_logline->setGraceTime(-1);
break;
case 2:
edit_logline->setGraceTime(QTime().msecsTo(edit_grace_box->time()));
//edit_logline->setGraceTime(edit_grace_box->value());
break;
}
}
else {
edit_logline->setTimeType(RDLogLine::Relative);
edit_logline->setStartTime(RDLogLine::Logged,QTime());
edit_logline->setGraceTime(0);
}
edit_logline->
setTransType((RDLogLine::TransType)edit_transtype_box->currentItem());
edit_logline->setMarkerComment(edit_comment_edit->text());
done(edit_logline->id());
}
void EditTrack::cancelData()
{
done(-1);
}
void EditTrack::closeEvent(QCloseEvent *e)
{
cancelData();
}

78
rdlogedit/edit_track.h Normal file
View File

@@ -0,0 +1,78 @@
// edit_track.h
//
// Edit a Rivendell Voice Track Log Entry
//
// (C) Copyright 2002-2005 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: edit_track.h,v 1.8 2010/07/29 19:32:37 cvs Exp $
//
// 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_TRACK_H
#define EDIT_TRACK_H
#include <qdialog.h>
#include <qdatetimeedit.h>
#include <qcombobox.h>
#include <qlineedit.h>
#include <qlabel.h>
#include <qcheckbox.h>
#include <qbuttongroup.h>
#include <qradiobutton.h>
#include <qspinbox.h>
#include <rdlog_line.h>
#include <rdtimeedit.h>
class EditTrack : public QDialog
{
Q_OBJECT
public:
EditTrack(RDLogLine *,QWidget *parent=0,const char *name=0);
~EditTrack();
QSize sizeHint() const;
QSizePolicy sizePolicy() const;
private slots:
void timeChangedData(const QTime &);
void timeToggledData(bool state);
void graceClickedData(int id);
void selectTimeData(int);
void okData();
void cancelData();
protected:
void closeEvent(QCloseEvent *e);
private:
RDLogLine *edit_logline;
RDTimeEdit *edit_time_edit;
QLabel *edit_time_label;
QCheckBox *edit_timetype_box;
QLabel *edit_timetype_label;
QCheckBox *edit_time_box;
QComboBox *edit_transtype_box;
QCheckBox *edit_overlap_box;
QLabel *edit_overlap_label;
QLineEdit *edit_comment_edit;
QButtonGroup *edit_grace_group;
QFont normal_font;
QTimeEdit *edit_grace_box;
QLabel *edit_grace_label;
};
#endif

52
rdlogedit/globals.h Normal file
View File

@@ -0,0 +1,52 @@
// globals.h
//
// Global Variable Declarations for RDLogEdit
//
// (C) Copyright 2002-2004 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: globals.h,v 1.8 2010/07/29 19:32:37 cvs Exp $
//
// 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 GLOBALS_H
#define GLOBALS_H
#include <rdstation.h>
#include <rduser.h>
#include <rdripc.h>
#include <rdconfig.h>
#include <rdsystem.h>
#include <rdlogedit_conf.h>
#include <rdcart_dialog.h>
#ifndef WIN32
#include <rdcae.h>
#endif // WIN32
//
// Global Resources
//
extern RDStation *rdstation_conf;
extern RDUser *rduser;
extern RDRipc *rdripc;
extern RDConfig *log_config;
extern RDLogeditConf *rdlogedit_conf;
extern RDCartDialog *log_cart_dialog;
extern bool import_running;
extern RDSystem *rdsystem;
#ifndef WIN32
extern RDCae *rdcae;
#endif // WIN32
#endif // GLOBALS_H

200
rdlogedit/import_track.cpp Normal file
View File

@@ -0,0 +1,200 @@
// import_track.cpp
//
// Insert Audio for a Voice Track
//
// (C) Copyright 2002-2006 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: import_track.cpp,v 1.7 2010/07/29 19:32:37 cvs Exp $
//
// 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 <vector>
#include <qdialog.h>
#include <qstring.h>
#include <qpushbutton.h>
#include <qlistbox.h>
#include <qtextedit.h>
#include <qpainter.h>
#include <qevent.h>
#include <qmessagebox.h>
#include <qcheckbox.h>
#include <rddb.h>
#include <rd.h>
#include <rdstation.h>
#include <rdcut_dialog.h>
#include <rdcut_path.h>
#include <import_track.h>
extern RDStation *rdstation_conf;
ImportTrack::ImportTrack(QString *filter,QString *group,
QWidget *parent,const char *name)
: QDialog(parent,name,true,Qt::WStyle_Customize|Qt::WStyle_DialogBorder)
{
setCaption("");
//
// Fix the Window Size
//
setMinimumWidth(sizeHint().width());
setMaximumWidth(sizeHint().width());
setMinimumHeight(sizeHint().height());
setMaximumHeight(sizeHint().height());
//
// Generate Fonts
//
QFont button_font=QFont("Helvetica",12,QFont::Bold);
button_font.setPixelSize(12);
QFont label_font=QFont("Helvetica",12,QFont::Bold);
label_font.setPixelSize(12);
QFont day_font=QFont("Helvetica",12,QFont::Normal);
day_font.setPixelSize(12);
add_filter=filter;
add_group=group;
//
// Title Label
//
QLabel *label=new QLabel(tr("Insert audio from a:"),this,"title_label");
label->setGeometry(0,0,sizeHint().width(),30);
label->setFont(label_font);
label->setAlignment(AlignCenter);
//
// Cart Button
//
QPushButton *button=new QPushButton(this,"cart_button");
button->setGeometry(10,30,sizeHint().width()-20,50);
button->setFont(button_font);
button->setText(tr("&Cart"));
button->setDisabled(true);
QString sql=QString("select CHANNEL from DECKS \
where (CARD_NUMBER>=0)&&(CHANNEL>0)&&(CHANNEL<=9)");
RDSqlQuery *q=new RDSqlQuery(sql);
if(q->first()) {
button->setEnabled(true);
}
delete q;
connect(button,SIGNAL(clicked()),this,SLOT(cartData()));
//
// Import Button
//
button=new QPushButton(this,"import_button");
button->setGeometry(10,80,sizeHint().width()-20,50);
button->setFont(button_font);
button->setText(tr("&File"));
button->setDisabled(true);
sql=QString("select CHANNEL from DECKS \
where (CARD_NUMBER>=0)&&(CHANNEL>128)&&(CHANNEL<=137)");
q=new RDSqlQuery(sql);
if(q->first()) {
button->setEnabled(true);
}
delete q;
connect(button,SIGNAL(clicked()),this,SLOT(importData()));
//
// Cancel Button
//
button=new QPushButton(this,"cancel_button");
button->setGeometry(10,140,sizeHint().width()-20,50);
button->setFont(button_font);
button->setText(tr("&Cancel"));
button->setDefault(true);
connect(button,SIGNAL(clicked()),this,SLOT(cancelData()));
}
ImportTrack::~ImportTrack()
{
}
QSize ImportTrack::sizeHint() const
{
return QSize(200,200);
}
QSizePolicy ImportTrack::sizePolicy() const
{
return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
}
void ImportTrack::closeEvent(QCloseEvent *e)
{
cancelData();
}
void ImportTrack::cartData()
{
/*
EditRecording *recording=
new EditRecording(add_id,NULL,add_filter,this,"recording");
if(recording->exec()<0) {
delete recording;
done(-1);
return;
}
delete recording;
done((int)RDRecording::Recording);
*/
}
void ImportTrack::importData()
{
/*
EditPlayout *playout=
new EditPlayout(add_id,NULL,add_filter,this,"playout");
if(playout->exec()<0) {
delete playout;
done(-1);
return;
}
delete playout;
done((int)RDRecording::Playout);
*/
}
void ImportTrack::cancelData()
{
done(-1);
}
void ImportTrack::keyPressEvent(QKeyEvent *e)
{
switch(e->key()) {
case Qt::Key_Escape:
cancelData();
break;
default:
QWidget::keyPressEvent(e);
break;
}
}

66
rdlogedit/import_track.h Normal file
View File

@@ -0,0 +1,66 @@
// import_track.h
//
// Import Audio for a Voice Track
//
// (C) Copyright 2002-2006 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: import_track.h,v 1.5 2010/07/29 19:32:37 cvs Exp $
//
// 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 IMPORT_TRACK_H
#define IMPORT_TRACK_H
#include <qdialog.h>
#include <qsqldatabase.h>
#include <qlineedit.h>
#include <qdatetimeedit.h>
#include <qcombobox.h>
#include <qcheckbox.h>
#include <qspinbox.h>
#include <qlabel.h>
#include <rdrecording.h>
#include <rddeck.h>
class ImportTrack : public QDialog
{
Q_OBJECT
public:
ImportTrack(QString *filter,QString *group,
QWidget *parent=0,const char *name=0);
~ImportTrack();
QSize sizeHint() const;
QSizePolicy sizePolicy() const;
protected:
void closeEvent(QCloseEvent *e);
private slots:
void cartData();
void importData();
void cancelData();
protected:
void keyPressEvent(QKeyEvent *e);
private:
int add_id;
QString *add_filter;
QString *add_group;
};
#endif // IMPORT_TRACK_H

View File

@@ -0,0 +1,118 @@
// list_listviewitem.cpp
//
// A QListViewItem class for RDLogEdit.
//
// (C) Copyright 2002-2006 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: list_listviewitem.cpp,v 1.6 2010/07/29 19:32:37 cvs Exp $
//
// 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 <qfontmetrics.h>
#include <qpainter.h>
#include <list_listviewitem.h>
#include "../icons/greenball.xpm"
#include "../icons/redball.xpm"
#include "../icons/whiteball.xpm"
ListListViewItem::ListListViewItem(QListView *parent)
: QListViewItem(parent)
{
list_track_column=-1;
list_tracks=-1;
list_total_tracks=0;
list_parent=parent;
//
// Create Icons
//
list_whiteball_map=new QPixmap(whiteball_xpm);
list_greenball_map=new QPixmap(greenball_xpm);
list_redball_map=new QPixmap(redball_xpm);
}
int ListListViewItem::trackColumn() const
{
return list_track_column;
}
void ListListViewItem::setTrackColumn(int col)
{
list_track_column=col;
}
int ListListViewItem::tracks() const
{
return list_tracks;
}
void ListListViewItem::setTracks(int quan)
{
list_tracks=quan;
}
int ListListViewItem::totalTracks() const
{
return list_total_tracks;
}
void ListListViewItem::setTotalTracks(int quan)
{
list_total_tracks=quan;
}
void ListListViewItem::paintCell(QPainter *p,const QColorGroup &cg,int column,
int width,int align)
{
if(column!=list_track_column) {
QListViewItem::paintCell(p,cg,column,width,align);
return;
}
QColor fg=cg.text();
QColor bg=cg.base();
if(isSelected()) {
fg=cg.highlightedText();
bg=cg.highlight();
}
QString str=QString().sprintf("%u / %u",list_tracks,list_total_tracks);
QPixmap *icon=list_whiteball_map;
if(list_total_tracks>0) {
if(list_tracks==list_total_tracks) {
icon=list_greenball_map;
}
else {
icon=list_redball_map;
}
}
QFontMetrics *m=new QFontMetrics(p->font());
p->setBackgroundColor(bg);
p->eraseRect(0,0,width,height());
p->setPen(fg);
p->drawPixmap(list_parent->itemMargin(),(height()-icon->size().height())/2,
*icon);
p->drawText(icon->size().width()+10,3*(height()-m->height())/2,str);
delete m;
}

View File

@@ -0,0 +1,57 @@
// list_listviewitem.h
//
// A QListViewItem class for RDLogEdit.
//
// (C) Copyright 2002-2006 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: list_listviewitem.h,v 1.5 2010/07/29 19:32:37 cvs Exp $
//
// 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 LIST_LISTVIEWITEM_H
#define LIST_LISTVIEWITEM_H
#include <qlistview.h>
#include <qpixmap.h>
#include <qlistview.h>
class ListListViewItem : public QListViewItem
{
public:
ListListViewItem(QListView *parent);
int trackColumn() const;
void setTrackColumn(int col);
int tracks() const;
void setTracks(int quan);
int totalTracks() const;
void setTotalTracks(int quan);
void paintCell(QPainter *p,const QColorGroup &cg,int column,
int width,int align);
private:
int list_track_column;
int list_tracks;
int list_total_tracks;
QPixmap *list_whiteball_map;
QPixmap *list_redball_map;
QPixmap *list_greenball_map;
QListView *list_parent;
};
#endif // LIST_LISTVIEWITEM_H

172
rdlogedit/list_logs.cpp Normal file
View File

@@ -0,0 +1,172 @@
// list_logs.cpp
//
// Select a Rivendell Log
//
// (C) Copyright 2002-2004 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: list_logs.cpp,v 1.9 2010/07/29 19:32:37 cvs Exp $
//
// 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 <qpushbutton.h>
#include <rddb.h>
#include <list_logs.h>
#include <globals.h>
ListLogs::ListLogs(QString *logname,QWidget *parent,const char *name)
: QDialog(parent,name,true)
{
//
// Fix the Window Size
//
setMinimumWidth(sizeHint().width());
setMaximumWidth(sizeHint().width());
setMinimumHeight(sizeHint().height());
setMaximumHeight(sizeHint().height());
//
// Generate Fonts
//
QFont button_font("Helvetica",12,QFont::Bold);
button_font.setPixelSize(12);
list_logname=logname;
setCaption(tr("Select a Log"));
//
// Log List
//
list_log_list=new QListView(this,"list_log_list");
list_log_list->setGeometry(10,10,
sizeHint().width()-20,sizeHint().height()-80);
list_log_list->setAllColumnsShowFocus(true);
list_log_list->setItemMargin(5);
connect(list_log_list,
SIGNAL(doubleClicked(QListViewItem *,const QPoint &,int)),
this,
SLOT(doubleClickedData(QListViewItem *,const QPoint &,int)));
list_log_list->addColumn(tr("NAME"));
list_log_list->setColumnAlignment(0,Qt::AlignLeft);
list_log_list->addColumn(tr("DESCRIPTION"));
list_log_list->setColumnAlignment(1,Qt::AlignLeft);
list_log_list->addColumn(tr("SERVICE"));
list_log_list->setColumnAlignment(2,Qt::AlignLeft);
//
// Load Button
//
QPushButton *button=new QPushButton(this,"load_button");
button->setGeometry(10,sizeHint().height()-60,80,50);
button->setFont(button_font);
button->setText(tr("&OK"));
connect(button,SIGNAL(clicked()),this,SLOT(okButtonData()));
//
// Cancel Button
//
button=new QPushButton(this,"cancel_button");
button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50);
button->setFont(button_font);
button->setText(tr("&Cancel"));
button->setDefault(true);
connect(button,SIGNAL(clicked()),this,SLOT(cancelButtonData()));
RefreshList();
}
QSize ListLogs::sizeHint() const
{
return QSize(400,300);
}
QSizePolicy ListLogs::sizePolicy() const
{
return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
}
void ListLogs::closeEvent(QCloseEvent *e)
{
done(1);
}
void ListLogs::doubleClickedData(QListViewItem *,const QPoint &,int)
{
okButtonData();
}
void ListLogs::okButtonData()
{
QListViewItem *item=list_log_list->selectedItem();
if(item==NULL) {
return;
}
*list_logname=item->text(0);
done(0);
}
void ListLogs::cancelButtonData()
{
done(-1);
}
void ListLogs::RefreshList()
{
RDSqlQuery *q;
QString sql;
QListViewItem *l;
list_log_list->clear(); // Note: clear here, in case user has no perms.
sql="select NAME,DESCRIPTION,SERVICE from LOGS where TYPE=0";
if (rdstation_conf->broadcastSecurity() == RDStation::UserSec) {
QStringList services_list;
QString sql_where;
services_list = rduser->services();
if(services_list.size()==0) {
return;
}
sql_where=" and (";
for ( QStringList::Iterator it = services_list.begin();
it != services_list.end(); ++it ) {
sql_where+=QString().sprintf("SERVICE=\"%s\"||",
(const char *)*it);
}
sql_where=sql_where.left(sql_where.length()-2);
sql_where+=")";
sql=sql+sql_where;
} // else no filter for RDStation::HostSec
q=new RDSqlQuery(sql);
while(q->next()) {
l=new QListViewItem(list_log_list);
l->setText(0,q->value(0).toString());
l->setText(1,q->value(1).toString());
l->setText(2,q->value(2).toString());
}
delete q;
}

54
rdlogedit/list_logs.h Normal file
View File

@@ -0,0 +1,54 @@
// list_logs.h
//
// Select a Rivendell Log
//
// (C) Copyright 2002-2004 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: list_logs.h,v 1.5 2010/07/29 19:32:37 cvs Exp $
//
// 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 LIST_LOGS_H
#define LIST_LOGS_H
#include <qsqldatabase.h>
#include <qdialog.h>
#include <qlistview.h>
#include <qpushbutton.h>
class ListLogs : public QDialog
{
Q_OBJECT
public:
ListLogs(QString *logname,QWidget *parent=0,const char *name=0);
QSize sizeHint() const;
QSizePolicy sizePolicy() const;
private slots:
void doubleClickedData(QListViewItem *,const QPoint &,int);
void closeEvent(QCloseEvent *);
void okButtonData();
void cancelButtonData();
private:
void RefreshList();
QListView *list_log_list;
QString *list_logname;
};
#endif

338
rdlogedit/list_reports.cpp Normal file
View File

@@ -0,0 +1,338 @@
// list_reports.cpp
//
// List and Generate Log Reports
//
// (C) Copyright 2002-2006 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: list_reports.cpp,v 1.7 2010/07/29 19:32:37 cvs Exp $
//
// 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 <qdialog.h>
#include <qpushbutton.h>
#include <qlabel.h>
#include <qsqldatabase.h>
#include <qmessagebox.h>
#include <rdconf.h>
#include <rdtextfile.h>
#include <rddatedialog.h>
#include <globals.h>
#include <list_reports.h>
ListReports::ListReports(const QString &logname,const QString &description,
const QString service_name,const QDate &start_date,
const QDate &end_date,bool auto_refresh,
RDLogEvent *events,
QWidget *parent,const char *name)
: QDialog(parent,name,true)
{
list_log_name=logname;
list_description=description;
list_service_name=service_name;
list_start_date=start_date;
list_end_date=end_date;
list_auto_refresh=auto_refresh;
list_events=events;
//
// Fix the Window Size
//
setMinimumWidth(sizeHint().width());
setMaximumWidth(sizeHint().width());
setMinimumHeight(sizeHint().height());
setMaximumHeight(sizeHint().height());
setCaption(tr("RDLibrary Reports"));
//
// Create Fonts
//
QFont font=QFont("Helvetica",12,QFont::Bold);
font.setPixelSize(12);
QFont select_font=QFont("Helvetica",12,QFont::Normal);
select_font.setPixelSize(12);
//
// Reports List
//
list_reports_box=new QComboBox(this,"list_reports_box");
list_reports_box->setGeometry(50,10,sizeHint().width()-60,19);
list_reports_box->insertItem(tr("Log Listing"));
list_reports_box->insertItem(tr("Log Exception Report"));
QLabel *list_reports_label=
new QLabel(list_reports_box,tr("Type:"),
this,"list_reports_label");
list_reports_label->setGeometry(10,10,35,19);
list_reports_label->setFont(font);
list_reports_label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);
//
// Effective Date
//
list_date_edit=new QDateEdit(this,"list_date_edit");
list_date_edit->setGeometry(110,34,100,19);
QLabel *list_date_label=
new QLabel(list_date_edit,tr("Effective Date:"),
this,"list_date_label");
list_date_label->setGeometry(10,34,95,19);
list_date_label->setFont(font);
list_date_label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);
QPushButton *button=new QPushButton(this,"select_button");
button->setGeometry(215,32,60,24);
button->setFont(select_font);
button->setText(tr("&Select"));
connect(button,SIGNAL(clicked()),this,SLOT(selectDateData()));
list_date_edit->setDate(QDate::currentDate());
//
// Generate Button
//
button=new QPushButton(this,"generate_button");
button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50);
button->setDefault(true);
button->setFont(font);
button->setText(tr("&Generate"));
connect(button,SIGNAL(clicked()),this,SLOT(generateData()));
//
// Close Button
//
button=new QPushButton(this,"close_button");
button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50);
button->setFont(font);
button->setText(tr("&Close"));
connect(button,SIGNAL(clicked()),this,SLOT(closeData()));
}
ListReports::~ListReports()
{
}
QSize ListReports::sizeHint() const
{
return QSize(350,132);
}
QSizePolicy ListReports::sizePolicy() const
{
return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
}
void ListReports::selectDateData()
{
QDate today=QDate::currentDate();
QDate date=list_date_edit->date();
RDDateDialog *d=new RDDateDialog(today.year()-1,today.year()+1,this);
if(d->exec(&date)==0) {
list_date_edit->setDate(date);
}
delete d;
}
void ListReports::generateData()
{
QString report;
switch(list_reports_box->currentItem()) {
case 0: // Event Report
GenerateLogReport(&report);
break;
case 1: // XLoad Report
GenerateExceptionReport(&report,list_date_edit->date());
break;
default:
return;
}
if(!report.isEmpty()) {
RDTextFile(report);
}
}
void ListReports::closeData()
{
done(-1);
}
void ListReports::GenerateLogReport(QString *report)
{
//
// Generate Header
//
QString refresh="No ";
if(list_auto_refresh) {
refresh="Yes";
}
QString start_date=tr("[none]");
if(!list_start_date.isNull()) {
start_date=list_start_date.toString("MM/dd/yyyy");
}
QString end_date=tr("[none]");
if(!list_end_date.isNull()) {
end_date=list_end_date.toString("MM/dd/yyyy");
}
*report=" Rivendell Log Listing\n";
*report+=QString().
sprintf("Generated: %s Log: %-30s Description: %s\n",
(const char *)QDateTime(QDate::currentDate(),QTime::currentTime()).
toString("MM/dd/yyyy - hh:mm:ss"),
(const char *)list_log_name.left(30),
(const char *)list_description.left(27));
*report+=QString().
sprintf("Service: %-10s AutoRefresh Enabled: %-3s Start Date: %-10s End Date: %s\n",
(const char *)list_service_name,
(const char *)refresh,
(const char *)start_date,(const char *)end_date);
*report+="\n";
*report+="-Type-- -Time---- Trans -Cart- -Group---- -Length- -Title--------------------------- -Artist----------------------- -Source----- Line\n";
//
// Generate Event Listing
//
RDLogLine *logline;
for(int i=0;i<list_events->size();i++) {
logline=list_events->logLine(i);
//
// Type
//
*report+=QString().sprintf("%-7s ",
(const char *)RDLogLine::typeText(logline->type()));
//
// Time
//
if(logline->timeType()==RDLogLine::Hard) {
*report+="H";
}
else {
*report+=" ";
}
if(!logline->startTime(RDLogLine::Imported).isNull()) {
*report+=QString().sprintf("%-8s ",
(const char *)logline->
startTime(RDLogLine::Logged).
toString("hh:mm:ss"));
}
else {
*report+=" ";
}
//
// Transition Type
//
*report+=QString().sprintf("%-5s ",
(const char *)RDLogLine::transText(logline->transType()).left(5));
switch(logline->type()) {
case RDLogLine::Cart:
case RDLogLine::Macro:
*report+=QString().sprintf("%06u ",logline->cartNumber());
*report+=QString().sprintf("%-10s ",
(const char *)logline->groupName());
*report+=QString().sprintf("%8s ",(const char *)
RDGetTimeLength(logline->forcedLength(),
false,false));
*report+=
QString().sprintf("%-33s ",
(const char *)logline->title().left(33));
*report+=
QString().sprintf("%-30s ",
(const char *)logline->artist().left(30));
break;
case RDLogLine::Marker:
case RDLogLine::Track:
*report+=" ";
*report+=" ";
*report+=" :00 ";
*report+=
QString().sprintf("%-30s ",
(const char *)logline->markerComment().left(30));
*report+=" ";
break;
case RDLogLine::TrafficLink:
*report+=" ";
*report+=" ";
*report+=" :00 ";
*report+="Traffic Import ";
*report+=" ";
break;
case RDLogLine::MusicLink:
*report+=" ";
*report+=" ";
*report+=" :00 ";
*report+="Music Import ";
*report+=" ";
break;
case RDLogLine::Chain:
*report+=" ";
*report+=" ";
*report+=" ";
*report+=
QString().sprintf("%-30s ",
(const char *)logline->markerLabel().left(30));
*report+=" ";
break;
break;
case RDLogLine::OpenBracket:
case RDLogLine::CloseBracket:
case RDLogLine::UnknownType:
break;
}
//
// Source
//
*report+=QString().sprintf("%-12s ",
(const char *)RDLogLine::sourceText(logline->source()));
//
// Line
//
*report+=QString().sprintf("%4d",i);
//
// End of Line
//
*report+="\n";
}
}
void ListReports::GenerateExceptionReport(QString *report,const QDate &date)
{
int errs=list_events->validate(report,date);
if(errs==0) {
QMessageBox::information(this,tr("Log Check"),tr("No exceptions found."));
*report="";
}
}

66
rdlogedit/list_reports.h Normal file
View File

@@ -0,0 +1,66 @@
// list_reports.h
//
// List and Generate Log Reports
//
// (C) Copyright 2002-2006 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: list_reports.h,v 1.5 2010/07/29 19:32:37 cvs Exp $
//
// 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 LIST_REPORTS_H
#define LIST_REPORTS_H
#include <qdialog.h>
#include <qdatetimeedit.h>
#include <qcombobox.h>
#include <qsqldatabase.h>
#include <rdlog.h>
#include <rdlog_event.h>
class ListReports : public QDialog
{
Q_OBJECT
public:
ListReports(const QString &logname,const QString &description,
const QString service_name,const QDate &start_date,
const QDate &end_date,bool auto_refresh,RDLogEvent *events,
QWidget *parent=0,const char *name=0);
~ListReports();
QSize sizeHint() const;
QSizePolicy sizePolicy() const;
private slots:
void selectDateData();
void generateData();
void closeData();
private:
void GenerateLogReport(QString *report);
void GenerateExceptionReport(QString *report,const QDate &date);
QComboBox *list_reports_box;
QString list_log_name;
QString list_description;
QString list_service_name;
QDate list_start_date;
QDate list_end_date;
bool list_auto_refresh;
RDLogEvent *list_events;
QDateEdit *list_date_edit;
};
#endif // LIST_REPORTS_H

112
rdlogedit/log_listview.cpp Normal file
View File

@@ -0,0 +1,112 @@
// log_listview.cpp
//
// The Log ListView widget for RDLogEdit.
//
// (C) Copyright 2002-2006 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: log_listview.cpp,v 1.10 2010/07/29 19:32:37 cvs Exp $
//
// 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 <qheader.h>
#include <log_listview.h>
LogListView::LogListView(QWidget *parent,const char *name)
: RDListView(parent,name)
{
log_parent=parent;
//
// Right Button Menu
//
log_menu=new QPopupMenu(this,"log_menu");
connect(log_menu,SIGNAL(aboutToShow()),this,SLOT(aboutToShowData()));
log_menu->insertItem(tr("PLAY Transition"),this,SLOT(playData()),0,0);
log_menu->insertItem(tr("SEGUE Transition"),this,SLOT(segueData()),0,1);
log_menu->insertItem(tr("STOP Transition"),this,SLOT(stopData()),0,2);
}
void LogListView::aboutToShowData()
{
RDListViewItem *item=(RDListViewItem *)selectedItem();
log_menu->setItemEnabled(0,item->line()!=TRACKER_MAX_LINENO);
log_menu->setItemEnabled(1,item->line()!=TRACKER_MAX_LINENO);
log_menu->setItemEnabled(2,item->line()!=TRACKER_MAX_LINENO);
log_transition_type=item->text(2).lower();
log_menu->setItemChecked(0,log_transition_type==tr("play"));
log_menu->setItemChecked(1,log_transition_type==tr("segue"));
log_menu->setItemChecked(2,log_transition_type==tr("stop"));
}
void LogListView::playData()
{
if(log_transition_type=="play") {
return;
}
emit transitionChanged(((RDListViewItem *)selectedItem())->line(),
RDLogLine::Play);
}
void LogListView::segueData()
{
if(log_transition_type=="segue") {
return;
}
emit transitionChanged(((RDListViewItem *)selectedItem())->line(),
RDLogLine::Segue);
}
void LogListView::stopData()
{
if(log_transition_type=="stop") {
return;
}
emit transitionChanged(((RDListViewItem *)selectedItem())->line(),
RDLogLine::Stop);
}
void LogListView::contentsMousePressEvent(QMouseEvent *e)
{
QListView::contentsMousePressEvent(e);
log_menu_item=(RDListViewItem *)selectedItem();
switch(e->button()) {
case QMouseEvent::RightButton:
//log_menu->setGeometry(log_parent->geometry().x()+
// geometry().x()+e->pos().x()+2,
// log_parent->geometry().y()+
// geometry().y()+e->pos().y()+
// header()->geometry().height()+2,
// log_menu->sizeHint().width(),
// log_menu->sizeHint().height());
log_menu->setGeometry(e->globalX(),e->globalY(),
log_menu->sizeHint().width(),
log_menu->sizeHint().height());
log_menu->exec();
break;
default:
e->ignore();
break;
}
}

64
rdlogedit/log_listview.h Normal file
View File

@@ -0,0 +1,64 @@
// log_listview.h
//
// The Log ListView widget for RDLogEdit.
//
// (C) Copyright 2002-2006 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: log_listview.h,v 1.7 2010/07/29 19:32:37 cvs Exp $
//
// 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 LOG_LISTVIEW_H
#define LOG_LISTVIEW_H
#include <qlistview.h>
#include <qpixmap.h>
#include <qpopupmenu.h>
#include <rdlistview.h>
#include <rdlog_event.h>
#include <rdlog_line.h>
#define TRACKER_MAX_LINENO 2147483647
class LogListView : public RDListView
{
Q_OBJECT
public:
LogListView(QWidget *parent,const char *name=0);
private slots:
void aboutToShowData();
void playData();
void segueData();
void stopData();
signals:
void transitionChanged(int line,RDLogLine::TransType trans);
protected:
void contentsMousePressEvent(QMouseEvent *e);
private:
QPopupMenu *log_menu;
RDListViewItem *log_menu_item;
QWidget *log_parent;
QString log_transition_type;
};
#endif // LOG_LISTVIEW_H

913
rdlogedit/rdlogedit.cpp Normal file
View File

@@ -0,0 +1,913 @@
// rdlogedit.cpp
//
// The Log Editor Utility for Rivendell.
//
// (C) Copyright 2002-2005 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: rdlogedit.cpp,v 1.77.4.9.2.1 2014/05/21 18:19:43 cvs Exp $
//
// 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 WIN32
#include <signal.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#endif // WIN32
#include <qapplication.h>
#include <qwindowsstyle.h>
#include <qwidget.h>
#include <qpainter.h>
#include <qsqlpropertymap.h>
#include <qmessagebox.h>
#include <qpushbutton.h>
#include <qlabel.h>
#include <qlabel.h>
#include <qlistview.h>
#include <qtextcodec.h>
#include <qtranslator.h>
#include <qsettings.h>
#include <qpixmap.h>
#include <qpainter.h>
#include <rd.h>
#include <rdconf.h>
#include <rdripc.h>
#include <rdstation.h>
#include <rdcheck_daemons.h>
#include <rdcreate_log.h>
#include <rdadd_log.h>
#include <rdcmd_switch.h>
#include <rddb.h>
#include <rdtextfile.h>
#include <rdmixer.h>
#include <dbversion.h>
#include <rdescape_string.h>
#include <rdlogedit.h>
#include <edit_log.h>
#include <globals.h>
#ifndef WIN32
#include <voice_tracker.h>
#endif // WIN32
//
// Icons
//
#include "../icons/rivendell-22x22.xpm"
#include "../icons/greencheckmark.xpm"
#include "../icons/redx.xpm"
#include "../icons/greenball.xpm"
#include "../icons/redball.xpm"
#include "../icons/whiteball.xpm"
//
// Global Resources
//
RDStation *rdstation_conf;
RDUser *rduser;
RDRipc *rdripc;
RDConfig *log_config;
RDLogeditConf *rdlogedit_conf;
RDSystem *rdsystem;
RDCartDialog *log_cart_dialog;
bool import_running=false;
#ifndef WIN32
RDCae *rdcae;
void SigHandler(int signo)
{
pid_t pLocalPid;
switch(signo) {
case SIGCHLD:
pLocalPid=waitpid(-1,NULL,WNOHANG);
while(pLocalPid>0) {
pLocalPid=waitpid(-1,NULL,WNOHANG);
}
import_running=false;
signal(SIGCHLD,SigHandler);
return;
}
}
#endif // WIN32
MainWidget::MainWidget(QWidget *parent,const char *name,WFlags f)
:QMainWindow(parent,name,f)
{
QString str1;
QString str2;
log_log_list=NULL;
bool skip_db_check=false;
unsigned schema=0;
QString sql;
RDSqlQuery *q;
//
// Read Command Options
//
RDCmdSwitch *cmd=new RDCmdSwitch(qApp->argc(),qApp->argv(),"rdlogedit","\n");
for(unsigned i=0;i<cmd->keys();i++) {
if(cmd->key(i)=="--skip-db-check") {
skip_db_check=true;
}
}
delete cmd;
//
// Fix the Window Size
//
setMinimumWidth(sizeHint().width());
setMinimumHeight(sizeHint().height());
//
// Ensure that the system daemons are running
//
#ifndef WIN32
RDInitializeDaemons();
#endif // WIN32
//
// Load Local Configs
//
log_config=new RDConfig();
log_config->load();
str1=QString("RDLogEdit")+"v"+VERSION+" - "+tr("Host");
str2=tr("User")+": ["+tr("Unknown")+"]";
setCaption(QString().sprintf("%s: %s, %s",(const char *)str1,
(const char *)log_config->stationName(),
(const char *)str2));
log_import_path=RDGetHomeDir();
//
// Open Database
//
QString err;
log_db=RDInitDb(&schema,&err);
if(!log_db) {
QMessageBox::warning(this,tr("Can't Connect"),err);
exit(0);
}
if((schema!=RD_VERSION_DATABASE)&&(!skip_db_check)) {
#ifdef WIN32
QMessageBox::warning(this,tr("RDLogEdit -- Database Skew"),
tr("This version of RDLogEdit is incompatible with the version installed on the server.\nSee your system administrator for an update!"));
#else
fprintf(stderr,
"rdlogedit: database version mismatch, should be %u, is %u\n",
RD_VERSION_DATABASE,schema);
#endif // WIN32
exit(256);
}
//
// Allocate Global Resources
//
rdstation_conf=new RDStation(log_config->stationName());
//
// CAE Connection
//
#ifndef WIN32
rdcae=new RDCae(rdstation_conf,log_config,parent,name);
rdcae->connectHost();
#endif // WIN32
//
// RIPC Connection
//
#ifndef WIN32
rdripc=new RDRipc(log_config->stationName());
connect(rdripc,SIGNAL(connected(bool)),this,SLOT(connectedData(bool)));
connect(rdripc,SIGNAL(userChanged()),this,SLOT(userData()));
rdripc->connectHost("localhost",RIPCD_TCP_PORT,log_config->password());
#else
rdripc=NULL;
#endif // WIN32
//
// System Configuration
//
rdsystem=new RDSystem();
//
// RDLogEdit Configuration
//
rdlogedit_conf=new RDLogeditConf(log_config->stationName());
//
// Cart Picker
//
#ifdef WIN32
log_cart_dialog=new RDCartDialog(&log_filter,&log_group,&log_schedcode,
NULL,NULL,rdstation_conf,rdsystem,
log_config,this);
#else
log_cart_dialog=new RDCartDialog(&log_filter,&log_group,&log_schedcode,
rdcae,rdripc,rdstation_conf,rdsystem,
log_config,this);
#endif
//
// User
//
#ifndef WIN32
rduser=NULL;
//
// Load Audio Assignments
//
RDSetMixerPorts(log_config->stationName(),rdcae);
#else
rduser=new RDUser(RD_USER_LOGIN_NAME);
#endif // WIN32
//
// 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);
//
// Create Icons
//
log_rivendell_map=new QPixmap(rivendell_xpm);
setIcon(*log_rivendell_map);
log_greencheckmark_map=new QPixmap(greencheckmark_xpm);
log_redx_map=new QPixmap(redx_xpm);
log_whiteball_map=new QPixmap(whiteball_xpm);
log_greenball_map=new QPixmap(greenball_xpm);
log_redball_map=new QPixmap(redball_xpm);
//
// Service Selector
//
log_service_box=new QComboBox(this);
log_service_box->setFont(default_font);
connect(log_service_box,SIGNAL(activated(const QString &)),
this,SLOT(filterChangedData(const QString &)));
log_service_box->insertItem(tr("ALL"));
sql="select NAME from SERVICES order by NAME";
q=new RDSqlQuery(sql);
while(q->next()) {
log_service_box->insertItem(q->value(0).toString());
}
delete q;
log_service_label=new QLabel(log_service_box,tr("Service")+":",this);
log_service_label->setFont(button_font);
log_service_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
//
// Filter
//
log_filter_edit=new QLineEdit(this);
log_filter_edit->setFont(default_font);
connect(log_filter_edit,SIGNAL(textChanged(const QString &)),
this,SLOT(filterChangedData(const QString &)));
log_filter_label=new QLabel(log_filter_edit,tr("Filter")+":",this);
log_filter_label->setFont(button_font);
log_filter_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
log_filter_button=new QPushButton(tr("Clear"),this);
log_filter_button->setFont(button_font);
connect(log_filter_button,SIGNAL(clicked()),this,SLOT(filterClearedData()));
//
// Log List
//
log_log_list=new QListView(this,"log_log_list");
log_log_list->setFont(default_font);
log_log_list->setAllColumnsShowFocus(true);
log_log_list->setItemMargin(5);
connect(log_log_list,
SIGNAL(doubleClicked(QListViewItem *,const QPoint &,int)),
this,
SLOT(logDoubleclickedData(QListViewItem *,const QPoint &,int)));
log_log_list->addColumn("");
log_log_list->setColumnAlignment(0,Qt::AlignCenter);
log_log_list->addColumn(tr("LOG NAME"));
log_log_list->setColumnAlignment(1,Qt::AlignHCenter);
log_log_list->addColumn(tr("DESCRIPTION"));
log_log_list->setColumnAlignment(2,Qt::AlignLeft);
log_log_list->addColumn(tr("SERVICE"));
log_log_list->setColumnAlignment(3,Qt::AlignLeft);
log_log_list->addColumn(tr("MUSIC"));
log_log_list->setColumnAlignment(4,Qt::AlignCenter);
log_log_list->addColumn(tr("TRAFFIC"));
log_log_list->setColumnAlignment(5,Qt::AlignCenter);
log_log_list->addColumn(tr("TRACKS"));
log_log_list->setColumnAlignment(6,Qt::AlignHCenter);
log_log_list->addColumn(tr("VALID FROM"));
log_log_list->setColumnAlignment(7,Qt::AlignHCenter);
log_log_list->addColumn(tr("VALID TO"));
log_log_list->setColumnAlignment(8,Qt::AlignHCenter);
log_log_list->addColumn(tr("AUTO REFRESH"));
log_log_list->setColumnAlignment(9,Qt::AlignHCenter);
log_log_list->addColumn(tr("ORIGIN"));
log_log_list->setColumnAlignment(10,Qt::AlignLeft);
log_log_list->addColumn(tr("LAST LINKED"));
log_log_list->setColumnAlignment(11,Qt::AlignLeft);
log_log_list->addColumn(tr("LAST MODIFIED"));
log_log_list->setColumnAlignment(12,Qt::AlignLeft);
RefreshList();
//
// Add Button
//
log_add_button=new QPushButton(this,"log_add_button");
log_add_button->setFont(button_font);
log_add_button->setText(tr("&Add"));
connect(log_add_button,SIGNAL(clicked()),this,SLOT(addData()));
//
// Edit Button
//
log_edit_button=new QPushButton(this,"log_edit_button");
log_edit_button->setFont(button_font);
log_edit_button->setText(tr("&Edit"));
connect(log_edit_button,SIGNAL(clicked()),this,SLOT(editData()));
//
// Delete Button
//
log_delete_button=new QPushButton(this,"log_delete_button");
log_delete_button->setFont(button_font);
log_delete_button->setText(tr("&Delete"));
connect(log_delete_button,SIGNAL(clicked()),this,SLOT(deleteData()));
//
// Tracker Button
//
log_track_button=new QPushButton(this,"log_track_button");
log_track_button->setFont(button_font);
log_track_button->setText(tr("Voice\n&Tracker"));
connect(log_track_button,SIGNAL(clicked()),this,SLOT(trackData()));
#ifdef WIN32
log_track_button->hide();
#endif
//
// Log Report Button
//
log_report_button=new QPushButton(this,"log_report_button");
log_report_button->setFont(button_font);
log_report_button->setText(tr("Log\nReport"));
connect(log_report_button,SIGNAL(clicked()),this,SLOT(reportData()));
//
// Close Button
//
log_close_button=new QPushButton(this,"log_close_button");
log_close_button->setFont(button_font);
log_close_button->setText(tr("&Close"));
connect(log_close_button,SIGNAL(clicked()),this,SLOT(quitMainWidget()));
#ifndef WIN32
//
// Setup Signal Handling
//
::signal(SIGCHLD,SigHandler);
#endif // WIN32
}
QSize MainWidget::sizeHint() const
{
return QSize(640,480);
}
QSizePolicy MainWidget::sizePolicy() const
{
return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
}
void MainWidget::connectedData(bool state)
{
}
void MainWidget::userData()
{
QString str1;
QString str2;
str1=QString("RDLogEdit")+" v"+VERSION+" - "+tr("Host");
str2=QString(tr("User"));
setCaption(str1+": "+log_config->stationName()+", "+str2+": "+
rdripc->user());
if(rduser!=NULL) {
delete rduser;
}
rduser=new RDUser(rdripc->user());
//
// Set Control Perms
//
log_add_button->setEnabled(rduser->createLog());
log_delete_button->setEnabled(rduser->deleteLog());
log_track_button->setEnabled(rduser->voicetrackLog());
// Update the list of logs if applicable.
if (rdstation_conf->broadcastSecurity() == RDStation::UserSec) {
RefreshList();
}
}
void MainWidget::addData()
{
QString logname;
QString svcname;
RDSqlQuery *q;
QString sql;
std::vector<QString> newlogs;
RDAddLog *log;
if(rduser->createLog()) {
if (rdstation_conf->broadcastSecurity() == RDStation::UserSec) {
log=new RDAddLog(&logname,&svcname,NULL,tr("Add Log"),this,"add_log",
rduser);
} else { // RDStation::HostSec
log=new RDAddLog(&logname,&svcname,NULL,tr("Add Log"),this,"add_log");
}
if(log->exec()!=0) {
delete log;
return;
}
delete log;
sql=QString().sprintf("INSERT INTO LOGS SET NAME=\"%s\",TYPE=0,\
DESCRIPTION=\"%s log\",ORIGIN_USER=\"%s\",\
ORIGIN_DATETIME=NOW(),LINK_DATETIME=NOW(),\
SERVICE=\"%s\"",
(const char *)logname,
(const char *)logname,
#ifdef WIN32
RD_USER_LOGIN_NAME,
#else
(const char *)rdripc->user(),
#endif // WIN32
(const char *)svcname);
q=new RDSqlQuery(sql);
if(!q->isActive()) {
QMessageBox::warning(this,tr("Log Exists"),tr("Log Already Exists!"));
delete q;
return;
}
delete q;
RDCreateLogTable(RDLog::tableName(logname));
EditLog *editlog=new EditLog(logname,&log_clipboard,&newlogs,this);
editlog->exec();
delete editlog;
ListListViewItem *item=new ListListViewItem(log_log_list);
item->setText(1,logname);
RefreshItem(item);
log_log_list->setSelected(item,true);
log_log_list->ensureItemVisible((QListViewItem *)item);
for(unsigned i=0;i<newlogs.size();i++) {
item=new ListListViewItem(log_log_list);
item->setText(1,newlogs[i]);
RefreshItem(item);
}
}
}
void MainWidget::editData()
{
ListListViewItem *item=(ListListViewItem *)log_log_list->selectedItem();
std::vector<QString> newlogs;
if(item==NULL) {
return;
}
EditLog *log=new EditLog(item->text(1),&log_clipboard,&newlogs,this);
log->exec();
delete log;
RefreshItem(item);
for(unsigned i=0;i<newlogs.size();i++) {
item=new ListListViewItem(log_log_list);
item->setText(1,newlogs[i]);
RefreshItem(item);
}
}
void MainWidget::deleteData()
{
QString filename;
QString str1;
QString str2;
unsigned tracks=0;
QListViewItem *item=log_log_list->selectedItem();
if(item==NULL) {
return;
}
if(rduser->deleteLog()) {
if(QMessageBox::question(this,tr("Delete Log"),
tr(QString().sprintf("Are you sure you want to delete the \"%s\" log?",
(const char *)item->text(1))),
QMessageBox::Yes,
QMessageBox::No)!=QMessageBox::Yes) {
return;
}
RDLog *log=new RDLog(item->text(1));
if((tracks=log->completedTracks())>0) {
str1=QString(tr("This will also delete the"));
str2=QString(tr("voice tracks associated with this log.\nContinue?"));
if(QMessageBox::question(this,tr("Tracks Exist"),
QString().sprintf("%s %u %s",
(const char *)str1,
tracks,
(const char *)str2),
QMessageBox::Yes,QMessageBox::No)!=
QMessageBox::Yes) {
delete log;
return;
}
}
if(!log->remove(rdstation_conf,rduser,log_config)) {
QMessageBox::warning(this,tr("RDLogEdit"),
tr("Unable to delete log, audio deletion error!"));
delete log;
return;
}
delete log;
delete item;
}
}
void MainWidget::trackData()
{
#ifndef WIN32
ListListViewItem *item=(ListListViewItem *)log_log_list->selectedItem();
if(item==NULL) {
return;
}
VoiceTracker *dialog=new VoiceTracker(item->text(1),&log_import_path);
dialog->exec();
delete dialog;
RefreshItem(item);
#endif // WIN32
}
void MainWidget::reportData()
{
QString report;
QString sql;
RDSqlQuery *q;
//
// Generate Header
//
report=" Rivendell Log Listing\n";
report+=QString().
sprintf("Generated: %s\n",
(const char *)QDateTime(QDate::currentDate(),QTime::currentTime()).
toString("MM/dd/yyyy - hh:mm:ss"));
report+="\n";
report+="Rdy -Log Name-------------------- -Description----------------- -Service------------ Mus Tfc Tracks- Start Date -End Date- -Mod Date-\n";
//
// Report Body
//
sql="select NAME,DESCRIPTION,SERVICE,MUSIC_LINKS,MUSIC_LINKED,\
TRAFFIC_LINKS,TRAFFIC_LINKED,COMPLETED_TRACKS,SCHEDULED_TRACKS,\
START_DATE,END_DATE,MODIFIED_DATETIME from LOGS order by NAME";
q=new RDSqlQuery(sql);
while(q->next()) {
//
// Summary Status
//
if(((q->value(3).toInt()==0)||(q->value(4).toString()=="Y"))&&
((q->value(5).toInt()==0)||(q->value(6).toString()=="Y"))&&
(q->value(7).toUInt()==q->value(8).toUInt())) {
report+=" Y ";
}
else {
report+=" N ";
}
//
// Log Name
//
report+=QString().sprintf("%-29s ",
(const char *)q->value(0).toString().left(29));
//
// Description
//
report+=QString().sprintf("%-29s ",
(const char *)q->value(1).toString().left(29));
//
// Service
//
report+=QString().sprintf("%-20s ",
(const char *)q->value(2).toString().left(20));
//
// Music Linked
//
if(q->value(3).toInt()>0) {
report+=QString().sprintf(" %s ",
(const char *)q->value(4).toString());
}
else {
report+="n/a ";
}
//
// Traffic Linked
//
if(q->value(5).toInt()>0) {
report+=QString().sprintf(" %s ",
(const char *)q->value(6).toString());
}
else {
report+="n/a ";
}
//
// Voice Tracks
//
report+=
QString().sprintf("%3u/%3u ",q->value(8).toUInt(),q->value(7).toUInt());
//
// Start Date
//
if(q->value(9).toDate().isNull()) {
report+="[none] ";
}
else {
report+=QString().sprintf("%s ",
(const char *)q->value(9).toDate().toString("MM/dd/yyyy"));
}
//
// End Date
//
if(q->value(10).toDate().isNull()) {
report+="[none] ";
}
else {
report+=QString().sprintf("%s ",
(const char *)q->value(10).toDate().toString("MM/dd/yyyy"));
}
//
// Last Modified Date
//
report+=QString().sprintf("%s",
(const char *)q->value(11).toDate().toString("MM/dd/yyyy"));
//
// End of Line
//
report+="\n";
}
delete q;
RDTextFile(report);
}
void MainWidget::filterChangedData(const QString &str)
{
RefreshList();
}
void MainWidget::filterClearedData()
{
log_filter_edit->clear();
filterChangedData("");
}
void MainWidget::logDoubleclickedData(QListViewItem *,const QPoint &,int)
{
editData();
}
void MainWidget::quitMainWidget()
{
log_db->removeDatabase(log_config->mysqlDbname());
exit(0);
}
void MainWidget::resizeEvent(QResizeEvent *e)
{
if(log_log_list==NULL) {
return;
}
log_service_label->setGeometry(10,10,70,20);
log_service_box->setGeometry(85,10,140,20);
log_filter_label->setGeometry(230,10,50,20);
log_filter_edit->setGeometry(285,10,size().width()-360,20);
log_filter_button->setGeometry(size().width()-60,8,50,25);
log_log_list->setGeometry(10,37,size().width()-20,size().height()-107);
log_add_button->setGeometry(10,size().height()-55,80,50);
log_edit_button->setGeometry(100,size().height()-55,80,50);
log_delete_button->setGeometry(190,size().height()-55,80,50);
log_track_button->setGeometry(300,size().height()-55,80,50);
log_report_button->setGeometry(400,size().height()-55,80,50);
log_close_button->setGeometry(size().width()-90,size().height()-55,80,50);
}
void MainWidget::RefreshItem(ListListViewItem *item)
{
RDSqlQuery *q;
QString sql;
sql=QString().sprintf("select DESCRIPTION,SERVICE,START_DATE,END_DATE,\
ORIGIN_USER,ORIGIN_DATETIME,COMPLETED_TRACKS,\
SCHEDULED_TRACKS,MUSIC_LINKS,MUSIC_LINKED,\
TRAFFIC_LINKS,TRAFFIC_LINKED,LINK_DATETIME,\
MODIFIED_DATETIME,AUTO_REFRESH from LOGS\
where (TYPE=0)&&(LOG_EXISTS=\"Y\")&&(NAME=\"%s\")",
(const char *)item->text(1));
q=new RDSqlQuery(sql);
if(q->next()) {
item->setText(2,q->value(0).toString());
item->setText(3,q->value(1).toString());
if((q->value(6).toInt()==q->value(7).toInt())&&
((q->value(8).toInt()==0)||(q->value(9).toString()=="Y"))&&
((q->value(10).toInt()==0)||(q->value(11).toString()=="Y"))) {
item->setPixmap(0,*log_greencheckmark_map);
}
else {
item->setPixmap(0,*log_redx_map);
}
if(q->value(8).toInt()==0) {
item->setPixmap(4,*log_whiteball_map);
}
else {
if(q->value(9).toString()=="Y") {
item->setPixmap(4,*log_greenball_map);
}
else {
item->setPixmap(4,*log_redball_map);
}
}
if(q->value(10).toInt()==0) {
item->setPixmap(5,*log_whiteball_map);
}
else {
if(q->value(11).toString()=="Y") {
item->setPixmap(5,*log_greenball_map);
}
else {
item->setPixmap(5,*log_redball_map);
}
}
item->setTracks(q->value(6).toInt());
item->setTotalTracks(q->value(7).toInt());
item->setTrackColumn(6);
if(!q->value(2).toDate().isNull()) {
item->setText(7,q->value(2).toDate().toString("MM/dd/yyyy"));
}
else {
item->setText(7,tr("Always"));
}
if(!q->value(3).toDate().isNull()) {
item->setText(8,q->value(3).toDate().toString("MM/dd/yyyy"));
}
else {
item->setText(8,tr("TFN"));
}
item->setText(9,q->value(14).toString());
item->setText(10,q->value(4).toString()+QString(" - ")+
q->value(5).toDateTime().toString("MM/dd/yyyy - hh:mm:ss"));
item->
setText(11,q->value(12).toDateTime().toString("MM/dd/yyyy - hh:mm:ss"));
item->
setText(12,q->value(13).toDateTime().toString("MM/dd/yyyy - hh:mm:ss"));
}
delete q;
}
void MainWidget::RefreshList()
{
RDSqlQuery *q;
QString sql;
ListListViewItem *item;
log_log_list->clear(); // Note: clear here, in case user has no perms.
sql="select NAME from LOGS where (TYPE=0)&&(LOG_EXISTS=\"Y\")";
if(log_service_box->currentItem()!=0) {
sql+="&&(SERVICE=\""+RDEscapeString(log_service_box->currentText())+"\")";
}
QString filter=log_filter_edit->text();
if(!filter.isEmpty()) {
sql+="&&((NAME like \"%%"+RDEscapeString(filter)+"%%\")||";
sql+="(DESCRIPTION like \"%%"+RDEscapeString(filter)+"%%\")||";
sql+="(SERVICE like \"%%"+RDEscapeString(filter)+"%%\"))";
}
if (rdstation_conf->broadcastSecurity() == RDStation::UserSec
&& rduser != NULL) {
QStringList services_list;
QString sql_where;
services_list = rduser->services();
if(services_list.size()==0) {
return;
}
sql_where=" and (";
for ( QStringList::Iterator it = services_list.begin();
it != services_list.end(); ++it ) {
sql_where+=QString().sprintf("SERVICE=\"%s\"||",
(const char *)*it);
}
sql_where=sql_where.left(sql_where.length()-2);
sql_where+=")";
sql=sql+sql_where;
} // else no filter for RDStation::HostSec
q=new RDSqlQuery(sql);
while(q->next()) {
item=new ListListViewItem(log_log_list);
item->setText(1,q->value(0).toString());
RefreshItem(item);
}
delete q;
}
int main(int argc,char *argv[])
{
QApplication a(argc,argv);
//
// Load Translations
//
QString tr_path;
QString qt_path;
#ifdef WIN32
QSettings settings;
settings.insertSearchPath(QSettings::Windows,"/SalemRadioLabs");
tr_path=QString().sprintf("%s\\",
(const char *)settings.
readEntry("/Rivendell/InstallDir"));
qt_path=tr_path;
#else
tr_path=QString(PREFIX)+QString("/share/rivendell/");
qt_path=QString(QTDIR)+QString("/translation/");
#endif // WIN32
QTranslator qt(0);
qt.load(qt_path+QString("qt_")+QTextCodec::locale(),".");
a.installTranslator(&qt);
QTranslator rd(0);
rd.load(tr_path+QString("librd_")+QTextCodec::locale(),".");
a.installTranslator(&rd);
QTranslator rdhpi(0);
rdhpi.load(tr_path+QString("librdhpi_")+QTextCodec::locale(),".");
a.installTranslator(&rdhpi);
QTranslator tr(0);
tr.load(tr_path+QString("rdlogedit_")+QTextCodec::locale(),".");
a.installTranslator(&tr);
//
// Start Event Loop
//
MainWidget *w=new MainWidget(NULL,"main");
a.setMainWidget(w);
w->setGeometry(QRect(QPoint(w->geometry().x(),w->geometry().y()),
w->sizeHint()));
w->show();
return a.exec();

106
rdlogedit/rdlogedit.h Normal file
View File

@@ -0,0 +1,106 @@
// rdlogedit.h
//
// The Log Editor Utility for Rivendell.
//
// (C) Copyright 2002-2003 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: rdlogedit.h,v 1.28.4.1 2014/01/08 23:32:50 cvs Exp $
//
// 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 RDLOGEDIT_H
#define RDLOGEDIT_H
#include <vector>
#include <qmainwindow.h>
#include <qsize.h>
#include <qsizepolicy.h>
#include <qsqldatabase.h>
#include <qlineedit.h>
#include <qlistview.h>
#include <qpushbutton.h>
#include <qpixmap.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <rduser.h>
#include <rdripc.h>
#include <rdlibrary_conf.h>
#include <rdlog_line.h>
#include <list_listviewitem.h>
class MainWidget : public QMainWindow
{
Q_OBJECT
public:
MainWidget(QWidget *parent=0,const char *name=0,WFlags f=0);
QSize sizeHint() const;
QSizePolicy sizePolicy() const;
private slots:
void connectedData(bool state);
void userData();
void addData();
void editData();
void deleteData();
void trackData();
void reportData();
void filterChangedData(const QString &str);
void filterClearedData();
void logDoubleclickedData(QListViewItem *item,const QPoint &pt,int col);
void quitMainWidget();
protected:
void resizeEvent(QResizeEvent *e);
private:
void RefreshItem(ListListViewItem *item);
void RefreshList();
QSqlDatabase *log_db;
QString log_filename;
QString log_import_path;
QLabel *log_user_label;
int log_card_no;
int log_stream_no;
QLabel *log_service_label;
QComboBox *log_service_box;
QLabel *log_filter_label;
QLineEdit *log_filter_edit;
QPushButton *log_filter_button;
QListView *log_log_list;
std::vector<RDLogLine> log_clipboard;
QPushButton *log_add_button;
QPushButton *log_edit_button;
QPushButton *log_delete_button;
QPushButton *log_track_button;
QPushButton *log_report_button;
QPushButton *log_close_button;
QPixmap *log_rivendell_map;
QPixmap *log_greencheckmark_map;
QPixmap *log_redx_map;
QPixmap *log_whiteball_map;
QPixmap *log_greenball_map;
QPixmap *log_redball_map;
QString log_filter;
QString log_group;
QString log_schedcode;
};
#endif // RDLOGEDIT_H

80
rdlogedit/rdlogedit.pro Normal file
View File

@@ -0,0 +1,80 @@
# rdlogedit.pro
#
# The rdlogedit/ QMake project file for Rivendell
#
# (C) Copyright 2003-2004 Fred Gleason <fredg@paravelsystems.com>
#
# $Id: rdlogedit.pro,v 1.17.2.3 2013/12/27 22:12:29 cvs Exp $
#
# 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.
TEMPLATE = app
TARGET = rdlogedit
win32 {
DEFINES += WIN32
DEFINES += VERSION=\"$$[VERSION]\"
DEFINES += PACKAGE=\"rivendell\"
DEFINES += PACKAGE_VERSION=\"$$[VERSION]\"
DEFINES += PACKAGE_NAME=\"rivendell\"
DEFINES += PACKAGE_BUGREPORT=\"fredg@paravelsystems.com\"
}
SOURCES += add_meta.cpp
SOURCES += drop_listview.cpp
SOURCES += edit_chain.cpp
SOURCES += edit_log.cpp
SOURCES += edit_logline.cpp
SOURCES += edit_marker.cpp
SOURCES += edit_track.cpp
SOURCES += list_listviewitem.cpp
SOURCES += list_logs.cpp
SOURCES += list_reports.cpp
SOURCES += rdlogedit.cpp
x11 {
SOURCES += voice_tracker.cpp
}
HEADERS += add_meta.h
HEADERS += drop_listview.h
HEADERS += edit_chain.h
HEADERS += edit_log.h
HEADERS += edit_logline.h
HEADERS += edit_marker.h
HEADERS += edit_track.h
HEADERS += globals.h
HEADERS += list_listviewitem.h
HEADERS += list_logs.h
HEADERS += list_reports.h
HEADERS += rdlogedit.h
x11 {
HEADERS += voice_tracker.h
}
RES_FILE += ..\icons\rivendell.res
INCLUDEPATH += ..\lib
LIBS = -lqui -L..\lib -llib
CONFIG += qt
TRANSLATIONS += rdlogedit_cs.ts
TRANSLATIONS += rdlogedit_de.ts
TRANSLATIONS += rdlogedit_es.ts
TRANSLATIONS += rdlogedit_fr.ts
TRANSLATIONS += rdlogedit_nb.ts
TRANSLATIONS += rdlogedit_nn.ts
TRANSLATIONS += rdlogedit_pt_BR.ts

1103
rdlogedit/rdlogedit_cs.ts Normal file

File diff suppressed because it is too large Load Diff

1102
rdlogedit/rdlogedit_de.ts Normal file

File diff suppressed because it is too large Load Diff

1109
rdlogedit/rdlogedit_es.ts Normal file

File diff suppressed because it is too large Load Diff

1080
rdlogedit/rdlogedit_fr.ts Normal file

File diff suppressed because it is too large Load Diff

1124
rdlogedit/rdlogedit_nb.ts Normal file

File diff suppressed because it is too large Load Diff

1124
rdlogedit/rdlogedit_nn.ts Normal file

File diff suppressed because it is too large Load Diff

1110
rdlogedit/rdlogedit_pt_BR.ts Normal file

File diff suppressed because it is too large Load Diff

4146
rdlogedit/voice_tracker.cpp Normal file

File diff suppressed because it is too large Load Diff

293
rdlogedit/voice_tracker.h Normal file
View File

@@ -0,0 +1,293 @@
// voice_tracker.h
//
// A Rivendell Voice Tracker
//
// (C) Copyright 2002-2006 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: voice_tracker.h,v 1.50 2010/09/16 19:52:08 cvs Exp $
//
// 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 VOICE_TRACKER_H
#define VOICE_TRACKER_H
#include <qdialog.h>
#include <qlistview.h>
#include <qpixmap.h>
#include <qradiobutton.h>
#include <qsqldatabase.h>
#include <qpushbutton.h>
#include <qlineedit.h>
#include <qlabel.h>
#include <qpixmap.h>
#include <qtimer.h>
#include <qcursor.h>
#include <qpopupmenu.h>
#include <rdtransportbutton.h>
#include <rdstereometer.h>
#include <rdcart.h>
#include <rdcut.h>
#include <rdgroup.h>
#include <rdlog.h>
#include <rdlog_event.h>
#include <rdplay_deck.h>
#include <log_listview.h>
#include <rdevent_player.h>
#include <rdwavepainter.h>
#include <rdsettings.h>
//
// Widget Settings
//
#define TRACKER_TEXT_COLOR red
#define TRACKER_RUBBERBAND_COLOR "#008000"
#define TRACKER_RECORD_COLOR green
#define TRACKER_RECORD_BUTTON_COLOR red
#define TRACKER_START_BUTTON_COLOR green
#define TRACKER_ABORT_BUTTON_COLOR red
#define TRACKER_DONE_BUTTON_COLOR blue
#define TRACKER_START_WIDTH 19633
#define TRACKER_MSECS_PER_PIXEL 29
//#define TRACKER_MB_PER_PIXEL 141
#define TRACKER_MB_PER_PIXEL 42
#define TRACKER_GAIN_MARGIN 4
#define TRACKER_MAX_GAIN 0
#define TRACKER_MIN_GAIN -3000
#define TRACKER_X_ORIGIN 12
#define TRACKER_X_WIDTH sizeHint().width()-123
#define TRACKER_Y_ORIGIN 12
#define TRACKER_Y_HEIGHT 79
#define TRACKER_SCROLL_SCALE 2
#define TRACKER_SCROLL_SCALE 2
#define TRACKER_FORCED_SEGUE 1000
class VoiceTracker : public QDialog
{
Q_OBJECT
public:
VoiceTracker(const QString &logname,QString *import_path,
QWidget *parent=0,const char *name=0);
~VoiceTracker();
QSize sizeHint() const;
QSizePolicy sizePolicy() const;
private slots:
void updateMenuData();
void hideMenuData();
virtual void keyPressEvent(QKeyEvent *e);
virtual void keyReleaseEvent(QKeyEvent *e);
virtual void wheelEvent(QWheelEvent *e);
void playData();
void stopData();
void track1Data();
void recordData();
void track2Data();
void finishedData();
void postData();
void resetData();
void insertData();
void insertData(int line,RDLogLine *logline,bool warn);
void deleteData();
void deleteData(int line,bool warn);
void previousData();
void nextData();
void editAudioData();
void undoChangesData();
void setStartPointData();
void setEndPointData();
void setHookPointData();
void stateChangedData(int id,RDPlayDeck::State state);
void positionData(int id,int msecs);
void segueStartData(int id);
void logClickedData(QListViewItem *item,const QPoint &pt,int col);
void transitionChangedData(int line,RDLogLine::TransType trans);
void meterData();
void recordLoadedData(int card,int stream);
void recordingData(int card,int stream);
void recordStoppedData(int card,int stream);
void recordUnloadedData(int cart,int stream,unsigned msecs);
void closeData();
protected:
void paintEvent(QPaintEvent *e);
void mousePressEvent(QMouseEvent *e);
void mouseReleaseEvent(QMouseEvent *e);
void mouseMoveEvent(QMouseEvent *e);
private:
enum DeckState {DeckIdle=0,DeckTrack1=1,DeckTrack2=2,DeckTrack3=3};
enum Target {FadeupGain=0,FadeupPoint=1,FadedownGain=2,FadedownPoint=3,
TrackFadeupGain=4,TrackFadeupPoint=5,
TrackFadedownGain=6,TrackFadedownPoint=7,TargetSize=8};
void LoadTrack(int line);
void SaveTrack(int line);
bool ImportTrack(RDListViewItem *item);
void RenderTransition(int line);
void LoadBlockLength(int line);
void RefreshList();
void RefreshLine(RDListViewItem *item);
void StartNext(int finishing_id,int next_id=-1);
QString GetCutName(int line,RDCut **cut);
int GetClick(QMouseEvent *e,QPoint *p);
void DragTrack(int trackno,int xdiff);
void DragTarget(int trackno,const QPoint &pt);
void DrawTrackMap(int trackno);
void DrawCursor(RDWavePainter *wp,int height,int xpos,const QColor &color,
int arrow_offset,bool left_arrow);
void DrawRubberBand(RDWavePainter *wp,int trackno);
void DrawTarget(RDWavePainter *wp,VoiceTracker::Target target,
int trackno,int xpos,int ypos);
void WriteTrackMap(int trackno);
bool TransportActive();
bool PlayoutActive();
void UpdateControls();
void UpdateRemaining();
bool TrackAvailable();
void LogLine(const QString &line);
bool InitTrack();
void FinishTrack();
double GetCurrentTime();
bool IsTrack(int line,bool *offset);
bool CanInsertTrack();
bool CanDeleteTrack();
void ClearCursor(QPainter *p);
RDListViewItem *GetItemByLine(int line);
void CheckChanges();
void PushSegues();
void PopSegues();
RDStereoMeter *track_meter;
QTimer *track_meter_timer;
RDTransportButton *track_play_button;
RDTransportButton *track_stop_button;
QPushButton *track_track1_button;
QPushButton *track_record_button;
QPushButton *track_track2_button;
QPushButton *track_finished_button;
QPushButton *track_post_button;
QPushButton *track_reset_button;
QPushButton *track_previous_button;
QPushButton *track_next_button;
QPushButton *track_insert_button;
QPushButton *track_delete_button;
QPushButton *track_close_button;
RDLog *track_log;
RDLogEvent *track_log_event;
RDEventPlayer *track_event_player;
QString edit_log_name;
int track_line;
unsigned track_tracks;
int track_time_remaining;
int track_time_remaining_start;
int track_time_counter;
bool track_block_valid;
QTime track_start_time;
LogListView *track_log_list;
QLabel *edit_length_label;
QLabel *edit_tracks_remaining_label;
QLabel *edit_time_remaining_label;
QPalette edit_time_remaining_palette[2];
QPixmap *edit_wave_map[3];
QString edit_wave_name[3];
RDWavePainter *wpg[3];
//int edit_wave_pos[3];
int edit_scroll_pos[3];
int edit_wave_origin[3];
RDLogLine *edit_logline[3];
RDLogLine *edit_saved_logline[3];
int edit_segue_start_point[3];
int edit_segue_gain[3];
int edit_segue_start_offset[3];
RDPlayDeck *edit_deck[3];
int edit_track_line[3];
bool track_redraw[3];
unsigned track_redraw_count;
RDCart *edit_track_cart;
//RDCut *edit_track_cut;
RDCut *edit_track_cuts[3];
RDGroup *track_group;
int edit_wave_width;
int edit_cursor_pos;
QPixmap *edit_playout_map;
QPixmap *edit_macro_map;
QPixmap *edit_marker_map;
QPixmap *edit_chain_map;
QPixmap *edit_track_cart_map;
QPixmap *edit_music_map;
QPixmap *edit_notemarker_map;
QPixmap *edit_traffic_map;
QPixmap *edit_mic16_map;
int edit_input_card;
int edit_input_port;
int edit_output_card;
int edit_output_port;
int edit_tail_preroll;
int edit_threshold_level;
RDCae::AudioCoding edit_coding;
unsigned edit_format;
unsigned edit_samprate;
unsigned edit_bitrate;
unsigned edit_chans;
unsigned play_start_macro;
unsigned play_end_macro;
unsigned record_start_macro;
unsigned record_end_macro;
DeckState edit_deck_state;
bool edit_sliding;
bool edit_scrolling;
int edit_scroll_threshold;
QPoint *edit_previous_point;
int edit_current_track;
int edit_rightclick_track;
int edit_rightclick_pos;
QCursor *track_current_cursor;
QCursor *track_arrow_cursor;
QCursor *track_hand_cursor;
QCursor *track_cross_cursor;
bool track_loaded;
bool track_offset;
bool segue_loaded;
bool track_recording;
bool track_changed;
double track_record_start_time;
int track_recording_pos;
bool track_aborting;
bool track_record_ran;
RDLogLine *track_dummy0_logline;
RDLogLine *track_dummy2_logline;
QString track_import_filter;
QString track_import_group;
int track_preroll;
bool track_size_altered;
QPalette track_start_palette;
QPalette track_record_palette;
QPalette track_done_palette;
QPalette track_abort_palette;
QPopupMenu *track_menu;
int menu_clicked_point;
QString *edit_import_path;
RDSettings *edit_settings;
QRect *track_track_rect;
QRect *track_trackzones_rect[3];
QRect *track_target_rect[VoiceTracker::TargetSize];
int track_target_track[VoiceTracker::TargetSize];
VoiceTracker::Target track_current_target;
bool edit_shift_pressed;
};
#endif