mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-07 16:07:45 +02:00
2021-01-26 Fred Gleason <fredg@paravelsystems.com>
* Added 'RDLogImportModel'. * Refactored the 'Test Import' dialog in rdadmin(1) to use the model-based API. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
db1f03e7cb
commit
2ea048a80b
@ -20916,3 +20916,7 @@
|
|||||||
* Added 'RDPypadListModel'.
|
* Added 'RDPypadListModel'.
|
||||||
* Refactored the 'Encoder 'PyPAD Instances' dialog in rdadmin(1)
|
* Refactored the 'Encoder 'PyPAD Instances' dialog in rdadmin(1)
|
||||||
to use the model-based API.
|
to use the model-based API.
|
||||||
|
2021-01-26 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Added 'RDLogImportModel'.
|
||||||
|
* Refactored the 'Test Import' dialog in rdadmin(1) to use the
|
||||||
|
model-based API.
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
00:00:00 10001 Lonely Cowboy 00:02:53 ISCI4567890123456789012345678901 GUID4567890123456789012345678901
|
00:00:00 10001 Lonely Cowboy 00:02:53 ISCI4567890123456789012345678901 GUID4567890123456789012345678901
|
||||||
00:02:53 10002 E Song 00:03:27 ISCI4567890123456789012345678901 GUID4567890123456789012345678901
|
00:02:53 10002 E Song 00:03:27 ISCI4567890123456789012345678901 GUID4567890123456789012345678901
|
||||||
|
00:06:20 MARKER Let the cat out!
|
||||||
00:06:20 10003 Likeness 00:02:54 ISCI4567890123456789012345678901 GUID4567890123456789012345678901
|
00:06:20 10003 Likeness 00:02:54 ISCI4567890123456789012345678901 GUID4567890123456789012345678901
|
||||||
00:09:14 10004 Atchafalaya 00:28:02 ISCI4567890123456789012345678901 GUID4567890123456789012345678901
|
00:09:14 10004 Atchafalaya 00:28:02 ISCI4567890123456789012345678901 GUID4567890123456789012345678901
|
||||||
00:30:00 BREAK Spot Break 00:02:00
|
00:30:00 BREAK Spot Break 00:02:00
|
||||||
00:32:00 10005 Mr. Banks 00:03:54 ISCI4567890123456789012345678901 GUID4567890123456789012345678901
|
00:32:00 10005 Mr. Banks 00:03:54 ISCI4567890123456789012345678901 GUID4567890123456789012345678901
|
||||||
00:35:54 VOICETRACK 00:01:30
|
00:35:54 VT VOICETRACK 00:01:30
|
||||||
00:38:24 10006 The Grey and the Green 00:03:23 ISCI4567890123456789012345678901 GUID4567890123456789012345678901
|
00:38:24 10006 The Grey and the Green 00:03:23 ISCI4567890123456789012345678901 GUID4567890123456789012345678901
|
||||||
|
@ -175,6 +175,7 @@ dist_librd_la_SOURCES = dbversion.h\
|
|||||||
rdlog_line.cpp rdlog_line.h\
|
rdlog_line.cpp rdlog_line.h\
|
||||||
rdlogedit_conf.cpp rdlogedit_conf.h\
|
rdlogedit_conf.cpp rdlogedit_conf.h\
|
||||||
rdlogfilter.cpp rdlogfilter.h\
|
rdlogfilter.cpp rdlogfilter.h\
|
||||||
|
rdlogimportmodel.cpp rdlogimportmodel.h\
|
||||||
rdloglock.cpp rdloglock.h\
|
rdloglock.cpp rdloglock.h\
|
||||||
rdloglistmodel.cpp rdloglistmodel.h\
|
rdloglistmodel.cpp rdloglistmodel.h\
|
||||||
rdlogmodel.cpp rdlogmodel.h\
|
rdlogmodel.cpp rdlogmodel.h\
|
||||||
@ -335,6 +336,7 @@ nodist_librd_la_SOURCES = moc_rdadd_cart.cpp\
|
|||||||
moc_rdlistview.cpp\
|
moc_rdlistview.cpp\
|
||||||
moc_rdlivewire.cpp\
|
moc_rdlivewire.cpp\
|
||||||
moc_rdlogfilter.cpp\
|
moc_rdlogfilter.cpp\
|
||||||
|
moc_rdlogimportmodel.cpp\
|
||||||
moc_rdloglock.cpp\
|
moc_rdloglock.cpp\
|
||||||
moc_rdloglistmodel.cpp\
|
moc_rdloglistmodel.cpp\
|
||||||
moc_rdlogmodel.cpp\
|
moc_rdlogmodel.cpp\
|
||||||
|
@ -129,6 +129,7 @@ SOURCES += rdlog.cpp
|
|||||||
SOURCES += rdlog_line.cpp
|
SOURCES += rdlog_line.cpp
|
||||||
SOURCES += rdlogedit_conf.cpp
|
SOURCES += rdlogedit_conf.cpp
|
||||||
SOURCES += rdlogfilter.cpp
|
SOURCES += rdlogfilter.cpp
|
||||||
|
SOURCES += rdlogimportmodel.cpp
|
||||||
SOURCES += rdloglock.cpp
|
SOURCES += rdloglock.cpp
|
||||||
SOURCES += rdloglistmodel.cpp
|
SOURCES += rdloglistmodel.cpp
|
||||||
SOURCES += rdlogmodel.cpp
|
SOURCES += rdlogmodel.cpp
|
||||||
@ -289,6 +290,7 @@ HEADERS += rdlog.h
|
|||||||
HEADERS += rdlog_line.h
|
HEADERS += rdlog_line.h
|
||||||
HEADERS += rdlogedit_conf.h
|
HEADERS += rdlogedit_conf.h
|
||||||
HEADERS += rdlogfilter.h
|
HEADERS += rdlogfilter.h
|
||||||
|
HEADERS += rdlogimportmodel.h
|
||||||
HEADERS += rdloglock.h
|
HEADERS += rdloglock.h
|
||||||
HEADERS += rdloglistmodel.h
|
HEADERS += rdloglistmodel.h
|
||||||
HEADERS += rdlogmodel.h
|
HEADERS += rdlogmodel.h
|
||||||
|
@ -2964,6 +2964,53 @@ Bitte Kofiguration prüfen und erneut versuchen.</translation>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>RDLogImportModel</name>
|
||||||
|
<message>
|
||||||
|
<source>Start Time</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Cart</source>
|
||||||
|
<translation type="unfinished">Vozík</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Len</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Title</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GUID</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Event ID</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Annc Type</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Line</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>NOTE</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>[spot break]</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>[voice track]</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RDLogLine</name>
|
<name>RDLogLine</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -2945,6 +2945,53 @@ Bitte Kofiguration prüfen und erneut versuchen.</translation>
|
|||||||
<translation type="unfinished">ALLE</translation>
|
<translation type="unfinished">ALLE</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>RDLogImportModel</name>
|
||||||
|
<message>
|
||||||
|
<source>Start Time</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Cart</source>
|
||||||
|
<translation type="unfinished">Cart</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Len</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Title</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GUID</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Event ID</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Annc Type</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Line</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>NOTE</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>[spot break]</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>[voice track]</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RDLogLine</name>
|
<name>RDLogLine</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -2936,6 +2936,53 @@ Do you still want to proceed?</source>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>RDLogImportModel</name>
|
||||||
|
<message>
|
||||||
|
<source>Start Time</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Cart</source>
|
||||||
|
<translation type="unfinished">Cartucho</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Len</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Title</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GUID</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Event ID</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Annc Type</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Line</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>NOTE</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>[spot break]</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>[voice track]</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RDLogLine</name>
|
<name>RDLogLine</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -2452,6 +2452,53 @@ Do you want to overwrite it?</source>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>RDLogImportModel</name>
|
||||||
|
<message>
|
||||||
|
<source>Start Time</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Cart</source>
|
||||||
|
<translation type="unfinished">Cart</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Len</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Title</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GUID</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Event ID</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Annc Type</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Line</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>NOTE</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>[spot break]</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>[voice track]</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RDLogLine</name>
|
<name>RDLogLine</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -2895,6 +2895,53 @@ Sjekk eksportoppsettet ditt og prøv att.</translation>
|
|||||||
<translation type="unfinished">ALLE</translation>
|
<translation type="unfinished">ALLE</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>RDLogImportModel</name>
|
||||||
|
<message>
|
||||||
|
<source>Start Time</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Cart</source>
|
||||||
|
<translation type="unfinished">Korg</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Len</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Title</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GUID</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Event ID</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Annc Type</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Line</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>NOTE</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>[spot break]</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>[voice track]</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RDLogLine</name>
|
<name>RDLogLine</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -2895,6 +2895,53 @@ Sjekk eksportoppsettet ditt og prøv att.</translation>
|
|||||||
<translation type="unfinished">ALLE</translation>
|
<translation type="unfinished">ALLE</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>RDLogImportModel</name>
|
||||||
|
<message>
|
||||||
|
<source>Start Time</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Cart</source>
|
||||||
|
<translation type="unfinished">Korg</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Len</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Title</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GUID</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Event ID</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Annc Type</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Line</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>NOTE</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>[spot break]</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>[voice track]</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RDLogLine</name>
|
<name>RDLogLine</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -2934,6 +2934,53 @@ Por Favor, cheque suas configurações e tenbte outra vez.</translation>
|
|||||||
<translation type="unfinished">TODOS</translation>
|
<translation type="unfinished">TODOS</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>RDLogImportModel</name>
|
||||||
|
<message>
|
||||||
|
<source>Start Time</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Cart</source>
|
||||||
|
<translation type="unfinished">Cartão</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Len</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Title</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GUID</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Event ID</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Annc Type</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Line</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>NOTE</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>[spot break]</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>[voice track]</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>RDLogLine</name>
|
<name>RDLogLine</name>
|
||||||
<message>
|
<message>
|
||||||
|
294
lib/rdlogimportmodel.cpp
Normal file
294
lib/rdlogimportmodel.cpp
Normal file
@ -0,0 +1,294 @@
|
|||||||
|
// rdlogimportmodel.cpp
|
||||||
|
//
|
||||||
|
// Data model for Rivendell log imports
|
||||||
|
//
|
||||||
|
// (C) Copyright 2021 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
|
||||||
|
// published by the Free Software Foundation.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public
|
||||||
|
// License along with this program; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "rdapplication.h"
|
||||||
|
#include "rdconf.h"
|
||||||
|
#include "rdescape_string.h"
|
||||||
|
#include "rdlogimportmodel.h"
|
||||||
|
#include "rdsvc.h"
|
||||||
|
|
||||||
|
RDLogImportModel::RDLogImportModel(const QString &hostname,pid_t proc_id,
|
||||||
|
QObject *parent)
|
||||||
|
: QAbstractTableModel(parent)
|
||||||
|
{
|
||||||
|
d_station_name=hostname;
|
||||||
|
d_process_id=proc_id;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Column Attributes
|
||||||
|
//
|
||||||
|
unsigned left=Qt::AlignLeft|Qt::AlignVCenter;
|
||||||
|
unsigned center=Qt::AlignCenter;
|
||||||
|
unsigned right=Qt::AlignRight|Qt::AlignVCenter;
|
||||||
|
|
||||||
|
d_headers.push_back(tr("Start Time"));
|
||||||
|
d_alignments.push_back(left);
|
||||||
|
|
||||||
|
d_headers.push_back(tr("Cart"));
|
||||||
|
d_alignments.push_back(center);
|
||||||
|
|
||||||
|
d_headers.push_back(tr("Len"));
|
||||||
|
d_alignments.push_back(right);
|
||||||
|
|
||||||
|
d_headers.push_back(tr("Title"));
|
||||||
|
d_alignments.push_back(left);
|
||||||
|
|
||||||
|
d_headers.push_back(tr("GUID"));
|
||||||
|
d_alignments.push_back(left);
|
||||||
|
|
||||||
|
d_headers.push_back(tr("Event ID"));
|
||||||
|
d_alignments.push_back(left);
|
||||||
|
|
||||||
|
d_headers.push_back(tr("Annc Type"));
|
||||||
|
d_alignments.push_back(left);
|
||||||
|
|
||||||
|
d_headers.push_back(tr("Line"));
|
||||||
|
d_alignments.push_back(right);
|
||||||
|
|
||||||
|
updateModel();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
RDLogImportModel::~RDLogImportModel()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QPalette RDLogImportModel::palette()
|
||||||
|
{
|
||||||
|
return d_palette;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void RDLogImportModel::setPalette(const QPalette &pal)
|
||||||
|
{
|
||||||
|
d_palette=pal;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void RDLogImportModel::setFont(const QFont &font)
|
||||||
|
{
|
||||||
|
d_font=font;
|
||||||
|
d_bold_font=font;
|
||||||
|
d_bold_font.setWeight(QFont::Bold);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int RDLogImportModel::columnCount(const QModelIndex &parent) const
|
||||||
|
{
|
||||||
|
return d_headers.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int RDLogImportModel::rowCount(const QModelIndex &parent) const
|
||||||
|
{
|
||||||
|
return d_texts.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QVariant RDLogImportModel::headerData(int section,Qt::Orientation orient,
|
||||||
|
int role) const
|
||||||
|
{
|
||||||
|
if((orient==Qt::Horizontal)&&(role==Qt::DisplayRole)) {
|
||||||
|
return d_headers.at(section);
|
||||||
|
}
|
||||||
|
return QVariant();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QVariant RDLogImportModel::data(const QModelIndex &index,int role) const
|
||||||
|
{
|
||||||
|
QString str;
|
||||||
|
int col=index.column();
|
||||||
|
int row=index.row();
|
||||||
|
|
||||||
|
if(row<d_texts.size()) {
|
||||||
|
switch((Qt::ItemDataRole)role) {
|
||||||
|
case Qt::DisplayRole:
|
||||||
|
return d_texts.at(row).at(col);
|
||||||
|
|
||||||
|
case Qt::DecorationRole:
|
||||||
|
if(col==0) {
|
||||||
|
return d_icons.at(row);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Qt::TextAlignmentRole:
|
||||||
|
return d_alignments.at(col);
|
||||||
|
|
||||||
|
case Qt::FontRole:
|
||||||
|
return d_font;
|
||||||
|
|
||||||
|
case Qt::TextColorRole:
|
||||||
|
// Nothing to do!
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Qt::BackgroundRole:
|
||||||
|
// Nothing to do!
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return QVariant();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int RDLogImportModel::lineId(const QModelIndex &row) const
|
||||||
|
{
|
||||||
|
return d_ids.at(row.row());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void RDLogImportModel::refresh()
|
||||||
|
{
|
||||||
|
updateModel();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void RDLogImportModel::updateModel()
|
||||||
|
{
|
||||||
|
QList<QVariant> texts;
|
||||||
|
|
||||||
|
RDSqlQuery *q=NULL;
|
||||||
|
QString sql=sqlFields()+
|
||||||
|
"where "+
|
||||||
|
"IMPORTER_LINES.STATION_NAME=\""+RDEscapeString(d_station_name)+"\"&&"+
|
||||||
|
QString().sprintf("PROCESS_ID=%u ",d_process_id)+
|
||||||
|
"order by IMPORTER_LINES.LINE_ID ";
|
||||||
|
beginResetModel();
|
||||||
|
d_texts.clear();
|
||||||
|
q=new RDSqlQuery(sql);
|
||||||
|
while(q->next()) {
|
||||||
|
d_ids.push_back(0);
|
||||||
|
d_icons.push_back(QVariant());
|
||||||
|
d_texts.push_back(texts);
|
||||||
|
updateRow(d_texts.size()-1,q);
|
||||||
|
}
|
||||||
|
delete q;
|
||||||
|
endResetModel();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void RDLogImportModel::updateRowLine(int line)
|
||||||
|
{
|
||||||
|
if(line<d_texts.size()) {
|
||||||
|
QString sql=sqlFields()+
|
||||||
|
"where "+
|
||||||
|
QString().sprintf("IMPORTER_LINES.ID=%u",d_ids.at(line));
|
||||||
|
RDSqlQuery *q=new RDSqlQuery(sql);
|
||||||
|
if(q->first()) {
|
||||||
|
updateRow(line,q);
|
||||||
|
}
|
||||||
|
delete q;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void RDLogImportModel::updateRow(int row,RDSqlQuery *q)
|
||||||
|
{
|
||||||
|
QList<QVariant> texts;
|
||||||
|
for(int i=0;i<columnCount();i++) {
|
||||||
|
texts.push_back(QVariant());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start Time
|
||||||
|
texts[0]=RDSvc::timeString(q->value(1).toInt(),q->value(2).toInt());
|
||||||
|
|
||||||
|
// Cart
|
||||||
|
// texts.push_back(q->value(2));
|
||||||
|
|
||||||
|
// Length
|
||||||
|
if(!q->value(4).isNull()) {
|
||||||
|
texts[2]=RDGetTimeLength(q->value(4).toInt(),false,false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Title
|
||||||
|
// texts.push_back(q->value(2));
|
||||||
|
|
||||||
|
// GUID
|
||||||
|
texts[4]=q->value(5).toString().trimmed();
|
||||||
|
|
||||||
|
// Event ID
|
||||||
|
texts[5]=q->value(6).toString().trimmed();
|
||||||
|
|
||||||
|
// Annc Type
|
||||||
|
texts[6]=q->value(7).toString().trimmed();
|
||||||
|
|
||||||
|
// Line
|
||||||
|
texts[7]=QString().sprintf("%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
|
||||||
|
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
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RDLogLine::TrafficLink:
|
||||||
|
d_icons[row]=rda->iconEngine()->typeIcon(RDLogLine::TrafficLink);
|
||||||
|
texts[3]=tr("[spot break]"); // Title
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RDLogLine::Track:
|
||||||
|
d_icons[row]=rda->iconEngine()->typeIcon(RDLogLine::Track);
|
||||||
|
texts[3]=tr("[voice track]"); // Title
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RDLogLine::Macro:
|
||||||
|
case RDLogLine::OpenBracket:
|
||||||
|
case RDLogLine::CloseBracket:
|
||||||
|
case RDLogLine::Chain:
|
||||||
|
case RDLogLine::MusicLink:
|
||||||
|
case RDLogLine::UnknownType:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
d_ids[row]=q->value(0).toUInt();
|
||||||
|
d_texts[row]=texts;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString RDLogImportModel::sqlFields() const
|
||||||
|
{
|
||||||
|
QString sql=QString("select ")+
|
||||||
|
"ID,"+ // 00
|
||||||
|
"START_HOUR,"+ // 01
|
||||||
|
"START_SECS,"+ // 02
|
||||||
|
"EXT_CART_NAME,"+ // 03
|
||||||
|
"LENGTH,"+ // 04
|
||||||
|
"EXT_DATA,"+ // 05
|
||||||
|
"EXT_EVENT_ID,"+ // 06
|
||||||
|
"EXT_ANNC_TYPE,"+ // 07
|
||||||
|
"TITLE,"+ // 08
|
||||||
|
"TYPE,"+ // 09
|
||||||
|
"FILE_LINE "+ // 10
|
||||||
|
"from IMPORTER_LINES ";
|
||||||
|
|
||||||
|
return sql;
|
||||||
|
}
|
69
lib/rdlogimportmodel.h
Normal file
69
lib/rdlogimportmodel.h
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
// rdlogimportmodel.h
|
||||||
|
//
|
||||||
|
// Data model for Rivendell log imports
|
||||||
|
//
|
||||||
|
// (C) Copyright 2021 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
|
||||||
|
// published by the Free Software Foundation.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public
|
||||||
|
// License along with this program; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef RDLOGIMPORTMODEL_H
|
||||||
|
#define RDLOGIMPORTMODEL_H
|
||||||
|
|
||||||
|
#include <QAbstractTableModel>
|
||||||
|
#include <QFont>
|
||||||
|
#include <QList>
|
||||||
|
#include <QPalette>
|
||||||
|
|
||||||
|
#include <rddb.h>
|
||||||
|
#include <rdnotification.h>
|
||||||
|
|
||||||
|
class RDLogImportModel : public QAbstractTableModel
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
RDLogImportModel(const QString &hostname,pid_t proc_id,QObject *parent=0);
|
||||||
|
~RDLogImportModel();
|
||||||
|
QPalette palette();
|
||||||
|
void setPalette(const QPalette &pal);
|
||||||
|
void setFont(const QFont &font);
|
||||||
|
int columnCount(const QModelIndex &parent=QModelIndex()) const;
|
||||||
|
int rowCount(const QModelIndex &parent=QModelIndex()) const;
|
||||||
|
QVariant headerData(int section,Qt::Orientation orient,
|
||||||
|
int role=Qt::DisplayRole) const;
|
||||||
|
QVariant data(const QModelIndex &index,int role=Qt::DisplayRole) const;
|
||||||
|
int lineId(const QModelIndex &row) const;
|
||||||
|
void refresh();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void updateModel();
|
||||||
|
void updateRowLine(int line);
|
||||||
|
void updateRow(int row,RDSqlQuery *q);
|
||||||
|
QString sqlFields() const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
QPalette d_palette;
|
||||||
|
QFont d_font;
|
||||||
|
QFont d_bold_font;
|
||||||
|
QList<QVariant> d_headers;
|
||||||
|
QList<QVariant> d_alignments;
|
||||||
|
QList<QList<QVariant> > d_texts;
|
||||||
|
QList<QVariant> d_icons;
|
||||||
|
QList<unsigned> d_ids;
|
||||||
|
QString d_station_name;
|
||||||
|
pid_t d_process_id;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // RDLOGIMPORTMODEL_H
|
@ -6737,19 +6737,19 @@ Chcete obě spojit?</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Start Time</source>
|
<source>Start Time</source>
|
||||||
<translation type="unfinished">Počáteční čas</translation>
|
<translation type="obsolete">Počáteční čas</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Cart</source>
|
<source>Cart</source>
|
||||||
<translation type="unfinished">Vozík</translation>
|
<translation type="obsolete">Vozík</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Len</source>
|
<source>Len</source>
|
||||||
<translation type="unfinished">Délka</translation>
|
<translation type="obsolete">Délka</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Title</source>
|
<source>Title</source>
|
||||||
<translation type="unfinished">Název</translation>
|
<translation type="obsolete">Název</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Contract #</source>
|
<source>Contract #</source>
|
||||||
@ -6757,7 +6757,7 @@ Chcete obě spojit?</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Event ID</source>
|
<source>Event ID</source>
|
||||||
<translation type="unfinished">ID události</translation>
|
<translation type="obsolete">ID události</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Announcement Type</source>
|
<source>Announcement Type</source>
|
||||||
@ -6773,37 +6773,17 @@ Chcete obě spojit?</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Import Error</source>
|
<source>Import Error</source>
|
||||||
<translation>Chyba při zavedení</translation>
|
<translation type="unfinished">Chyba při zavedení</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>There was an error during import
|
<source>There was an error during import
|
||||||
please check your settings and try again.</source>
|
please check your settings and try again.</source>
|
||||||
<translation>Během zavedení se vyskytla chyba.
|
<translation type="unfinished">Během zavedení se vyskytla chyba.
|
||||||
Prověřte, prosím, svá nastavení a zkuste to znovu.</translation>
|
Prověřte, prosím, svá nastavení a zkuste to znovu.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>[spot break]</source>
|
<source>[spot break]</source>
|
||||||
<translation type="unfinished">[přerušení místa]</translation>
|
<translation type="obsolete">[přerušení místa]</translation>
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>GUID</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Annc Type</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>[voice track]</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Line</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>NOTE</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -6247,19 +6247,19 @@ Wollen Sie die beiden kombinieren?</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Start Time</source>
|
<source>Start Time</source>
|
||||||
<translation type="unfinished">Startzeit</translation>
|
<translation type="obsolete">Startzeit</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Cart</source>
|
<source>Cart</source>
|
||||||
<translation type="unfinished">Cart</translation>
|
<translation type="obsolete">Cart</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Len</source>
|
<source>Len</source>
|
||||||
<translation type="unfinished">Länge</translation>
|
<translation type="obsolete">Länge</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Title</source>
|
<source>Title</source>
|
||||||
<translation type="unfinished">Titel</translation>
|
<translation type="obsolete">Titel</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Contract #</source>
|
<source>Contract #</source>
|
||||||
@ -6267,7 +6267,7 @@ Wollen Sie die beiden kombinieren?</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Event ID</source>
|
<source>Event ID</source>
|
||||||
<translation type="unfinished">Event-ID</translation>
|
<translation type="obsolete">Event-ID</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Announcement Type</source>
|
<source>Announcement Type</source>
|
||||||
@ -6283,37 +6283,17 @@ Wollen Sie die beiden kombinieren?</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Import Error</source>
|
<source>Import Error</source>
|
||||||
<translation>Importfehler</translation>
|
<translation type="unfinished">Importfehler</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>There was an error during import
|
<source>There was an error during import
|
||||||
please check your settings and try again.</source>
|
please check your settings and try again.</source>
|
||||||
<translation>Es gab einen Fehler während des Imports.
|
<translation type="unfinished">Es gab einen Fehler während des Imports.
|
||||||
Bitte überprüfen Sie ihre Einstellungen und versuchen sie es erneut.</translation>
|
Bitte überprüfen Sie ihre Einstellungen und versuchen sie es erneut.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>[spot break]</source>
|
<source>[spot break]</source>
|
||||||
<translation type="unfinished">[spot break]</translation>
|
<translation type="obsolete">[spot break]</translation>
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>GUID</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Annc Type</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>[voice track]</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Line</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>NOTE</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -6692,19 +6692,19 @@ Do you want to combine the two?</source>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Start Time</source>
|
<source>Start Time</source>
|
||||||
<translation type="unfinished">Hora de inicio</translation>
|
<translation type="obsolete">Hora de inicio</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Cart</source>
|
<source>Cart</source>
|
||||||
<translation type="unfinished">Cartucho</translation>
|
<translation type="obsolete">Cartucho</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Len</source>
|
<source>Len</source>
|
||||||
<translation type="unfinished">Lon</translation>
|
<translation type="obsolete">Lon</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Title</source>
|
<source>Title</source>
|
||||||
<translation type="unfinished">Título</translation>
|
<translation type="obsolete">Título</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Contract #</source>
|
<source>Contract #</source>
|
||||||
@ -6712,7 +6712,7 @@ Do you want to combine the two?</source>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Event ID</source>
|
<source>Event ID</source>
|
||||||
<translation type="unfinished">ID de evento</translation>
|
<translation type="obsolete">ID de evento</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Announcement Type</source>
|
<source>Announcement Type</source>
|
||||||
@ -6728,37 +6728,17 @@ Do you want to combine the two?</source>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Import Error</source>
|
<source>Import Error</source>
|
||||||
<translation>Error de importación</translation>
|
<translation type="unfinished">Error de importación</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>There was an error during import
|
<source>There was an error during import
|
||||||
please check your settings and try again.</source>
|
please check your settings and try again.</source>
|
||||||
<translation>Ha habido un error durante la importación
|
<translation type="unfinished">Ha habido un error durante la importación
|
||||||
Revise los parámetros e intente de nuevo.</translation>
|
Revise los parámetros e intente de nuevo.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>[spot break]</source>
|
<source>[spot break]</source>
|
||||||
<translation type="unfinished">[parada del spot]</translation>
|
<translation type="obsolete">[parada del spot]</translation>
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>GUID</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Annc Type</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>[voice track]</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Line</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>NOTE</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -4970,6 +4970,10 @@ Replicators</source>
|
|||||||
<source>&Close</source>
|
<source>&Close</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Imported Events</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Import Error</source>
|
<source>Import Error</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@ -4979,54 +4983,6 @@ Replicators</source>
|
|||||||
please check your settings and try again.</source>
|
please check your settings and try again.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>Start Time</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Cart</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Len</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Title</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>GUID</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Event ID</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Imported Events</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Annc Type</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>[spot break]</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>[voice track]</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Line</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>NOTE</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ViewAdapters</name>
|
<name>ViewAdapters</name>
|
||||||
|
@ -6081,19 +6081,19 @@ Vil du kombinera desse to?</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Start Time</source>
|
<source>Start Time</source>
|
||||||
<translation type="unfinished">Starttid</translation>
|
<translation type="obsolete">Starttid</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Cart</source>
|
<source>Cart</source>
|
||||||
<translation type="unfinished">Korg</translation>
|
<translation type="obsolete">Korg</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Len</source>
|
<source>Len</source>
|
||||||
<translation type="unfinished">Len</translation>
|
<translation type="obsolete">Len</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Title</source>
|
<source>Title</source>
|
||||||
<translation type="unfinished">Tittel</translation>
|
<translation type="obsolete">Tittel</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Contract #</source>
|
<source>Contract #</source>
|
||||||
@ -6101,7 +6101,7 @@ Vil du kombinera desse to?</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Event ID</source>
|
<source>Event ID</source>
|
||||||
<translation type="unfinished">Hendings-ID</translation>
|
<translation type="obsolete">Hendings-ID</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Announcement Type</source>
|
<source>Announcement Type</source>
|
||||||
@ -6117,37 +6117,17 @@ Vil du kombinera desse to?</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Import Error</source>
|
<source>Import Error</source>
|
||||||
<translation>Importfeil</translation>
|
<translation type="unfinished">Importfeil</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>There was an error during import
|
<source>There was an error during import
|
||||||
please check your settings and try again.</source>
|
please check your settings and try again.</source>
|
||||||
<translation>Det vart ein feil under importen.
|
<translation type="unfinished">Det vart ein feil under importen.
|
||||||
Sjekk oppsettet ditt og prøv att.</translation>
|
Sjekk oppsettet ditt og prøv att.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>[spot break]</source>
|
<source>[spot break]</source>
|
||||||
<translation type="unfinished">[spott-avbrot]</translation>
|
<translation type="obsolete">[spott-avbrot]</translation>
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>GUID</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Annc Type</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>[voice track]</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Line</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>NOTE</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -6081,19 +6081,19 @@ Vil du kombinera desse to?</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Start Time</source>
|
<source>Start Time</source>
|
||||||
<translation type="unfinished">Starttid</translation>
|
<translation type="obsolete">Starttid</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Cart</source>
|
<source>Cart</source>
|
||||||
<translation type="unfinished">Korg</translation>
|
<translation type="obsolete">Korg</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Len</source>
|
<source>Len</source>
|
||||||
<translation type="unfinished">Len</translation>
|
<translation type="obsolete">Len</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Title</source>
|
<source>Title</source>
|
||||||
<translation type="unfinished">Tittel</translation>
|
<translation type="obsolete">Tittel</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Contract #</source>
|
<source>Contract #</source>
|
||||||
@ -6101,7 +6101,7 @@ Vil du kombinera desse to?</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Event ID</source>
|
<source>Event ID</source>
|
||||||
<translation type="unfinished">Hendings-ID</translation>
|
<translation type="obsolete">Hendings-ID</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Announcement Type</source>
|
<source>Announcement Type</source>
|
||||||
@ -6117,37 +6117,17 @@ Vil du kombinera desse to?</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Import Error</source>
|
<source>Import Error</source>
|
||||||
<translation>Importfeil</translation>
|
<translation type="unfinished">Importfeil</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>There was an error during import
|
<source>There was an error during import
|
||||||
please check your settings and try again.</source>
|
please check your settings and try again.</source>
|
||||||
<translation>Det vart ein feil under importen.
|
<translation type="unfinished">Det vart ein feil under importen.
|
||||||
Sjekk oppsettet ditt og prøv att.</translation>
|
Sjekk oppsettet ditt og prøv att.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>[spot break]</source>
|
<source>[spot break]</source>
|
||||||
<translation type="unfinished">[spott-avbrot]</translation>
|
<translation type="obsolete">[spott-avbrot]</translation>
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>GUID</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Annc Type</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>[voice track]</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Line</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>NOTE</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -6211,19 +6211,19 @@ Do you want to combine the two?</source>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Start Time</source>
|
<source>Start Time</source>
|
||||||
<translation type="unfinished">Hora de Início</translation>
|
<translation type="obsolete">Hora de Início</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Cart</source>
|
<source>Cart</source>
|
||||||
<translation type="unfinished">Cartão</translation>
|
<translation type="obsolete">Cartão</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Len</source>
|
<source>Len</source>
|
||||||
<translation type="unfinished">Duração</translation>
|
<translation type="obsolete">Duração</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Title</source>
|
<source>Title</source>
|
||||||
<translation type="unfinished">Título</translation>
|
<translation type="obsolete">Título</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Contract #</source>
|
<source>Contract #</source>
|
||||||
@ -6231,7 +6231,7 @@ Do you want to combine the two?</source>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Event ID</source>
|
<source>Event ID</source>
|
||||||
<translation type="unfinished">ID do Evento</translation>
|
<translation type="obsolete">ID do Evento</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Announcement Type</source>
|
<source>Announcement Type</source>
|
||||||
@ -6247,37 +6247,17 @@ Do you want to combine the two?</source>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Import Error</source>
|
<source>Import Error</source>
|
||||||
<translation>Erro ao Importar</translation>
|
<translation type="unfinished">Erro ao Importar</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>There was an error during import
|
<source>There was an error during import
|
||||||
please check your settings and try again.</source>
|
please check your settings and try again.</source>
|
||||||
<translation>Houve um Erro ao importar
|
<translation type="unfinished">Houve um Erro ao importar
|
||||||
por favor, cheque suas configurações e tente novamente</translation>
|
por favor, cheque suas configurações e tente novamente</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>[spot break]</source>
|
<source>[spot break]</source>
|
||||||
<translation type="unfinished">[spot break]</translation>
|
<translation type="obsolete">[spot break]</translation>
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>GUID</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Annc Type</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>[voice track]</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Line</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>NOTE</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// Test a Rivendell Log Import
|
// Test a Rivendell Log Import
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2020 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -18,9 +18,9 @@
|
|||||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <qpushbutton.h>
|
#include <QHeaderView>
|
||||||
#include <qpainter.h>
|
#include <QMessageBox>
|
||||||
#include <qmessagebox.h>
|
#include <QPainter>
|
||||||
|
|
||||||
#include <rdapplication.h>
|
#include <rdapplication.h>
|
||||||
#include <rdconf.h>
|
#include <rdconf.h>
|
||||||
@ -35,16 +35,9 @@
|
|||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "test_import.h"
|
#include "test_import.h"
|
||||||
|
|
||||||
#include "../icons/play.xpm"
|
|
||||||
#include "../icons/marker.xpm"
|
|
||||||
#include "../icons/mic16.xpm"
|
|
||||||
#include "../icons/traffic.xpm"
|
|
||||||
|
|
||||||
TestImport::TestImport(RDSvc *svc,RDSvc::ImportSource src,QWidget *parent)
|
TestImport::TestImport(RDSvc *svc,RDSvc::ImportSource src,QWidget *parent)
|
||||||
: RDDialog(parent)
|
: RDDialog(parent)
|
||||||
{
|
{
|
||||||
setModal(true);
|
|
||||||
|
|
||||||
QString sql;
|
QString sql;
|
||||||
QDate current_date=QDate::currentDate();
|
QDate current_date=QDate::currentDate();
|
||||||
|
|
||||||
@ -66,23 +59,16 @@ TestImport::TestImport(RDSvc *svc,RDSvc::ImportSource src,QWidget *parent)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Create Icons
|
|
||||||
//
|
|
||||||
test_playout_map=new QPixmap(play_xpm);
|
|
||||||
test_marker_map=new QPixmap(marker_xpm);
|
|
||||||
test_mic16_map=new QPixmap(mic16_xpm);
|
|
||||||
test_traffic_map=new QPixmap(traffic_xpm);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Date Selector
|
// Date Selector
|
||||||
//
|
//
|
||||||
test_date_edit=new Q3DateEdit(this);
|
test_date_edit=new QDateEdit(this);
|
||||||
|
test_date_edit->setDisplayFormat("MM/dd/yyyy");
|
||||||
test_date_label=new QLabel(test_date_edit,tr("Test Date:"),this);
|
test_date_label=new QLabel(test_date_edit,tr("Test Date:"),this);
|
||||||
test_date_label->setFont(labelFont());
|
test_date_label->setFont(labelFont());
|
||||||
test_date_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
|
test_date_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
|
||||||
test_date_edit->setDate(current_date);
|
test_date_edit->setDate(current_date);
|
||||||
connect(test_date_edit,SIGNAL(valueChanged(const QDate &)),
|
connect(test_date_edit,SIGNAL(dateChanged(const QDate &)),
|
||||||
this,SLOT(dateChangedData(const QDate &)));
|
this,SLOT(dateChangedData(const QDate &)));
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -115,33 +101,22 @@ TestImport::TestImport(RDSvc *svc,RDSvc::ImportSource src,QWidget *parent)
|
|||||||
//
|
//
|
||||||
// Events List
|
// Events List
|
||||||
//
|
//
|
||||||
test_events_list=new RDListView(this);
|
test_events_view=new QTableView(this);
|
||||||
test_events_list->setItemMargin(2);
|
test_events_view->setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||||
test_events_list->setSortColumn(0);
|
test_events_view->setSelectionMode(QAbstractItemView::NoSelection);
|
||||||
test_events_list->setSortOrder(Qt::Ascending);
|
test_events_view->setShowGrid(false);
|
||||||
test_events_list->setAllColumnsShowFocus(true);
|
test_events_view->setSortingEnabled(false);
|
||||||
test_events_list->addColumn("");
|
test_events_view->setWordWrap(false);
|
||||||
test_events_list->setColumnAlignment(0,Qt::AlignCenter);
|
test_events_view->verticalHeader()->setVisible(false);
|
||||||
test_events_list->addColumn(tr("Start Time"));
|
test_events_view->horizontalHeader()->setStretchLastSection(true);
|
||||||
test_events_list->setColumnAlignment(1,Qt::AlignCenter);
|
test_events_model=new RDLogImportModel(rda->station()->name(),getpid(),this);
|
||||||
test_events_list->addColumn(tr("Cart"));
|
test_events_view->setModel(test_events_model);
|
||||||
test_events_list->setColumnAlignment(2,Qt::AlignCenter);
|
test_events_label=new QLabel(test_events_view,tr("Imported Events"),this);
|
||||||
test_events_list->addColumn(tr("Len"));
|
|
||||||
test_events_list->setColumnAlignment(3,Qt::AlignRight);
|
|
||||||
test_events_list->addColumn(tr("Title"));
|
|
||||||
test_events_list->setColumnAlignment(4,Qt::AlignLeft);
|
|
||||||
test_events_list->addColumn(tr("GUID"));
|
|
||||||
test_events_list->setColumnAlignment(5,Qt::AlignCenter);
|
|
||||||
test_events_list->addColumn(tr("Event ID"));
|
|
||||||
test_events_list->setColumnAlignment(6,Qt::AlignCenter);
|
|
||||||
test_events_list->addColumn(tr("Annc Type"));
|
|
||||||
test_events_list->setColumnAlignment(7,Qt::AlignCenter);
|
|
||||||
test_events_list->addColumn(tr("Line"));
|
|
||||||
test_events_list->setColumnAlignment(8,Qt::AlignRight);
|
|
||||||
test_events_list->setColumnSortType(0,RDListView::LineSort);
|
|
||||||
test_events_label=new QLabel(test_events_list,tr("Imported Events"),this);
|
|
||||||
test_events_label->setGeometry(15,160,sizeHint().width()-30,18);
|
test_events_label->setGeometry(15,160,sizeHint().width()-30,18);
|
||||||
test_events_label->setFont(labelFont());
|
test_events_label->setFont(labelFont());
|
||||||
|
connect(test_events_model,SIGNAL(modelReset()),
|
||||||
|
test_events_view,SLOT(resizeColumnsToContents()));
|
||||||
|
test_events_view->resizeColumnsToContents();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Close Button
|
// Close Button
|
||||||
@ -162,13 +137,13 @@ TestImport::~TestImport()
|
|||||||
|
|
||||||
QSize TestImport::sizeHint() const
|
QSize TestImport::sizeHint() const
|
||||||
{
|
{
|
||||||
return QSize(700,400);
|
return QSize(1000,600);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QSizePolicy TestImport::sizePolicy() const
|
QSizePolicy TestImport::sizePolicy() const
|
||||||
{
|
{
|
||||||
return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
|
return QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -189,81 +164,15 @@ void TestImport::selectData()
|
|||||||
|
|
||||||
void TestImport::importData()
|
void TestImport::importData()
|
||||||
{
|
{
|
||||||
RDListViewItem *item;
|
|
||||||
int next_line=0;
|
|
||||||
|
|
||||||
test_events_list->clear();
|
|
||||||
if(!test_svc->import(test_src,test_date_edit->date(),test_svc->breakString(),
|
if(!test_svc->import(test_src,test_date_edit->date(),test_svc->breakString(),
|
||||||
test_svc->trackString(test_src),true)) {
|
test_svc->trackString(test_src),true)) {
|
||||||
QMessageBox::information(this,tr("Import Error"),
|
QMessageBox::information(this,tr("Import Error"),
|
||||||
tr("There was an error during import\nplease check your settings and try again."));
|
tr("There was an error during import\nplease check your settings and try again."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QString sql=QString("select ")+
|
test_events_model->refresh();
|
||||||
"START_HOUR,"+ // 00
|
|
||||||
"START_SECS,"+ // 01
|
|
||||||
"EXT_CART_NAME,"+ // 02
|
|
||||||
"LENGTH,"+ // 03
|
|
||||||
"EXT_DATA,"+ // 04
|
|
||||||
"EXT_EVENT_ID,"+ // 05
|
|
||||||
"EXT_ANNC_TYPE,"+ // 06
|
|
||||||
"TITLE,"+ // 07
|
|
||||||
"TYPE,"+ // 08
|
|
||||||
"FILE_LINE "+ // 09
|
|
||||||
"from IMPORTER_LINES where "+
|
|
||||||
"STATION_NAME=\""+RDEscapeString(rda->station()->name())+"\" && "+
|
|
||||||
QString().sprintf("PROCESS_ID=%u ",getpid())+
|
|
||||||
"order by LINE_ID";
|
|
||||||
RDSqlQuery *q=new RDSqlQuery(sql);
|
|
||||||
while(q->next()) {
|
|
||||||
item=new RDListViewItem(test_events_list);
|
|
||||||
item->setLine(next_line++);
|
|
||||||
if((!q->value(0).isNull())&&(!q->value(1).isNull())) {
|
|
||||||
item->setText(1,RDSvc::timeString(q->value(0).toInt(),
|
|
||||||
q->value(1).toInt()));
|
|
||||||
}
|
|
||||||
if(!q->value(3).isNull()) {
|
|
||||||
item->setText(3,RDGetTimeLength(q->value(3).toInt(),false,false));
|
|
||||||
}
|
|
||||||
item->setText(5,q->value(4).toString().trimmed());
|
|
||||||
item->setText(6,q->value(5).toString().trimmed());
|
|
||||||
item->setText(7,q->value(6).toString().trimmed());
|
|
||||||
item->setText(8,QString().sprintf("%u",1+q->value(9).toUInt()));
|
|
||||||
switch((RDLogLine::Type)q->value(8).toUInt()) {
|
|
||||||
case RDLogLine::Cart:
|
|
||||||
item->setPixmap(0,*test_playout_map);
|
|
||||||
item->setText(2,q->value(2).toString());
|
|
||||||
item->setText(4,q->value(7).toString().trimmed());
|
|
||||||
break;
|
|
||||||
|
|
||||||
case RDLogLine::Marker:
|
QString sql=QString("delete from IMPORTER_LINES where ")+
|
||||||
item->setPixmap(0,*test_marker_map);
|
|
||||||
item->setText(2,tr("NOTE"));
|
|
||||||
item->setText(4,q->value(7).toString().trimmed());
|
|
||||||
break;
|
|
||||||
|
|
||||||
case RDLogLine::TrafficLink:
|
|
||||||
item->setPixmap(0,*test_traffic_map);
|
|
||||||
item->setText(4,tr("[spot break]"));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case RDLogLine::Track:
|
|
||||||
item->setPixmap(0,*test_mic16_map);
|
|
||||||
item->setText(4,tr("[voice track]"));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case RDLogLine::Macro:
|
|
||||||
case RDLogLine::OpenBracket:
|
|
||||||
case RDLogLine::CloseBracket:
|
|
||||||
case RDLogLine::Chain:
|
|
||||||
case RDLogLine::MusicLink:
|
|
||||||
case RDLogLine::UnknownType:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
delete q;
|
|
||||||
|
|
||||||
sql=QString("delete from IMPORTER_LINES where ")+
|
|
||||||
"STATION_NAME=\""+RDEscapeString(rda->station()->name())+"\" && "+
|
"STATION_NAME=\""+RDEscapeString(rda->station()->name())+"\" && "+
|
||||||
QString().sprintf("PROCESS_ID=%u",getpid());
|
QString().sprintf("PROCESS_ID=%u",getpid());
|
||||||
// printf("IMPORTER_LINES cleanup SQL: %s\n",(const char *)sql);
|
// printf("IMPORTER_LINES cleanup SQL: %s\n",(const char *)sql);
|
||||||
@ -301,7 +210,7 @@ void TestImport::resizeEvent(QResizeEvent *e)
|
|||||||
test_date_label->setGeometry(5,10,85,20);
|
test_date_label->setGeometry(5,10,85,20);
|
||||||
test_filename_edit->setGeometry(10,133,size().width()-20,18);
|
test_filename_edit->setGeometry(10,133,size().width()-20,18);
|
||||||
test_import_button->setGeometry(30,45,size().width()-60,50);
|
test_import_button->setGeometry(30,45,size().width()-60,50);
|
||||||
test_events_list->
|
test_events_view->
|
||||||
setGeometry(10,178,size().width()-20,size().height()-248);
|
setGeometry(10,178,size().width()-20,size().height()-248);
|
||||||
test_close_button->setGeometry(size().width()-90,size().height()-60,80,50);
|
test_close_button->setGeometry(size().width()-90,size().height()-60,80,50);
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// Test a Rivendell Log Import
|
// Test a Rivendell Log Import
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2020 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -21,14 +21,14 @@
|
|||||||
#ifndef TEST_IMPORT_H
|
#ifndef TEST_IMPORT_H
|
||||||
#define TEST_IMPORT_H
|
#define TEST_IMPORT_H
|
||||||
|
|
||||||
#include <qpushbutton.h>
|
#include <QDateTimeEdit>
|
||||||
#include <q3datetimeedit.h>
|
#include <QLabel>
|
||||||
#include <qlabel.h>
|
#include <QLineEdit>
|
||||||
#include <qlineedit.h>
|
#include <QPushButton>
|
||||||
#include <qpixmap.h>
|
#include <QTableView>
|
||||||
|
|
||||||
#include <rddialog.h>
|
#include <rddialog.h>
|
||||||
#include <rdlistview.h>
|
#include <rdlogimportmodel.h>
|
||||||
#include <rdsvc.h>
|
#include <rdsvc.h>
|
||||||
|
|
||||||
class TestImport : public RDDialog
|
class TestImport : public RDDialog
|
||||||
@ -54,17 +54,14 @@ class TestImport : public RDDialog
|
|||||||
RDSvc *test_svc;
|
RDSvc *test_svc;
|
||||||
RDSvc::ImportSource test_src;
|
RDSvc::ImportSource test_src;
|
||||||
QLabel *test_date_label;
|
QLabel *test_date_label;
|
||||||
Q3DateEdit *test_date_edit;
|
QDateEdit *test_date_edit;
|
||||||
QPushButton *test_import_button;
|
QPushButton *test_import_button;
|
||||||
QLabel *test_events_label;
|
QLabel *test_events_label;
|
||||||
RDListView *test_events_list;
|
QTableView *test_events_view;
|
||||||
|
RDLogImportModel *test_events_model;
|
||||||
QLabel *test_filename_label;
|
QLabel *test_filename_label;
|
||||||
QLineEdit *test_filename_edit;
|
QLineEdit *test_filename_edit;
|
||||||
QPushButton *test_close_button;
|
QPushButton *test_close_button;
|
||||||
QPixmap *test_playout_map;
|
|
||||||
QPixmap *test_marker_map;
|
|
||||||
QPixmap *test_mic16_map;
|
|
||||||
QPixmap *test_traffic_map;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user