mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-09-16 16:30:26 +02:00
2019-12-13 Fred Gleason <fredg@paravelsystems.com>
* Added a 'Show Start Time As' control to the 'Edit Log' dialog in rdlogedit(1). * Made the main window and 'Edit Log' dialog window size persistent. * Changed the 'Time' column in the 'Full Log Widget' in rdairplay(1) to 'Sch. Time'.
This commit is contained in:
parent
755a84604f
commit
f263c5e0d3
@ -19344,3 +19344,9 @@
|
||||
* Incremented the package version to 3.2.0int6.
|
||||
2019-12-13 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Removed dead code from 'lib/rdevent_line.cpp'.
|
||||
2019-12-13 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added a 'Show Start Time As' control to the 'Edit Log' dialog
|
||||
in rdlogedit(1).
|
||||
* Made the main window and 'Edit Log' dialog window size persistent.
|
||||
* Changed the 'Time' column in the 'Full Log Widget' in rdairplay(1)
|
||||
to 'Sch. Time'.
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 92 KiB |
@ -109,7 +109,7 @@
|
||||
<para>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata align="center" fileref="rdlogedit.edit_log_dialog.png" scale="55"/>
|
||||
<imagedata align="center" fileref="rdlogedit.edit_log_dialog.png" scale="50"/>
|
||||
</imageobject>
|
||||
<caption>
|
||||
<para>The Edit Log Dialog</para>
|
||||
@ -479,6 +479,37 @@
|
||||
</para>
|
||||
</sect3>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="sect.rdlogedit.estimated_vs__scheduled_start_times">
|
||||
<title>Estimated vs. Scheduled Start Times</title>
|
||||
<para>
|
||||
When viewing log events in
|
||||
<command>rdlogedit</command><manvolnum>1</manvolnum>, the displayed
|
||||
start time style for each event can be either
|
||||
<userinput>Estimated</userinput> or
|
||||
<userinput>Scheduled</userinput>, as selected in the
|
||||
<computeroutput>Show Start Times As</computeroutput> dropdown box.
|
||||
<userinput>Estimated</userinput> will give start time values
|
||||
based on any hard start times in the log, taking the known
|
||||
lengths of the relevant carts, while <userinput>Scheduled</userinput>
|
||||
will display the start times as provided by an external music and/or
|
||||
traffic scheduling system.
|
||||
</para>
|
||||
<para>
|
||||
The optimum style to use is largely dependent on how a particular
|
||||
log was assembled. If the log was generated using
|
||||
<command>rdlogmanager</command><manvolnum>1</manvolnum> and largely
|
||||
populated with events from external music and traffic systems, the
|
||||
<userinput>Scheduled</userinput> style will usually be preferred
|
||||
as this permits the start times provided by those external schedulers
|
||||
to be visible. On the other hand, if the log was mostly assembled
|
||||
"on the fly" in
|
||||
<command>rdlogedit</command><manvolnum>1</manvolnum>, the
|
||||
<userinput>Estimated</userinput> style will usually provide more
|
||||
insight on a log will actually time out when played.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
||||
<sect1 xml:id="sect.rdlogedit.editing_log_event_parameters">
|
||||
<title>Editing Log Event Parameters</title>
|
||||
|
@ -154,7 +154,7 @@ ListLog::ListLog(RDLogPlay *log,RDCae *cae,int id,bool allow_pause,
|
||||
list_log_list->setItemMargin(5);
|
||||
list_log_list->addColumn("");
|
||||
list_log_list->setColumnAlignment(0,Qt::AlignHCenter);
|
||||
list_log_list->addColumn(tr("Est Time"));
|
||||
list_log_list->addColumn(tr("Est. Time"));
|
||||
list_log_list->setColumnAlignment(1,Qt::AlignRight);
|
||||
list_log_list->addColumn(tr("Len"));
|
||||
list_log_list->setColumnAlignment(2,Qt::AlignRight);
|
||||
@ -168,7 +168,7 @@ ListLog::ListLog(RDLogPlay *log,RDCae *cae,int id,bool allow_pause,
|
||||
list_log_list->setColumnAlignment(6,Qt::AlignLeft);
|
||||
list_log_list->addColumn(tr("Group"));
|
||||
list_log_list->setColumnAlignment(7,Qt::AlignHCenter);
|
||||
list_log_list->addColumn(tr("Time"));
|
||||
list_log_list->addColumn(tr("Sch. Time"));
|
||||
list_log_list->setColumnAlignment(8,Qt::AlignHCenter);
|
||||
list_log_list->addColumn(tr("Album"));
|
||||
list_log_list->setColumnAlignment(9,Qt::AlignLeft);
|
||||
|
@ -399,10 +399,6 @@ poslechu</translation>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Est Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Len</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@ -427,10 +423,6 @@ poslechu</translation>
|
||||
<source>Group</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Album</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@ -463,6 +455,14 @@ poslechu</translation>
|
||||
<source>Status</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Est. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sch. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ListLogs</name>
|
||||
|
@ -399,10 +399,6 @@ vorhören</translation>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Est Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Len</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@ -427,10 +423,6 @@ vorhören</translation>
|
||||
<source>Group</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Album</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@ -463,6 +455,14 @@ vorhören</translation>
|
||||
<source>Status</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Est. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sch. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ListLogs</name>
|
||||
|
@ -399,10 +399,6 @@ Final</translation>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Est Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Len</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@ -427,10 +423,6 @@ Final</translation>
|
||||
<source>Group</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Album</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@ -463,6 +455,14 @@ Final</translation>
|
||||
<source>Status</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Est. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sch. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ListLogs</name>
|
||||
|
@ -403,10 +403,6 @@ la Fin</translation>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Est Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Len</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@ -431,10 +427,6 @@ la Fin</translation>
|
||||
<source>Group</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Album</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@ -467,6 +459,14 @@ la Fin</translation>
|
||||
<source>Status</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Est. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sch. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ListLogs</name>
|
||||
|
@ -405,10 +405,6 @@ Tail</source>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Est Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Len</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@ -433,10 +429,6 @@ Tail</source>
|
||||
<source>Group</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Album</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@ -469,6 +461,14 @@ Tail</source>
|
||||
<source>Status</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Est. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sch. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ListLogs</name>
|
||||
|
@ -405,10 +405,6 @@ Tail</source>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Est Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Len</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@ -433,10 +429,6 @@ Tail</source>
|
||||
<source>Group</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Album</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@ -469,6 +461,14 @@ Tail</source>
|
||||
<source>Status</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Est. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sch. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ListLogs</name>
|
||||
|
@ -400,10 +400,6 @@ Log</source>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Est Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Len</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@ -428,10 +424,6 @@ Log</source>
|
||||
<source>Group</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Album</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@ -464,6 +456,14 @@ Log</source>
|
||||
<source>Status</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Est. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sch. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ListLogs</name>
|
||||
|
@ -52,8 +52,6 @@ EditLog::EditLog(QString logname,QString *filter,QString *group,
|
||||
vector<QString> *new_logs,QWidget *parent)
|
||||
: RDDialog(parent)
|
||||
{
|
||||
setModal(true);
|
||||
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
QStringList services_list;
|
||||
@ -72,7 +70,6 @@ EditLog::EditLog(QString logname,QString *filter,QString *group,
|
||||
bool editing_allowed=rda->user()->arrangeLog();
|
||||
bool saveas_allowed=rda->user()->createLog();
|
||||
|
||||
setModal(true);
|
||||
setWindowTitle("RDLogEdit - "+tr("Edit Log"));
|
||||
|
||||
//
|
||||
@ -87,8 +84,8 @@ EditLog::EditLog(QString logname,QString *filter,QString *group,
|
||||
//
|
||||
// Fix the Window Size
|
||||
//
|
||||
setMinimumWidth(sizeHint().width());
|
||||
setMinimumHeight(sizeHint().height());
|
||||
setMinimumWidth(RDLOGEDIT_EDITLOG_DEFAULT_WIDTH);
|
||||
setMinimumHeight(RDLOGEDIT_EDITLOG_DEFAULT_HEIGHT);
|
||||
|
||||
//
|
||||
// Create Icons
|
||||
@ -467,6 +464,20 @@ EditLog::EditLog(QString logname,QString *filter,QString *group,
|
||||
edit_start_macro,edit_end_macro,this);
|
||||
edit_player->stopButton()->setOnColor(Qt::red);
|
||||
|
||||
//
|
||||
// Start Time Style
|
||||
//
|
||||
edit_timestyle_box=new QComboBox(this);
|
||||
edit_timestyle_box->insertItem(edit_timestyle_box->count(),tr("Estimated"));
|
||||
edit_timestyle_box->insertItem(edit_timestyle_box->count(),tr("Scheduled"));
|
||||
edit_timestyle_box->setCurrentIndex(global_start_time_style);
|
||||
connect(edit_timestyle_box,SIGNAL(activated(int)),
|
||||
this,SLOT(timestyleChangedData(int)));
|
||||
edit_timestyle_label=
|
||||
new QLabel(edit_timestyle_box,tr("Show Start Times As"),this);
|
||||
edit_timestyle_label->setFont(labelFont());
|
||||
edit_timestyle_label->setAlignment(Qt::AlignCenter|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Ok Button
|
||||
//
|
||||
@ -601,7 +612,7 @@ EditLog::~EditLog()
|
||||
|
||||
QSize EditLog::sizeHint() const
|
||||
{
|
||||
return QSize(800,600);
|
||||
return global_logedit_window_size;
|
||||
}
|
||||
|
||||
|
||||
@ -693,6 +704,17 @@ void EditLog::endDateEnabledData(bool state)
|
||||
}
|
||||
|
||||
|
||||
void EditLog::timestyleChangedData(int index)
|
||||
{
|
||||
RDListViewItem *item=(RDListViewItem *)edit_log_list->firstChild();
|
||||
while(item!=NULL) {
|
||||
SetStartTimeField(item);
|
||||
item=(RDListViewItem *)item->nextSibling();
|
||||
}
|
||||
global_start_time_style=index;
|
||||
}
|
||||
|
||||
|
||||
void EditLog::dateValueChangedData(const QDate &)
|
||||
{
|
||||
SetLogModified(true);
|
||||
@ -1276,8 +1298,8 @@ void EditLog::resizeEvent(QResizeEvent *e)
|
||||
edit_endtime_label->setGeometry(625,102,65,18);
|
||||
edit_endtime_edit->setGeometry(695,102,60,18);
|
||||
|
||||
edit_log_list->setGeometry(10,128,
|
||||
size().width()-20,size().height()-258);
|
||||
edit_log_list->setGeometry(10,127,
|
||||
size().width()-20,size().height()-257);
|
||||
edit_cart_button->setGeometry(20,size().height()-125,80,50);
|
||||
edit_marker_button->setGeometry(110,size().height()-125,80,50);
|
||||
edit_edit_button->setGeometry(200,size().height()-125,80,50);
|
||||
@ -1296,9 +1318,15 @@ void EditLog::resizeEvent(QResizeEvent *e)
|
||||
edit_renderas_button->setGeometry(190,size().height()-60,80,50);
|
||||
edit_player->playButton()->setGeometry(410,size().height()-60,80,50);
|
||||
edit_player->stopButton()->setGeometry(500,size().height()-60,80,50);
|
||||
|
||||
edit_timestyle_label->setGeometry(600,size().height()-60,150,20);
|
||||
edit_timestyle_box->setGeometry(625,size().height()-40,100,30);
|
||||
|
||||
edit_ok_button->
|
||||
setGeometry(size().width()-180,size().height()-60,80,50);
|
||||
edit_cancel_button->setGeometry(size().width()-90,size().height()-60,80,50);
|
||||
|
||||
global_logedit_window_size=e->size();
|
||||
}
|
||||
|
||||
|
||||
@ -1381,28 +1409,8 @@ void EditLog::RefreshLine(RDListViewItem *item)
|
||||
return;
|
||||
}
|
||||
edit_log_event->refresh(line);
|
||||
SetStartTimeField(item);
|
||||
RDLogLine *logline=edit_log_event->logLine(line);
|
||||
switch(logline->timeType()) {
|
||||
case RDLogLine::Hard:
|
||||
item->setText(1,QString("T")+edit_log_event->
|
||||
logLine(line)->startTime(RDLogLine::Logged).
|
||||
toString("hh:mm:ss.zzz").left(10));
|
||||
break;
|
||||
|
||||
default:
|
||||
if(logline->
|
||||
startTime(RDLogLine::Predicted).isNull()) {
|
||||
item->setText(1,edit_log_event->
|
||||
blockStartTime(line).
|
||||
toString("hh:mm:ss.zzz").left(10));
|
||||
}
|
||||
else {
|
||||
item->setText(1,edit_log_event->
|
||||
logLine(line)->startTime(RDLogLine::Predicted).
|
||||
toString("hh:mm:ss.zzz").left(10));
|
||||
}
|
||||
break;
|
||||
}
|
||||
switch(logline->transType()) {
|
||||
case RDLogLine::Play:
|
||||
item->setText(2,tr("PLAY"));
|
||||
@ -1565,6 +1573,56 @@ void EditLog::RefreshLine(RDListViewItem *item)
|
||||
}
|
||||
|
||||
|
||||
void EditLog::SetStartTimeField(RDListViewItem *item)
|
||||
{
|
||||
int line=item->text(14).toInt();
|
||||
RDLogLine *logline=edit_log_event->logLine(line);
|
||||
|
||||
if(edit_timestyle_box->currentIndex()==0) { // Estimated
|
||||
edit_log_list->setColumnText(1,tr("Est. Time"));
|
||||
}
|
||||
else { // Scheduled
|
||||
edit_log_list->setColumnText(1,tr("Sch. Time"));
|
||||
}
|
||||
|
||||
if(logline!=NULL) {
|
||||
switch(logline->timeType()) {
|
||||
case RDLogLine::Hard:
|
||||
item->setText(1,QString("T")+edit_log_event->
|
||||
logLine(line)->startTime(RDLogLine::Logged).
|
||||
toString("hh:mm:ss.zzz").left(10));
|
||||
break;
|
||||
|
||||
default:
|
||||
if(edit_timestyle_box->currentIndex()==0) { // Estimated
|
||||
if(logline->
|
||||
startTime(RDLogLine::Predicted).isNull()) {
|
||||
item->setText(1,edit_log_event->
|
||||
blockStartTime(line).
|
||||
toString("hh:mm:ss.zzz").left(10));
|
||||
}
|
||||
else {
|
||||
item->setText(1,edit_log_event->
|
||||
logLine(line)->startTime(RDLogLine::Predicted).
|
||||
toString("hh:mm:ss.zzz").left(10));
|
||||
}
|
||||
}
|
||||
else { // Scheduled
|
||||
if(logline->startTime(RDLogLine::Logged).isNull()) {
|
||||
item->setText(1,"");
|
||||
}
|
||||
else {
|
||||
item->setText(1,edit_log_event->
|
||||
logLine(line)->startTime(RDLogLine::Logged).
|
||||
toString("hh:mm:ss.zzz").left(10));
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void EditLog::RefreshList()
|
||||
{
|
||||
RDListViewItem *l;
|
||||
|
@ -36,6 +36,8 @@
|
||||
// Widget Settings
|
||||
//
|
||||
#define END_MARKER_ID -2
|
||||
#define RDLOGEDIT_EDITLOG_DEFAULT_WIDTH 950
|
||||
#define RDLOGEDIT_EDITLOG_DEFAULT_HEIGHT 600
|
||||
|
||||
class EditLog : public RDDialog
|
||||
{
|
||||
@ -61,6 +63,7 @@ class EditLog : public RDDialog
|
||||
void autorefreshChangedData(int index);
|
||||
void startDateEnabledData(bool);
|
||||
void endDateEnabledData(bool);
|
||||
void timestyleChangedData(int index);
|
||||
void insertCartButtonData();
|
||||
void insertMarkerButtonData();
|
||||
void clickedData(Q3ListViewItem *item);
|
||||
@ -91,6 +94,7 @@ class EditLog : public RDDialog
|
||||
void DeleteLines(int line,int count);
|
||||
void SaveLog();
|
||||
void RefreshLine(RDListViewItem *item);
|
||||
void SetStartTimeField(RDListViewItem *item);
|
||||
void RefreshList();
|
||||
void UpdateSelection();
|
||||
void RenumberList(int line);
|
||||
@ -145,6 +149,8 @@ class EditLog : public RDDialog
|
||||
QLabel *edit_origin_label;
|
||||
QLabel *edit_track_label_label;
|
||||
QLabel *edit_track_label;
|
||||
QLabel *edit_timestyle_label;
|
||||
QComboBox *edit_timestyle_box;
|
||||
bool edit_changed;
|
||||
QPushButton *edit_cart_button;
|
||||
QPushButton *edit_marker_button;
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Global Variable Declarations for RDLogEdit
|
||||
//
|
||||
// (C) Copyright 2002-2004,2016-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -21,10 +21,15 @@
|
||||
#ifndef GLOBALS_H
|
||||
#define GLOBALS_H
|
||||
|
||||
#include <qrect.h>
|
||||
#include <qsize.h>
|
||||
|
||||
//
|
||||
// Global Resources
|
||||
//
|
||||
extern bool import_running;
|
||||
|
||||
extern bool global_import_running;
|
||||
extern QSize global_top_window_size;
|
||||
extern QSize global_logedit_window_size;
|
||||
extern int global_start_time_style;
|
||||
|
||||
#endif // GLOBALS_H
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <rdadd_log.h>
|
||||
#include <rdconf.h>
|
||||
#include <rdescape_string.h>
|
||||
#include <rdprofile.h>
|
||||
#include <rdreport.h>
|
||||
#include <rdtextfile.h>
|
||||
|
||||
@ -46,8 +47,10 @@
|
||||
//
|
||||
// Global Resources
|
||||
//
|
||||
RDCartDialog *log_cart_dialog;
|
||||
bool import_running=false;
|
||||
bool global_import_running=false;
|
||||
QSize global_top_window_size;
|
||||
QSize global_logedit_window_size;
|
||||
int global_start_time_style;
|
||||
|
||||
MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
||||
: RDWidget(c,parent)
|
||||
@ -61,7 +64,9 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
||||
//
|
||||
// Fix the Window Size
|
||||
//
|
||||
setMinimumSize(sizeHint());
|
||||
setMinimumWidth(RDLOGEDIT_DEFAULT_WIDTH);
|
||||
setMinimumHeight(RDLOGEDIT_DEFAULT_HEIGHT);
|
||||
LoadPositions();
|
||||
|
||||
//
|
||||
// Open the Database
|
||||
@ -219,7 +224,7 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
||||
|
||||
QSize MainWidget::sizeHint() const
|
||||
{
|
||||
return QSize(640,480);
|
||||
return global_top_window_size;
|
||||
}
|
||||
|
||||
|
||||
@ -651,6 +656,7 @@ void MainWidget::notificationReceivedData(RDNotification *notify)
|
||||
|
||||
void MainWidget::quitMainWidget()
|
||||
{
|
||||
SavePositions();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@ -672,6 +678,8 @@ void MainWidget::resizeEvent(QResizeEvent *e)
|
||||
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);
|
||||
|
||||
global_top_window_size=e->size();
|
||||
}
|
||||
|
||||
|
||||
@ -876,3 +884,39 @@ int main(int argc,char *argv[])
|
||||
w->show();
|
||||
return a.exec();
|
||||
}
|
||||
|
||||
|
||||
void MainWidget::LoadPositions() const
|
||||
{
|
||||
QString filename=RDHomeDir()+"/"+RDLOGEDIT_POSITION_FILENAME;
|
||||
RDProfile *p=new RDProfile();
|
||||
p->setSource(filename);
|
||||
global_top_window_size=
|
||||
QSize(p->intValue("RDLogEdit","TopWindowWidth",RDLOGEDIT_DEFAULT_WIDTH),
|
||||
p->intValue("RDLogEdit","TopWindowHeight",RDLOGEDIT_DEFAULT_HEIGHT));
|
||||
global_logedit_window_size=
|
||||
QSize(p->intValue("RDLogEdit","LogeditWindowWidth",RDLOGEDIT_EDITLOG_DEFAULT_WIDTH),
|
||||
p->intValue("RDLogEdit","LogeditWindowHeight",RDLOGEDIT_EDITLOG_DEFAULT_HEIGHT));
|
||||
global_start_time_style=p->intValue("RDLogEdit","StartTimeStyle",0);
|
||||
|
||||
delete p;
|
||||
}
|
||||
|
||||
|
||||
void MainWidget::SavePositions() const
|
||||
{
|
||||
QString filename=RDHomeDir()+"/"+RDLOGEDIT_POSITION_FILENAME;
|
||||
QString temp_filename=RDHomeDir()+"/"+RDLOGEDIT_POSITION_FILENAME+"-temp";
|
||||
FILE *f=NULL;
|
||||
|
||||
if((f=fopen(temp_filename.toUtf8(),"w"))!=NULL) {
|
||||
fprintf(f,"[RDLogEdit]\n");
|
||||
fprintf(f,"TopWindowWidth=%d\n",global_top_window_size.width());
|
||||
fprintf(f,"TopWindowHeight=%d\n",global_top_window_size.height());
|
||||
fprintf(f,"LogeditWindowWidth=%d\n",global_logedit_window_size.width());
|
||||
fprintf(f,"LogeditWindowHeight=%d\n",global_logedit_window_size.height());
|
||||
fprintf(f,"StartTimeStyle=%d\n",global_start_time_style);
|
||||
fclose(f);
|
||||
rename(temp_filename.toUtf8(),filename.toUtf8());
|
||||
}
|
||||
}
|
||||
|
@ -28,6 +28,9 @@
|
||||
|
||||
#include "list_listviewitem.h"
|
||||
|
||||
#define RDLOGEDIT_POSITION_FILENAME ".rdlogedit"
|
||||
#define RDLOGEDIT_DEFAULT_WIDTH 640
|
||||
#define RDLOGEDIT_DEFAULT_HEIGHT 480
|
||||
#define RDLOGEDIT_USAGE "\n"
|
||||
|
||||
class MainWidget : public RDWidget
|
||||
@ -65,6 +68,8 @@ class MainWidget : public RDWidget
|
||||
void SendNotification(RDNotification::Action action,const QString &logname);
|
||||
void LockList();
|
||||
void UnlockList();
|
||||
void LoadPositions() const;
|
||||
void SavePositions() const;
|
||||
QString log_filename;
|
||||
QString log_import_path;
|
||||
QLabel *log_user_label;
|
||||
|
@ -491,6 +491,26 @@ jež jsou pro vybranou službu zakázány!</translation>
|
||||
<source>Count</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Scheduled</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show Start Times As</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sch. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Estimated</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Est. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditLogLine</name>
|
||||
|
@ -491,6 +491,26 @@ die für den gewählten Service ungültig sind!</translation>
|
||||
<source>Count</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Scheduled</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show Start Times As</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sch. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Estimated</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Est. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditLogLine</name>
|
||||
|
@ -491,6 +491,26 @@ desactivados para el servicio actual!
|
||||
<source>Count</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Scheduled</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show Start Times As</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sch. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Estimated</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Est. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditLogLine</name>
|
||||
|
@ -365,6 +365,26 @@ for the selected service!</source>
|
||||
<source>Run Length</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Scheduled</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show Start Times As</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sch. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Estimated</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Est. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditLogLine</name>
|
||||
|
@ -498,6 +498,26 @@ skrudd av for denne tenesta!</translation>
|
||||
<source>Run Length</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Scheduled</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show Start Times As</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sch. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Estimated</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Est. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditLogLine</name>
|
||||
|
@ -498,6 +498,26 @@ skrudd av for denne tenesta!</translation>
|
||||
<source>Run Length</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Scheduled</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show Start Times As</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sch. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Estimated</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Est. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditLogLine</name>
|
||||
|
@ -493,6 +493,26 @@ para o serviço selecionado!</translation>
|
||||
<source>Count</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Scheduled</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show Start Times As</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sch. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Estimated</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Est. Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditLogLine</name>
|
||||
|
@ -2374,7 +2374,8 @@ bool VoiceTracker::ImportTrack(RDListViewItem *item)
|
||||
RDWaveData *wdata=new RDWaveData();
|
||||
RDImportAudio *import=
|
||||
new RDImportAudio(edit_track_cuts[1]->cutName(),edit_import_path,
|
||||
edit_settings,&metadata,wdata,NULL,&import_running,this);
|
||||
edit_settings,&metadata,wdata,NULL,&global_import_running,
|
||||
this);
|
||||
if(import->exec(true,false)<0) {
|
||||
delete import;
|
||||
delete wdata;
|
||||
|
Loading…
x
Reference in New Issue
Block a user