Fixed conflict in 'ChangeLog'
Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
56
ChangeLog
@ -23490,5 +23490,61 @@
|
||||
2022-10-13 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added a 'RedHat Enterprise Linux 9' subsection to the
|
||||
'DISTRO-SPECIFIC NOTES' section of 'INSTALL'.
|
||||
2022-10-14 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added a 'SERVICES.BYPASS_MODE' field to the database.
|
||||
* Added a 'SERVICES.MUS_TRANS_TYPE_OFFSET' field to the database.
|
||||
* Added a 'SERVICES.MUS_TRANS_TYPE_LENGTH' field to the database.
|
||||
* Added a 'SERVICES.MUS_TIME_TYPE_OFFSET' field to the database.
|
||||
* Added a 'SERVICES.MUS_TIME_TYPE_LENGTH' field to the database.
|
||||
* Added a 'IMPORT_TEMPLATES.TRANS_TYPE_OFFSET' field to the database.
|
||||
* Added a 'IMPORT_TEMPLATES.TRANS_TYPE_LENGTH' field to the database.
|
||||
* Added a 'IMPORT_TEMPLATES.TIME_TYPE_OFFSET' field to the database.
|
||||
* Added a 'IMPORT_TEMPLATES.TIME_TYPE_LENGTH' field to the database.
|
||||
* Added a 'IMPORTER_LINES.TRANS_TYPE' field to the database.
|
||||
* Added a 'IMPORTER_LINES.TIME_TYPE' field to the database.
|
||||
* Added a 'IMPORTER_LINES.GRACE_TIME' field to the database.
|
||||
* Incremented the database schema to 363.
|
||||
* Added a 'Bypass Grid Processing' dropdown to the 'Edit Service'
|
||||
dialog in rdadmin(1).
|
||||
* Added 'Transition Type' and 'Time Type' parameters to the music
|
||||
import parameters in the 'Edit Service' dialog in rdadmin(1).
|
||||
2022-10-15 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added a 'Trans' column to the 'Imported Events' list in the
|
||||
'Test Music Import' list in rdadmin(1).
|
||||
2022-10-15 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a regression in the 'Test Music Import' dialog that caused
|
||||
the 'Imported Events' list to fail to be cleared when starting a
|
||||
new test.
|
||||
2022-10-16 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Modified the 'Log Grids' dialog in rdlogmanager(1) to not display
|
||||
services with 'Bypass Grid Processing' set to 'Yes'.
|
||||
2022-10-18 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added a 'RDEventLine::loadBypass()' method.
|
||||
* Implemented log generation and importation for bypass grid
|
||||
processing in rdlogmanager(1).
|
||||
2022-10-18 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added code to 'RDSvc::create()' to include the
|
||||
'SERVICES.BYPASS_MODE', 'SERVICES.MUS_TRANS_TYPE_OFFSET',
|
||||
'SERVICES.MUS_TRANS_TYPE_LENGTH', 'SERVICES.MUS_TIME_TYPE_OFFSET'
|
||||
and 'SERVICES.MUS_TIME_TYPE_LENGTH' fields when cloning a new
|
||||
Service entry.
|
||||
2022-10-18 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added values for the `IMPORTER_TEMPLATES.TRANS_TYPE_*` and
|
||||
`IMPORTER_TEMPLATES.TIME_TYPE_*` parser settings for the
|
||||
'Rivendell Standard Import' profile.
|
||||
* Incremented the database version to 364.
|
||||
2022-10-19 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added files from 'docs/examples/' to the RPM package.
|
||||
2022-10-20 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Modified the 'List Grids' dialog in rdlogmanager(1) to show
|
||||
all services, with a 'Has Grid' column.
|
||||
2022-10-20 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Documented grid processing bypass in the Operations Guide.
|
||||
2022-10-20 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in rdlogmanager(1) that caused the Chain-To event
|
||||
to be dropped when linking music events in bypass grid mode.
|
||||
2022-10-20 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Modified the start time display string to use 'H' and 'S' to
|
||||
distinguish hard and soft start times.
|
||||
2022-10-21 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added an Ubuntu-specific pam(7) configuration.
|
||||
|
@ -1,8 +1,8 @@
|
||||
00:00:00 10001 Lonely Cowboy 00:02:53 GUID4567890123456789012345678901
|
||||
00:02:53 10002 E Song 00:03:27 GUID4567890123456789012345678902
|
||||
00:06:20 10003 Likeness 00:02:54 GUID4567890123456789012345678903
|
||||
00:00:00 10001 Lonely Cowboy 00:02:53 GUID4567890123456789012345678901 SEGUE SOFT
|
||||
00:02:53 10002 E Song 00:03:27 GUID4567890123456789012345678902 PLAY HARD
|
||||
00:06:20 10003 Likeness 00:02:54 GUID4567890123456789012345678903 STOP
|
||||
00:09:14 10004 Atchafalaya 00:28:02 GUID4567890123456789012345678904
|
||||
00:30:00 BREAK Spot Break 00:02:00
|
||||
00:30:00 BREAK Spot Break 00:02:00 SOFT
|
||||
00:32:00 10005 Mr. Banks 00:03:54 GUID4567890123456789012345678905
|
||||
00:35:54 TRACK Voicetrack 00:01:30
|
||||
00:38:24 10006 The Grey and the Green 00:03:23 GUID4567890123456789012345678906
|
||||
|
@ -2,7 +2,7 @@
|
||||
##
|
||||
## docs/examples/automake.am for Rivendell
|
||||
##
|
||||
## (C) Copyright 2002-2006,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
## (C) Copyright 2002-2022 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
|
||||
@ -24,6 +24,8 @@ EXTRA_DIST = 0320090805.tfc\
|
||||
0320090805.cpi\
|
||||
0320090805.vti\
|
||||
080509T3.LOG\
|
||||
bypass_music.tfc\
|
||||
bypass_traffic.tfc\
|
||||
cart_report.asc
|
||||
|
||||
CLEANFILES = *~
|
||||
|
39
docs/examples/bypass_music.tfc
Normal file
@ -0,0 +1,39 @@
|
||||
10:00:00 060105 Legal ID 00:00:14 STOP HARD
|
||||
10:03:30 10001 25 Or 6 To 4 00:04:48 GUID4567890123456789012345678901 SEGUE
|
||||
10:07:00 10004 American Pie (Part 1) 00:04:03 GUID4567890123456789012345678901 SEGUE
|
||||
10:09:30 10005 Backstabbers 00:03:00 GUID4567890123456789012345678902 SEGUE
|
||||
10:13:00 10006 Bad, Bad, Leroy Brown 00:02:58 GUID4567890123456789012345678903 SEGUE
|
||||
10:15:00 BREAK Spot Break 00:02:00 PLAY SOFT
|
||||
10:17:00 10007 Bad Blood 00:03:05 GUID4567890123456789012345678904 SEGUE
|
||||
10:20:30 10008 Baker Street 00:06:01 GUID4567890123456789012345678905 SEGUE
|
||||
10:24:00 10009 Band On The Run 00:05:08 GUID4567890123456789012345678906 SEGUE
|
||||
10:30:00 TRACK Voicetrack 00:00:30 SEGUE
|
||||
10:31:00 10010 Bang A Gong 00:04:22 GUID4567890123456789012345678907 SEGUE
|
||||
10:34:30 10011 Bang The Drum All Day 00:03:13 GUID4567890123456789012345678908 SEGUE
|
||||
10:38:00 10012 Big Shot 00:03:55 GUID4567890123456789012345678909 SEGUE
|
||||
10:41:30 10013 Black And White 00:03:21 GUID4567890123456789012345678910 SEGUE
|
||||
10:45:00 BREAK Spot Break 00:02:00 PLAY SOFT
|
||||
10:48:30 10014 Black Magic Woman-Gypsy Queen 00:05:17 GUID4567890123456789012345678911 SEGUE
|
||||
10:52:00 10015 Boogie Wonderland 00:04:46 GUID4567890123456789012345678912 SEGUE
|
||||
10:55:30 10016 Born To Run 00:04:27 GUID4567890123456789012345678913 SEGUE
|
||||
10:59:00 10017 Brand New Key 00:02:22 GUID4567890123456789012345678914 SEGUE
|
||||
11:00:00 060105 Legal ID 00:00:14 STOP HARD
|
||||
11:03:30 10018 Brother Louie 00:03:52 GUID4567890123456789012345678915 SEGUE
|
||||
11:07:00 10019 Brown Sugar 00:03:47 GUID4567890123456789012345678916 SEGUE
|
||||
11:09:30 10020 Can't Get Enough 00:04:13 GUID4567890123456789012345678917 SEGUE
|
||||
11:13:00 10021 Can't Get Enough of Your Love, Bab 00:03:48 GUID4567890123456789012345678918 SEGUE
|
||||
11:15:00 BREAK Spot Break 00:02:00 PLAY SOFT
|
||||
11:17:00 10022 Carry On 00:04:20 GUID4567890123456789012345678919 SEGUE
|
||||
11:20:30 10023 Cat's in the Cradle 00:03:43 GUID4567890123456789012345678920 SEGUE
|
||||
11:24:00 10024 Celebrate 00:02:54 GUID4567890123456789012345678921 SEGUE
|
||||
11:30:00 TRACK Voicetrack 00:00:30 SEGUE
|
||||
11:31:00 10025 Changes 00:03:31 GUID4567890123456789012345678922 SEGUE
|
||||
11:34:30 10026 Changes in Latitude 00:03:13 GUID4567890123456789012345678923 SEGUE
|
||||
11:38:00 10027 Cheesburger in Paradise 00:02:46 GUID4567890123456789012345678924 SEGUE
|
||||
11:41:30 10028 China Grove 00:03:13 GUID4567890123456789012345678925 SEGUE
|
||||
11:45:00 BREAK Spot Break 00:02:00 PLAY SOFT
|
||||
11:48:30 10029 Could It Be I'm Fallin' in Love 00:04:09 GUID4567890123456789012345678926 SEGUE
|
||||
11:52:00 10030 Couldn't Get It Right 00:03:11 GUID4567890123456789012345678927 SEGUE
|
||||
11:55:30 10031 Crazy Little Thing Called Love 00:02:40 GUID4567890123456789012345678928 SEGUE
|
||||
11:59:00 10032 Crocodile Rock 00:03:51 GUID4567890123456789012345678929 SEGUE
|
||||
12:00:00 060105 Legal ID 00:00:14 STOP HARD
|
8
docs/examples/bypass_traffic.tfc
Normal file
@ -0,0 +1,8 @@
|
||||
10:15:00 999009 30 Second Tone 00:00:30 PLAY
|
||||
10:15:30 990013 Record Test 00:00:30 PLAY
|
||||
10:45:00 040041 Irish Music Bed 00:01:00 PLAY
|
||||
10:46:00 810011 The Nutcracker - Divertissement 00:00:30 PLAY
|
||||
10:46:30 999009 30 Second Tone 00:00:30 PLAY
|
||||
11:15:00 070000 FF-PROMO 00:01:00 PLAY
|
||||
11:16:00 990013 Record Test 00:00:30 PLAY
|
||||
11:46:00 040038 AM Show Promo 00:36:00 PLAY
|
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 151 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 29 KiB |
@ -327,6 +327,44 @@
|
||||
The <computeroutput>Service Description</computeroutput> field is
|
||||
for a free-form string that describes the service.
|
||||
</para>
|
||||
<!--
|
||||
<title>The <computeroutput>General</computeroutput> Section</title>
|
||||
<para>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata align="center" fileref="rdadmin.services_dialog_general.png" width="75mm" depth="36mm"/>
|
||||
</imageobject>
|
||||
<caption>
|
||||
<para>The General Section</para>
|
||||
</caption>
|
||||
</mediaobject>
|
||||
</para>
|
||||
<para>
|
||||
The <computeroutput>Service Name</computeroutput> field contains
|
||||
the name of the service (read-only). This value is available in
|
||||
<link linkend="sect.filepath_wildcards.definition">
|
||||
filepath wildcards</link> as <userinput>%s</userinput>.
|
||||
</para>
|
||||
<para>
|
||||
The <computeroutput>Service Description</computeroutput> field is
|
||||
for a free-form string that describes the service.
|
||||
</para>
|
||||
-->
|
||||
<para>
|
||||
The <computeroutput>Bypass Grid Processing</computeroutput> dropdown,
|
||||
if set to <computeroutput>Yes</computeroutput>, will completely
|
||||
disable RDLogManager's native grid/clock/event template system
|
||||
for this service; helpful for centralizing log template management
|
||||
in a third-party music scheduler system. (See
|
||||
<xref linkend="sect.rdlogmanager.rdlogmanager.grids.bypassing_grid_processing" />
|
||||
for an overview). Logs generated in this mode will contain a single
|
||||
music import link covering
|
||||
the entire broadcast day (<userinput>00:00:00</userinput> through
|
||||
<userinput>23:59:59</userinput>). See
|
||||
<xref linkend="sect.rdadmin.manage_services.general.inline_event_scheduling_parameters" />
|
||||
for information on encoding transition and time parameters when using
|
||||
this option.
|
||||
</para>
|
||||
<para>
|
||||
The <computeroutput>Program Code</computeroutput> is a string that
|
||||
is sent to PyPAD scripts as part of every Now & Next update.
|
||||
@ -654,7 +692,7 @@
|
||||
<para>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata align="center" fileref="rdadmin.import_parser_fields.png" width="90mm" depth="54mm"/>
|
||||
<imagedata align="center" fileref="rdadmin.import_parser_fields.png" width="90mm"/>
|
||||
</imageobject>
|
||||
<caption>
|
||||
<para>The Log Parser Settings</para>
|
||||
@ -723,7 +761,64 @@
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><computeroutput>Transition Type:</computeroutput></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The transition type to be assigned to this event. The
|
||||
following strings are recognized:
|
||||
<simplelist>
|
||||
<member><userinput>PLAY</userinput></member>
|
||||
<member><userinput>SEGUE</userinput></member>
|
||||
<member><userinput>STOP</userinput></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<para>
|
||||
See <xref linkend="sect.rdlogedit.event_transitions" /> for
|
||||
discussion of the meaning of these types. If left blank,
|
||||
a <userinput>PLAY</userinput> transition will be applied.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><computeroutput>Time Type:</computeroutput></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The time type to be assigned to this event. The
|
||||
following strings are recognized:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><userinput>HARD</userinput></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Apply a hard start (Start Immediately) to this
|
||||
item, using the specified start time of the event.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><userinput>SOFT</userinput></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Apply a soft start (Make Next) to this
|
||||
item, using the specified start time of the event.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<para>
|
||||
If left blank, no time start options will be applied.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
<note>
|
||||
The <computeroutput>Transition Type</computeroutput> and
|
||||
<computeroutput>Time Type</computeroutput> fields are available
|
||||
only if the <computeroutput>Bypass Grid Processing</computeroutput>
|
||||
dropdown has been set to <computeroutput>Yes</computeroutput>.
|
||||
</note>
|
||||
</sect2>
|
||||
<sect2 xml:id="sect.rdadmin.manage_services.testing_data_importation">
|
||||
<title>Testing Data Importation</title>
|
||||
|
@ -420,36 +420,24 @@
|
||||
</para>
|
||||
</sect2>
|
||||
<sect2 xml:id="sect.rdlogedit.the_hard_time_type">
|
||||
<title>The Hard Time Type</title>
|
||||
<title>The Hard and Soft Time Types</title>
|
||||
<para>
|
||||
A hard time type causes the event to be executed or otherwise acted
|
||||
A hard or soft time type causes the event to be executed or otherwise
|
||||
acted
|
||||
upon when the wall clock equals the time associated with the event.
|
||||
Hard times are a powerful feature that can be used to synchronize
|
||||
Hard/soft times are powerful features that can be used to synchronize
|
||||
the log to various external events. An event can be assigned a
|
||||
hard time by clicking the <computeroutput>Start at</computeroutput>
|
||||
hard/soft time by clicking the <computeroutput>Start at</computeroutput>
|
||||
check box in the Edit Log Entry
|
||||
and filling in the desired time, and will show up with the letter
|
||||
<computeroutput>T</computeroutput> appearing at the beginning of
|
||||
<computeroutput>H</computeroutput> or
|
||||
<computeroutput>S</computeroutput> appearing at the beginning of
|
||||
its listed time in the
|
||||
<computeroutput>Time</computeroutput> column of the Edit Log dialog.
|
||||
</para>
|
||||
<para>
|
||||
The specific action that is performed when the time matches is
|
||||
determined by the option parameters supplied as part of the event.
|
||||
Three basic actions are possible:
|
||||
</para>
|
||||
<para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
Start the event immediately
|
||||
</listitem>
|
||||
<listitem>
|
||||
Cue to the event ("Make Next")
|
||||
</listitem>1
|
||||
<listitem>
|
||||
Wait up to some period of time, then start the event
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<sect3 xml:id="sect.rdlogedit.start_immediately">
|
||||
<title>Start Immediately</title>
|
||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 24 KiB |
@ -45,6 +45,31 @@
|
||||
</sect1>
|
||||
<sect1 xml:id="sect.rdlogmanager.grids">
|
||||
<title>Grids</title>
|
||||
<sect2 xml:id="sect.rdlogmanager.rdlogmanager.grids.bypassing_grid_processing">
|
||||
<title>Bypassing Grid Processing</title>
|
||||
<para>
|
||||
Certain third-party music scheduler systems support the ability to
|
||||
compose the entire schedule for a service (including placement of
|
||||
traffic breaks) within its own native user interface, thus potentially
|
||||
centralizing and simplifying log template maintenance. To facilitate
|
||||
this mode of operation, it is possible to configure RDLogManager to
|
||||
bypass its native grid/clock/event template system entirely on a
|
||||
service by service basis,
|
||||
instead passing the schedule generated by the music scheduler system
|
||||
through to Rivendell logs unchanged.
|
||||
For information on configuring this mode of operation, see
|
||||
the <computeroutput>Bypass Grid Processing</computeroutput> dropdown
|
||||
and related discussion in
|
||||
<xref linkend="sect.rdadmin.manage_services" />.
|
||||
</para>
|
||||
<para>
|
||||
If a service has been configured to bypass grid processing, then
|
||||
it will not have a grid. Skip forward to
|
||||
<xref linkend="sect.rdlogmanager.generating_logs" />.
|
||||
</para>
|
||||
</sect2>
|
||||
<sect2 xml:id="sect.rdlogmanager.grids.configuring_grids">
|
||||
<title>Configuring Grids</title>
|
||||
<para>
|
||||
Each Rivendell service has an RDLogManager grid. To see the list of
|
||||
available grids, touch the <computeroutput>Edit Grids</computeroutput>
|
||||
@ -53,7 +78,7 @@
|
||||
<para>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata align="center" fileref="rdlogmanager.log_grids_dialog.png" width="65mm" depth="53mm" />
|
||||
<imagedata align="center" fileref="rdlogmanager.log_grids_dialog.png" width="65mm" />
|
||||
</imageobject>
|
||||
<caption><para>The Log Grids Dialog</para></caption>
|
||||
</mediaobject>
|
||||
@ -100,6 +125,9 @@
|
||||
the relevant hour in a grid and selecting
|
||||
<computeroutput> Edit Clock</computeroutput>.
|
||||
</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
||||
<sect1 xml:id="sect.rdlogmanager.clocks">
|
||||
<title>Clocks</title>
|
||||
@ -189,8 +217,8 @@
|
||||
Each clock can be designated as being associated with one or more
|
||||
services. This can make finding the correct clock for a given
|
||||
service much faster, as the
|
||||
<computeroutput>Filter</computeroutput> control on the List Clocks dialog
|
||||
can then be used. To program these associations, touch the
|
||||
<computeroutput>Filter</computeroutput> control on the List Clocks
|
||||
dialog can then be used. To program these associations, touch the
|
||||
<computeroutput>Services List</computeroutput> button in the Edit
|
||||
Clock dialog to bring up the Service
|
||||
Associations dialog.
|
||||
|
@ -30,3 +30,8 @@ EVENT_ID_OFFSET int(11)
|
||||
EVENT_ID_LENGTH int(11)
|
||||
ANNC_TYPE_OFFSET int(11)
|
||||
ANNC_TYPE_LENGTH int(11)
|
||||
|
||||
TRANS_TYPE_OFFSET int(11)
|
||||
TRANS_TYPE_LENGTH int(11)
|
||||
TIME_TYPE_OFFSET int(11)
|
||||
TIME_TYPE_LENGTH int(11)
|
||||
|
@ -16,6 +16,9 @@ START_SECS int(11) signed
|
||||
CART_NUMBER int(10) unsigned
|
||||
TITLE varchar(191)
|
||||
LENGTH int(11) signed
|
||||
TRANS_TYPE int(11) signed RDLogLine::TransType
|
||||
TIME_TYPE int(11) signed RDLogLine::TimeType
|
||||
GRACE_TIME int(11) signed
|
||||
EXT_DATA varchar(32)
|
||||
EXT_EVENT_ID varchar(32)
|
||||
EXT_ANNC_TYPE varchar(8)
|
||||
|
@ -5,9 +5,10 @@ on the system. Following is the layout of a record in the SERVICES
|
||||
table:
|
||||
|
||||
FIELD NAME TYPE REMARKS
|
||||
---------------------------------------------------------------
|
||||
------------------------------------------------------------------------------
|
||||
NAME varchar(10) unsigned Primary Key
|
||||
DESCRIPTION varchar(191)
|
||||
BYPASS_MODE enum('N','Y')
|
||||
NAME_TEMPLATE varchar(191)
|
||||
DESCRIPTION_TEMPLATE varchar(191)
|
||||
PROGRAM_CODE varchar(191)
|
||||
@ -82,3 +83,7 @@ MUS_EVENT_ID_OFFSET int(11)
|
||||
MUS_EVENT_ID_LENGTH int(11)
|
||||
MUS_ANNC_TYPE_OFFSET int(11)
|
||||
MUS_ANNC_TYPE_LENGTH int(11)
|
||||
MUS_TRANS_TYPE_OFFSET int(11)
|
||||
MUS_TRANS_TYPE_LENGTH int(11)
|
||||
MUS_TIME_TYPE_OFFSET int(11)
|
||||
MUS_TIME_TYPE_LENGTH int(11)
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* Current Database Version
|
||||
*/
|
||||
#define RD_VERSION_DATABASE 362
|
||||
#define RD_VERSION_DATABASE 364
|
||||
|
||||
|
||||
#endif // DBVERSION_H
|
||||
|
@ -294,6 +294,7 @@ void RDEventLine::clear()
|
||||
event_artist_sep=15;
|
||||
event_title_sep=100;
|
||||
event_nested_event="";
|
||||
event_using_bypass=false;
|
||||
}
|
||||
|
||||
|
||||
@ -354,12 +355,53 @@ bool RDEventLine::load()
|
||||
|
||||
event_preimport_list->load();
|
||||
event_postimport_list->load();
|
||||
|
||||
event_using_bypass=false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool RDEventLine::loadBypass()
|
||||
{
|
||||
//
|
||||
// Internal read-only event for processing inline traffic imports
|
||||
//
|
||||
event_preposition=0;
|
||||
event_time_type=RDLogLine::Relative;
|
||||
event_grace_time=0;
|
||||
event_use_autofill=false;
|
||||
event_use_timescale=false;
|
||||
event_import_source=RDEventLine::Traffic;
|
||||
event_start_slop=0;
|
||||
event_end_slop=0;
|
||||
event_first_transtype=RDLogLine::Play;
|
||||
event_default_transtype=RDLogLine::Play;
|
||||
event_color=QColor();
|
||||
event_preimport_list->clear();
|
||||
event_postimport_list->clear();
|
||||
event_start_time=QTime(0,0,0,0);
|
||||
event_length=0;
|
||||
event_autofill_slop=-1;
|
||||
event_sched_group="";
|
||||
event_have_code="";
|
||||
event_have_code2="";
|
||||
event_artist_sep=15;
|
||||
event_title_sep=100;
|
||||
event_nested_event="";
|
||||
|
||||
event_using_bypass=true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool RDEventLine::save(RDConfig *config)
|
||||
{
|
||||
if(event_using_bypass) {
|
||||
return false;
|
||||
}
|
||||
|
||||
QString sql=QString("select `NAME` from `EVENTS` where ")+
|
||||
"`NAME`='"+RDEscapeString(event_name)+"'";
|
||||
RDSqlQuery *q=new RDSqlQuery(sql);
|
||||
@ -914,7 +956,7 @@ bool RDEventLine::generateLog(QString logname,const QString &svcname,
|
||||
}
|
||||
|
||||
|
||||
bool RDEventLine::linkLog(RDLogModel *e,RDLog *log,const QString &svcname,
|
||||
void RDEventLine::linkLog(RDLogModel *e,RDLog *log,const QString &svcname,
|
||||
RDLogLine *link_logline,const QString &track_str,
|
||||
const QString &label_cart,const QString &track_cart,
|
||||
QString *errors)
|
||||
@ -1033,7 +1075,6 @@ bool RDEventLine::linkLog(RDLogModel *e,RDLog *log,const QString &svcname,
|
||||
logline->setStartTime(RDLogLine::Logged,time);
|
||||
logline->setType(RDLogLine::TrafficLink);
|
||||
logline->setSource(event_src);
|
||||
// logline->setTransType(trans_type);
|
||||
logline->setEventLength(event_length);
|
||||
logline->setLinkEventName(event_nested_event);
|
||||
logline->setLinkStartTime(q->value(9).toTime());
|
||||
@ -1055,7 +1096,6 @@ bool RDEventLine::linkLog(RDLogModel *e,RDLog *log,const QString &svcname,
|
||||
logline->setStartTime(RDLogLine::Logged,time);
|
||||
logline->setType(RDLogLine::Track);
|
||||
logline->setSource(event_src);
|
||||
// logline->setTransType(RDLogLine::Segue);
|
||||
logline->setMarkerComment(q->value(7).toString());
|
||||
logline->setEventLength(event_length);
|
||||
logline->setLinkEventName(event_name);
|
||||
@ -1077,7 +1117,6 @@ bool RDEventLine::linkLog(RDLogModel *e,RDLog *log,const QString &svcname,
|
||||
logline->setStartTime(RDLogLine::Logged,time);
|
||||
logline->setType(RDLogLine::Marker);
|
||||
logline->setSource(event_src);
|
||||
// logline->(RDLogLine::Segue);
|
||||
logline->setMarkerComment(q->value(7).toString());
|
||||
logline->setEventLength(event_length);
|
||||
logline->setLinkEventName(event_name);
|
||||
@ -1102,9 +1141,6 @@ bool RDEventLine::linkLog(RDLogModel *e,RDLog *log,const QString &svcname,
|
||||
QTime(start_start_hour,0,0).addSecs(q->value(1).toInt()));
|
||||
logline->setType(RDLogLine::Cart);
|
||||
logline->setCartNumber(q->value(0).toUInt());
|
||||
// logline->setGraceTime(grace_time);
|
||||
// logline->setTimeType(time_type);
|
||||
// logline->setTransType(trans_type);
|
||||
logline->setExtStartTime(QTime(0,0,0).addSecs(3600*start_start_hour+
|
||||
q->value(1).toInt()));
|
||||
logline->setExtLength(q->value(2).toInt());
|
||||
@ -1226,8 +1262,6 @@ bool RDEventLine::linkLog(RDLogModel *e,RDLog *log,const QString &svcname,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Abstract a Rivendell Log Manager Event
|
||||
//
|
||||
// (C) Copyright 2002-2020 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2022 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,7 +21,7 @@
|
||||
#ifndef RDEVENT_LINE_H
|
||||
#define RDEVENT_LINE_H
|
||||
|
||||
#include <qdatetime.h>
|
||||
#include <QDateTime>
|
||||
|
||||
#include <rdlogmodel.h>
|
||||
#include <rdeventimportlist.h>
|
||||
@ -75,10 +75,11 @@ class RDEventLine
|
||||
void setLength(int msecs);
|
||||
void clear();
|
||||
bool load();
|
||||
bool loadBypass();
|
||||
bool save(RDConfig *config);
|
||||
bool generateLog(QString logname,const QString &svcname,
|
||||
QString *errors,QString clockname);
|
||||
bool linkLog(RDLogModel *e,RDLog *log,const QString &svcname,
|
||||
void linkLog(RDLogModel *e,RDLog *log,const QString &svcname,
|
||||
RDLogLine *link_logline,const QString &track_str,
|
||||
const QString &label_cart,const QString &track_cart,
|
||||
QString *errors);
|
||||
@ -94,6 +95,7 @@ class RDEventLine
|
||||
private:
|
||||
int GetLength(unsigned cartnum,int def_length=0);
|
||||
QString event_name;
|
||||
bool event_using_bypass;
|
||||
int event_preposition;
|
||||
RDLogLine::TimeType event_time_type;
|
||||
int event_grace_time;
|
||||
|
@ -36,7 +36,7 @@ RDListSvcs::RDListSvcs(const QString &caption,QWidget *parent)
|
||||
// Services
|
||||
//
|
||||
edit_svc_view=new RDTableView(this);
|
||||
edit_svc_model=new RDServiceListModel(false,this);
|
||||
edit_svc_model=new RDServiceListModel(false,false,this);
|
||||
edit_svc_model->setFont(font());
|
||||
edit_svc_model->setPalette(palette());
|
||||
edit_svc_view->setModel(edit_svc_model);
|
||||
|
@ -443,7 +443,12 @@ QString RDLogLine::startTimeText() const
|
||||
QString ret("");
|
||||
|
||||
if(timeType()==RDLogLine::Hard) {
|
||||
ret="T";
|
||||
if(graceTime()<0) {
|
||||
ret="S";
|
||||
}
|
||||
else {
|
||||
ret="H";
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!startTime(RDLogLine::Logged).isValid()) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Data model for Rivendell log imports
|
||||
//
|
||||
// (C) Copyright 2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2022 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
|
||||
@ -39,11 +39,14 @@ RDLogImportModel::RDLogImportModel(const QString &hostname,pid_t proc_id,
|
||||
unsigned right=Qt::AlignRight|Qt::AlignVCenter;
|
||||
|
||||
d_headers.push_back(tr("Start Time"));
|
||||
d_alignments.push_back(left);
|
||||
d_alignments.push_back(right);
|
||||
|
||||
d_headers.push_back(tr("Cart"));
|
||||
d_alignments.push_back(center);
|
||||
|
||||
d_headers.push_back(tr("Trans"));
|
||||
d_alignments.push_back(center);
|
||||
|
||||
d_headers.push_back(tr("Len"));
|
||||
d_alignments.push_back(right);
|
||||
|
||||
@ -59,7 +62,7 @@ RDLogImportModel::RDLogImportModel(const QString &hostname,pid_t proc_id,
|
||||
d_headers.push_back(tr("Annc Type"));
|
||||
d_alignments.push_back(left);
|
||||
|
||||
d_headers.push_back(tr("Line"));
|
||||
d_headers.push_back(tr("Line Number"));
|
||||
d_alignments.push_back(right);
|
||||
|
||||
updateModel();
|
||||
@ -165,6 +168,16 @@ void RDLogImportModel::refresh()
|
||||
}
|
||||
|
||||
|
||||
void RDLogImportModel::clear()
|
||||
{
|
||||
beginResetModel();
|
||||
d_texts.clear();
|
||||
d_icons.clear();
|
||||
d_ids.clear();
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
|
||||
void RDLogImportModel::updateModel()
|
||||
{
|
||||
QList<QVariant> texts;
|
||||
@ -197,52 +210,58 @@ void RDLogImportModel::updateRow(int row,RDSqlQuery *q)
|
||||
}
|
||||
|
||||
// Start Time
|
||||
texts[0]=RDSvc::timeString(q->value(1).toInt(),q->value(2).toInt());
|
||||
QString prefix;
|
||||
if((RDLogLine::TimeType)q->value(12).toUInt()==RDLogLine::Hard) {
|
||||
if(q->value(13).toInt()<0) {
|
||||
prefix="S:";
|
||||
}
|
||||
else {
|
||||
prefix="H:";
|
||||
}
|
||||
}
|
||||
texts[0]=prefix+RDSvc::timeString(q->value(1).toInt(),q->value(2).toInt());
|
||||
|
||||
// Cart
|
||||
// texts.push_back(q->value(2));
|
||||
// Transition Type
|
||||
texts[2]=RDLogLine::transText((RDLogLine::TransType)q->value(11).toUInt());
|
||||
|
||||
// Length
|
||||
if(!q->value(4).isNull()) {
|
||||
texts[2]=RDGetTimeLength(q->value(4).toInt(),false,false);
|
||||
texts[3]=RDGetTimeLength(q->value(4).toInt(),false,false);
|
||||
}
|
||||
|
||||
// Title
|
||||
// texts.push_back(q->value(2));
|
||||
|
||||
// GUID
|
||||
texts[4]=q->value(5).toString().trimmed();
|
||||
texts[5]=q->value(5).toString().trimmed();
|
||||
|
||||
// Event ID
|
||||
texts[5]=q->value(6).toString().trimmed();
|
||||
texts[6]=q->value(6).toString().trimmed();
|
||||
|
||||
// Annc Type
|
||||
texts[6]=q->value(7).toString().trimmed();
|
||||
texts[7]=q->value(7).toString().trimmed();
|
||||
|
||||
// Line
|
||||
texts[7]=QString::asprintf("%u",1+q->value(10).toUInt());
|
||||
texts[8]=QString::asprintf("%u",1+q->value(10).toUInt());
|
||||
|
||||
switch((RDLogLine::Type)q->value(9).toUInt()) {
|
||||
case RDLogLine::Cart:
|
||||
d_icons[row]=rda->iconEngine()->typeIcon(RDLogLine::Cart);
|
||||
texts[1]=q->value(3); // Cart Number
|
||||
texts[3]=q->value(8).toString().trimmed(); // Title
|
||||
texts[4]=q->value(8).toString().trimmed(); // Title
|
||||
break;
|
||||
|
||||
case RDLogLine::Marker:
|
||||
d_icons[row]=rda->iconEngine()->typeIcon(RDLogLine::Marker);
|
||||
texts[1]=tr("NOTE"); // Cart Number
|
||||
texts[3]=q->value(8).toString().trimmed(); // Title
|
||||
texts[4]=q->value(8).toString().trimmed(); // Title
|
||||
break;
|
||||
|
||||
case RDLogLine::TrafficLink:
|
||||
d_icons[row]=rda->iconEngine()->typeIcon(RDLogLine::TrafficLink);
|
||||
texts[3]=tr("[spot break]"); // Title
|
||||
texts[4]=tr("[spot break]"); // Title
|
||||
break;
|
||||
|
||||
case RDLogLine::Track:
|
||||
d_icons[row]=rda->iconEngine()->typeIcon(RDLogLine::Track);
|
||||
texts[3]=tr("[voice track]"); // Title
|
||||
texts[4]=tr("[voice track]"); // Title
|
||||
break;
|
||||
|
||||
case RDLogLine::Macro:
|
||||
@ -272,7 +291,10 @@ QString RDLogImportModel::sqlFields() const
|
||||
"`EXT_ANNC_TYPE`,"+ // 07
|
||||
"`TITLE`,"+ // 08
|
||||
"`TYPE`,"+ // 09
|
||||
"`FILE_LINE` "+ // 10
|
||||
"`FILE_LINE`,"+ // 10
|
||||
"`TRANS_TYPE`,"+ // 11
|
||||
"`TIME_TYPE`,"+ // 12
|
||||
"`GRACE_TIME` "+ // 13
|
||||
"from `IMPORTER_LINES` ";
|
||||
|
||||
return sql;
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Data model for Rivendell log imports
|
||||
//
|
||||
// (C) Copyright 2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2021-2022 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -28,6 +28,7 @@
|
||||
|
||||
#include <rddb.h>
|
||||
#include <rdnotification.h>
|
||||
#include <rdsvc.h>
|
||||
|
||||
class RDLogImportModel : public QAbstractTableModel
|
||||
{
|
||||
@ -45,6 +46,7 @@ class RDLogImportModel : public QAbstractTableModel
|
||||
QVariant data(const QModelIndex &index,int role=Qt::DisplayRole) const;
|
||||
int lineId(const QModelIndex &row) const;
|
||||
void refresh();
|
||||
void clear();
|
||||
|
||||
protected:
|
||||
void updateModel();
|
||||
|
@ -1027,10 +1027,13 @@ QString RDLogModel::StartTimeString(int line) const
|
||||
RDLogLine *ll=logLine(line);
|
||||
|
||||
if(ll!=NULL) {
|
||||
QString code="H";
|
||||
switch(ll->timeType()) {
|
||||
case RDLogLine::Hard:
|
||||
return QString("T")+
|
||||
rda->tenthsTimeString(ll->startTime(RDLogLine::Logged));
|
||||
if(ll->graceTime()<0) {
|
||||
code="S";
|
||||
}
|
||||
return code+rda->tenthsTimeString(ll->startTime(RDLogLine::Logged));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1791,7 +1791,11 @@ QString RDLogPlay::cellText(int col,int row,RDLogLine *ll) const
|
||||
if((ll->status()==RDLogLine::Scheduled)||
|
||||
(ll->status()==RDLogLine::Paused)) {
|
||||
if(ll->timeType()==RDLogLine::Hard) {
|
||||
return tr("T")+rda->tenthsTimeString(ll->startTime(RDLogLine::Logged));
|
||||
if(ll->graceTime()<0) {
|
||||
return tr("S")+
|
||||
rda->tenthsTimeString(ll->startTime(RDLogLine::Logged));
|
||||
}
|
||||
return tr("H")+rda->tenthsTimeString(ll->startTime(RDLogLine::Logged));
|
||||
}
|
||||
if(!ll->startTime(RDLogLine::Predicted).isNull()) {
|
||||
return rda->tenthsTimeString(ll->startTime(RDLogLine::Predicted));
|
||||
|
@ -22,10 +22,12 @@
|
||||
#include "rdescape_string.h"
|
||||
#include "rdservicelistmodel.h"
|
||||
|
||||
RDServiceListModel::RDServiceListModel(bool incl_none,QObject *parent)
|
||||
RDServiceListModel::RDServiceListModel(bool incl_none,bool exclude_bypass,
|
||||
QObject *parent)
|
||||
: QAbstractTableModel(parent)
|
||||
{
|
||||
d_include_none=incl_none;
|
||||
d_exclude_bypass=exclude_bypass;
|
||||
|
||||
//
|
||||
// Load Color Map
|
||||
@ -47,31 +49,34 @@ RDServiceListModel::RDServiceListModel(bool incl_none,QObject *parent)
|
||||
unsigned center=Qt::AlignCenter;
|
||||
unsigned right=Qt::AlignRight|Qt::AlignVCenter;
|
||||
|
||||
d_headers.push_back(tr("Name"));
|
||||
d_headers.push_back(tr("Name")); // 00
|
||||
d_alignments.push_back(left);
|
||||
|
||||
d_headers.push_back(tr("Description"));
|
||||
d_headers.push_back(tr("Description")); // 01
|
||||
d_alignments.push_back(left);
|
||||
|
||||
d_headers.push_back(tr("Pgm Code"));
|
||||
d_headers.push_back(tr("Pgm Code")); // 02
|
||||
d_alignments.push_back(left);
|
||||
|
||||
d_headers.push_back(tr("Track Group"));
|
||||
d_headers.push_back(tr("Track Group")); // 03
|
||||
d_alignments.push_back(left);
|
||||
|
||||
d_headers.push_back(tr("Log Shelf Life"));
|
||||
d_headers.push_back(tr("Log Shelf Life")); // 04
|
||||
d_alignments.push_back(right);
|
||||
|
||||
d_headers.push_back(tr("ELR Shelf Life"));
|
||||
d_headers.push_back(tr("ELR Shelf Life")); // 05
|
||||
d_alignments.push_back(right);
|
||||
|
||||
d_headers.push_back(tr("Auto Refresh"));
|
||||
d_headers.push_back(tr("Auto Refresh")); // 06
|
||||
d_alignments.push_back(center);
|
||||
|
||||
d_headers.push_back(tr("Chain Log"));
|
||||
d_headers.push_back(tr("Chain Log")); // 07
|
||||
d_alignments.push_back(center);
|
||||
|
||||
d_headers.push_back(tr("Import Markers"));
|
||||
d_headers.push_back(tr("Import Markers")); // 08
|
||||
d_alignments.push_back(center);
|
||||
|
||||
d_headers.push_back(tr("Has Grid")); // 09
|
||||
d_alignments.push_back(center);
|
||||
|
||||
updateModel();
|
||||
@ -168,6 +173,15 @@ QVariant RDServiceListModel::data(const QModelIndex &index,int role) const
|
||||
}
|
||||
|
||||
|
||||
bool RDServiceListModel::hasGrid(const QModelIndex &index) const
|
||||
{
|
||||
if(index.isValid()) {
|
||||
return d_has_grids.at(index.row());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
QString RDServiceListModel::serviceName(const QModelIndex &row) const
|
||||
{
|
||||
return d_texts.at(row.row()).at(0).toString();
|
||||
@ -194,6 +208,7 @@ QModelIndex RDServiceListModel::addService(const QString &svcname)
|
||||
list[0]=svcname;
|
||||
d_texts.insert(offset,list);
|
||||
d_icons.insert(offset,list);
|
||||
d_has_grids.insert(offset,"N");
|
||||
updateRowLine(offset);
|
||||
endInsertRows();
|
||||
|
||||
@ -207,6 +222,7 @@ void RDServiceListModel::removeService(const QModelIndex &row)
|
||||
|
||||
d_texts.removeAt(row.row());
|
||||
d_icons.removeAt(row.row());
|
||||
d_has_grids.removeAt(row.row());
|
||||
|
||||
endRemoveRows();
|
||||
}
|
||||
@ -257,10 +273,14 @@ void RDServiceListModel::updateModel()
|
||||
|
||||
RDSqlQuery *q=NULL;
|
||||
QString sql=sqlFields();
|
||||
if(d_exclude_bypass) {
|
||||
sql+="where `BYPASS_MODE`='N' ";
|
||||
}
|
||||
sql+="order by NAME ";
|
||||
beginResetModel();
|
||||
d_texts.clear();
|
||||
d_icons.clear();
|
||||
d_has_grids.clear();
|
||||
if(d_include_none) {
|
||||
d_texts.push_back(texts);
|
||||
d_icons.push_back(texts);
|
||||
@ -270,11 +290,13 @@ void RDServiceListModel::updateModel()
|
||||
d_texts.back().push_back(QVariant());
|
||||
d_icons.back().push_back(QVariant());
|
||||
}
|
||||
d_has_grids.push_back("N");
|
||||
}
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
d_texts.push_back(texts);
|
||||
d_icons.push_back(texts);
|
||||
d_has_grids.push_back("N");
|
||||
updateRow(d_texts.size()-1,q);
|
||||
}
|
||||
delete q;
|
||||
@ -342,8 +364,18 @@ void RDServiceListModel::updateRow(int row,RDSqlQuery *q)
|
||||
texts.push_back(q->value(8));
|
||||
icons.push_back(QVariant());
|
||||
|
||||
// Has Grid
|
||||
if(q->value(9).toString()=="Y") {
|
||||
texts.push_back("N");
|
||||
}
|
||||
else {
|
||||
texts.push_back("Y");
|
||||
}
|
||||
icons.push_back(QVariant());
|
||||
|
||||
d_texts[row]=texts;
|
||||
d_icons[row]=icons;
|
||||
d_has_grids[row]=q->value(9).toString()!="Y";
|
||||
}
|
||||
|
||||
|
||||
@ -358,7 +390,8 @@ QString RDServiceListModel::sqlFields() const
|
||||
"`SERVICES`.`ELR_SHELFLIFE`,"+ // 05
|
||||
"`SERVICES`.`AUTO_REFRESH`,"+ // 06
|
||||
"`SERVICES`.`CHAIN_LOG`,"+ // 07
|
||||
"`SERVICES`.`INCLUDE_IMPORT_MARKERS` "+ // 08
|
||||
"`SERVICES`.`INCLUDE_IMPORT_MARKERS`,"+ // 08
|
||||
"`BYPASS_MODE` "+ // 09
|
||||
"from `SERVICES` ";
|
||||
|
||||
return sql;
|
||||
|
@ -42,7 +42,7 @@ class RDServiceListModel : public QAbstractTableModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
RDServiceListModel(bool incl_none,QObject *parent);
|
||||
RDServiceListModel(bool incl_none,bool exclude_bypass,QObject *parent);
|
||||
~RDServiceListModel();
|
||||
QPalette palette();
|
||||
void setPalette(const QPalette &pal);
|
||||
@ -52,6 +52,7 @@ class RDServiceListModel : public QAbstractTableModel
|
||||
QVariant headerData(int section,Qt::Orientation orient,
|
||||
int role=Qt::DisplayRole) const;
|
||||
QVariant data(const QModelIndex &index,int role=Qt::DisplayRole) const;
|
||||
bool hasGrid(const QModelIndex &index) const;
|
||||
QString serviceName(const QModelIndex &row) const;
|
||||
QModelIndex addService(const QString &name);
|
||||
void removeService(const QModelIndex &row);
|
||||
@ -70,10 +71,12 @@ class RDServiceListModel : public QAbstractTableModel
|
||||
QFont d_font;
|
||||
QFont d_bold_font;
|
||||
bool d_include_none;
|
||||
bool d_exclude_bypass;
|
||||
QList<QVariant> d_headers;
|
||||
QList<QVariant> d_alignments;
|
||||
QList<QList<QVariant> > d_texts;
|
||||
QList<QList<QVariant> > d_icons;
|
||||
QList<bool> d_has_grids;
|
||||
QMap<QString,QVariant> d_group_color_map;
|
||||
};
|
||||
|
||||
|
738
lib/rdsvc.cpp
@ -28,7 +28,7 @@
|
||||
#include "rddb.h"
|
||||
#include "rd.h"
|
||||
#include "rdescape_string.h"
|
||||
#include "rdlog.h"
|
||||
#include "rdevent_line.h"
|
||||
#include "rdlogmodel.h"
|
||||
#include "rdsvc.h"
|
||||
#include "rdweb.h"
|
||||
@ -67,6 +67,19 @@ void RDSvc::setDescription(const QString &desc) const
|
||||
}
|
||||
|
||||
|
||||
bool RDSvc::bypassMode() const
|
||||
{
|
||||
return RDBool(RDGetSqlValue("SERVICES","NAME",svc_name,"BYPASS_MODE").
|
||||
toString());
|
||||
}
|
||||
|
||||
|
||||
void RDSvc::setBypassMode(bool state) const
|
||||
{
|
||||
SetRow("BYPASS_MODE",RDYesNo(state));
|
||||
}
|
||||
|
||||
|
||||
QString RDSvc::programCode() const
|
||||
{
|
||||
return RDGetSqlValue("SERVICES","NAME",svc_name,"PROGRAM_CODE").
|
||||
@ -442,6 +455,7 @@ bool RDSvc::import(ImportSource src,const QDate &date,const QString &break_str,
|
||||
QString data_buf;
|
||||
QString eventid_buf;
|
||||
QString annctype_buf;
|
||||
int grace_time=0;
|
||||
QString os_flag;
|
||||
int cartlen;
|
||||
QString sql;
|
||||
@ -536,7 +550,11 @@ bool RDSvc::import(ImportSource src,const QDate &date,const QString &break_str,
|
||||
"`"+src_str+"LEN_MINUTES_OFFSET`,"+ // 18
|
||||
"`"+src_str+"LEN_MINUTES_LENGTH`,"+ // 19
|
||||
"`"+src_str+"LEN_SECONDS_OFFSET`,"+ // 20
|
||||
"`"+src_str+"LEN_SECONDS_LENGTH` "+ // 21
|
||||
"`"+src_str+"LEN_SECONDS_LENGTH`,"+ // 21
|
||||
"`"+src_str+"TRANS_TYPE_OFFSET`,"+ // 22
|
||||
"`"+src_str+"TRANS_TYPE_LENGTH`,"+ // 23
|
||||
"`"+src_str+"TIME_TYPE_OFFSET`,"+ // 24
|
||||
"`"+src_str+"TIME_TYPE_LENGTH` "+ // 25
|
||||
"from "+parser_table+" where `NAME`='"+RDEscapeString(parser_name)+"'";
|
||||
q=new RDSqlQuery(sql);
|
||||
if(!q->first()) {
|
||||
@ -565,6 +583,10 @@ bool RDSvc::import(ImportSource src,const QDate &date,const QString &break_str,
|
||||
int minutes_len_length=q->value(19).toInt();
|
||||
int seconds_len_offset=q->value(20).toInt();
|
||||
int seconds_len_length=q->value(21).toInt();
|
||||
int trans_type_offset=q->value(22).toInt();
|
||||
int trans_type_length=q->value(23).toInt();
|
||||
int time_type_offset=q->value(24).toInt();
|
||||
int time_type_length=q->value(25).toInt();
|
||||
|
||||
delete q;
|
||||
|
||||
@ -588,6 +610,10 @@ bool RDSvc::import(ImportSource src,const QDate &date,const QString &break_str,
|
||||
int file_line=0;
|
||||
while(fgets(buf,RD_MAX_IMPORT_LINE_LENGTH,infile)!=NULL) {
|
||||
str_buf=QString::fromUtf8(buf);
|
||||
QString trans_type_buf;
|
||||
RDLogLine::TransType trans_type=RDLogLine::NoTrans;
|
||||
QString time_type_buf;
|
||||
RDLogLine::TimeType time_type=RDLogLine::Relative;
|
||||
|
||||
//
|
||||
// Cart Number
|
||||
@ -648,6 +674,33 @@ bool RDSvc::import(ImportSource src,const QDate &date,const QString &break_str,
|
||||
//
|
||||
title=str_buf.mid(title_offset,title_length).trimmed();
|
||||
|
||||
//
|
||||
// Transition Type
|
||||
//
|
||||
trans_type_buf=str_buf.mid(trans_type_offset,trans_type_length).trimmed();
|
||||
if(trans_type_buf.toLower()=="play") {
|
||||
trans_type=RDLogLine::Play;
|
||||
}
|
||||
if(trans_type_buf.toLower()=="segue") {
|
||||
trans_type=RDLogLine::Segue;
|
||||
}
|
||||
if(trans_type_buf.toLower()=="stop") {
|
||||
trans_type=RDLogLine::Stop;
|
||||
}
|
||||
|
||||
//
|
||||
// Time Type
|
||||
//
|
||||
time_type_buf=str_buf.mid(time_type_offset,time_type_length).trimmed();
|
||||
if(time_type_buf.toLower()=="soft") {
|
||||
time_type=RDLogLine::Hard;
|
||||
grace_time=-1;
|
||||
}
|
||||
if(time_type_buf.toLower()=="hard") {
|
||||
time_type=RDLogLine::Hard;
|
||||
grace_time=0;
|
||||
}
|
||||
|
||||
//
|
||||
// Process Line
|
||||
//
|
||||
@ -658,6 +711,9 @@ bool RDSvc::import(ImportSource src,const QDate &date,const QString &break_str,
|
||||
//
|
||||
sql=QString("insert into `IMPORTER_LINES` set ")+
|
||||
"`STATION_NAME`='"+RDEscapeString(svc_station->name())+"',"+
|
||||
QString::asprintf("`TRANS_TYPE`=%d,",trans_type)+
|
||||
QString::asprintf("`TIME_TYPE`=%d,",time_type)+
|
||||
QString::asprintf("`GRACE_TIME`=%d,",grace_time)+
|
||||
QString::asprintf("`PROCESS_ID`=%d,",getpid())+
|
||||
QString::asprintf("`FILE_LINE`=%u,",file_line)+
|
||||
QString::asprintf("`LINE_ID`=%d,",line_id);
|
||||
@ -827,6 +883,7 @@ bool RDSvc::generateLog(const QDate &date,const QString &logname,
|
||||
RDClock clock(svc_station);
|
||||
RDLog *log=NULL;
|
||||
RDLogLock *log_lock=NULL;
|
||||
int count=0;
|
||||
|
||||
if((!date.isValid()||logname.isEmpty())) {
|
||||
return false;
|
||||
@ -860,12 +917,36 @@ bool RDSvc::generateLog(const QDate &date,const QString &logname,
|
||||
includeImportMarkers(RDSvc::Music));
|
||||
log->setIncludeImportMarkers(RDLog::SourceTraffic,
|
||||
includeImportMarkers(RDSvc::Traffic));
|
||||
|
||||
emit generationProgress(1);
|
||||
qApp->processEvents();
|
||||
|
||||
if(bypassMode()) {
|
||||
//
|
||||
// Generate Events
|
||||
// Generate Single Music Import Event
|
||||
//
|
||||
sql=QString("insert into `LOG_LINES` set ")+
|
||||
"`LOG_NAME`='"+RDEscapeString(logname)+"',"+
|
||||
QString::asprintf("`LINE_ID`=%d,",count)+
|
||||
QString::asprintf("`COUNT`=%d,",count)+
|
||||
QString::asprintf("`TYPE`=%d,",RDLogLine::MusicLink)+
|
||||
QString::asprintf("`SOURCE`=%d,",RDLogLine::Template)+
|
||||
"`START_TIME`=0,"+
|
||||
"`GRACE_TIME`=0,"+
|
||||
QString::asprintf("`TIME_TYPE`=%d,",RDLogLine::Relative)+
|
||||
QString::asprintf("`TRANS_TYPE`=%d,",RDLogLine::Play)+
|
||||
"`LINK_EVENT_NAME`='"+RDEscapeString("bypass")+"',"+
|
||||
"`LINK_START_TIME`=0,"+
|
||||
"`LINK_LENGTH`=86400000,"+
|
||||
"`LINK_ID`=1,"+
|
||||
"`LINK_START_SLOP`=0,"+
|
||||
"`LINK_END_SLOP`=0,"+
|
||||
"`EVENT_LENGTH`=86400000";
|
||||
RDSqlQuery::apply(sql);
|
||||
count++;
|
||||
}
|
||||
else {
|
||||
//
|
||||
// Generate Grid Events
|
||||
//
|
||||
for(int i=0;i<24;i++) {
|
||||
sql=QString("select `CLOCK_NAME` from `SERVICE_CLOCKS` where ")+
|
||||
@ -888,7 +969,6 @@ bool RDSvc::generateLog(const QDate &date,const QString &logname,
|
||||
//
|
||||
// Get Current Count
|
||||
//
|
||||
int count;
|
||||
sql=QString("select `COUNT` from `LOG_LINES` where ")+
|
||||
"`LOG_NAME`='"+RDEscapeString(logname)+"' "+
|
||||
"order by `COUNT` desc";
|
||||
@ -900,6 +980,7 @@ bool RDSvc::generateLog(const QDate &date,const QString &logname,
|
||||
count=0;
|
||||
}
|
||||
delete q;
|
||||
}
|
||||
|
||||
//
|
||||
// Log Chain To
|
||||
@ -914,8 +995,7 @@ bool RDSvc::generateLog(const QDate &date,const QString &logname,
|
||||
QString::asprintf("`TRANS_TYPE`=%d,",RDLogLine::Segue)+
|
||||
QString::asprintf("`TIME_TYPE`=%d,",RDLogLine::Relative)+
|
||||
"`LABEL`='"+RDEscapeString(nextname)+"'";
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
RDSqlQuery::apply(sql);
|
||||
count ++;
|
||||
}
|
||||
|
||||
@ -942,7 +1022,6 @@ bool RDSvc::linkLog(RDSvc::ImportSource src,const QDate &date,
|
||||
QTime prev_start_time;
|
||||
RDLogModel *src_model=NULL;
|
||||
RDLogModel *dst_model=NULL;
|
||||
RDLogLine *logline=NULL;
|
||||
|
||||
*err_msg="";
|
||||
|
||||
@ -969,8 +1048,8 @@ bool RDSvc::linkLog(RDSvc::ImportSource src,const QDate &date,
|
||||
break;
|
||||
}
|
||||
RDLog *log=new RDLog(logname);
|
||||
int current_link=0;
|
||||
int total_links=log->linkQuantity(link_src);
|
||||
// int current_link=0;
|
||||
// int total_links=log->linkQuantity(link_src);
|
||||
|
||||
emit generationProgress(0);
|
||||
qApp->processEvents();
|
||||
@ -993,6 +1072,29 @@ bool RDSvc::linkLog(RDSvc::ImportSource src,const QDate &date,
|
||||
return false;
|
||||
}
|
||||
|
||||
if(bypassMode()) {
|
||||
if(src==RDSvc::Music) {
|
||||
if(!ValidateInlineEvents(err_msg)) {
|
||||
delete log_lock;
|
||||
*err_msg=tr("Import file")+": \""+importFilename(src,date)+"\"\n\n"+
|
||||
*err_msg;
|
||||
return false;
|
||||
}
|
||||
src_model=new RDLogModel(logname,true,this);
|
||||
dst_model=new RDLogModel(logname,true,this);
|
||||
src_model->load();
|
||||
ProcessBypassMusicEvents(log,dst_model,src_model,track_str,label_cart,
|
||||
track_cart,link_src,src_type,&autofill_errors);
|
||||
}
|
||||
else {
|
||||
src_model=new RDLogModel(logname,true,this);
|
||||
dst_model=new RDLogModel(logname,true,this);
|
||||
src_model->load();
|
||||
ProcessBypassTrafficEvents(log,dst_model,src_model,track_str,label_cart,
|
||||
track_cart,link_src,&autofill_errors);
|
||||
}
|
||||
}
|
||||
else {
|
||||
//
|
||||
// Resolve embedded link parameters
|
||||
//
|
||||
@ -1011,24 +1113,10 @@ bool RDSvc::linkLog(RDSvc::ImportSource src,const QDate &date,
|
||||
src_model=new RDLogModel(logname,true,this);
|
||||
dst_model=new RDLogModel(logname,true,this);
|
||||
src_model->load();
|
||||
for(int i=0;i<src_model->lineCount();i++) {
|
||||
logline=src_model->logLine(i);
|
||||
if(logline->type()==src_type) {
|
||||
RDEventLine *e=new RDEventLine(svc_station);
|
||||
e->setName(logline->linkEventName());
|
||||
e->load();
|
||||
e->linkLog(dst_model,log,svc_name,logline,track_str,label_cart,
|
||||
track_cart,&autofill_errors);
|
||||
delete e;
|
||||
emit generationProgress(1+(24*current_link++)/total_links);
|
||||
qApp->processEvents();
|
||||
}
|
||||
else {
|
||||
dst_model->insert(dst_model->lineCount(),1,true);
|
||||
*(dst_model->logLine(dst_model->lineCount()-1))=*logline;
|
||||
dst_model->logLine(dst_model->lineCount()-1)->setId(dst_model->nextId());
|
||||
}
|
||||
ProcessGridEvents(log,dst_model,src_model,track_str,label_cart,track_cart,
|
||||
link_src,src_type,&autofill_errors);
|
||||
}
|
||||
|
||||
dst_model->save(svc_config);
|
||||
|
||||
//
|
||||
@ -1135,7 +1223,7 @@ bool RDSvc::linkLog(RDSvc::ImportSource src,const QDate &date,
|
||||
sql=QString("delete from `IMPORTER_LINES` where ")+
|
||||
"`STATION_NAME`='"+RDEscapeString(svc_station->name())+"' && "+
|
||||
QString::asprintf("`PROCESS_ID`=%u",getpid());
|
||||
// printf("Importer Table Cleanup SQL: %s\n",(const char *)sql);
|
||||
// printf("Importer Table Cleanup SQL: %s\n",sql.toUtf8().constData());
|
||||
RDSqlQuery::apply(sql);
|
||||
delete log_lock;
|
||||
|
||||
@ -1296,150 +1384,160 @@ bool RDSvc::create(const QString &name,QString *err_msg,
|
||||
else { // Base on Existing Service
|
||||
sql=QString("select ")+
|
||||
"`DESCRIPTION`,"+ // 00
|
||||
"`NAME_TEMPLATE`,"+ // 01
|
||||
"`DESCRIPTION_TEMPLATE`,"+ // 02
|
||||
"`PROGRAM_CODE`,"+ // 03
|
||||
"`CHAIN_LOG`,"+ // 04
|
||||
"`SUB_EVENT_INHERITANCE`,"+ // 05
|
||||
"`TRACK_GROUP`,"+ // 06
|
||||
"`AUTOSPOT_GROUP`,"+ // 07
|
||||
"`DEFAULT_LOG_SHELFLIFE`,"+ // 08
|
||||
"`LOG_SHELFLIFE_ORIGIN`,"+ // 09
|
||||
"`AUTO_REFRESH`,"+ // 10
|
||||
"`ELR_SHELFLIFE`,"+ // 11
|
||||
"`TFC_PREIMPORT_CMD`,"+ // 12
|
||||
"`TFC_IMPORT_TEMPLATE`,"+ // 13
|
||||
"`TFC_PATH`,"+ // 14
|
||||
"`TFC_LABEL_CART`,"+ // 15
|
||||
"`TFC_TRACK_CART`,"+ // 16
|
||||
"`TFC_BREAK_STRING`,"+ // 17
|
||||
"`TFC_TRACK_STRING`,"+ // 18
|
||||
"`TFC_CART_OFFSET`,"+ // 19
|
||||
"`TFC_CART_LENGTH`,"+ // 20
|
||||
"`TFC_TITLE_OFFSET`," // 21
|
||||
"`TFC_TITLE_LENGTH`,"+ // 22
|
||||
"`TFC_LEN_HOURS_OFFSET`," // 23
|
||||
"`TFC_LEN_HOURS_LENGTH`," // 24
|
||||
"`TFC_LEN_MINUTES_OFFSET`," // 25
|
||||
"`TFC_LEN_MINUTES_LENGTH`," // 26
|
||||
"`TFC_LEN_SECONDS_OFFSET`," // 27
|
||||
"`TFC_LEN_SECONDS_LENGTH`," // 28
|
||||
"`TFC_HOURS_OFFSET`,"+ // 29
|
||||
"`TFC_HOURS_LENGTH`,"+ // 30
|
||||
"`TFC_MINUTES_OFFSET`,"+ // 31
|
||||
"`TFC_MINUTES_LENGTH`,"+ // 32
|
||||
"`TFC_SECONDS_OFFSET`,"+ // 33
|
||||
"`TFC_SECONDS_LENGTH`,"+ // 34
|
||||
"`TFC_DATA_OFFSET`,"+ // 35
|
||||
"`TFC_DATA_LENGTH`,"+ // 36
|
||||
"`TFC_EVENT_ID_OFFSET`,"+ // 37
|
||||
"`TFC_EVENT_ID_LENGTH`,"+ // 38
|
||||
"`TFC_ANNC_TYPE_OFFSET`,"+ // 39
|
||||
"`TFC_ANNC_TYPE_LENGTH`,"+ // 40
|
||||
"`MUS_PREIMPORT_CMD`,"+ // 41
|
||||
"`MUS_IMPORT_TEMPLATE`,"+ // 42
|
||||
"`MUS_PATH`,"+ // 43
|
||||
"`MUS_LABEL_CART`,"+ // 44
|
||||
"`MUS_TRACK_CART`,"+ // 45
|
||||
"`MUS_BREAK_STRING`,"+ // 46
|
||||
"`MUS_TRACK_STRING`,"+ // 47
|
||||
"`MUS_CART_OFFSET`,"+ // 48
|
||||
"`MUS_CART_LENGTH`,"+ // 49
|
||||
"`MUS_TITLE_OFFSET`," // 50
|
||||
"`MUS_TITLE_LENGTH`,"+ // 51
|
||||
"`MUS_LEN_HOURS_OFFSET`," // 52
|
||||
"`MUS_LEN_HOURS_LENGTH`," // 53
|
||||
"`MUS_LEN_MINUTES_OFFSET`," // 54
|
||||
"`MUS_LEN_MINUTES_LENGTH`," // 55
|
||||
"`MUS_LEN_SECONDS_OFFSET`," // 56
|
||||
"`MUS_LEN_SECONDS_LENGTH`," // 57
|
||||
"`MUS_HOURS_OFFSET`,"+ // 58
|
||||
"`MUS_HOURS_LENGTH`,"+ // 59
|
||||
"`MUS_MINUTES_OFFSET`,"+ // 60
|
||||
"`MUS_MINUTES_LENGTH`,"+ // 61
|
||||
"`MUS_SECONDS_OFFSET`,"+ // 62
|
||||
"`MUS_SECONDS_LENGTH`,"+ // 63
|
||||
"`MUS_DATA_OFFSET`,"+ // 64
|
||||
"`MUS_DATA_LENGTH`,"+ // 65
|
||||
"`MUS_EVENT_ID_OFFSET`,"+ // 66
|
||||
"`MUS_EVENT_ID_LENGTH`,"+ // 67
|
||||
"`MUS_ANNC_TYPE_OFFSET`,"+ // 68
|
||||
"`MUS_ANNC_TYPE_LENGTH` "+ // 69
|
||||
"`BYPASS_MODE`,"+ // 01
|
||||
"`NAME_TEMPLATE`,"+ // 02
|
||||
"`DESCRIPTION_TEMPLATE`,"+ // 03
|
||||
"`PROGRAM_CODE`,"+ // 04
|
||||
"`CHAIN_LOG`,"+ // 05
|
||||
"`SUB_EVENT_INHERITANCE`,"+ // 06
|
||||
"`TRACK_GROUP`,"+ // 07
|
||||
"`AUTOSPOT_GROUP`,"+ // 08
|
||||
"`DEFAULT_LOG_SHELFLIFE`,"+ // 09
|
||||
"`LOG_SHELFLIFE_ORIGIN`,"+ // 10
|
||||
"`AUTO_REFRESH`,"+ // 11
|
||||
"`ELR_SHELFLIFE`,"+ // 12
|
||||
"`TFC_PREIMPORT_CMD`,"+ // 13
|
||||
"`TFC_IMPORT_TEMPLATE`,"+ // 14
|
||||
"`TFC_PATH`,"+ // 15
|
||||
"`TFC_LABEL_CART`,"+ // 16
|
||||
"`TFC_TRACK_CART`,"+ // 17
|
||||
"`TFC_BREAK_STRING`,"+ // 18
|
||||
"`TFC_TRACK_STRING`,"+ // 19
|
||||
"`TFC_CART_OFFSET`,"+ // 20
|
||||
"`TFC_CART_LENGTH`,"+ // 21
|
||||
"`TFC_TITLE_OFFSET`," // 22
|
||||
"`TFC_TITLE_LENGTH`,"+ // 23
|
||||
"`TFC_LEN_HOURS_OFFSET`," // 24
|
||||
"`TFC_LEN_HOURS_LENGTH`," // 25
|
||||
"`TFC_LEN_MINUTES_OFFSET`," // 26
|
||||
"`TFC_LEN_MINUTES_LENGTH`," // 27
|
||||
"`TFC_LEN_SECONDS_OFFSET`," // 28
|
||||
"`TFC_LEN_SECONDS_LENGTH`," // 29
|
||||
"`TFC_HOURS_OFFSET`,"+ // 30
|
||||
"`TFC_HOURS_LENGTH`,"+ // 31
|
||||
"`TFC_MINUTES_OFFSET`,"+ // 32
|
||||
"`TFC_MINUTES_LENGTH`,"+ // 33
|
||||
"`TFC_SECONDS_OFFSET`,"+ // 34
|
||||
"`TFC_SECONDS_LENGTH`,"+ // 35
|
||||
"`TFC_DATA_OFFSET`,"+ // 36
|
||||
"`TFC_DATA_LENGTH`,"+ // 37
|
||||
"`TFC_EVENT_ID_OFFSET`,"+ // 38
|
||||
"`TFC_EVENT_ID_LENGTH`,"+ // 39
|
||||
"`TFC_ANNC_TYPE_OFFSET`,"+ // 40
|
||||
"`TFC_ANNC_TYPE_LENGTH`,"+ // 41
|
||||
"`MUS_PREIMPORT_CMD`,"+ // 42
|
||||
"`MUS_IMPORT_TEMPLATE`,"+ // 43
|
||||
"`MUS_PATH`,"+ // 44
|
||||
"`MUS_LABEL_CART`,"+ // 45
|
||||
"`MUS_TRACK_CART`,"+ // 46
|
||||
"`MUS_BREAK_STRING`,"+ // 47
|
||||
"`MUS_TRACK_STRING`,"+ // 48
|
||||
"`MUS_CART_OFFSET`,"+ // 49
|
||||
"`MUS_CART_LENGTH`,"+ // 50
|
||||
"`MUS_TITLE_OFFSET`," // 51
|
||||
"`MUS_TITLE_LENGTH`,"+ // 52
|
||||
"`MUS_LEN_HOURS_OFFSET`," // 53
|
||||
"`MUS_LEN_HOURS_LENGTH`," // 54
|
||||
"`MUS_LEN_MINUTES_OFFSET`," // 55
|
||||
"`MUS_LEN_MINUTES_LENGTH`," // 56
|
||||
"`MUS_LEN_SECONDS_OFFSET`," // 57
|
||||
"`MUS_LEN_SECONDS_LENGTH`," // 58
|
||||
"`MUS_HOURS_OFFSET`,"+ // 59
|
||||
"`MUS_HOURS_LENGTH`,"+ // 60
|
||||
"`MUS_MINUTES_OFFSET`,"+ // 61
|
||||
"`MUS_MINUTES_LENGTH`,"+ // 62
|
||||
"`MUS_SECONDS_OFFSET`,"+ // 63
|
||||
"`MUS_SECONDS_LENGTH`,"+ // 64
|
||||
"`MUS_DATA_OFFSET`,"+ // 65
|
||||
"`MUS_DATA_LENGTH`,"+ // 66
|
||||
"`MUS_EVENT_ID_OFFSET`,"+ // 67
|
||||
"`MUS_EVENT_ID_LENGTH`,"+ // 68
|
||||
"`MUS_ANNC_TYPE_OFFSET`,"+ // 69
|
||||
"`MUS_ANNC_TYPE_LENGTH`,"+ // 70
|
||||
"`MUS_TRANS_TYPE_OFFSET`,"+ // 71
|
||||
"`MUS_TRANS_TYPE_LENGTH`,"+ // 72
|
||||
"`MUS_TIME_TYPE_OFFSET`,"+ // 73
|
||||
"`MUS_TIME_TYPE_LENGTH` "+ // 74
|
||||
" from `SERVICES` where `NAME`='"+RDEscapeString(exemplar)+"'";
|
||||
q=new RDSqlQuery(sql);
|
||||
if(q->first()) {
|
||||
sql=QString("insert into `SERVICES` set ")+
|
||||
"`DESCRIPTION`='"+
|
||||
RDEscapeString(tr("Copy of")+" "+q->value(0).toString())+"',"+
|
||||
"`NAME_TEMPLATE`='"+RDEscapeString(q->value(1).toString())+"',"+
|
||||
"`DESCRIPTION_TEMPLATE`='"+RDEscapeString(q->value(2).toString())+"',"+
|
||||
"`PROGRAM_CODE`='"+RDEscapeString(q->value(3).toString())+"',"+
|
||||
"`CHAIN_LOG`='"+RDEscapeString(q->value(4).toString())+"',"+
|
||||
QString::asprintf("`SUB_EVENT_INHERITANCE`=%d,",q->value(5).toInt())+
|
||||
"`TRACK_GROUP`='"+RDEscapeString(q->value(6).toString())+"',"+
|
||||
"`AUTOSPOT_GROUP`='"+RDEscapeString(q->value(7).toString())+"',"+
|
||||
QString::asprintf("`DEFAULT_LOG_SHELFLIFE`=%d,",q->value(8).toInt())+
|
||||
QString::asprintf("`LOG_SHELFLIFE_ORIGIN`=%d,",q->value(9).toInt())+
|
||||
"`AUTO_REFRESH`='"+RDEscapeString(q->value(10).toString())+"',"+
|
||||
QString::asprintf("`ELR_SHELFLIFE`=%d,",q->value(11).toInt())+
|
||||
"`TFC_PREIMPORT_CMD`='"+RDEscapeString(q->value(12).toString())+"',"+
|
||||
"`TFC_IMPORT_TEMPLATE`='"+RDEscapeString(q->value(13).toString())+"',"+
|
||||
"`TFC_PATH`='"+RDEscapeString(q->value(14).toString())+"',"+
|
||||
"`TFC_LABEL_CART`='"+RDEscapeString(q->value(15).toString())+"',"+
|
||||
"`TFC_TRACK_CART`='"+RDEscapeString(q->value(16).toString())+"',"+
|
||||
"`TFC_BREAK_STRING`='"+RDEscapeString(q->value(17).toString())+"',"+
|
||||
"`TFC_TRACK_STRING`='"+RDEscapeString(q->value(18).toString())+"',"+
|
||||
QString::asprintf("`TFC_CART_OFFSET`=%d,",q->value(19).toInt())+
|
||||
QString::asprintf("`TFC_CART_LENGTH`=%d,",q->value(20).toInt())+
|
||||
QString::asprintf("`TFC_TITLE_OFFSET`=%d,",q->value(21).toInt())+
|
||||
QString::asprintf("`TFC_TITLE_LENGTH`=%d,",q->value(22).toInt())+
|
||||
QString::asprintf("`TFC_LEN_HOURS_OFFSET`=%d,",q->value(23).toInt())+
|
||||
QString::asprintf("`TFC_LEN_HOURS_LENGTH`=%d,",q->value(24).toInt())+
|
||||
QString::asprintf("`TFC_LEN_MINUTES_OFFSET`=%d,",q->value(25).toInt())+
|
||||
QString::asprintf("`TFC_LEN_MINUTES_LENGTH`=%d,",q->value(26).toInt())+
|
||||
QString::asprintf("`TFC_LEN_SECONDS_OFFSET`=%d,",q->value(27).toInt())+
|
||||
QString::asprintf("`TFC_LEN_SECONDS_LENGTH`=%d,",q->value(28).toInt())+
|
||||
QString::asprintf("`TFC_HOURS_OFFSET`=%d,",q->value(29).toInt())+
|
||||
QString::asprintf("`TFC_HOURS_LENGTH`=%d,",q->value(30).toInt())+
|
||||
QString::asprintf("`TFC_MINUTES_OFFSET`=%d,",q->value(31).toInt())+
|
||||
QString::asprintf("`TFC_MINUTES_LENGTH`=%d,",q->value(32).toInt())+
|
||||
QString::asprintf("`TFC_SECONDS_OFFSET`=%d,",q->value(33).toInt())+
|
||||
QString::asprintf("`TFC_SECONDS_LENGTH`=%d,",q->value(34).toInt())+
|
||||
QString::asprintf("`TFC_DATA_OFFSET`=%d,",q->value(35).toInt())+
|
||||
QString::asprintf("`TFC_DATA_LENGTH`=%d,",q->value(36).toInt())+
|
||||
QString::asprintf("`TFC_EVENT_ID_OFFSET`=%d,",q->value(37).toInt())+
|
||||
QString::asprintf("`TFC_EVENT_ID_LENGTH`=%d,",q->value(38).toInt())+
|
||||
QString::asprintf("`TFC_ANNC_TYPE_OFFSET`=%d,",q->value(39).toInt())+
|
||||
QString::asprintf("`TFC_ANNC_TYPE_LENGTH`=%d,",q->value(40).toInt())+
|
||||
"`MUS_PREIMPORT_CMD`='"+RDEscapeString(q->value(41).toString())+"',"+
|
||||
"`MUS_IMPORT_TEMPLATE`='"+RDEscapeString(q->value(42).toString())+"',"+
|
||||
"`MUS_PATH`='"+RDEscapeString(q->value(43).toString())+"',"+
|
||||
"`MUS_LABEL_CART`='"+RDEscapeString(q->value(44).toString())+"',"+
|
||||
"`MUS_TRACK_CART`='"+RDEscapeString(q->value(45).toString())+"',"+
|
||||
"`MUS_BREAK_STRING`='"+RDEscapeString(q->value(46).toString())+"',"+
|
||||
"`MUS_TRACK_STRING`='"+RDEscapeString(q->value(47).toString())+"',"+
|
||||
QString::asprintf("`MUS_CART_OFFSET`=%d,",q->value(48).toInt())+
|
||||
QString::asprintf("`MUS_CART_LENGTH`=%d,",q->value(49).toInt())+
|
||||
QString::asprintf("`MUS_TITLE_OFFSET`=%d,",q->value(50).toInt())+
|
||||
QString::asprintf("`MUS_TITLE_LENGTH`=%d,",q->value(51).toInt())+
|
||||
QString::asprintf("`MUS_LEN_HOURS_OFFSET`=%d,",q->value(52).toInt())+
|
||||
QString::asprintf("`MUS_LEN_HOURS_LENGTH`=%d,",q->value(53).toInt())+
|
||||
QString::asprintf("`MUS_LEN_MINUTES_OFFSET`=%d,",q->value(54).toInt())+
|
||||
QString::asprintf("`MUS_LEN_MINUTES_LENGTH`=%d,",q->value(55).toInt())+
|
||||
QString::asprintf("`MUS_LEN_SECONDS_OFFSET`=%d,",q->value(56).toInt())+
|
||||
QString::asprintf("`MUS_LEN_SECONDS_LENGTH`=%d,",q->value(57).toInt())+
|
||||
QString::asprintf("`MUS_HOURS_OFFSET`=%d,",q->value(58).toInt())+
|
||||
QString::asprintf("`MUS_HOURS_LENGTH`=%d,",q->value(59).toInt())+
|
||||
QString::asprintf("`MUS_MINUTES_OFFSET`=%d,",q->value(60).toInt())+
|
||||
QString::asprintf("`MUS_MINUTES_LENGTH`=%d,",q->value(61).toInt())+
|
||||
QString::asprintf("`MUS_SECONDS_OFFSET`=%d,",q->value(62).toInt())+
|
||||
QString::asprintf("`MUS_SECONDS_LENGTH`=%d,",q->value(63).toInt())+
|
||||
QString::asprintf("`MUS_DATA_OFFSET`=%d,",q->value(64).toInt())+
|
||||
QString::asprintf("`MUS_DATA_LENGTH`=%d,",q->value(65).toInt())+
|
||||
QString::asprintf("`MUS_EVENT_ID_OFFSET`=%d,",q->value(66).toInt())+
|
||||
QString::asprintf("`MUS_EVENT_ID_LENGTH`=%d,",q->value(67).toInt())+
|
||||
QString::asprintf("`MUS_ANNC_TYPE_OFFSET`=%d,",q->value(68).toInt())+
|
||||
QString::asprintf("`MUS_ANNC_TYPE_LENGTH`=%d,",q->value(69).toInt())+
|
||||
"`BYPASS_MODE`='"+RDEscapeString(q->value(1).toString())+"',"+
|
||||
"`NAME_TEMPLATE`='"+RDEscapeString(q->value(2).toString())+"',"+
|
||||
"`DESCRIPTION_TEMPLATE`='"+RDEscapeString(q->value(3).toString())+"',"+
|
||||
"`PROGRAM_CODE`='"+RDEscapeString(q->value(4).toString())+"',"+
|
||||
"`CHAIN_LOG`='"+RDEscapeString(q->value(5).toString())+"',"+
|
||||
QString::asprintf("`SUB_EVENT_INHERITANCE`=%d,",q->value(6).toInt())+
|
||||
"`TRACK_GROUP`='"+RDEscapeString(q->value(7).toString())+"',"+
|
||||
"`AUTOSPOT_GROUP`='"+RDEscapeString(q->value(8).toString())+"',"+
|
||||
QString::asprintf("`DEFAULT_LOG_SHELFLIFE`=%d,",q->value(9).toInt())+
|
||||
QString::asprintf("`LOG_SHELFLIFE_ORIGIN`=%d,",q->value(10).toInt())+
|
||||
"`AUTO_REFRESH`='"+RDEscapeString(q->value(11).toString())+"',"+
|
||||
QString::asprintf("`ELR_SHELFLIFE`=%d,",q->value(12).toInt())+
|
||||
"`TFC_PREIMPORT_CMD`='"+RDEscapeString(q->value(13).toString())+"',"+
|
||||
"`TFC_IMPORT_TEMPLATE`='"+RDEscapeString(q->value(14).toString())+"',"+
|
||||
"`TFC_PATH`='"+RDEscapeString(q->value(15).toString())+"',"+
|
||||
"`TFC_LABEL_CART`='"+RDEscapeString(q->value(16).toString())+"',"+
|
||||
"`TFC_TRACK_CART`='"+RDEscapeString(q->value(17).toString())+"',"+
|
||||
"`TFC_BREAK_STRING`='"+RDEscapeString(q->value(18).toString())+"',"+
|
||||
"`TFC_TRACK_STRING`='"+RDEscapeString(q->value(19).toString())+"',"+
|
||||
QString::asprintf("`TFC_CART_OFFSET`=%d,",q->value(20).toInt())+
|
||||
QString::asprintf("`TFC_CART_LENGTH`=%d,",q->value(21).toInt())+
|
||||
QString::asprintf("`TFC_TITLE_OFFSET`=%d,",q->value(22).toInt())+
|
||||
QString::asprintf("`TFC_TITLE_LENGTH`=%d,",q->value(23).toInt())+
|
||||
QString::asprintf("`TFC_LEN_HOURS_OFFSET`=%d,",q->value(24).toInt())+
|
||||
QString::asprintf("`TFC_LEN_HOURS_LENGTH`=%d,",q->value(25).toInt())+
|
||||
QString::asprintf("`TFC_LEN_MINUTES_OFFSET`=%d,",q->value(26).toInt())+
|
||||
QString::asprintf("`TFC_LEN_MINUTES_LENGTH`=%d,",q->value(27).toInt())+
|
||||
QString::asprintf("`TFC_LEN_SECONDS_OFFSET`=%d,",q->value(28).toInt())+
|
||||
QString::asprintf("`TFC_LEN_SECONDS_LENGTH`=%d,",q->value(29).toInt())+
|
||||
QString::asprintf("`TFC_HOURS_OFFSET`=%d,",q->value(30).toInt())+
|
||||
QString::asprintf("`TFC_HOURS_LENGTH`=%d,",q->value(31).toInt())+
|
||||
QString::asprintf("`TFC_MINUTES_OFFSET`=%d,",q->value(32).toInt())+
|
||||
QString::asprintf("`TFC_MINUTES_LENGTH`=%d,",q->value(33).toInt())+
|
||||
QString::asprintf("`TFC_SECONDS_OFFSET`=%d,",q->value(34).toInt())+
|
||||
QString::asprintf("`TFC_SECONDS_LENGTH`=%d,",q->value(35).toInt())+
|
||||
QString::asprintf("`TFC_DATA_OFFSET`=%d,",q->value(36).toInt())+
|
||||
QString::asprintf("`TFC_DATA_LENGTH`=%d,",q->value(37).toInt())+
|
||||
QString::asprintf("`TFC_EVENT_ID_OFFSET`=%d,",q->value(38).toInt())+
|
||||
QString::asprintf("`TFC_EVENT_ID_LENGTH`=%d,",q->value(39).toInt())+
|
||||
QString::asprintf("`TFC_ANNC_TYPE_OFFSET`=%d,",q->value(40).toInt())+
|
||||
QString::asprintf("`TFC_ANNC_TYPE_LENGTH`=%d,",q->value(41).toInt())+
|
||||
"`MUS_PREIMPORT_CMD`='"+RDEscapeString(q->value(42).toString())+"',"+
|
||||
"`MUS_IMPORT_TEMPLATE`='"+RDEscapeString(q->value(43).toString())+"',"+
|
||||
"`MUS_PATH`='"+RDEscapeString(q->value(44).toString())+"',"+
|
||||
"`MUS_LABEL_CART`='"+RDEscapeString(q->value(45).toString())+"',"+
|
||||
"`MUS_TRACK_CART`='"+RDEscapeString(q->value(46).toString())+"',"+
|
||||
"`MUS_BREAK_STRING`='"+RDEscapeString(q->value(47).toString())+"',"+
|
||||
"`MUS_TRACK_STRING`='"+RDEscapeString(q->value(48).toString())+"',"+
|
||||
QString::asprintf("`MUS_CART_OFFSET`=%d,",q->value(49).toInt())+
|
||||
QString::asprintf("`MUS_CART_LENGTH`=%d,",q->value(50).toInt())+
|
||||
QString::asprintf("`MUS_TITLE_OFFSET`=%d,",q->value(51).toInt())+
|
||||
QString::asprintf("`MUS_TITLE_LENGTH`=%d,",q->value(52).toInt())+
|
||||
QString::asprintf("`MUS_LEN_HOURS_OFFSET`=%d,",q->value(53).toInt())+
|
||||
QString::asprintf("`MUS_LEN_HOURS_LENGTH`=%d,",q->value(54).toInt())+
|
||||
QString::asprintf("`MUS_LEN_MINUTES_OFFSET`=%d,",q->value(55).toInt())+
|
||||
QString::asprintf("`MUS_LEN_MINUTES_LENGTH`=%d,",q->value(56).toInt())+
|
||||
QString::asprintf("`MUS_LEN_SECONDS_OFFSET`=%d,",q->value(57).toInt())+
|
||||
QString::asprintf("`MUS_LEN_SECONDS_LENGTH`=%d,",q->value(58).toInt())+
|
||||
QString::asprintf("`MUS_HOURS_OFFSET`=%d,",q->value(59).toInt())+
|
||||
QString::asprintf("`MUS_HOURS_LENGTH`=%d,",q->value(60).toInt())+
|
||||
QString::asprintf("`MUS_MINUTES_OFFSET`=%d,",q->value(61).toInt())+
|
||||
QString::asprintf("`MUS_MINUTES_LENGTH`=%d,",q->value(62).toInt())+
|
||||
QString::asprintf("`MUS_SECONDS_OFFSET`=%d,",q->value(63).toInt())+
|
||||
QString::asprintf("`MUS_SECONDS_LENGTH`=%d,",q->value(64).toInt())+
|
||||
QString::asprintf("`MUS_DATA_OFFSET`=%d,",q->value(65).toInt())+
|
||||
QString::asprintf("`MUS_DATA_LENGTH`=%d,",q->value(66).toInt())+
|
||||
QString::asprintf("`MUS_EVENT_ID_OFFSET`=%d,",q->value(67).toInt())+
|
||||
QString::asprintf("`MUS_EVENT_ID_LENGTH`=%d,",q->value(68).toInt())+
|
||||
QString::asprintf("`MUS_ANNC_TYPE_OFFSET`=%d,",q->value(69).toInt())+
|
||||
QString::asprintf("`MUS_ANNC_TYPE_LENGTH`=%d,",q->value(70).toInt())+
|
||||
QString::asprintf("`MUS_TRANS_TYPE_OFFSET`=%d,",q->value(71).toInt())+
|
||||
QString::asprintf("`MUS_TRANS_TYPE_LENGTH`=%d,",q->value(72).toInt())+
|
||||
QString::asprintf("`MUS_TIME_TYPE_OFFSET`=%d,",q->value(73).toInt())+
|
||||
QString::asprintf("`MUS_TIME_TYPE_LENGTH`=%d,",q->value(74).toInt())+
|
||||
"`NAME`='"+RDEscapeString(name)+"'";
|
||||
RDSqlQuery::apply(sql);
|
||||
delete q;
|
||||
@ -1494,7 +1592,7 @@ bool RDSvc::create(const QString &name,QString *err_msg,
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
sql=QString("insert into `SERVICE_PERMS` set ")+
|
||||
"`STATION_NAME`=;"+RDEscapeString(q->value(0).toString())+"',"+
|
||||
"`STATION_NAME`='"+RDEscapeString(q->value(0).toString())+"',"+
|
||||
"`SERVICE_NAME`='"+RDEscapeString(name)+"'";
|
||||
RDSqlQuery::apply(sql);
|
||||
}
|
||||
@ -1718,6 +1816,14 @@ QString RDSvc::FieldString(ImportField field) const
|
||||
case RDSvc::ExtAnncType:
|
||||
fieldname="ANNC_TYPE_";
|
||||
break;
|
||||
|
||||
case RDSvc::TransType:
|
||||
fieldname="TRANS_TYPE_";
|
||||
break;
|
||||
|
||||
case RDSvc::TimeType:
|
||||
fieldname="TIME_TYPE_";
|
||||
break;
|
||||
}
|
||||
return fieldname;
|
||||
}
|
||||
@ -1861,11 +1967,46 @@ bool RDSvc::ResolveInlineEvents(const QString &logname,QString *err_msg)
|
||||
break;
|
||||
|
||||
case RDSvc::SchedFile:
|
||||
if(!ValidateInlineEvents(err_msg)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// Resolve link parameters
|
||||
//
|
||||
sql=QString("select ")+
|
||||
"`ID`,"+ // 00
|
||||
"`START_HOUR`,"+ // 01
|
||||
"`START_SECS`,"+ // 02
|
||||
"`LENGTH` "+ // 03
|
||||
"from `IMPORTER_LINES` where "+
|
||||
QString::asprintf("`TYPE`=%u",RDLogLine::TrafficLink);
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
sql=QString("update `IMPORTER_LINES` set ")+
|
||||
"`LINK_START_TIME`='"+QTime(q->value(1).toInt(),0,0).
|
||||
addSecs(q->value(2).toInt()).toString("hh:mm:ss")+"',"+
|
||||
QString::asprintf("`LINK_LENGTH`=%d where ",q->value(3).toInt())+
|
||||
QString::asprintf("`ID`=%u",q->value(0).toUInt());
|
||||
RDSqlQuery::apply(sql);
|
||||
}
|
||||
delete q;
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool RDSvc::ValidateInlineEvents(QString *err_msg) const
|
||||
{
|
||||
//
|
||||
// Verify that all inline traffic and voicetrack events have explicit
|
||||
// start times and length
|
||||
//
|
||||
sql=QString("select ")+
|
||||
bool ret=true;
|
||||
|
||||
QString sql=QString("select ")+
|
||||
"`FILE_LINE`,"+ // 00
|
||||
"`TYPE` "+ // 01
|
||||
"from `IMPORTER_LINES` where "+
|
||||
@ -1876,8 +2017,7 @@ bool RDSvc::ResolveInlineEvents(const QString &logname,QString *err_msg)
|
||||
QString::asprintf("(`TYPE`=%u) ||",RDLogLine::Marker)+
|
||||
QString::asprintf("(`TYPE`=%u)) && ",RDLogLine::Track)+
|
||||
"(`START_HOUR` is null || `START_SECS` is null || `LENGTH` is null)";
|
||||
ok=true;
|
||||
q=new RDSqlQuery(sql);
|
||||
RDSqlQuery *q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
switch((RDLogLine::Type)q->value(1).toUInt()) {
|
||||
case RDLogLine::Marker:
|
||||
@ -1907,35 +2047,259 @@ bool RDSvc::ResolveInlineEvents(const QString &logname,QString *err_msg)
|
||||
" \""+RDLogLine::typeText((RDLogLine::Type)q->value(1).toUInt())+"\"");
|
||||
break;
|
||||
}
|
||||
ok=false;
|
||||
ret=false;
|
||||
}
|
||||
delete q;
|
||||
if(!ok) {
|
||||
return false;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void RDSvc::ProcessGridEvents(RDLog *log,RDLogModel *dst_model,
|
||||
RDLogModel *src_model,const QString &track_str,
|
||||
const QString &label_cart,
|
||||
const QString &track_cart,RDLog::Source link_src,
|
||||
RDLogLine::Type src_type,QString *err_msgs)
|
||||
{
|
||||
int current_link=0;
|
||||
int total_links=log->linkQuantity(link_src);
|
||||
RDLogLine *logline=NULL;
|
||||
|
||||
for(int i=0;i<src_model->lineCount();i++) {
|
||||
logline=src_model->logLine(i);
|
||||
if(logline->type()==src_type) {
|
||||
RDEventLine *e=new RDEventLine(svc_station);
|
||||
e->setName(logline->linkEventName());
|
||||
e->load();
|
||||
e->linkLog(dst_model,log,svc_name,logline,track_str,label_cart,
|
||||
track_cart,err_msgs);
|
||||
delete e;
|
||||
emit generationProgress(1+(24*current_link++)/total_links);
|
||||
qApp->processEvents();
|
||||
}
|
||||
else {
|
||||
dst_model->insert(dst_model->lineCount(),1,true);
|
||||
*(dst_model->logLine(dst_model->lineCount()-1))=*logline;
|
||||
dst_model->logLine(dst_model->lineCount()-1)->
|
||||
setId(dst_model->nextId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void RDSvc::ProcessBypassMusicEvents(RDLog *log,RDLogModel *dst_model,
|
||||
RDLogModel *src_model,
|
||||
const QString &track_str,
|
||||
const QString &label_cart,
|
||||
const QString &track_cart,
|
||||
RDLog::Source link_src,
|
||||
RDLogLine::Type src_type,QString *err_msgs)
|
||||
{
|
||||
QString sql;
|
||||
RDSqlQuery *q=NULL;
|
||||
RDLogLine *logline=NULL;
|
||||
|
||||
for(int i=0;i<src_model->lineCount();i++) {
|
||||
RDLogLine *link_logline=src_model->logLine(i);
|
||||
if(link_logline->type()==RDLogLine::MusicLink) {
|
||||
//
|
||||
// Resolve link parameters
|
||||
// Load Imported Events and Insert into Log
|
||||
//
|
||||
sql=QString("select ")+
|
||||
"`ID`,"+ // 00
|
||||
"`CART_NUMBER`,"+ // 00
|
||||
"`START_HOUR`,"+ // 01
|
||||
"`START_SECS`,"+ // 02
|
||||
"`LENGTH` "+ // 03
|
||||
"`LENGTH`,"+ // 03
|
||||
"`EXT_DATA`,"+ // 04
|
||||
"`EXT_EVENT_ID`,"+ // 05
|
||||
"`EXT_ANNC_TYPE`,"+ // 06
|
||||
"`EXT_CART_NAME`,"+ // 07
|
||||
"`TITLE`,"+ // 08
|
||||
"`TYPE`,"+ // 09
|
||||
"`LINK_START_TIME`,"+ // 10
|
||||
"`LINK_LENGTH`,"+ // 11
|
||||
"`TRANS_TYPE`,"+ // 12
|
||||
"`TIME_TYPE`,"+ // 13
|
||||
"`GRACE_TIME` "+ // 14
|
||||
"from `IMPORTER_LINES` where "+
|
||||
QString::asprintf("`TYPE`=%u",RDLogLine::TrafficLink);
|
||||
"`STATION_NAME`='"+RDEscapeString(rda->station()->name())+"' && "+
|
||||
QString::asprintf("`PROCESS_ID`=%u && ",getpid())+
|
||||
"(`EVENT_USED`='N') order by `LINE_ID`";
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
sql=QString("update `IMPORTER_LINES` set ")+
|
||||
"`LINK_START_TIME`='"+QTime(q->value(1).toInt(),0,0).
|
||||
addSecs(q->value(2).toInt()).toString("hh:mm:ss")+"',"+
|
||||
QString::asprintf("`LINK_LENGTH`=%d where ",q->value(3).toInt())+
|
||||
QString::asprintf("`ID`=%u",q->value(0).toUInt());
|
||||
RDSqlQuery::apply(sql);
|
||||
}
|
||||
delete q;
|
||||
break;
|
||||
QTime start_time=
|
||||
QTime(q->value(1).toInt(),0,0).addSecs(q->value(2).toInt());
|
||||
int length=GetCartLength(q->value(0).toUInt(),q->value(3).toInt());
|
||||
RDLogLine::TransType trans_type=
|
||||
(RDLogLine::TransType)q->value(12).toInt();
|
||||
if(trans_type==RDLogLine::NoTrans) {
|
||||
trans_type=RDLogLine::Play;
|
||||
}
|
||||
|
||||
return true;
|
||||
//
|
||||
// Inline Traffic Break
|
||||
//
|
||||
if(q->value(9).toUInt()==RDLogLine::TrafficLink) {
|
||||
dst_model->insert(dst_model->lineCount(),1);
|
||||
logline=dst_model->logLine(dst_model->lineCount()-1);
|
||||
logline->setId(dst_model->nextId());
|
||||
logline->setStartTime(RDLogLine::Logged,start_time);
|
||||
logline->setType(RDLogLine::TrafficLink);
|
||||
logline->setSource(RDLogLine::Music);
|
||||
logline->setEventLength(length);
|
||||
logline->setLinkEventName("Traffic BYPASS");
|
||||
logline->setLinkStartTime(QTime(0,0,0).
|
||||
addSecs(3600*q->value(1).toInt()+q->value(2).toInt()));
|
||||
logline->setLinkLength(q->value(3).toInt());
|
||||
logline->setLinkStartSlop(0);
|
||||
logline->setLinkEndSlop(0);
|
||||
logline->setLinkId(link_logline->linkId());
|
||||
logline->setLinkEmbedded(true);
|
||||
}
|
||||
|
||||
//
|
||||
// Voicetrack Marker
|
||||
//
|
||||
if(q->value(9).toUInt()==RDLogLine::Track) {
|
||||
dst_model->insert(dst_model->lineCount(),1);
|
||||
logline=dst_model->logLine(dst_model->lineCount()-1);
|
||||
logline->setId(dst_model->nextId());
|
||||
logline->setStartTime(RDLogLine::Logged,start_time);
|
||||
logline->setType(RDLogLine::Track);
|
||||
logline->setSource(RDLogLine::Music);
|
||||
logline->setMarkerComment(q->value(8).toString());
|
||||
logline->setEventLength(length);
|
||||
logline->setLinkEventName("bypass");
|
||||
logline->setLinkStartTime(QTime(0,0,0).
|
||||
addSecs(3600*q->value(1).toInt()+q->value(2).toInt()));
|
||||
logline->setLinkLength(q->value(3).toInt());
|
||||
logline->setLinkStartSlop(0);
|
||||
logline->setLinkEndSlop(0);
|
||||
logline->setLinkId(link_logline->linkId());
|
||||
logline->setLinkEmbedded(true);
|
||||
}
|
||||
|
||||
//
|
||||
// Label/Note Cart
|
||||
//
|
||||
if(q->value(9).toUInt()==RDLogLine::Marker) {
|
||||
dst_model->insert(dst_model->lineCount(),1);
|
||||
logline=dst_model->logLine(dst_model->lineCount()-1);
|
||||
logline->setId(dst_model->nextId());
|
||||
logline->setStartTime(RDLogLine::Logged,start_time);
|
||||
logline->setType(RDLogLine::Marker);
|
||||
logline->setSource(RDLogLine::Music);
|
||||
logline->setMarkerComment(q->value(8).toString());
|
||||
logline->setEventLength(length);
|
||||
logline->setLinkEventName("bypass");
|
||||
logline->setLinkStartTime(QTime(0,0,0).
|
||||
addSecs(3600*q->value(1).toInt()+q->value(2).toInt()));
|
||||
logline->setLinkLength(q->value(3).toInt());
|
||||
logline->setLinkStartSlop(0);
|
||||
logline->setLinkEndSlop(0);
|
||||
logline->setLinkId(link_logline->linkId());
|
||||
logline->setLinkEmbedded(true);
|
||||
}
|
||||
|
||||
//
|
||||
// Cart
|
||||
//
|
||||
if(q->value(9).toUInt()==RDLogLine::Cart) {
|
||||
dst_model->insert(dst_model->lineCount(),1);
|
||||
logline=dst_model->logLine(dst_model->lineCount()-1);
|
||||
logline->setId(dst_model->nextId());
|
||||
logline->setSource(RDLogLine::Music);
|
||||
logline->setStartTime(RDLogLine::Logged,start_time);
|
||||
logline->setType(RDLogLine::Cart);
|
||||
logline->setCartNumber(q->value(0).toUInt());
|
||||
logline->setExtStartTime(start_time);
|
||||
logline->setExtLength(q->value(3).toInt());
|
||||
logline->setExtData(q->value(4).toString().trimmed());
|
||||
logline->setExtEventId(q->value(5).toString().trimmed());
|
||||
logline->setExtAnncType(q->value(6).toString().trimmed());
|
||||
logline->setExtCartName(q->value(7).toString().trimmed());
|
||||
logline->setEventLength(length);
|
||||
logline->setLinkEventName("bypass");
|
||||
logline->setLinkStartTime(QTime(0,0,0).
|
||||
addSecs(3600*q->value(1).toInt()+q->value(2).toInt()));
|
||||
logline->setLinkLength(q->value(3).toInt());
|
||||
logline->setLinkStartSlop(0);
|
||||
logline->setLinkEndSlop(0);
|
||||
logline->setLinkId(logline->linkId());
|
||||
logline->setLinkEmbedded(link_logline->linkEmbedded());
|
||||
}
|
||||
|
||||
//
|
||||
// Apply Common Values
|
||||
//
|
||||
if(logline!=NULL) {
|
||||
logline->setGraceTime(q->value(14).toInt());
|
||||
logline->setTimeType((RDLogLine::TimeType)q->value(13).toInt());
|
||||
logline->setTransType(trans_type);
|
||||
}
|
||||
}
|
||||
|
||||
delete q;
|
||||
|
||||
//
|
||||
// Mark Events as Used
|
||||
//
|
||||
sql=QString("update `IMPORTER_LINES` set ")+
|
||||
"`EVENT_USED`='Y' where "+
|
||||
"`STATION_NAME`='"+RDEscapeString(rda->station()->name())+"' && "+
|
||||
QString::asprintf("`PROCESS_ID`=%u",getpid());
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
}
|
||||
|
||||
if((link_logline!=NULL)&&(link_logline->type()==RDLogLine::Chain)) {
|
||||
printf("Chain to!\n");
|
||||
dst_model->insert(dst_model->lineCount(),1,true);
|
||||
*(dst_model->logLine(dst_model->lineCount()-1))=*link_logline;
|
||||
dst_model->logLine(dst_model->lineCount()-1)->
|
||||
setId(dst_model->nextId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void RDSvc::ProcessBypassTrafficEvents(RDLog *log,RDLogModel *dst_model,
|
||||
RDLogModel *src_model,
|
||||
const QString &track_str,
|
||||
const QString &label_cart,
|
||||
const QString &track_cart,
|
||||
RDLog::Source link_src,
|
||||
QString *err_msgs)
|
||||
{
|
||||
RDEventLine *evt=new RDEventLine(rda->station());
|
||||
|
||||
evt->loadBypass();
|
||||
for(int i=0;i<src_model->lineCount();i++) {
|
||||
RDLogLine *logline=src_model->logLine(i);
|
||||
if(logline->type()==RDLogLine::TrafficLink) {
|
||||
evt->linkLog(dst_model,log,rda->station()->name(),logline,
|
||||
track_str,label_cart,track_cart,err_msgs);
|
||||
}
|
||||
else {
|
||||
dst_model->insert(dst_model->lineCount(),1);
|
||||
*(dst_model->logLine(dst_model->lineCount()-1))=*logline;
|
||||
dst_model->logLine(dst_model->lineCount()-1)->
|
||||
setId(dst_model->nextId());
|
||||
}
|
||||
}
|
||||
|
||||
delete evt;
|
||||
}
|
||||
|
||||
|
||||
int RDSvc::GetCartLength(unsigned cartnum,int def_length) const
|
||||
{
|
||||
RDCart *cart=new RDCart(cartnum);
|
||||
if(!cart->exists()) {
|
||||
delete cart;
|
||||
return def_length;
|
||||
}
|
||||
int length=cart->forcedLength();
|
||||
delete cart;
|
||||
return length;
|
||||
}
|
||||
|
30
lib/rdsvc.h
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Abstract a Rivendell Service
|
||||
//
|
||||
// (C) Copyright 2002-2020 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2022 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
|
||||
@ -23,10 +23,10 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <qobject.h>
|
||||
#include <qsqldatabase.h>
|
||||
#include <QObject>
|
||||
|
||||
#include "rdconfig.h"
|
||||
#include "rdlog.h"
|
||||
#include "rdloglock.h"
|
||||
#include "rdstation.h"
|
||||
#include "rduser.h"
|
||||
@ -38,7 +38,8 @@ class RDSvc : public QObject
|
||||
enum ImportSource {Traffic=0,Music=1};
|
||||
enum ImportField {CartNumber=0,ExtData=3,ExtEventId=4,ExtAnncType=5,
|
||||
Title=6,StartHours=7,StartMinutes=8,StartSeconds=9,
|
||||
LengthHours=10,LengthMinutes=11,LengthSeconds=12};
|
||||
LengthHours=10,LengthMinutes=11,LengthSeconds=12,
|
||||
TransType=13,TimeType=14};
|
||||
enum ShelflifeOrigin {OriginAirDate=0,OriginCreationDate=1};
|
||||
enum SubEventInheritance {ParentEvent=0,SchedFile=1};
|
||||
RDSvc(QString svcname,RDStation *station,RDConfig *config,QObject *parent=0);
|
||||
@ -46,6 +47,8 @@ class RDSvc : public QObject
|
||||
bool exists() const;
|
||||
QString description() const;
|
||||
void setDescription(const QString &desc) const;
|
||||
bool bypassMode() const;
|
||||
void setBypassMode(bool state) const;
|
||||
QString programCode() const;
|
||||
void setProgramCode(const QString &str) const;
|
||||
QString nameTemplate() const;
|
||||
@ -122,6 +125,25 @@ class RDSvc : public QObject
|
||||
bool CheckId(std::vector<int> *v,int value);
|
||||
QString MakeErrorLine(int indent,unsigned lineno,const QString &msg) const;
|
||||
bool ResolveInlineEvents(const QString &logname,QString *err_msg);
|
||||
bool ValidateInlineEvents(QString *err_msg) const;
|
||||
void ProcessGridEvents(RDLog *log,RDLogModel *dst_model,RDLogModel *src_model,
|
||||
const QString &track_str,const QString &label_cart,
|
||||
const QString &track_cart,RDLog::Source link_src,
|
||||
RDLogLine::Type src_type,QString *err_msgs);
|
||||
void ProcessBypassMusicEvents(RDLog *log,RDLogModel *dst_model,
|
||||
RDLogModel *src_model,const QString &track_str,
|
||||
const QString &label_cart,
|
||||
const QString &track_cart,
|
||||
RDLog::Source link_src,RDLogLine::Type src_type,
|
||||
QString *err_msgs);
|
||||
void ProcessBypassTrafficEvents(RDLog *log,RDLogModel *dst_model,
|
||||
RDLogModel *src_model,
|
||||
const QString &track_str,
|
||||
const QString &label_cart,
|
||||
const QString &track_cart,
|
||||
RDLog::Source link_src,
|
||||
QString *err_msgs);
|
||||
int GetCartLength(unsigned cartnum,int def_length) const;
|
||||
QString svc_name;
|
||||
RDStation *svc_station;
|
||||
RDConfig *svc_config;
|
||||
|
@ -66,7 +66,7 @@ AddSvc::AddSvc(QString *svcname,QWidget *parent)
|
||||
//
|
||||
svc_exemplar_box=new QComboBox(this);
|
||||
svc_exemplar_box->setGeometry(155,36,sizeHint().width()-165,19);
|
||||
svc_services_model=new RDServiceListModel(true,this);
|
||||
svc_services_model=new RDServiceListModel(true,false,this);
|
||||
svc_services_model->setFont(defaultFont());
|
||||
svc_services_model->setPalette(palette());
|
||||
svc_exemplar_box->setModel(svc_services_model);
|
||||
|
@ -155,7 +155,7 @@ EditCartSlots::EditCartSlots(RDStation *station,RDStation *cae_station,
|
||||
//
|
||||
edit_service_box=new QComboBox(this);
|
||||
edit_service_box->setGeometry(127,240,120,20);
|
||||
edit_service_model=new RDServiceListModel(true,this);
|
||||
edit_service_model=new RDServiceListModel(true,false,this);
|
||||
edit_service_model->setFont(defaultFont());
|
||||
edit_service_model->setPalette(palette());
|
||||
edit_service_box->setModel(edit_service_model);
|
||||
|
@ -64,7 +64,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station,
|
||||
//
|
||||
// Models
|
||||
//
|
||||
air_service_model=new RDServiceListModel(true,this);
|
||||
air_service_model=new RDServiceListModel(true,false,this);
|
||||
|
||||
//
|
||||
// Channel Assignments Section
|
||||
|
@ -54,7 +54,7 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station,
|
||||
//
|
||||
// Models
|
||||
//
|
||||
air_service_model=new RDServiceListModel(true,this);
|
||||
air_service_model=new RDServiceListModel(true,false,this);
|
||||
|
||||
//
|
||||
// Channel Assignments Section
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Edit a Rivendell Service
|
||||
//
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2022 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
|
||||
@ -36,8 +36,6 @@
|
||||
EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
: RDDialog(parent)
|
||||
{
|
||||
setModal(true);
|
||||
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
QString group;
|
||||
@ -46,10 +44,8 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
//
|
||||
// Fix the Window Size
|
||||
//
|
||||
setMinimumWidth(sizeHint().width());
|
||||
setMaximumWidth(sizeHint().width());
|
||||
setMinimumHeight(sizeHint().height());
|
||||
setMaximumHeight(sizeHint().height());
|
||||
setMinimumSize(sizeHint());
|
||||
setMinimumSize(sizeHint());
|
||||
|
||||
svc_svc=new RDSvc(svc,rda->station(),rda->config());
|
||||
|
||||
@ -62,6 +58,11 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
RDIdValidator *log_validator=new RDIdValidator(this);
|
||||
log_validator->addBannedChar(' ');
|
||||
|
||||
//
|
||||
// Dialogs
|
||||
//
|
||||
svc_test_import_dialog=new TestImport(this);
|
||||
|
||||
//
|
||||
// General Section
|
||||
//
|
||||
@ -124,57 +125,73 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
label->setGeometry(10,115,170,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Bypass Grid Processing
|
||||
//
|
||||
svc_bypass_box=new QComboBox(this);
|
||||
svc_bypass_box->setGeometry(185,136,60,19);
|
||||
svc_bypass_box->insertItem(0,tr("No"));
|
||||
svc_bypass_box->insertItem(1,tr("Yes"));
|
||||
connect(svc_bypass_box,SIGNAL(activated(const QString &)),
|
||||
this,SLOT(textChangedData(const QString &)));
|
||||
connect(svc_bypass_box,SIGNAL(activated(int)),
|
||||
this,SLOT(bypassModeChangedData(int)));
|
||||
label=new QLabel(tr("Bypass Grid Processing")+":",this);
|
||||
label->setGeometry(10,136,170,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Inline Event Inheritance Log
|
||||
//
|
||||
svc_sub_event_inheritance_box=new QComboBox(this);
|
||||
svc_sub_event_inheritance_box->setGeometry(185,136,240,19);
|
||||
svc_sub_event_inheritance_box->setGeometry(185,157,240,19);
|
||||
svc_sub_event_inheritance_box->
|
||||
insertItem((int)RDSvc::ParentEvent,tr("From Relative Position"));
|
||||
svc_sub_event_inheritance_box->
|
||||
insertItem((int)RDSvc::SchedFile,tr("From Scheduler File"));
|
||||
connect(svc_sub_event_inheritance_box,SIGNAL(activated(const QString &)),
|
||||
this,SLOT(textChangedData(const QString &)));
|
||||
label=new QLabel(tr("Inline Event Start/Length")+":",this);
|
||||
label->setGeometry(10,136,170,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
svc_sub_event_inheritance_label=
|
||||
new QLabel(tr("Inline Event Start/Length")+":",this);
|
||||
svc_sub_event_inheritance_label->setGeometry(10,157,170,19);
|
||||
svc_sub_event_inheritance_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Voicetracking Group
|
||||
//
|
||||
svc_voice_group_box=new QComboBox(this);
|
||||
svc_voice_group_box->setGeometry(185,157,240,19);
|
||||
svc_voice_group_box->setGeometry(185,178,180,19);
|
||||
svc_voice_group_box->insertItem(0,tr("[none]"));
|
||||
label=new QLabel(tr("Voicetrack Group:"),this);
|
||||
label->setGeometry(10,157,170,19);
|
||||
label->setGeometry(10,178,170,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Autospot Group
|
||||
//
|
||||
svc_autospot_group_box=new QComboBox(this);
|
||||
svc_autospot_group_box->setGeometry(185,178,240,19);
|
||||
svc_autospot_group_box->setGeometry(185,199,180,19);
|
||||
svc_autospot_group_box->insertItem(0,tr("[none]"));
|
||||
label=new QLabel(tr("AutoSpot Group:"),this);
|
||||
label->setGeometry(10,178,170,19);
|
||||
label->setGeometry(10,199,170,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Chain Log
|
||||
//
|
||||
svc_chain_box=new QCheckBox(this);
|
||||
svc_chain_box->setGeometry(30,201,15,15);
|
||||
svc_chain_box->setGeometry(30,222,15,15);
|
||||
label=new QLabel(tr("Insert CHAIN TO at log end"),this);
|
||||
label->setGeometry(50,201,170,19);
|
||||
label->setGeometry(50,222,170,19);
|
||||
label->setAlignment(Qt::AlignLeft);
|
||||
|
||||
//
|
||||
// Default Auto Refresh
|
||||
//
|
||||
svc_autorefresh_box=new QCheckBox(this);
|
||||
svc_autorefresh_box->setGeometry(230,201,15,15);
|
||||
svc_autorefresh_box->setGeometry(230,222,15,15);
|
||||
label=new QLabel(tr("Enable AutoRefresh By Default"),this);
|
||||
label->setGeometry(250,201,200,19);
|
||||
label->setGeometry(250,222,200,19);
|
||||
label->setAlignment(Qt::AlignLeft);
|
||||
|
||||
//
|
||||
@ -259,7 +276,7 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
// Traffic Import Section
|
||||
//
|
||||
label=new QLabel(tr("Traffic Data Import"),this);
|
||||
label->setGeometry(10,231,160,24);
|
||||
label->setGeometry(10,252,160,24);
|
||||
label->setFont(sectionLabelFont());
|
||||
label->setAlignment(Qt::AlignLeft);
|
||||
|
||||
@ -267,11 +284,11 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
// Linux Traffic Import Path
|
||||
//
|
||||
svc_tfc_path_edit=new QLineEdit(this);
|
||||
svc_tfc_path_edit->setGeometry(185,255,240,19);
|
||||
svc_tfc_path_edit->setGeometry(185,276,240,19);
|
||||
svc_tfc_path_edit->setMaxLength(191);
|
||||
svc_tfc_path_edit->setValidator(validator);
|
||||
label=new QLabel(tr("Import Path:"),this);
|
||||
label->setGeometry(10,255,170,19);
|
||||
label->setGeometry(10,276,170,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
connect(svc_tfc_path_edit,SIGNAL(textChanged(const QString &)),
|
||||
this,SLOT(textChangedData(const QString &)));
|
||||
@ -280,10 +297,10 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
// Linux Traffic Preimport Command
|
||||
//
|
||||
svc_tfc_preimport_cmd_edit=new QLineEdit(this);
|
||||
svc_tfc_preimport_cmd_edit->setGeometry(185,276,240,19);
|
||||
svc_tfc_preimport_cmd_edit->setGeometry(185,297,240,19);
|
||||
svc_tfc_preimport_cmd_edit->setValidator(validator);
|
||||
label=new QLabel(tr("Preimport Command:"),this);
|
||||
label->setGeometry(10,276,170,19);
|
||||
label->setGeometry(10,297,170,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
connect(svc_tfc_preimport_cmd_edit,SIGNAL(textChanged(const QString &)),
|
||||
this,SLOT(textChangedData(const QString &)));
|
||||
@ -292,10 +309,10 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
// Note Cart
|
||||
//
|
||||
svc_tfc_label_cart_edit=new QLineEdit(this);
|
||||
svc_tfc_label_cart_edit->setGeometry(185,297,240,19);
|
||||
svc_tfc_label_cart_edit->setGeometry(185,318,240,19);
|
||||
svc_tfc_label_cart_edit->setMaxLength(32);
|
||||
label=new QLabel(tr("Insert Marker String")+":",this);
|
||||
label->setGeometry(10,297,170,19);
|
||||
label->setGeometry(10,318,170,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
connect(svc_tfc_label_cart_edit,SIGNAL(textChanged(const QString &)),
|
||||
this,SLOT(textChangedData(const QString &)));
|
||||
@ -304,10 +321,10 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
// Track String
|
||||
//
|
||||
svc_tfc_track_edit=new QLineEdit(this);
|
||||
svc_tfc_track_edit->setGeometry(185,318,240,19);
|
||||
svc_tfc_track_edit->setGeometry(185,339,240,19);
|
||||
svc_tfc_track_edit->setMaxLength(32);
|
||||
label=new QLabel(tr("Insert Voice Track String:"),this);
|
||||
label->setGeometry(10,318,170,19);
|
||||
label->setGeometry(10,339,170,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
connect(svc_tfc_track_edit,SIGNAL(textChanged(const QString &)),
|
||||
this,SLOT(textChangedData(const QString &)));
|
||||
@ -316,9 +333,9 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
// Traffic Import Template
|
||||
//
|
||||
svc_tfc_import_template_box=new QComboBox(this);
|
||||
svc_tfc_import_template_box->setGeometry(185,339,240,19);
|
||||
svc_tfc_import_template_box->setGeometry(185,360,240,19);
|
||||
label=new QLabel(tr("Import Template:"),this);
|
||||
label->setGeometry(10,339,170,19);
|
||||
label->setGeometry(10,360,170,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
connect(svc_tfc_import_template_box,SIGNAL(activated(int)),
|
||||
this,SLOT(tfcTemplateActivatedData(int)));
|
||||
@ -326,15 +343,15 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
//
|
||||
// Traffic Parser Settings
|
||||
//
|
||||
svc_tfc_fields=new ImportFields(this);
|
||||
svc_tfc_fields->setGeometry(10,360,svc_tfc_fields->sizeHint().width(),
|
||||
svc_tfc_fields=new ImportFields(RDSvc::Traffic,this);
|
||||
svc_tfc_fields->setGeometry(10,381,svc_tfc_fields->sizeHint().width(),
|
||||
svc_tfc_fields->sizeHint().height());
|
||||
|
||||
//
|
||||
// Traffic Test Button
|
||||
//
|
||||
button=new QPushButton(this);
|
||||
button->setGeometry(360,360,60,40);
|
||||
button->setGeometry(360,381,60,40);
|
||||
button->setFont(buttonFont());
|
||||
button->setText(tr("Test \nTraffic"));
|
||||
connect(button,SIGNAL(clicked()),this,SLOT(trafficData()));
|
||||
@ -343,7 +360,7 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
// Traffic Copy Button
|
||||
//
|
||||
svc_tfc_copy_button=new QPushButton(this);
|
||||
svc_tfc_copy_button->setGeometry(360,410,60,40);
|
||||
svc_tfc_copy_button->setGeometry(360,431,60,40);
|
||||
svc_tfc_copy_button->setFont(buttonFont());
|
||||
svc_tfc_copy_button->setText(tr("Copy To\nCustom"));
|
||||
connect(svc_tfc_copy_button,SIGNAL(clicked()),this,SLOT(trafficCopyData()));
|
||||
@ -352,7 +369,7 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
// Music Import Section
|
||||
//
|
||||
label=new QLabel(tr("Music Data Import"),this);
|
||||
label->setGeometry(445,234,160,24);
|
||||
label->setGeometry(445,252,160,24);
|
||||
label->setFont(sectionLabelFont());
|
||||
label->setAlignment(Qt::AlignLeft);
|
||||
|
||||
@ -360,11 +377,11 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
// Linux Music Import Path
|
||||
//
|
||||
svc_mus_path_edit=new QLineEdit(this);
|
||||
svc_mus_path_edit->setGeometry(620,256,240,19);
|
||||
svc_mus_path_edit->setGeometry(620,277,240,19);
|
||||
svc_mus_path_edit->setMaxLength(191);
|
||||
svc_mus_path_edit->setValidator(validator);
|
||||
label=new QLabel(tr("Import Path:"),this);
|
||||
label->setGeometry(450,256,165,19);
|
||||
label->setGeometry(450,277,165,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
connect(svc_mus_path_edit,SIGNAL(textChanged(const QString &)),
|
||||
this,SLOT(textChangedData(const QString &)));
|
||||
@ -373,11 +390,11 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
// Linux Music Preimport Command
|
||||
//
|
||||
svc_mus_preimport_cmd_edit=new QLineEdit(this);
|
||||
svc_mus_preimport_cmd_edit->setGeometry(620,276,240,19);
|
||||
svc_mus_preimport_cmd_edit->setGeometry(620,297,240,19);
|
||||
svc_mus_preimport_cmd_edit->setValidator(validator);
|
||||
label=
|
||||
new QLabel(tr("Preimport Command:"),this);
|
||||
label->setGeometry(450,276,165,19);
|
||||
label->setGeometry(450,297,165,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
connect(svc_mus_preimport_cmd_edit,SIGNAL(textChanged(const QString &)),
|
||||
this,SLOT(textChangedData(const QString &)));
|
||||
@ -386,10 +403,10 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
// Label Cart
|
||||
//
|
||||
svc_mus_label_cart_edit=new QLineEdit(this);
|
||||
svc_mus_label_cart_edit->setGeometry(620,297,240,19);
|
||||
svc_mus_label_cart_edit->setGeometry(620,318,240,19);
|
||||
svc_mus_label_cart_edit->setMaxLength(32);
|
||||
label=new QLabel(tr("Insert Marker String")+":",this);
|
||||
label->setGeometry(450,297,165,19);
|
||||
label->setGeometry(450,318,165,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
connect(svc_mus_label_cart_edit,SIGNAL(textChanged(const QString &)),
|
||||
this,SLOT(textChangedData(const QString &)));
|
||||
@ -398,10 +415,10 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
// Insert Voice Track String
|
||||
//
|
||||
svc_mus_track_edit=new QLineEdit(this);
|
||||
svc_mus_track_edit->setGeometry(620,318,240,19);
|
||||
svc_mus_track_edit->setGeometry(620,339,240,19);
|
||||
svc_mus_track_edit->setMaxLength(255);
|
||||
label=new QLabel(tr("Insert Voice Track String:"),this);
|
||||
label->setGeometry(450,318,165,19);
|
||||
label->setGeometry(450,339,165,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
connect(svc_mus_track_edit,SIGNAL(textChanged(const QString &)),
|
||||
this,SLOT(textChangedData(const QString &)));
|
||||
@ -410,10 +427,10 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
// Insert Spot Break String
|
||||
//
|
||||
svc_mus_break_edit=new QLineEdit(this);
|
||||
svc_mus_break_edit->setGeometry(620,339,240,19);
|
||||
svc_mus_break_edit->setGeometry(620,360,240,19);
|
||||
svc_mus_break_edit->setMaxLength(255);
|
||||
label=new QLabel(tr("Insert Traffic Break String:"),this);
|
||||
label->setGeometry(450,339,165,19);
|
||||
label->setGeometry(450,360,165,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
connect(svc_mus_break_edit,SIGNAL(textChanged(const QString &)),
|
||||
this,SLOT(textChangedData(const QString &)));
|
||||
@ -422,9 +439,9 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
// Music Import Template
|
||||
//
|
||||
svc_mus_import_template_box=new QComboBox(this);
|
||||
svc_mus_import_template_box->setGeometry(620,360,240,19);
|
||||
svc_mus_import_template_box->setGeometry(620,381,240,19);
|
||||
label=new QLabel(tr("Import Template:"),this);
|
||||
label->setGeometry(450,360,165,19);
|
||||
label->setGeometry(450,381,165,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
connect(svc_mus_import_template_box,SIGNAL(activated(int)),
|
||||
this,SLOT(musTemplateActivatedData(int)));
|
||||
@ -432,15 +449,17 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
//
|
||||
// Music Parser Settings
|
||||
//
|
||||
svc_mus_fields=new ImportFields(this);
|
||||
svc_mus_fields->setGeometry(445,381,svc_mus_fields->sizeHint().width(),
|
||||
svc_mus_fields=new ImportFields(RDSvc::Music,this);
|
||||
connect(svc_bypass_box,SIGNAL(activated(int)),
|
||||
svc_mus_fields,SLOT(setBypassMode(int)));
|
||||
svc_mus_fields->setGeometry(445,402,svc_mus_fields->sizeHint().width(),
|
||||
svc_mus_fields->sizeHint().height());
|
||||
|
||||
//
|
||||
// Music Test Button
|
||||
//
|
||||
button=new QPushButton(this);
|
||||
button->setGeometry(795,381,60,40);
|
||||
button->setGeometry(795,402,60,40);
|
||||
button->setFont(buttonFont());
|
||||
button->setText(tr("Test \nMusic"));
|
||||
connect(button,SIGNAL(clicked()),this,SLOT(musicData()));
|
||||
@ -449,7 +468,7 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
// Music Copy Button
|
||||
//
|
||||
svc_mus_copy_button=new QPushButton(this);
|
||||
svc_mus_copy_button->setGeometry(795,431,60,40);
|
||||
svc_mus_copy_button->setGeometry(795,452,60,40);
|
||||
svc_mus_copy_button->setFont(buttonFont());
|
||||
svc_mus_copy_button->setText(tr("Copy To\nCustom"));
|
||||
connect(svc_mus_copy_button,SIGNAL(clicked()),this,SLOT(musicCopyData()));
|
||||
@ -500,6 +519,7 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
//
|
||||
svc_name_edit->setText(svc_svc->name());
|
||||
svc_description_edit->setText(svc_svc->description());
|
||||
svc_bypass_box->setCurrentIndex(svc_svc->bypassMode());
|
||||
svc_program_code_edit->setText(svc_svc->programCode());
|
||||
svc_name_template_edit->setText(svc_svc->nameTemplate());
|
||||
svc_description_template_edit->setText(svc_svc->descriptionTemplate());
|
||||
@ -563,6 +583,7 @@ EditSvc::EditSvc(QString svc,QWidget *parent)
|
||||
setText(svc_svc->trackString(RDSvc::Music));
|
||||
tfcTemplateActivatedData(svc_tfc_import_template_box->currentIndex());
|
||||
musTemplateActivatedData(svc_mus_import_template_box->currentIndex());
|
||||
bypassModeChangedData(svc_bypass_box->currentIndex());
|
||||
import_changed=false;
|
||||
}
|
||||
|
||||
@ -571,12 +592,13 @@ EditSvc::~EditSvc()
|
||||
{
|
||||
delete svc_name_edit;
|
||||
delete svc_description_edit;
|
||||
delete svc_test_import_dialog;
|
||||
}
|
||||
|
||||
|
||||
QSize EditSvc::sizeHint() const
|
||||
{
|
||||
return QSize(870,691);
|
||||
return QSize(870,712+42);
|
||||
}
|
||||
|
||||
|
||||
@ -594,6 +616,16 @@ void EditSvc::autofillData()
|
||||
}
|
||||
|
||||
|
||||
void EditSvc::bypassModeChangedData(int n)
|
||||
{
|
||||
if(n!=0) {
|
||||
svc_sub_event_inheritance_box->setCurrentIndex((int)RDSvc::SchedFile);
|
||||
}
|
||||
svc_sub_event_inheritance_label->setEnabled(n==0);
|
||||
svc_sub_event_inheritance_box->setEnabled(n==0);
|
||||
}
|
||||
|
||||
|
||||
void EditSvc::enableHostsData()
|
||||
{
|
||||
EditSvcPerms *edit_perms=new EditSvcPerms(svc_svc,this);
|
||||
@ -668,7 +700,7 @@ void EditSvc::tfcTemplateActivatedData(int index)
|
||||
svc_tfc_import_template_box->currentText());
|
||||
}
|
||||
|
||||
svc_tfc_fields->setFields(svc_svc,RDSvc::Traffic);
|
||||
svc_tfc_fields->setFields(svc_svc);
|
||||
svc_tfc_fields->setEnabled(index==0);
|
||||
svc_tfc_copy_button->setEnabled(index!=0);
|
||||
import_changed=true;
|
||||
@ -701,7 +733,7 @@ void EditSvc::musTemplateActivatedData(int index)
|
||||
svc_mus_import_template_box->currentText());
|
||||
}
|
||||
|
||||
svc_mus_fields->setFields(svc_svc,RDSvc::Music);
|
||||
svc_mus_fields->setFields(svc_svc);
|
||||
svc_mus_fields->setEnabled(index==0);
|
||||
svc_mus_copy_button->setEnabled(index!=0);
|
||||
import_changed=true;
|
||||
@ -742,15 +774,14 @@ void EditSvc::TestDataImport(RDSvc::ImportSource src)
|
||||
}
|
||||
Save();
|
||||
}
|
||||
TestImport *testimport=new TestImport(svc_svc,src,this);
|
||||
testimport->exec();
|
||||
delete testimport;
|
||||
svc_test_import_dialog->exec(svc_svc,src);
|
||||
}
|
||||
|
||||
|
||||
void EditSvc::Save()
|
||||
{
|
||||
svc_svc->setDescription(svc_description_edit->text());
|
||||
svc_svc->setBypassMode(svc_bypass_box->currentIndex());
|
||||
svc_svc->setProgramCode(svc_program_code_edit->text());
|
||||
svc_svc->setNameTemplate(svc_name_template_edit->text().trimmed());
|
||||
svc_svc->setDescriptionTemplate(svc_description_template_edit->text());
|
||||
@ -781,7 +812,7 @@ void EditSvc::Save()
|
||||
setPreimportCommand(RDSvc::Traffic,svc_tfc_preimport_cmd_edit->text());
|
||||
if(svc_tfc_import_template_box->currentIndex()==0) {
|
||||
svc_svc->setImportTemplate(RDSvc::Traffic,"");
|
||||
svc_tfc_fields->readFields(svc_svc,RDSvc::Traffic);
|
||||
svc_tfc_fields->readFields(svc_svc);
|
||||
}
|
||||
else {
|
||||
svc_svc->setImportTemplate(RDSvc::Traffic,
|
||||
@ -793,7 +824,7 @@ void EditSvc::Save()
|
||||
svc_svc->setPreimportCommand(RDSvc::Music,svc_mus_preimport_cmd_edit->text());
|
||||
if(svc_mus_import_template_box->currentIndex()==0) {
|
||||
svc_svc->setImportTemplate(RDSvc::Music,"");
|
||||
svc_mus_fields->readFields(svc_svc,RDSvc::Music);
|
||||
svc_mus_fields->readFields(svc_svc);
|
||||
}
|
||||
else {
|
||||
svc_svc->setImportTemplate(RDSvc::Music,
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Edit a Rivendell Service
|
||||
//
|
||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2022 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,16 +21,17 @@
|
||||
#ifndef EDIT_SVC_H
|
||||
#define EDIT_SVC_H
|
||||
|
||||
#include <qcheckbox.h>
|
||||
#include <qcombobox.h>
|
||||
#include <qlabel.h>
|
||||
#include <qlineedit.h>
|
||||
#include <qspinbox.h>
|
||||
#include <QCheckBox>
|
||||
#include <QComboBox>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QSpinBox>
|
||||
|
||||
#include <rddialog.h>
|
||||
#include <rdsvc.h>
|
||||
|
||||
#include "importfields.h"
|
||||
#include "test_import.h"
|
||||
|
||||
class EditSvc : public RDDialog
|
||||
{
|
||||
@ -43,6 +44,7 @@ class EditSvc : public RDDialog
|
||||
|
||||
private slots:
|
||||
void autofillData();
|
||||
void bypassModeChangedData(int n);
|
||||
void enableHostsData();
|
||||
void trafficData();
|
||||
void trafficCopyData();
|
||||
@ -63,6 +65,9 @@ class EditSvc : public RDDialog
|
||||
QLineEdit *svc_program_code_edit;
|
||||
QLineEdit *svc_name_template_edit;
|
||||
QLineEdit *svc_description_template_edit;
|
||||
QComboBox *svc_bypass_box;
|
||||
QLabel *svc_sub_event_inheritance_label;
|
||||
QComboBox *svc_sub_event_inheritance_box;
|
||||
QComboBox *svc_voice_group_box;
|
||||
QComboBox *svc_autospot_group_box;
|
||||
QLineEdit *svc_tfc_path_edit;
|
||||
@ -78,7 +83,6 @@ class EditSvc : public RDDialog
|
||||
QLineEdit *svc_mus_label_cart_edit;
|
||||
QLineEdit *svc_mus_break_edit;
|
||||
QLineEdit *svc_mus_track_edit;
|
||||
QComboBox *svc_sub_event_inheritance_box;
|
||||
QCheckBox *svc_chain_box;
|
||||
QCheckBox *svc_autorefresh_box;
|
||||
QCheckBox *svc_loglife_box;
|
||||
@ -92,8 +96,8 @@ class EditSvc : public RDDialog
|
||||
QPushButton *svc_tfc_copy_button;
|
||||
QPushButton *svc_mus_copy_button;
|
||||
bool import_changed;
|
||||
TestImport *svc_test_import_dialog;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif // EDIT_SVC_H
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Import Parser Parameters for RDAdmin.
|
||||
//
|
||||
// (C) Copyright 2010-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2010-2022 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -22,21 +22,23 @@
|
||||
|
||||
#include "importfields.h"
|
||||
|
||||
ImportFields::ImportFields(QWidget *parent)
|
||||
ImportFields::ImportFields(RDSvc::ImportSource src,QWidget *parent)
|
||||
: RDWidget(parent)
|
||||
{
|
||||
QLabel *label;
|
||||
import_changed=false;
|
||||
bypass_mode=false;
|
||||
import_source=src;
|
||||
|
||||
//
|
||||
// Traffic Cartname Parser Data Section
|
||||
// Cartname Parser Data Section
|
||||
//
|
||||
label=new QLabel(tr("Cart Number:"),this);
|
||||
label->setGeometry(0,0,125,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Traffic Cart Offset
|
||||
// Cart Offset
|
||||
//
|
||||
cart_offset_spin=new QSpinBox(this);
|
||||
cart_offset_spin->setGeometry(175,0,50,19);
|
||||
@ -48,7 +50,7 @@ ImportFields::ImportFields(QWidget *parent)
|
||||
this,SLOT(valueChangedData(int)));
|
||||
|
||||
//
|
||||
// Traffic Cart Length
|
||||
// Cart Length
|
||||
//
|
||||
cart_length_spin=new QSpinBox(this);
|
||||
cart_length_spin->setGeometry(285,0,50,19);
|
||||
@ -91,14 +93,14 @@ ImportFields::ImportFields(QWidget *parent)
|
||||
this,SLOT(valueChangedData(int)));
|
||||
|
||||
//
|
||||
// Traffic Start Hours Parser Data Section
|
||||
// Start Hours Parser Data Section
|
||||
//
|
||||
label=new QLabel(tr("Start Time - Hours:"),this);
|
||||
label->setGeometry(0,42,125,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Traffic Start Hours Offset
|
||||
// Start Hours Offset
|
||||
//
|
||||
hours_offset_spin=new QSpinBox(this);
|
||||
hours_offset_spin->setGeometry(175,42,50,19);
|
||||
@ -110,7 +112,7 @@ ImportFields::ImportFields(QWidget *parent)
|
||||
this,SLOT(valueChangedData(int)));
|
||||
|
||||
//
|
||||
// Traffic Start Hours Length
|
||||
// Start Hours Length
|
||||
//
|
||||
hours_length_spin=new QSpinBox(this);
|
||||
hours_length_spin->setGeometry(285,42,50,19);
|
||||
@ -122,14 +124,14 @@ ImportFields::ImportFields(QWidget *parent)
|
||||
this,SLOT(valueChangedData(int)));
|
||||
|
||||
//
|
||||
// Traffic Start Minutes Parser Data Section
|
||||
// Start Minutes Parser Data Section
|
||||
//
|
||||
label=new QLabel(tr("Start Time - Minutes:"),this);
|
||||
label->setGeometry(0,63,125,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Traffic Start Minutes Offset
|
||||
// Start Minutes Offset
|
||||
//
|
||||
minutes_offset_spin=new QSpinBox(this);
|
||||
minutes_offset_spin->setGeometry(175,63,50,19);
|
||||
@ -141,7 +143,7 @@ ImportFields::ImportFields(QWidget *parent)
|
||||
this,SLOT(valueChangedData(int)));
|
||||
|
||||
//
|
||||
// Traffic Start Minutes Length
|
||||
// Start Minutes Length
|
||||
//
|
||||
minutes_length_spin=new QSpinBox(this);
|
||||
minutes_length_spin->setGeometry(285,63,50,19);
|
||||
@ -153,14 +155,14 @@ ImportFields::ImportFields(QWidget *parent)
|
||||
this,SLOT(valueChangedData(int)));
|
||||
|
||||
//
|
||||
// Traffic Start Seconds Parser Data Section
|
||||
// Start Seconds Parser Data Section
|
||||
//
|
||||
label=new QLabel(tr("Start Time - Seconds:"),this);
|
||||
label->setGeometry(0,84,125,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Traffic Start Seconds Offset
|
||||
// Start Seconds Offset
|
||||
//
|
||||
seconds_offset_spin=new QSpinBox(this);
|
||||
seconds_offset_spin->setGeometry(175,84,50,19);
|
||||
@ -172,7 +174,7 @@ ImportFields::ImportFields(QWidget *parent)
|
||||
this,SLOT(valueChangedData(int)));
|
||||
|
||||
//
|
||||
// Traffic Start Seconds Length
|
||||
// Start Seconds Length
|
||||
//
|
||||
seconds_length_spin=new QSpinBox(this);
|
||||
seconds_length_spin->setGeometry(285,84,50,19);
|
||||
@ -184,14 +186,14 @@ ImportFields::ImportFields(QWidget *parent)
|
||||
this,SLOT(valueChangedData(int)));
|
||||
|
||||
//
|
||||
// Traffic Length Hours Parser Data Section
|
||||
// Length Hours Parser Data Section
|
||||
//
|
||||
label=new QLabel(tr("Length - Hours:"),this);
|
||||
label->setGeometry(0,106,125,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Traffic Length Hours Offset
|
||||
// Length Hours Offset
|
||||
//
|
||||
len_hours_offset_spin=new QSpinBox(this);
|
||||
len_hours_offset_spin->setGeometry(175,106,50,19);
|
||||
@ -203,7 +205,7 @@ ImportFields::ImportFields(QWidget *parent)
|
||||
this,SLOT(valueChangedData(int)));
|
||||
|
||||
//
|
||||
// Traffic Length Hours Length
|
||||
// Length Hours Length
|
||||
//
|
||||
len_hours_length_spin=new QSpinBox(this);
|
||||
len_hours_length_spin->setGeometry(285,106,50,19);
|
||||
@ -215,14 +217,14 @@ ImportFields::ImportFields(QWidget *parent)
|
||||
this,SLOT(valueChangedData(int)));
|
||||
|
||||
//
|
||||
// Traffic Length Minutes Parser Data Section
|
||||
// Length Minutes Parser Data Section
|
||||
//
|
||||
label=new QLabel(tr("Length - Minutes:"),this);
|
||||
label->setGeometry(0,127,125,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Traffic Length Minutes Offset
|
||||
// Length Minutes Offset
|
||||
//
|
||||
len_minutes_offset_spin=new QSpinBox(this);
|
||||
len_minutes_offset_spin->setGeometry(175,127,50,19);
|
||||
@ -234,7 +236,7 @@ ImportFields::ImportFields(QWidget *parent)
|
||||
this,SLOT(valueChangedData(int)));
|
||||
|
||||
//
|
||||
// Traffic Length Minutes Length
|
||||
// Length Minutes Length
|
||||
//
|
||||
len_minutes_length_spin=new QSpinBox(this);
|
||||
len_minutes_length_spin->setGeometry(285,127,50,19);
|
||||
@ -246,14 +248,14 @@ ImportFields::ImportFields(QWidget *parent)
|
||||
this,SLOT(valueChangedData(int)));
|
||||
|
||||
//
|
||||
// Traffic Length Seconds Parser Data Section
|
||||
// Length Seconds Parser Data Section
|
||||
//
|
||||
label=new QLabel(tr("Length - Seconds:"),this);
|
||||
label->setGeometry(0,148,125,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Traffic Length Seconds Offset
|
||||
// Length Seconds Offset
|
||||
//
|
||||
len_seconds_offset_spin=new QSpinBox(this);
|
||||
len_seconds_offset_spin->setGeometry(175,148,50,19);
|
||||
@ -265,7 +267,7 @@ ImportFields::ImportFields(QWidget *parent)
|
||||
this,SLOT(valueChangedData(int)));
|
||||
|
||||
//
|
||||
// Traffic Length Seconds Length
|
||||
// Length Seconds Length
|
||||
//
|
||||
len_seconds_length_spin=new QSpinBox(this);
|
||||
len_seconds_length_spin->setGeometry(285,148,50,19);
|
||||
@ -277,14 +279,14 @@ ImportFields::ImportFields(QWidget *parent)
|
||||
this,SLOT(valueChangedData(int)));
|
||||
|
||||
//
|
||||
// Traffic GUID Parser Data Section
|
||||
// GUID Parser Data Section
|
||||
//
|
||||
label=new QLabel(tr("Globally Unique ID:"),this);
|
||||
label->setGeometry(0,169,125,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Traffic Contract # Offset
|
||||
// Contract # Offset
|
||||
//
|
||||
data_offset_spin=new QSpinBox(this);
|
||||
data_offset_spin->setGeometry(175,169,50,19);
|
||||
@ -296,7 +298,7 @@ ImportFields::ImportFields(QWidget *parent)
|
||||
this,SLOT(valueChangedData(int)));
|
||||
|
||||
//
|
||||
// Traffic Contract # Length
|
||||
// Contract # Length
|
||||
//
|
||||
data_length_spin=new QSpinBox(this);
|
||||
data_length_spin->setGeometry(285,169,50,19);
|
||||
@ -308,14 +310,14 @@ ImportFields::ImportFields(QWidget *parent)
|
||||
this,SLOT(valueChangedData(int)));
|
||||
|
||||
//
|
||||
// Traffic Event ID Parser Data Section
|
||||
// Event ID Parser Data Section
|
||||
//
|
||||
label=new QLabel(tr("Event ID:"),this);
|
||||
label->setGeometry(0,190,125,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Traffic Event ID Offset
|
||||
// Event ID Offset
|
||||
//
|
||||
event_id_offset_spin=new QSpinBox(this);
|
||||
event_id_offset_spin->setGeometry(175,190,50,19);
|
||||
@ -327,7 +329,7 @@ ImportFields::ImportFields(QWidget *parent)
|
||||
this,SLOT(valueChangedData(int)));
|
||||
|
||||
//
|
||||
// Traffic Event ID Length
|
||||
// Event ID Length
|
||||
//
|
||||
event_id_length_spin=new QSpinBox(this);
|
||||
event_id_length_spin->setGeometry(285,190,50,19);
|
||||
@ -339,14 +341,14 @@ ImportFields::ImportFields(QWidget *parent)
|
||||
this,SLOT(valueChangedData(int)));
|
||||
|
||||
//
|
||||
// Traffic Announcement Type Parser Data Section
|
||||
// Announcement Type Parser Data Section
|
||||
//
|
||||
label=new QLabel(tr("Annc. Type:"),this);
|
||||
label->setGeometry(0,211,125,19);
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Traffic Announcement Type Offset
|
||||
// Announcement Type Offset
|
||||
//
|
||||
annctype_offset_spin=new QSpinBox(this);
|
||||
annctype_offset_spin->setGeometry(175,211,50,19);
|
||||
@ -358,7 +360,7 @@ ImportFields::ImportFields(QWidget *parent)
|
||||
this,SLOT(valueChangedData(int)));
|
||||
|
||||
//
|
||||
// Traffic Announcement Type Length
|
||||
// Announcement Type Length
|
||||
//
|
||||
annctype_length_spin=new QSpinBox(this);
|
||||
annctype_length_spin->setGeometry(285,211,50,19);
|
||||
@ -368,11 +370,96 @@ ImportFields::ImportFields(QWidget *parent)
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
connect(annctype_length_spin,SIGNAL(valueChanged(int)),
|
||||
this,SLOT(valueChangedData(int)));
|
||||
|
||||
//
|
||||
// Transition Type Parser Data Section
|
||||
//
|
||||
trans_type_label=new QLabel(tr("Transition Type")+":",this);
|
||||
trans_type_label->setGeometry(0,232,125,19);
|
||||
trans_type_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
trans_type_label->setVisible(import_source==RDSvc::Music);
|
||||
trans_type_label->setEnabled(bypass_mode);
|
||||
|
||||
//
|
||||
// Transition Type Offset
|
||||
//
|
||||
trans_type_offset_spin=new QSpinBox(this);
|
||||
trans_type_offset_spin->setGeometry(175,232,50,19);
|
||||
trans_type_offset_spin->setRange(0,RD_MAX_IMPORT_LINE_LENGTH);
|
||||
trans_type_offset_spin->setVisible(import_source==RDSvc::Music);
|
||||
trans_type_offset_spin->setEnabled(bypass_mode);
|
||||
trans_type_offset_label=new QLabel(tr("Offset:"),this);
|
||||
trans_type_offset_label->setGeometry(125,232,45,19);
|
||||
trans_type_offset_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
trans_type_offset_label->setVisible(import_source==RDSvc::Music);
|
||||
trans_type_offset_label->setEnabled(bypass_mode);
|
||||
connect(trans_type_offset_spin,SIGNAL(valueChanged(int)),
|
||||
this,SLOT(valueChangedData(int)));
|
||||
|
||||
//
|
||||
// Transition Type Length
|
||||
//
|
||||
trans_type_length_spin=new QSpinBox(this);
|
||||
trans_type_length_spin->setGeometry(285,232,50,19);
|
||||
trans_type_length_spin->setRange(0,8);
|
||||
trans_type_length_spin->setVisible(import_source==RDSvc::Music);
|
||||
trans_type_length_spin->setEnabled(bypass_mode);
|
||||
trans_type_length_label=new QLabel(tr("Length:"),this);
|
||||
trans_type_length_label->setGeometry(230,232,50,19);
|
||||
trans_type_length_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
trans_type_length_label->setVisible(import_source==RDSvc::Music);
|
||||
trans_type_length_label->setEnabled(bypass_mode);
|
||||
connect(trans_type_length_spin,SIGNAL(valueChanged(int)),
|
||||
this,SLOT(valueChangedData(int)));
|
||||
|
||||
//
|
||||
// Time Type Parser Data Section
|
||||
//
|
||||
time_type_label=new QLabel(tr("Time Type")+":",this);
|
||||
time_type_label->setGeometry(0,253,125,19);
|
||||
time_type_label->setVisible(import_source==RDSvc::Music);
|
||||
time_type_label->setEnabled(bypass_mode);
|
||||
time_type_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
|
||||
//
|
||||
// Time Type Offset
|
||||
//
|
||||
time_type_offset_spin=new QSpinBox(this);
|
||||
time_type_offset_spin->setGeometry(175,253,50,19);
|
||||
time_type_offset_spin->setRange(0,RD_MAX_IMPORT_LINE_LENGTH);
|
||||
time_type_offset_spin->setVisible(import_source==RDSvc::Music);
|
||||
time_type_offset_spin->setEnabled(bypass_mode);
|
||||
time_type_offset_label=new QLabel(tr("Offset:"),this);
|
||||
time_type_offset_label->setGeometry(125,253,45,19);
|
||||
time_type_offset_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
time_type_offset_label->setVisible(import_source==RDSvc::Music);
|
||||
time_type_offset_label->setEnabled(bypass_mode);
|
||||
connect(time_type_offset_spin,SIGNAL(valueChanged(int)),
|
||||
this,SLOT(valueChangedData(int)));
|
||||
|
||||
//
|
||||
// Time Type Length
|
||||
//
|
||||
time_type_length_spin=new QSpinBox(this);
|
||||
time_type_length_spin->setGeometry(285,253,50,19);
|
||||
time_type_length_spin->setRange(0,8);
|
||||
time_type_length_spin->setVisible(import_source==RDSvc::Music);
|
||||
time_type_length_spin->setEnabled(bypass_mode);
|
||||
time_type_length_label=new QLabel(tr("Length:"),this);
|
||||
time_type_length_label->setGeometry(230,253,50,19);
|
||||
time_type_length_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
time_type_length_label->setVisible(import_source==RDSvc::Music);
|
||||
time_type_length_label->setEnabled(bypass_mode);
|
||||
connect(time_type_length_spin,SIGNAL(valueChanged(int)),
|
||||
this,SLOT(valueChangedData(int)));
|
||||
}
|
||||
|
||||
|
||||
QSize ImportFields::sizeHint() const
|
||||
{
|
||||
if(import_source==RDSvc::Music) {
|
||||
return QSize(335,230+42);
|
||||
}
|
||||
return QSize(335,230);
|
||||
}
|
||||
|
||||
@ -389,70 +476,168 @@ bool ImportFields::changed() const
|
||||
}
|
||||
|
||||
|
||||
void ImportFields::readFields(RDSvc *svc,RDSvc::ImportSource type)
|
||||
void ImportFields::readFields(RDSvc *svc)
|
||||
{
|
||||
svc->setImportOffset(type,RDSvc::CartNumber,cart_offset_spin->value());
|
||||
svc->setImportLength(type,RDSvc::CartNumber,cart_length_spin->value());
|
||||
svc->setImportOffset(type,RDSvc::Title,title_offset_spin->value());
|
||||
svc->setImportLength(type,RDSvc::Title,title_length_spin->value());
|
||||
svc->setImportOffset(type,RDSvc::StartHours,hours_offset_spin->value());
|
||||
svc->setImportLength(type,RDSvc::StartHours,hours_length_spin->value());
|
||||
svc->setImportOffset(type,RDSvc::StartMinutes,minutes_offset_spin->value());
|
||||
svc->setImportLength(type,RDSvc::StartMinutes,minutes_length_spin->value());
|
||||
svc->setImportOffset(type,RDSvc::StartSeconds,seconds_offset_spin->value());
|
||||
svc->setImportLength(type,RDSvc::StartSeconds,seconds_length_spin->value());
|
||||
svc->setImportOffset(type,RDSvc::LengthHours,len_hours_offset_spin->value());
|
||||
svc->setImportLength(type,RDSvc::LengthHours,len_hours_length_spin->value());
|
||||
svc->setImportOffset(type,RDSvc::LengthMinutes,
|
||||
svc->setImportOffset(import_source,RDSvc::CartNumber,
|
||||
cart_offset_spin->value());
|
||||
svc->setImportLength(import_source,RDSvc::CartNumber,
|
||||
cart_length_spin->value());
|
||||
svc->setImportOffset(import_source,RDSvc::Title,title_offset_spin->value());
|
||||
svc->setImportLength(import_source,RDSvc::Title,title_length_spin->value());
|
||||
svc->setImportOffset(import_source,RDSvc::StartHours,
|
||||
hours_offset_spin->value());
|
||||
svc->setImportLength(import_source,RDSvc::StartHours,
|
||||
hours_length_spin->value());
|
||||
svc->setImportOffset(import_source,RDSvc::StartMinutes,
|
||||
minutes_offset_spin->value());
|
||||
svc->setImportLength(import_source,RDSvc::StartMinutes,
|
||||
minutes_length_spin->value());
|
||||
svc->setImportOffset(import_source,RDSvc::StartSeconds,
|
||||
seconds_offset_spin->value());
|
||||
svc->setImportLength(import_source,RDSvc::StartSeconds,
|
||||
seconds_length_spin->value());
|
||||
svc->setImportOffset(import_source,RDSvc::LengthHours,
|
||||
len_hours_offset_spin->value());
|
||||
svc->setImportLength(import_source,RDSvc::LengthHours,
|
||||
len_hours_length_spin->value());
|
||||
svc->setImportOffset(import_source,RDSvc::LengthMinutes,
|
||||
len_minutes_offset_spin->value());
|
||||
svc->setImportLength(type,RDSvc::LengthMinutes,
|
||||
svc->setImportLength(import_source,RDSvc::LengthMinutes,
|
||||
len_minutes_length_spin->value());
|
||||
svc->setImportOffset(type,RDSvc::LengthSeconds,
|
||||
svc->setImportOffset(import_source,RDSvc::LengthSeconds,
|
||||
len_seconds_offset_spin->value());
|
||||
svc->setImportLength(type,RDSvc::LengthSeconds,
|
||||
svc->setImportLength(import_source,RDSvc::LengthSeconds,
|
||||
len_seconds_length_spin->value());
|
||||
svc->setImportOffset(type,RDSvc::ExtData,data_offset_spin->value());
|
||||
svc->setImportLength(type,RDSvc::ExtData,data_length_spin->value());
|
||||
svc->setImportOffset(type,RDSvc::ExtEventId,event_id_offset_spin->value());
|
||||
svc->setImportLength(type,RDSvc::ExtEventId,event_id_length_spin->value());
|
||||
svc->setImportOffset(type,RDSvc::ExtAnncType,annctype_offset_spin->value());
|
||||
svc->setImportLength(type,RDSvc::ExtAnncType,annctype_length_spin->value());
|
||||
svc->setImportOffset(import_source,RDSvc::ExtData,
|
||||
data_offset_spin->value());
|
||||
svc->setImportLength(import_source,RDSvc::ExtData,data_length_spin->value());
|
||||
svc->setImportOffset(import_source,RDSvc::ExtEventId,
|
||||
event_id_offset_spin->value());
|
||||
svc->setImportLength(import_source,RDSvc::ExtEventId,
|
||||
event_id_length_spin->value());
|
||||
svc->setImportOffset(import_source,RDSvc::ExtAnncType,
|
||||
annctype_offset_spin->value());
|
||||
svc->setImportLength(import_source,RDSvc::ExtAnncType,
|
||||
annctype_length_spin->value());
|
||||
if(import_source==RDSvc::Music) {
|
||||
svc->setImportOffset(import_source,RDSvc::TransType,
|
||||
trans_type_offset_spin->value());
|
||||
svc->setImportLength(import_source,RDSvc::TransType,
|
||||
trans_type_length_spin->value());
|
||||
svc->setImportOffset(import_source,RDSvc::TimeType,
|
||||
time_type_offset_spin->value());
|
||||
svc->setImportLength(import_source,RDSvc::TimeType,
|
||||
time_type_length_spin->value());
|
||||
}
|
||||
import_changed=false;
|
||||
}
|
||||
|
||||
|
||||
void ImportFields::setFields(RDSvc *svc,RDSvc::ImportSource type)
|
||||
void ImportFields::setFields(RDSvc *svc)
|
||||
{
|
||||
cart_offset_spin->setValue(svc->importOffset(type,RDSvc::CartNumber));
|
||||
cart_length_spin->setValue(svc->importLength(type,RDSvc::CartNumber));
|
||||
title_offset_spin->setValue(svc->importOffset(type,RDSvc::Title));
|
||||
title_length_spin->setValue(svc->importLength(type,RDSvc::Title));
|
||||
hours_offset_spin->setValue(svc->importOffset(type,RDSvc::StartHours));
|
||||
hours_length_spin->setValue(svc->importLength(type,RDSvc::StartHours));
|
||||
minutes_offset_spin->setValue(svc->importOffset(type,RDSvc::StartMinutes));
|
||||
minutes_length_spin->setValue(svc->importLength(type,RDSvc::StartMinutes));
|
||||
seconds_offset_spin->setValue(svc->importOffset(type,RDSvc::StartSeconds));
|
||||
seconds_length_spin->setValue(svc->importLength(type,RDSvc::StartSeconds));
|
||||
len_hours_offset_spin->setValue(svc->importOffset(type,RDSvc::LengthHours));
|
||||
len_hours_length_spin->setValue(svc->importLength(type,RDSvc::LengthHours));
|
||||
setBypassMode(svc->bypassMode());
|
||||
cart_offset_spin->
|
||||
setValue(svc->importOffset(import_source,RDSvc::CartNumber));
|
||||
cart_length_spin->
|
||||
setValue(svc->importLength(import_source,RDSvc::CartNumber));
|
||||
title_offset_spin->setValue(svc->importOffset(import_source,RDSvc::Title));
|
||||
title_length_spin->setValue(svc->importLength(import_source,RDSvc::Title));
|
||||
hours_offset_spin->
|
||||
setValue(svc->importOffset(import_source,RDSvc::StartHours));
|
||||
hours_length_spin->
|
||||
setValue(svc->importLength(import_source,RDSvc::StartHours));
|
||||
minutes_offset_spin->
|
||||
setValue(svc->importOffset(import_source,RDSvc::StartMinutes));
|
||||
minutes_length_spin->
|
||||
setValue(svc->importLength(import_source,RDSvc::StartMinutes));
|
||||
seconds_offset_spin->
|
||||
setValue(svc->importOffset(import_source,RDSvc::StartSeconds));
|
||||
seconds_length_spin->
|
||||
setValue(svc->importLength(import_source,RDSvc::StartSeconds));
|
||||
len_hours_offset_spin->
|
||||
setValue(svc->importOffset(import_source,RDSvc::LengthHours));
|
||||
len_hours_length_spin->
|
||||
setValue(svc->importLength(import_source,RDSvc::LengthHours));
|
||||
len_minutes_offset_spin->
|
||||
setValue(svc->importOffset(type,RDSvc::LengthMinutes));
|
||||
setValue(svc->importOffset(import_source,RDSvc::LengthMinutes));
|
||||
len_minutes_length_spin->
|
||||
setValue(svc->importLength(type,RDSvc::LengthMinutes));
|
||||
setValue(svc->importLength(import_source,RDSvc::LengthMinutes));
|
||||
len_seconds_offset_spin->
|
||||
setValue(svc->importOffset(type,RDSvc::LengthSeconds));
|
||||
setValue(svc->importOffset(import_source,RDSvc::LengthSeconds));
|
||||
len_seconds_length_spin->
|
||||
setValue(svc->importLength(type,RDSvc::LengthSeconds));
|
||||
data_offset_spin->setValue(svc->importOffset(type,RDSvc::ExtData));
|
||||
data_length_spin->setValue(svc->importLength(type,RDSvc::ExtData));
|
||||
event_id_offset_spin->setValue(svc->importOffset(type,RDSvc::ExtEventId));
|
||||
event_id_length_spin->setValue(svc->importLength(type,RDSvc::ExtEventId));
|
||||
annctype_offset_spin->setValue(svc->importOffset(type,RDSvc::ExtAnncType));
|
||||
annctype_length_spin->setValue(svc->importLength(type,RDSvc::ExtAnncType));
|
||||
setValue(svc->importLength(import_source,RDSvc::LengthSeconds));
|
||||
data_offset_spin->setValue(svc->importOffset(import_source,RDSvc::ExtData));
|
||||
data_length_spin->setValue(svc->importLength(import_source,RDSvc::ExtData));
|
||||
event_id_offset_spin->
|
||||
setValue(svc->importOffset(import_source,RDSvc::ExtEventId));
|
||||
event_id_length_spin->
|
||||
setValue(svc->importLength(import_source,RDSvc::ExtEventId));
|
||||
annctype_offset_spin->
|
||||
setValue(svc->importOffset(import_source,RDSvc::ExtAnncType));
|
||||
annctype_length_spin->
|
||||
setValue(svc->importLength(import_source,RDSvc::ExtAnncType));
|
||||
if(import_source==RDSvc::Music) {
|
||||
trans_type_offset_spin->
|
||||
setValue(svc->importOffset(import_source,RDSvc::TransType));
|
||||
trans_type_length_spin->
|
||||
setValue(svc->importLength(import_source,RDSvc::TransType));
|
||||
time_type_offset_spin->
|
||||
setValue(svc->importOffset(import_source,RDSvc::TimeType));
|
||||
time_type_length_spin->
|
||||
setValue(svc->importLength(import_source,RDSvc::TimeType));
|
||||
}
|
||||
import_changed=false;
|
||||
}
|
||||
|
||||
|
||||
bool ImportFields::bypassMode() const
|
||||
{
|
||||
return bypass_mode;
|
||||
}
|
||||
|
||||
|
||||
void ImportFields::setBypassMode(bool state)
|
||||
{
|
||||
if(state!=bypass_mode) {
|
||||
trans_type_label->setEnabled(state);
|
||||
trans_type_offset_label->setEnabled(state);
|
||||
trans_type_offset_spin->setEnabled(state);
|
||||
trans_type_length_label->setEnabled(state);
|
||||
trans_type_length_spin->setEnabled(state);
|
||||
time_type_label->setEnabled(state);
|
||||
time_type_offset_label->setEnabled(state);
|
||||
time_type_offset_spin->setEnabled(state);
|
||||
time_type_length_label->setEnabled(state);
|
||||
time_type_length_spin->setEnabled(state);
|
||||
|
||||
bypass_mode=state;
|
||||
import_changed=true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ImportFields::setBypassMode(int n)
|
||||
{
|
||||
setBypassMode((bool)n);
|
||||
}
|
||||
|
||||
|
||||
void ImportFields::setEnabled(bool state)
|
||||
{
|
||||
QWidget::setEnabled(state);
|
||||
trans_type_label->setEnabled(state&&bypass_mode);
|
||||
trans_type_offset_label->setEnabled(state&&bypass_mode);
|
||||
trans_type_offset_spin->setEnabled(state&&bypass_mode);
|
||||
trans_type_length_label->setEnabled(state&&bypass_mode);
|
||||
trans_type_length_spin->setEnabled(state&&bypass_mode);
|
||||
time_type_label->setEnabled(state&&bypass_mode);
|
||||
time_type_offset_label->setEnabled(state&&bypass_mode);
|
||||
time_type_offset_spin->setEnabled(state&&bypass_mode);
|
||||
time_type_length_label->setEnabled(state&&bypass_mode);
|
||||
time_type_length_spin->setEnabled(state&&bypass_mode);
|
||||
}
|
||||
|
||||
|
||||
void ImportFields::valueChangedData(int)
|
||||
{
|
||||
import_changed=true;
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Import Parser Parameters for RDAdmin.
|
||||
//
|
||||
// (C) Copyright 2010-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2010-2022 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
|
||||
@ -17,13 +17,12 @@
|
||||
// License along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef IMPORTFIELDS_H
|
||||
#define IMPORTFIELDS_H
|
||||
|
||||
#include <qlabel.h>
|
||||
#include <qspinbox.h>
|
||||
#include <QLabel>
|
||||
#include <QSpinBox>
|
||||
|
||||
#include <rdsvc.h>
|
||||
#include <rdwidget.h>
|
||||
@ -32,17 +31,25 @@ class ImportFields : public RDWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ImportFields(QWidget *parent=0);
|
||||
ImportFields(RDSvc::ImportSource src,QWidget *parent=0);
|
||||
QSize sizeHint() const;
|
||||
QSizePolicy sizePolicy() const;
|
||||
bool changed() const;
|
||||
void readFields(RDSvc *svc,RDSvc::ImportSource type);
|
||||
void setFields(RDSvc *svc,RDSvc::ImportSource type);
|
||||
void readFields(RDSvc *svc);
|
||||
void setFields(RDSvc *svc);
|
||||
bool bypassMode() const;
|
||||
void setBypassMode(bool state);
|
||||
|
||||
public slots:
|
||||
void setBypassMode(int n);
|
||||
void setEnabled(bool state);
|
||||
|
||||
private slots:
|
||||
void valueChangedData(int);
|
||||
|
||||
private:
|
||||
RDSvc::ImportSource import_source;
|
||||
bool bypass_mode;
|
||||
bool import_changed;
|
||||
QSpinBox *cart_offset_spin;
|
||||
QSpinBox *cart_length_spin;
|
||||
@ -66,6 +73,16 @@ class ImportFields : public RDWidget
|
||||
QSpinBox *data_length_spin;
|
||||
QSpinBox *event_id_offset_spin;
|
||||
QSpinBox *event_id_length_spin;
|
||||
QLabel *trans_type_label;
|
||||
QLabel *trans_type_offset_label;
|
||||
QSpinBox *trans_type_offset_spin;
|
||||
QLabel *trans_type_length_label;
|
||||
QSpinBox *trans_type_length_spin;
|
||||
QLabel *time_type_label;
|
||||
QLabel *time_type_offset_label;
|
||||
QSpinBox *time_type_offset_spin;
|
||||
QLabel *time_type_length_label;
|
||||
QSpinBox *time_type_length_spin;
|
||||
};
|
||||
|
||||
|
||||
|
@ -80,7 +80,7 @@ ListSvcs::ListSvcs(QWidget *parent)
|
||||
list_title_label=new QLabel(tr("Services:"),this);
|
||||
list_title_label->setFont(labelFont());
|
||||
list_title_label->setGeometry(14,11,85,19);
|
||||
list_services_model=new RDServiceListModel(false,this);
|
||||
list_services_model=new RDServiceListModel(false,false,this);
|
||||
list_services_model->setFont(defaultFont());
|
||||
list_services_model->setPalette(palette());
|
||||
list_services_view->setModel(list_services_model);
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Test a Rivendell Log Import
|
||||
//
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2022 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
|
||||
@ -33,30 +33,18 @@
|
||||
#include "globals.h"
|
||||
#include "test_import.h"
|
||||
|
||||
TestImport::TestImport(RDSvc *svc,RDSvc::ImportSource src,QWidget *parent)
|
||||
TestImport::TestImport(QWidget *parent)
|
||||
: RDDialog(parent)
|
||||
{
|
||||
QString sql;
|
||||
QDate current_date=QDate::currentDate();
|
||||
|
||||
test_svc=svc;
|
||||
test_src=src;
|
||||
test_svc=NULL;
|
||||
test_src=RDSvc::Music;
|
||||
|
||||
//
|
||||
// Fix the Window Size
|
||||
//
|
||||
setMinimumSize(sizeHint());
|
||||
|
||||
switch(test_src) {
|
||||
case RDSvc::Traffic:
|
||||
setWindowTitle("RDAdmin - "+tr("Test Traffic Import"));
|
||||
break;
|
||||
|
||||
case RDSvc::Music:
|
||||
setWindowTitle("RDAdmin - "+tr("Test Music Import"));
|
||||
break;
|
||||
}
|
||||
|
||||
//
|
||||
// Date Selector
|
||||
//
|
||||
@ -64,7 +52,6 @@ TestImport::TestImport(RDSvc *svc,RDSvc::ImportSource src,QWidget *parent)
|
||||
test_date_label=new QLabel(tr("Test Date:"),this);
|
||||
test_date_label->setFont(labelFont());
|
||||
test_date_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
|
||||
test_date_edit->setDate(current_date);
|
||||
connect(test_date_edit,SIGNAL(dateChanged(const QDate &)),
|
||||
this,SLOT(dateChangedData(const QDate &)));
|
||||
|
||||
@ -75,6 +62,7 @@ TestImport::TestImport(RDSvc *svc,RDSvc::ImportSource src,QWidget *parent)
|
||||
button->setGeometry(200,5,60,30);
|
||||
button->setFont(subButtonFont());
|
||||
button->setText(tr("Select"));
|
||||
test_date_edit->setDate(QDate::currentDate());
|
||||
connect(button,SIGNAL(clicked()),this,SLOT(selectData()));
|
||||
|
||||
//
|
||||
@ -114,8 +102,6 @@ TestImport::TestImport(RDSvc *svc,RDSvc::ImportSource src,QWidget *parent)
|
||||
test_close_button->setFont(buttonFont());
|
||||
test_close_button->setText(tr("Close"));
|
||||
connect(test_close_button,SIGNAL(clicked()),this,SLOT(closeData()));
|
||||
|
||||
dateChangedData(current_date);
|
||||
}
|
||||
|
||||
|
||||
@ -136,6 +122,28 @@ QSizePolicy TestImport::sizePolicy() const
|
||||
}
|
||||
|
||||
|
||||
int TestImport::exec(RDSvc *svc,RDSvc::ImportSource src)
|
||||
{
|
||||
test_svc=svc;
|
||||
test_src=src;
|
||||
|
||||
switch(test_src) {
|
||||
case RDSvc::Traffic:
|
||||
setWindowTitle("RDAdmin - "+tr("Test Traffic Import"));
|
||||
break;
|
||||
|
||||
case RDSvc::Music:
|
||||
setWindowTitle("RDAdmin - "+tr("Test Music Import"));
|
||||
break;
|
||||
}
|
||||
|
||||
test_events_model->clear();
|
||||
dateChangedData(test_date_edit->date());
|
||||
|
||||
return QDialog::exec();
|
||||
}
|
||||
|
||||
|
||||
void TestImport::selectData()
|
||||
{
|
||||
RDDateDialog *datedialog=
|
||||
@ -164,17 +172,19 @@ void TestImport::importData()
|
||||
QString sql=QString("delete from `IMPORTER_LINES` where ")+
|
||||
"`STATION_NAME`='"+RDEscapeString(rda->station()->name())+"' && "+
|
||||
QString::asprintf("`PROCESS_ID`=%u",getpid());
|
||||
// printf("IMPORTER_LINES cleanup SQL: %s\n",(const char *)sql);
|
||||
RDSqlQuery::apply(sql);
|
||||
printf("IMPORTER_LINES cleanup SQL: %s\n",sql.toUtf8().constData());
|
||||
// RDSqlQuery::apply(sql);
|
||||
}
|
||||
|
||||
|
||||
void TestImport::dateChangedData(const QDate &date)
|
||||
{
|
||||
if(test_svc!=NULL) {
|
||||
test_filename_edit->
|
||||
setText(RDDateDecode(test_svc->importPath(test_src),date,
|
||||
rda->station(),rda->config(),test_svc->name()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void TestImport::closeData()
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Test a Rivendell Log Import
|
||||
//
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2022 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -35,11 +35,14 @@ class TestImport : public RDDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
TestImport(RDSvc *svc,RDSvc::ImportSource src,QWidget *parent=0);
|
||||
TestImport(QWidget *parent=0);
|
||||
~TestImport();
|
||||
QSize sizeHint() const;
|
||||
QSizePolicy sizePolicy() const;
|
||||
|
||||
public slots:
|
||||
int exec(RDSvc *svc,RDSvc::ImportSource src);
|
||||
|
||||
private slots:
|
||||
void selectData();
|
||||
void importData();
|
||||
|
@ -964,9 +964,16 @@ void LogLineBox::PrintTime()
|
||||
switch(line_logline->timeType()) {
|
||||
case RDLogLine::Hard:
|
||||
line_time_label->setFont(line_bold_font);
|
||||
if(line_logline->graceTime()<0) {
|
||||
line_time_label->
|
||||
setText("T"+rda->tenthsTimeString(line_logline->
|
||||
setText("S"+rda->tenthsTimeString(line_logline->
|
||||
startTime(RDLogLine::Logged)));
|
||||
}
|
||||
else {
|
||||
line_time_label->
|
||||
setText("H"+rda->tenthsTimeString(line_logline->
|
||||
startTime(RDLogLine::Logged)));
|
||||
}
|
||||
line_time_label->setPalette(line_hard_palette);
|
||||
break;
|
||||
|
||||
|
@ -209,7 +209,12 @@ void ListReports::GenerateLogReport(QString *report)
|
||||
// Time
|
||||
//
|
||||
if(logline->timeType()==RDLogLine::Hard) {
|
||||
*report+="T";
|
||||
if(logline->graceTime()<0) {
|
||||
*report+="S";
|
||||
}
|
||||
else {
|
||||
*report+="H";
|
||||
}
|
||||
}
|
||||
else {
|
||||
*report+=" ";
|
||||
|
@ -39,13 +39,19 @@ ListGrids::ListGrids(QWidget *parent)
|
||||
edit_grids_view=new RDTableView(this);
|
||||
edit_grids_view->
|
||||
setGeometry(10,10,sizeHint().width()-20,sizeHint().height()-80);
|
||||
edit_grids_model=new RDServiceListModel(false,this);
|
||||
edit_grids_model=new RDServiceListModel(false,false,this);
|
||||
edit_grids_model->setFont(font());
|
||||
edit_grids_model->setPalette(palette());
|
||||
edit_grids_view->setModel(edit_grids_model);
|
||||
for(int i=2;i<edit_grids_model->columnCount();i++) {
|
||||
for(int i=2;i<(edit_grids_model->columnCount()-1);i++) {
|
||||
edit_grids_view->hideColumn(i);
|
||||
}
|
||||
connect(edit_grids_view->selectionModel(),
|
||||
SIGNAL(selectionChanged(const QItemSelection &,
|
||||
const QItemSelection &)),
|
||||
this,
|
||||
SLOT(selectionChangedData(const QItemSelection &,
|
||||
const QItemSelection &)));
|
||||
connect(edit_grids_view,SIGNAL(doubleClicked(const QModelIndex &)),
|
||||
this,SLOT(doubleClickedData(const QModelIndex &)));
|
||||
connect(edit_grids_model,SIGNAL(modelReset()),
|
||||
@ -55,21 +61,23 @@ ListGrids::ListGrids(QWidget *parent)
|
||||
//
|
||||
// Edit Button
|
||||
//
|
||||
QPushButton *button=new QPushButton(this);
|
||||
button->setGeometry(10,sizeHint().height()-60,80,50);
|
||||
button->setFont(buttonFont());
|
||||
button->setText(tr("Edit"));
|
||||
connect(button,SIGNAL(clicked()),this,SLOT(editData()));
|
||||
edit_edit_button=new QPushButton(this);
|
||||
edit_edit_button->setGeometry(10,sizeHint().height()-60,80,50);
|
||||
edit_edit_button->setFont(buttonFont());
|
||||
edit_edit_button->setText(tr("Edit"));
|
||||
edit_edit_button->setDisabled(true);
|
||||
connect(edit_edit_button,SIGNAL(clicked()),this,SLOT(editData()));
|
||||
|
||||
//
|
||||
// Close Button
|
||||
//
|
||||
button=new QPushButton(this);
|
||||
button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50);
|
||||
button->setDefault(true);
|
||||
button->setFont(buttonFont());
|
||||
button->setText(tr("Close"));
|
||||
connect(button,SIGNAL(clicked()),this,SLOT(closeData()));
|
||||
edit_close_button=new QPushButton(this);
|
||||
edit_close_button->
|
||||
setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50);
|
||||
edit_close_button->setDefault(true);
|
||||
edit_close_button->setFont(buttonFont());
|
||||
edit_close_button->setText(tr("Close"));
|
||||
connect(edit_close_button,SIGNAL(clicked()),this,SLOT(closeData()));
|
||||
}
|
||||
|
||||
|
||||
@ -89,7 +97,7 @@ void ListGrids::editData()
|
||||
{
|
||||
QModelIndexList rows=edit_grids_view->selectionModel()->selectedRows();
|
||||
|
||||
if(rows.size()!=1) {
|
||||
if((rows.size()!=1)||(!edit_grids_model->hasGrid(rows.at(0)))) {
|
||||
return;
|
||||
}
|
||||
EditGrid *d=new EditGrid(edit_grids_model->serviceName(rows.first()),this);
|
||||
@ -98,6 +106,19 @@ void ListGrids::editData()
|
||||
}
|
||||
|
||||
|
||||
void ListGrids::selectionChangedData(const QItemSelection &selected,
|
||||
const QItemSelection &previous)
|
||||
{
|
||||
QModelIndexList rows=edit_grids_view->selectionModel()->selectedRows();
|
||||
|
||||
if(rows.size()!=1) {
|
||||
edit_edit_button->setDisabled(true);
|
||||
return;
|
||||
}
|
||||
edit_edit_button->setEnabled(edit_grids_model->hasGrid(rows.at(0)));
|
||||
}
|
||||
|
||||
|
||||
void ListGrids::doubleClickedData(const QModelIndex &index)
|
||||
{
|
||||
editData();
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// List Rivendell Log Grids
|
||||
//
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2022 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,6 +21,8 @@
|
||||
#ifndef LIST_GRIDS_H
|
||||
#define LIST_GRIDS_H
|
||||
|
||||
#include <QPushButton>
|
||||
|
||||
#include <rddialog.h>
|
||||
#include <rdservicelistmodel.h>
|
||||
#include <rdtableview.h>
|
||||
@ -35,12 +37,16 @@ class ListGrids : public RDDialog
|
||||
|
||||
private slots:
|
||||
void editData();
|
||||
void selectionChangedData(const QItemSelection &selected,
|
||||
const QItemSelection &previous);
|
||||
void doubleClickedData(const QModelIndex &index);
|
||||
void closeData();
|
||||
|
||||
private:
|
||||
RDTableView *edit_grids_view;
|
||||
RDServiceListModel *edit_grids_model;
|
||||
QPushButton *edit_edit_button;
|
||||
QPushButton *edit_close_button;
|
||||
};
|
||||
|
||||
|
||||
|
@ -39,7 +39,7 @@ ListSvcs::ListSvcs(QWidget *parent)
|
||||
// Log List
|
||||
//
|
||||
list_log_view=new RDTableView(this);
|
||||
list_log_model=new RDServiceListModel(false,this);
|
||||
list_log_model=new RDServiceListModel(false,false,this);
|
||||
list_log_model->setFont(font());
|
||||
list_log_model->setPalette(palette());
|
||||
list_log_view->setModel(list_log_model);
|
||||
|
@ -140,6 +140,12 @@ cp NEWS $RPM_BUILD_ROOT/@DOC_PATH@/
|
||||
cp README $RPM_BUILD_ROOT/@DOC_PATH@/
|
||||
cp UPGRADING $RPM_BUILD_ROOT/@DOC_PATH@/
|
||||
cp CODINGSTYLE $RPM_BUILD_ROOT/@DOC_PATH@/
|
||||
mkdir -p $RPM_BUILD_ROOT/@DOC_PATH@/examples
|
||||
cp docs/examples/*.cpi $RPM_BUILD_ROOT/@DOC_PATH@/examples/
|
||||
cp docs/examples/*.elr $RPM_BUILD_ROOT/@DOC_PATH@/examples/
|
||||
cp docs/examples/*.LOG $RPM_BUILD_ROOT/@DOC_PATH@/examples/
|
||||
cp docs/examples/*.tfc $RPM_BUILD_ROOT/@DOC_PATH@/examples/
|
||||
cp docs/examples/*.vti $RPM_BUILD_ROOT/@DOC_PATH@/examples/
|
||||
cp conf/*.conf $RPM_BUILD_ROOT/@DOC_PATH@/
|
||||
cat conf/rd.conf-sample | sed s/SyslogFacility=1/SyslogFacility=23/ > $RPM_BUILD_ROOT/@DOC_PATH@/rd.conf-sample
|
||||
cp conf/asound.conf-sample $RPM_BUILD_ROOT/@DOC_PATH@/
|
||||
|
@ -41,6 +41,45 @@ bool MainObject::RevertSchema(int cur_schema,int set_schema,QString *err_msg)
|
||||
// NEW SCHEMA REVERSIONS GO HERE...
|
||||
|
||||
|
||||
//
|
||||
// Revert 364
|
||||
//
|
||||
if((cur_schema==364)&&(set_schema<cur_schema)) {
|
||||
sql=QString("update `IMPORT_TEMPLATES` set ")+
|
||||
"`TRANS_TYPE_OFFSET`=NULL,"+
|
||||
"`TRANS_TYPE_LENGTH`=NULL,"+
|
||||
"`TIME_TYPE_OFFSET`=NULL,"+
|
||||
"`TIME_TYPE_LENGTH`=NULL "+
|
||||
"where `NAME`='Rivendell Standard Import'";
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
WriteSchemaVersion(--cur_schema);
|
||||
}
|
||||
|
||||
//
|
||||
// Revert 363
|
||||
//
|
||||
if((cur_schema==363)&&(set_schema<cur_schema)) {
|
||||
DropColumn("IMPORTER_LINES","GRACE_TIME");
|
||||
DropColumn("IMPORTER_LINES","TIME_TYPE");
|
||||
DropColumn("IMPORTER_LINES","TRANS_TYPE");
|
||||
|
||||
DropColumn("IMPORT_TEMPLATES","TIME_TYPE_LENGTH");
|
||||
DropColumn("IMPORT_TEMPLATES","TIME_TYPE_OFFSET");
|
||||
DropColumn("IMPORT_TEMPLATES","TRANS_TYPE_LENGTH");
|
||||
DropColumn("IMPORT_TEMPLATES","TRANS_TYPE_OFFSET");
|
||||
|
||||
DropColumn("SERVICES","MUS_TIME_TYPE_LENGTH");
|
||||
DropColumn("SERVICES","MUS_TIME_TYPE_OFFSET");
|
||||
DropColumn("SERVICES","MUS_TRANS_TYPE_LENGTH");
|
||||
DropColumn("SERVICES","MUS_TRANS_TYPE_OFFSET");
|
||||
DropColumn("SERVICES","BYPASS_MODE");
|
||||
|
||||
WriteSchemaVersion(--cur_schema);
|
||||
}
|
||||
|
||||
//
|
||||
// Revert 362
|
||||
//
|
||||
|
@ -160,7 +160,7 @@ void MainObject::InitializeSchemaMap() {
|
||||
global_version_map["3.4"]=317;
|
||||
global_version_map["3.5"]=346;
|
||||
global_version_map["3.6"]=347;
|
||||
global_version_map["4.0"]=362;
|
||||
global_version_map["4.0"]=364;
|
||||
}
|
||||
|
||||
|
||||
|
@ -11197,6 +11197,89 @@ bool MainObject::UpdateSchema(int cur_schema,int set_schema,QString *err_msg)
|
||||
WriteSchemaVersion(++cur_schema);
|
||||
}
|
||||
|
||||
if((cur_schema<363)&&(set_schema>cur_schema)) {
|
||||
sql=QString("alter table `SERVICES` ")+
|
||||
"add column `BYPASS_MODE` enum('N','Y') not null default 'N' "+
|
||||
"after `DESCRIPTION`";
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
sql=QString("alter table `SERVICES` ")+
|
||||
"add column `MUS_TRANS_TYPE_OFFSET` int after `MUS_ANNC_TYPE_LENGTH`";
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
sql=QString("alter table `SERVICES` ")+
|
||||
"add column `MUS_TRANS_TYPE_LENGTH` int after `MUS_TRANS_TYPE_OFFSET`";
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
sql=QString("alter table `SERVICES` ")+
|
||||
"add column `MUS_TIME_TYPE_OFFSET` int after `MUS_TRANS_TYPE_LENGTH`";
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
sql=QString("alter table `SERVICES` ")+
|
||||
"add column `MUS_TIME_TYPE_LENGTH` int after `MUS_TIME_TYPE_OFFSET`";
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
sql=QString("alter table `IMPORT_TEMPLATES` ")+
|
||||
"add column `TRANS_TYPE_OFFSET` int after `ANNC_TYPE_LENGTH`";
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
sql=QString("alter table `IMPORT_TEMPLATES` ")+
|
||||
"add column `TRANS_TYPE_LENGTH` int after `TRANS_TYPE_OFFSET`";
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
sql=QString("alter table `IMPORT_TEMPLATES` ")+
|
||||
"add column `TIME_TYPE_OFFSET` int after `TRANS_TYPE_LENGTH`";
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
sql=QString("alter table `IMPORT_TEMPLATES` ")+
|
||||
"add column `TIME_TYPE_LENGTH` int after `TIME_TYPE_OFFSET`";
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
sql=QString("alter table `IMPORTER_LINES` ")+
|
||||
"add column `TRANS_TYPE` int not null default 255 after `LENGTH`";
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
sql=QString("alter table `IMPORTER_LINES` ")+
|
||||
"add column `TIME_TYPE` int not null default 0 after `TRANS_TYPE`";
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
sql=QString("alter table `IMPORTER_LINES` ")+
|
||||
"add column `GRACE_TIME` int not null default 0 after `TIME_TYPE`";
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
WriteSchemaVersion(++cur_schema);
|
||||
}
|
||||
|
||||
if((cur_schema<364)&&(set_schema>cur_schema)) {
|
||||
sql=QString("update `IMPORT_TEMPLATES` set ")+
|
||||
"`TRANS_TYPE_OFFSET`=102,"+
|
||||
"`TRANS_TYPE_LENGTH`=5,"+
|
||||
"`TIME_TYPE_OFFSET`=108,"+
|
||||
"`TIME_TYPE_LENGTH`=4 "+
|
||||
"where `NAME`='Rivendell Standard Import'";
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
WriteSchemaVersion(++cur_schema);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// NEW SCHEMA UPDATES GO HERE...
|
||||
|
||||
|