mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-08-16 08:34:12 +02:00
2021-01-17 Fred Gleason <fredg@paravelsystems.com>
* Added static 'RDCartFilter::phraseFilter()', 'RDCartFilter::groupFilter()' and 'RDCartFilter::typeFilter()' methods. * Refactored 'RDCartDialog' to use the model-based API. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
a94a47e38d
commit
df749a0f70
@ -20808,3 +20808,8 @@
|
||||
of 'int'.
|
||||
2021-01-15 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Commented out removed slots in 'rdairplay/list_log.cpp'.
|
||||
2021-01-17 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added static 'RDCartFilter::phraseFilter()',
|
||||
'RDCartFilter::groupFilter()' and 'RDCartFilter::typeFilter()'
|
||||
methods.
|
||||
* Refactored 'RDCartDialog' to use the model-based API.
|
||||
|
@ -1251,19 +1251,19 @@ barvu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cart Filter:</source>
|
||||
<translation>Filtr vozíku:</translation>
|
||||
<translation type="obsolete">Filtr vozíku:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Search</source>
|
||||
<translation>&Hledat</translation>
|
||||
<translation type="obsolete">&Hledat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>C&lear</source>
|
||||
<translation>S&mazat</translation>
|
||||
<translation type="obsolete">S&mazat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Group:</source>
|
||||
<translation>Skupina:</translation>
|
||||
<translation type="obsolete">Skupina:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NUMBER</source>
|
||||
@ -1321,19 +1321,19 @@ barvu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ALL</source>
|
||||
<translation>VŠE</translation>
|
||||
<translation type="obsolete">VŠE</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show Only First</source>
|
||||
<translation>Ukázat pouze první </translation>
|
||||
<translation type="obsolete">Ukázat pouze první </translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Matches</source>
|
||||
<translation>Shody</translation>
|
||||
<translation type="obsolete">Shody</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Scheduler Code:</source>
|
||||
<translation>Kódy rozvrhovače:</translation>
|
||||
<translation type="obsolete">Kódy rozvrhovače:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Load From
|
||||
@ -1369,53 +1369,13 @@ ze &souboru</translation>
|
||||
<source>Importing</source>
|
||||
<translation>Zavádí se</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Number</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Length</source>
|
||||
<translation type="unfinished">Délka</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Title</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Artist</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Group</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Composer</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Conductor</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Client</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Agency</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>User Def</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Start</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation type="obsolete">Délka</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>End</source>
|
||||
<translation type="unfinished">Konec</translation>
|
||||
<translation type="obsolete">Konec</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open Audio File</source>
|
||||
|
@ -1247,19 +1247,19 @@ setzen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cart Filter:</source>
|
||||
<translation>Cart Filter:</translation>
|
||||
<translation type="obsolete">Cart Filter:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Search</source>
|
||||
<translation>&Suchen</translation>
|
||||
<translation type="obsolete">&Suchen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>C&lear</source>
|
||||
<translation>&Löschen</translation>
|
||||
<translation type="obsolete">&Löschen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Group:</source>
|
||||
<translation>Gruppe:</translation>
|
||||
<translation type="obsolete">Gruppe:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NUMBER</source>
|
||||
@ -1317,19 +1317,15 @@ senden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ALL</source>
|
||||
<translation>ALLE</translation>
|
||||
<translation type="obsolete">ALLE</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show Only First</source>
|
||||
<translation>Zeige nur erste</translation>
|
||||
<translation type="obsolete">Zeige nur erste</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Matches</source>
|
||||
<translation>Treffer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Scheduler Code:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation type="obsolete">Treffer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Load From
|
||||
@ -1360,53 +1356,13 @@ senden</translation>
|
||||
<source>Importing</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Number</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Length</source>
|
||||
<translation type="unfinished">Länge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Title</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Artist</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Group</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Composer</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Conductor</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Client</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Agency</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>User Def</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Start</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation type="obsolete">Länge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>End</source>
|
||||
<translation type="unfinished">Ende</translation>
|
||||
<translation type="obsolete">Ende</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open Audio File</source>
|
||||
|
@ -1243,15 +1243,15 @@ Color</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cart Filter:</source>
|
||||
<translation>Filtrar:</translation>
|
||||
<translation type="obsolete">Filtrar:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>C&lear</source>
|
||||
<translation>&Limpiar</translation>
|
||||
<translation type="obsolete">&Limpiar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Group:</source>
|
||||
<translation>Grupo:</translation>
|
||||
<translation type="obsolete">Grupo:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NUMBER</source>
|
||||
@ -1299,7 +1299,7 @@ Color</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ALL</source>
|
||||
<translation>TODAS</translation>
|
||||
<translation type="obsolete">TODAS</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>GROUP</source>
|
||||
@ -1313,7 +1313,7 @@ Color</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Search</source>
|
||||
<translation>&Buscar</translation>
|
||||
<translation type="obsolete">&Buscar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Please Wait...</source>
|
||||
@ -1321,15 +1321,15 @@ Color</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show Only First</source>
|
||||
<translation>Mostrar los primeros</translation>
|
||||
<translation type="obsolete">Mostrar los primeros</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Matches</source>
|
||||
<translation>resultados</translation>
|
||||
<translation type="obsolete">resultados</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Scheduler Code:</source>
|
||||
<translation>Cód. Programac.:</translation>
|
||||
<translation type="obsolete">Cód. Programac.:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Load From
|
||||
@ -1360,53 +1360,13 @@ Color</translation>
|
||||
<source>Importing</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Number</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Length</source>
|
||||
<translation type="unfinished">Longitud</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Title</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Artist</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Group</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Composer</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Conductor</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Client</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Agency</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>User Def</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Start</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation type="obsolete">Longitud</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>End</source>
|
||||
<translation type="unfinished">Final</translation>
|
||||
<translation type="obsolete">Final</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open Audio File</source>
|
||||
|
@ -1136,22 +1136,6 @@ La Couleur</translation>
|
||||
<source>Please Wait...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cart Filter:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>C&lear</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Group:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Send to
|
||||
&Editor</source>
|
||||
@ -1165,22 +1149,6 @@ La Couleur</translation>
|
||||
<source>&Cancel</source>
|
||||
<translation type="unfinished">&Annuler</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ALL</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Scheduler Code:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show Only First</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Matches</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Load From
|
||||
&File</source>
|
||||
@ -1210,53 +1178,13 @@ La Couleur</translation>
|
||||
<source>Imported from</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Number</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Length</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Title</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Artist</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Group</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Composer</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Conductor</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Client</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Agency</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>User Def</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Start</source>
|
||||
<translation type="unfinished">Début</translation>
|
||||
<translation type="obsolete">Début</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>End</source>
|
||||
<translation type="unfinished">Fin</translation>
|
||||
<translation type="obsolete">Fin</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open Audio File</source>
|
||||
|
@ -1247,19 +1247,19 @@ farge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cart Filter:</source>
|
||||
<translation>Korgfilter:</translation>
|
||||
<translation type="obsolete">Korgfilter:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Search</source>
|
||||
<translation>&Søk</translation>
|
||||
<translation type="obsolete">&Søk</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>C&lear</source>
|
||||
<translation>&Tøm</translation>
|
||||
<translation type="obsolete">&Tøm</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Group:</source>
|
||||
<translation>Gruppe:</translation>
|
||||
<translation type="obsolete">Gruppe:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NUMBER</source>
|
||||
@ -1316,19 +1316,7 @@ farge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ALL</source>
|
||||
<translation>ALLE</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show Only First</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Matches</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Scheduler Code:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation type="obsolete">ALLE</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Load From
|
||||
@ -1359,53 +1347,13 @@ farge</translation>
|
||||
<source>Importing</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Number</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Length</source>
|
||||
<translation type="unfinished">Lengd</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Title</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Artist</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Group</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Composer</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Conductor</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Client</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Agency</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>User Def</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Start</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation type="obsolete">Lengd</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>End</source>
|
||||
<translation type="unfinished">Slutten</translation>
|
||||
<translation type="obsolete">Slutten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open Audio File</source>
|
||||
|
@ -1247,19 +1247,19 @@ farge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cart Filter:</source>
|
||||
<translation>Korgfilter:</translation>
|
||||
<translation type="obsolete">Korgfilter:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Search</source>
|
||||
<translation>&Søk</translation>
|
||||
<translation type="obsolete">&Søk</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>C&lear</source>
|
||||
<translation>&Tøm</translation>
|
||||
<translation type="obsolete">&Tøm</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Group:</source>
|
||||
<translation>Gruppe:</translation>
|
||||
<translation type="obsolete">Gruppe:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NUMBER</source>
|
||||
@ -1316,19 +1316,7 @@ farge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ALL</source>
|
||||
<translation>ALLE</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show Only First</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Matches</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Scheduler Code:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation type="obsolete">ALLE</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Load From
|
||||
@ -1359,53 +1347,13 @@ farge</translation>
|
||||
<source>Importing</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Number</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Length</source>
|
||||
<translation type="unfinished">Lengd</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Title</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Artist</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Group</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Composer</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Conductor</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Client</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Agency</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>User Def</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Start</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation type="obsolete">Lengd</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>End</source>
|
||||
<translation type="unfinished">Slutten</translation>
|
||||
<translation type="obsolete">Slutten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open Audio File</source>
|
||||
|
@ -1247,19 +1247,19 @@ Cor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cart Filter:</source>
|
||||
<translation>Filtro:</translation>
|
||||
<translation type="obsolete">Filtro:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Search</source>
|
||||
<translation>&Procurar</translation>
|
||||
<translation type="obsolete">&Procurar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>C&lear</source>
|
||||
<translation>&Limpar</translation>
|
||||
<translation type="obsolete">&Limpar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Group:</source>
|
||||
<translation>Grupo:</translation>
|
||||
<translation type="obsolete">Grupo:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NUMBER</source>
|
||||
@ -1317,19 +1317,7 @@ Cor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ALL</source>
|
||||
<translation>TODOS</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show Only First</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Matches</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Scheduler Code:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation type="obsolete">TODOS</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Load From
|
||||
@ -1360,53 +1348,13 @@ Cor</translation>
|
||||
<source>Importing</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Number</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Length</source>
|
||||
<translation type="unfinished">Duração</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Title</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Artist</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Group</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Composer</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Conductor</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Client</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Agency</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>User Def</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Start</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation type="obsolete">Duração</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>End</source>
|
||||
<translation type="unfinished">Fim</translation>
|
||||
<translation type="obsolete">Fim</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open Audio File</source>
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// A widget to select a Rivendell Cart.
|
||||
//
|
||||
// (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
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -21,51 +21,32 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <qfiledialog.h>
|
||||
#include <qmessagebox.h>
|
||||
#include <QApplication>
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "rdapplication.h"
|
||||
#include "rdaudioimport.h"
|
||||
#include "rdcart_dialog.h"
|
||||
#include "rdcart_search_text.h"
|
||||
#include "rdconf.h"
|
||||
#include "rddb.h"
|
||||
#include "rdescape_string.h"
|
||||
#include "rdgroup.h"
|
||||
#include "rdprofile.h"
|
||||
#include "rdsettings.h"
|
||||
#include "rdtextvalidator.h"
|
||||
#include "rdwavefile.h"
|
||||
|
||||
//
|
||||
// Icons
|
||||
//
|
||||
#include "../icons/play.xpm"
|
||||
#include "../icons/rml5.xpm"
|
||||
|
||||
RDCartDialog::RDCartDialog(QString *filter,QString *group,QString *schedcode,
|
||||
const QString &caption,QWidget *parent)
|
||||
const QString &caption,bool user_is_admin,
|
||||
QWidget *parent)
|
||||
: RDDialog(parent)
|
||||
{
|
||||
cart_caption=caption;
|
||||
|
||||
//
|
||||
// Fix the Window Size
|
||||
//
|
||||
setMinimumWidth(sizeHint().width());
|
||||
setMinimumHeight(sizeHint().height());
|
||||
|
||||
cart_cartnum=NULL;
|
||||
cart_type=RDCart::All;
|
||||
cart_group=group;
|
||||
cart_schedcode=schedcode;
|
||||
if(cart_schedcode->isNull()) {
|
||||
*cart_schedcode=tr("ALL");
|
||||
}
|
||||
cart_temp_allowed=NULL;
|
||||
cart_filter_mode=rda->station()->filterMode();
|
||||
|
||||
if(filter==NULL) {
|
||||
cart_filter=new QString();
|
||||
local_filter=true;
|
||||
@ -79,17 +60,6 @@ RDCartDialog::RDCartDialog(QString *filter,QString *group,QString *schedcode,
|
||||
|
||||
setWindowTitle(caption+" - "+tr("Select Cart"));
|
||||
|
||||
//
|
||||
// Create Icons
|
||||
//
|
||||
cart_playout_map=new QPixmap(play_xpm);
|
||||
cart_macro_map=new QPixmap(rml5_xpm);
|
||||
|
||||
//
|
||||
// Text Validator
|
||||
//
|
||||
RDTextValidator *validator=new RDTextValidator(this,"validator",true);
|
||||
|
||||
//
|
||||
// Progress Dialog
|
||||
//
|
||||
@ -107,122 +77,38 @@ RDCartDialog::RDCartDialog(QString *filter,QString *group,QString *schedcode,
|
||||
cart_busy_dialog=new RDBusyDialog(this);
|
||||
|
||||
//
|
||||
// Filter Selector
|
||||
// Cart Filter
|
||||
//
|
||||
cart_filter_edit=new QLineEdit(this);
|
||||
cart_filter_edit->setValidator(validator);
|
||||
cart_filter_label=new QLabel(cart_filter_edit,tr("Cart Filter:"),this);
|
||||
cart_filter_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
cart_filter_label->setFont(labelFont());
|
||||
connect(cart_filter_edit,SIGNAL(textChanged(const QString &)),
|
||||
this,SLOT(filterChangedData(const QString &)));
|
||||
|
||||
//
|
||||
// Filter Search Button
|
||||
//
|
||||
cart_search_button=new QPushButton(this);
|
||||
cart_search_button->setText(tr("&Search"));
|
||||
cart_search_button->setFont(buttonFont());
|
||||
connect(cart_search_button,SIGNAL(clicked()),this,SLOT(filterSearchedData()));
|
||||
|
||||
//
|
||||
// Filter Clear Button
|
||||
//
|
||||
cart_clear_button=new QPushButton(this);
|
||||
cart_clear_button->setText(tr("C&lear"));
|
||||
cart_clear_button->setFont(buttonFont());
|
||||
connect(cart_clear_button,SIGNAL(clicked()),this,SLOT(filterClearedData()));
|
||||
|
||||
//
|
||||
// Group Code Selector
|
||||
//
|
||||
cart_group_box=new RDComboBox(this);
|
||||
cart_group_label=new QLabel(cart_group_box,tr("Group:"),this);
|
||||
cart_group_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
cart_group_label->setFont(labelFont());
|
||||
connect(cart_group_box,SIGNAL(activated(const QString &)),
|
||||
this,SLOT(groupActivatedData(const QString &)));
|
||||
|
||||
//
|
||||
// Scheduler Code Selector
|
||||
//
|
||||
cart_schedcode_box=new RDComboBox(this);
|
||||
cart_schedcode_label=
|
||||
new QLabel(cart_schedcode_box,tr("Scheduler Code:"),this);
|
||||
cart_schedcode_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
cart_schedcode_label->setFont(labelFont());
|
||||
connect(cart_schedcode_box,SIGNAL(activated(const QString &)),
|
||||
this,SLOT(schedcodeActivatedData(const QString &)));
|
||||
|
||||
//
|
||||
// Search Limit Checkbox
|
||||
//
|
||||
cart_limit_box=new QCheckBox(this);
|
||||
cart_limit_box->setChecked(true);
|
||||
cart_limit_label=
|
||||
new QLabel(cart_limit_box,tr("Show Only First")+
|
||||
QString().sprintf(" %d ",
|
||||
RD_LIMITED_CART_SEARCH_QUANTITY)+tr("Matches"),this);
|
||||
cart_limit_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
|
||||
cart_limit_label->setFont(labelFont());
|
||||
connect(cart_limit_box,SIGNAL(stateChanged(int)),
|
||||
this,SLOT(limitChangedData(int)));
|
||||
cart_cart_filter=new RDCartFilter(this);
|
||||
cart_cart_filter->setUserIsAdmin(user_is_admin);
|
||||
connect(rda,SIGNAL(userChanged()),cart_cart_filter,SLOT(changeUser()));
|
||||
|
||||
//
|
||||
// Cart List
|
||||
//
|
||||
cart_cart_list=new RDListView(this);
|
||||
cart_cart_list->setSelectionMode(Q3ListView::Single);
|
||||
cart_cart_list->setAllColumnsShowFocus(true);
|
||||
cart_cart_list->setItemMargin(5);
|
||||
connect(cart_cart_list,SIGNAL(clicked(Q3ListViewItem *)),
|
||||
this,SLOT(clickedData(Q3ListViewItem *)));
|
||||
connect(cart_cart_list,
|
||||
SIGNAL(doubleClicked(Q3ListViewItem *,const QPoint &,int)),
|
||||
this,
|
||||
SLOT(doubleClickedData(Q3ListViewItem *,const QPoint &,int)));
|
||||
cart_cart_label=new QLabel(cart_cart_list,"Carts",this);
|
||||
cart_cart_label->setFont(labelFont());
|
||||
cart_cart_list->addColumn("");
|
||||
cart_cart_list->setColumnAlignment(0,Qt::AlignHCenter);
|
||||
cart_cart_view=new QTableView(this);
|
||||
cart_cart_view->setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||
cart_cart_view->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
cart_cart_view->setShowGrid(false);
|
||||
cart_cart_view->setSortingEnabled(false);
|
||||
cart_cart_view->setWordWrap(false);
|
||||
cart_cart_model=new RDLibraryModel(this);
|
||||
cart_cart_model->setFont(font());
|
||||
cart_cart_model->setPalette(palette());
|
||||
cart_cart_view->setModel(cart_cart_model);
|
||||
connect(cart_cart_filter,SIGNAL(filterChanged(const QString &)),
|
||||
cart_cart_model,SLOT(setFilterSql(const QString &)));
|
||||
connect(cart_cart_model,SIGNAL(modelReset()),this,SLOT(modelResetData()));
|
||||
|
||||
cart_cart_list->addColumn(tr("Number"));
|
||||
cart_cart_list->setColumnAlignment(1,Qt::AlignHCenter);
|
||||
|
||||
cart_cart_list->addColumn(tr("Length"));
|
||||
cart_cart_list->setColumnAlignment(2,Qt::AlignRight);
|
||||
cart_cart_list->setColumnSortType(2,RDListView::TimeSort);
|
||||
|
||||
cart_cart_list->addColumn(tr("Title"),200);
|
||||
cart_cart_list->setColumnAlignment(3,Qt::AlignLeft);
|
||||
cart_cart_list->setColumnWidthMode(3,Q3ListView::Manual);
|
||||
|
||||
cart_cart_list->addColumn(tr("Artist"));
|
||||
cart_cart_list->setColumnAlignment(4,Qt::AlignLeft);
|
||||
|
||||
cart_cart_list->addColumn(tr("Group"));
|
||||
cart_cart_list->setColumnAlignment(5,Qt::AlignLeft);
|
||||
|
||||
cart_cart_list->addColumn(tr("Composer"));
|
||||
cart_cart_list->setColumnAlignment(6,Qt::AlignLeft);
|
||||
|
||||
cart_cart_list->addColumn(tr("Conductor"));
|
||||
cart_cart_list->setColumnAlignment(7,Qt::AlignLeft);
|
||||
|
||||
cart_cart_list->addColumn(tr("Client"));
|
||||
cart_cart_list->setColumnAlignment(8,Qt::AlignLeft);
|
||||
|
||||
cart_cart_list->addColumn(tr("Agency"));
|
||||
cart_cart_list->setColumnAlignment(9,Qt::AlignLeft);
|
||||
|
||||
cart_cart_list->addColumn(tr("User Def"));
|
||||
cart_cart_list->setColumnAlignment(10,Qt::AlignLeft);
|
||||
|
||||
cart_cart_list->addColumn(tr("Start"));
|
||||
cart_cart_list->setColumnAlignment(11,Qt::AlignLeft);
|
||||
|
||||
cart_cart_list->addColumn(tr("End"));
|
||||
cart_cart_list->setColumnAlignment(12,Qt::AlignLeft);
|
||||
connect(cart_cart_model,SIGNAL(rowCountChanged(int)),
|
||||
cart_cart_filter,SLOT(setMatchCount(int)));
|
||||
connect(cart_cart_view,SIGNAL(doubleClicked(const QModelIndex &)),
|
||||
this,SLOT(cartDoubleClickedData(const QModelIndex &)));
|
||||
connect(cart_cart_view->selectionModel(),
|
||||
SIGNAL(selectionChanged(const QItemSelection &,const QItemSelection &)),
|
||||
this,
|
||||
SLOT(selectionChangedData(const QItemSelection &,
|
||||
const QItemSelection &)));
|
||||
|
||||
//
|
||||
// Audition Player
|
||||
@ -272,32 +158,42 @@ RDCartDialog::RDCartDialog(QString *filter,QString *group,QString *schedcode,
|
||||
cart_cancel_button=new QPushButton(tr("&Cancel"),this);
|
||||
cart_cancel_button->setFont(buttonFont());
|
||||
connect(cart_cancel_button,SIGNAL(clicked()),this,SLOT(cancelData()));
|
||||
|
||||
cart_cart_model->setFilterSql(cart_cart_filter->filterSql());
|
||||
|
||||
//
|
||||
// Fix the Window Size
|
||||
//
|
||||
setMinimumWidth(sizeHint().width());
|
||||
setMinimumHeight(sizeHint().height());
|
||||
|
||||
cart_cart_filter->changeUser();
|
||||
}
|
||||
|
||||
|
||||
RDCartDialog::~RDCartDialog()
|
||||
{
|
||||
if(local_filter) {
|
||||
delete cart_filter;
|
||||
}
|
||||
delete cart_cart_filter;
|
||||
delete cart_cart_model;
|
||||
delete cart_cart_view;
|
||||
if(cart_player!=NULL) {
|
||||
delete cart_player;
|
||||
}
|
||||
delete cart_playout_map;
|
||||
delete cart_macro_map;
|
||||
}
|
||||
|
||||
|
||||
QSize RDCartDialog::sizeHint() const
|
||||
{
|
||||
return QSize(640,400);
|
||||
return QSize(cart_cart_filter->sizeHint().width(),400);
|
||||
}
|
||||
|
||||
|
||||
int RDCartDialog::exec(int *cartnum,RDCart::Type type,QString *svcname,
|
||||
int svc_quan,const QString &username,
|
||||
const QString &passwd,bool *temp_allowed)
|
||||
{
|
||||
LoadState();
|
||||
cart_cart_filter->setShowCartType(type);
|
||||
cart_cartnum=cartnum;
|
||||
cart_type=type;
|
||||
cart_service=svcname;
|
||||
@ -334,102 +230,33 @@ int RDCartDialog::exec(int *cartnum,RDCart::Type type,QString *svcname,
|
||||
}
|
||||
break;
|
||||
}
|
||||
if(*cart_cartnum==0) {
|
||||
cart_ok_button->setDisabled(true);
|
||||
}
|
||||
switch(cart_filter_mode) {
|
||||
case RDStation::FilterAsynchronous:
|
||||
cart_search_button->setDefault(true);
|
||||
break;
|
||||
cart_ok_button->setEnabled(false);
|
||||
|
||||
case RDStation::FilterSynchronous:
|
||||
cart_ok_button->setDefault(true);
|
||||
cart_search_button->hide();
|
||||
if(cart_cartnum!=NULL) {
|
||||
QModelIndex index=cart_cart_model->cartRow(*cart_cartnum);
|
||||
cart_cart_view->selectRow(index.row());
|
||||
}
|
||||
BuildGroupList();
|
||||
cart_filter_edit->setText(*cart_filter);
|
||||
RefreshCarts();
|
||||
RDListViewItem *item=(RDListViewItem *)cart_cart_list->firstChild();
|
||||
while(item!=NULL) {
|
||||
if(item->text(1).toInt()==*cartnum) {
|
||||
cart_cart_list->setSelected(item,true);
|
||||
cart_cart_list->ensureItemVisible(item);
|
||||
clickedData(item);
|
||||
return QDialog::exec();
|
||||
}
|
||||
item=(RDListViewItem *)item->nextSibling();
|
||||
}
|
||||
cart_filter_edit->setFocus();
|
||||
|
||||
return QDialog::exec();
|
||||
}
|
||||
|
||||
|
||||
void RDCartDialog::modelResetData()
|
||||
{
|
||||
cart_cart_view->resizeColumnsToContents();
|
||||
if(cart_cartnum!=NULL) {
|
||||
QModelIndex index=cart_cart_model->cartRow(*cart_cartnum);
|
||||
cart_cart_view->selectRow(index.row());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QSizePolicy RDCartDialog::sizePolicy() const
|
||||
{
|
||||
return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
|
||||
}
|
||||
|
||||
|
||||
void RDCartDialog::filterChangedData(const QString &str)
|
||||
{
|
||||
cart_search_button->setEnabled(true);
|
||||
switch(cart_filter_mode) {
|
||||
case RDStation::FilterSynchronous:
|
||||
filterSearchedData();
|
||||
break;
|
||||
|
||||
case RDStation::FilterAsynchronous:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void RDCartDialog::filterSearchedData()
|
||||
{
|
||||
if(cart_filter_edit->text().isEmpty()) {
|
||||
cart_clear_button->setDisabled(true);
|
||||
}
|
||||
else {
|
||||
cart_clear_button->setEnabled(true);
|
||||
}
|
||||
RefreshCarts();
|
||||
}
|
||||
|
||||
|
||||
void RDCartDialog::filterClearedData()
|
||||
{
|
||||
cart_filter_edit->clear();
|
||||
filterChangedData("");
|
||||
}
|
||||
|
||||
|
||||
void RDCartDialog::groupActivatedData(const QString &group)
|
||||
{
|
||||
filterChangedData("");
|
||||
if(cart_group!=NULL) {
|
||||
*cart_group=group;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void RDCartDialog::schedcodeActivatedData(const QString &schedcode)
|
||||
{
|
||||
filterChangedData("");
|
||||
if(cart_schedcode!=NULL) {
|
||||
*cart_schedcode=schedcode;
|
||||
}
|
||||
if(cart_schedcode!=NULL) {
|
||||
*cart_schedcode=schedcode;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void RDCartDialog::limitChangedData(int state)
|
||||
{
|
||||
filterChangedData("");
|
||||
}
|
||||
|
||||
|
||||
void RDCartDialog::clickedData(Q3ListViewItem *item)
|
||||
{
|
||||
RDListViewItem *i=(RDListViewItem *)item;
|
||||
@ -447,30 +274,51 @@ void RDCartDialog::clickedData(Q3ListViewItem *item)
|
||||
}
|
||||
|
||||
|
||||
void RDCartDialog::doubleClickedData(Q3ListViewItem *,const QPoint &,int)
|
||||
void RDCartDialog::cartDoubleClickedData(const QModelIndex &index)
|
||||
{
|
||||
okData();
|
||||
}
|
||||
|
||||
|
||||
void RDCartDialog::selectionChangedData(const QItemSelection &before,
|
||||
const QItemSelection &after)
|
||||
{
|
||||
QModelIndexList rows=cart_cart_view->selectionModel()->selectedRows();
|
||||
|
||||
cart_ok_button->setEnabled(rows.size()==1);
|
||||
}
|
||||
|
||||
|
||||
void RDCartDialog::editorData()
|
||||
{
|
||||
RDListViewItem *item=(RDListViewItem *)cart_cart_list->currentItem();
|
||||
if(item==NULL) {
|
||||
QModelIndexList rows=cart_cart_view->selectionModel()->selectedRows();
|
||||
|
||||
if(rows.size()!=1) {
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned cartnum=cart_cart_model->cartNumber(rows.first());
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
|
||||
sql=QString().sprintf("select CUTS.CUT_NAME,CUTS.LENGTH,CART.GROUP_NAME,\
|
||||
CART.TITLE,CART.ARTIST,CART.ALBUM,CART.YEAR,\
|
||||
CART.LABEL,CART.CLIENT,CART.AGENCY,CART.COMPOSER,\
|
||||
CART.PUBLISHER,CART.USER_DEFINED \
|
||||
from CUTS left join CART \
|
||||
on CUTS.CART_NUMBER=CART.NUMBER \
|
||||
where (CUTS.CART_NUMBER=%u)&&(CUTS.LENGTH>0)",
|
||||
item->text(1).toUInt());
|
||||
sql=QString("select ")+
|
||||
"CUTS.CUT_NAME,"+ // 00
|
||||
"CUTS.LENGTH,"+ // 01
|
||||
"CART.GROUP_NAME,"+ // 02
|
||||
"CART.TITLE,"+ // 03
|
||||
"CART.ARTIST,"+ // 04
|
||||
"CART.ALBUM,"+ // 05
|
||||
"CART.YEAR,"+ // 06
|
||||
"CART.LABEL,"+ // 07
|
||||
"CART.CLIENT,"+ // 08
|
||||
"CART.AGENCY,"+ // 09
|
||||
"CART.COMPOSER,"+ // 10
|
||||
"CART.PUBLISHER,"+ // 11
|
||||
"CART.USER_DEFINED "+ // 12
|
||||
"from CUTS left join CART "+
|
||||
"on CUTS.CART_NUMBER=CART.NUMBER where "+
|
||||
QString().sprintf("(CUTS.CART_NUMBER=%u)&&",cartnum)+
|
||||
"(CUTS.LENGTH>0)";
|
||||
q=new RDSqlQuery(sql);
|
||||
if(!q->first()) {
|
||||
delete q;
|
||||
@ -478,7 +326,7 @@ void RDCartDialog::editorData()
|
||||
}
|
||||
QString cmd=rda->station()->editorPath();
|
||||
cmd.replace("%f",RDCut::pathName(q->value(0).toString()));
|
||||
cmd.replace("%n",QString().sprintf("%06u",item->text(1).toUInt()));
|
||||
cmd.replace("%n",QString().sprintf("%06u",cartnum));
|
||||
cmd.replace("%h",QString().sprintf("%d",q->value(1).toInt()));
|
||||
cmd.replace("%g",q->value(2).toString());
|
||||
cmd.replace("%t",q->value(3).toString());
|
||||
@ -586,22 +434,21 @@ void RDCartDialog::loadFileData()
|
||||
|
||||
void RDCartDialog::okData()
|
||||
{
|
||||
RDListViewItem *item=(RDListViewItem *)cart_cart_list->currentItem();
|
||||
if(item==NULL) {
|
||||
return;
|
||||
QModelIndexList rows=cart_cart_view->selectionModel()->selectedRows();
|
||||
|
||||
if(rows.size()==1) {
|
||||
SaveState();
|
||||
if(cart_player!=NULL) {
|
||||
cart_player->stop();
|
||||
}
|
||||
|
||||
*cart_filter=cart_cart_filter->filterText();
|
||||
*cart_cartnum=cart_cart_model->cartNumber(rows.first());
|
||||
if(cart_temp_allowed!=NULL) {
|
||||
*cart_temp_allowed=false;
|
||||
}
|
||||
}
|
||||
|
||||
SaveState();
|
||||
if(cart_player!=NULL) {
|
||||
cart_player->stop();
|
||||
}
|
||||
if(!local_filter) {
|
||||
*cart_filter=cart_filter_edit->text();
|
||||
}
|
||||
*cart_cartnum=item->text(1).toInt();
|
||||
if(cart_temp_allowed!=NULL) {
|
||||
*cart_temp_allowed=false;
|
||||
}
|
||||
done(0);
|
||||
}
|
||||
|
||||
@ -618,34 +465,20 @@ void RDCartDialog::cancelData()
|
||||
|
||||
void RDCartDialog::resizeEvent(QResizeEvent *e)
|
||||
{
|
||||
cart_filter_label->setGeometry(10,10,85,20);
|
||||
int w=size().width();
|
||||
int h=size().height();
|
||||
|
||||
cart_search_button->setGeometry(size().width()-160,5,70,30);
|
||||
cart_clear_button->setGeometry(size().width()-80,5,70,30);
|
||||
cart_group_box->setGeometry(100,40,150,20);
|
||||
cart_group_label->setGeometry(10,40,85,20);
|
||||
cart_schedcode_box->setGeometry(390,40,150,20);
|
||||
cart_schedcode_label->setGeometry(280,40,105,20);
|
||||
cart_limit_box->setGeometry(100,72,15,15);
|
||||
cart_limit_label->setGeometry(120,70,300,20);
|
||||
cart_cart_label->setGeometry(15,90,100,20);
|
||||
cart_cart_list->setGeometry(10,110,size().width()-20,size().height()-180);
|
||||
cart_editor_button->setGeometry(235,size().height()-60,80,50);
|
||||
cart_file_button->setGeometry(325,size().height()-60,80,50);
|
||||
cart_ok_button->setGeometry(size().width()-180,size().height()-60,80,50);
|
||||
cart_cancel_button->setGeometry(size().width()-90,size().height()-60,80,50);
|
||||
switch(cart_filter_mode) {
|
||||
case RDStation::FilterAsynchronous:
|
||||
cart_filter_edit->setGeometry(100,10,size().width()-280,20);
|
||||
break;
|
||||
cart_cart_filter->setGeometry(0,0,w,cart_cart_filter->sizeHint().height());
|
||||
|
||||
case RDStation::FilterSynchronous:
|
||||
cart_filter_edit->setGeometry(100,10,size().width()-200,20);
|
||||
break;
|
||||
}
|
||||
cart_cart_view->setGeometry(10,cart_cart_filter->sizeHint().height(),
|
||||
w-20,h-cart_cart_filter->sizeHint().height()-70);
|
||||
cart_editor_button->setGeometry(235,h-60,80,50);
|
||||
cart_file_button->setGeometry(325,h-60,80,50);
|
||||
cart_ok_button->setGeometry(w-180,h-60,80,50);
|
||||
cart_cancel_button->setGeometry(w-90,h-60,80,50);
|
||||
if(cart_player!=NULL) {
|
||||
cart_player->playButton()->setGeometry(10,size().height()-60,80,50);
|
||||
cart_player->stopButton()->setGeometry(100,size().height()-60,80,50);
|
||||
cart_player->playButton()->setGeometry(10,h-60,80,50);
|
||||
cart_player->stopButton()->setGeometry(100,h-60,80,50);
|
||||
}
|
||||
}
|
||||
|
||||
@ -659,213 +492,6 @@ void RDCartDialog::closeEvent(QCloseEvent *e)
|
||||
}
|
||||
|
||||
|
||||
void RDCartDialog::RefreshCarts()
|
||||
{
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
RDListViewItem *l;
|
||||
|
||||
cart_cart_list->clear();
|
||||
QString group=cart_group_box->currentText();
|
||||
if(group==QString(tr("ALL"))) {
|
||||
group="";
|
||||
}
|
||||
QString schedcode=cart_schedcode_box->currentText();
|
||||
if(schedcode==QString(tr("ALL"))) {
|
||||
schedcode="";
|
||||
}
|
||||
if(cart_type==RDCart::All) {
|
||||
sql=QString("select ")+
|
||||
"CART.NUMBER,"+ // 00
|
||||
"CART.TITLE,"+ // 01
|
||||
"CART.ARTIST,"+ // 02
|
||||
"CART.CLIENT,"+ // 03
|
||||
"CART.AGENCY,"+ // 04
|
||||
"CART.USER_DEFINED,"+ // 05
|
||||
"CART.COMPOSER,"+ // 06
|
||||
"CART.CONDUCTOR,"+ // 07
|
||||
"CART.START_DATETIME,"+ // 08
|
||||
"CART.END_DATETIME,"+ // 09
|
||||
"CART.TYPE,"+ // 10
|
||||
"CART.FORCED_LENGTH,"+ // 11
|
||||
"CART.GROUP_NAME,"+ // 12
|
||||
"GROUPS.COLOR "+ // 13
|
||||
"from CART left join GROUPS "+
|
||||
"on CART.GROUP_NAME=GROUPS.NAME "+
|
||||
GetSearchFilter(cart_filter_edit->text(),group,schedcode);
|
||||
}
|
||||
else {
|
||||
sql=QString("select ")+
|
||||
"CART.NUMBER,"+ // 00
|
||||
"CART.TITLE,"+ // 01
|
||||
"CART.ARTIST,"+ // 02
|
||||
"CART.CLIENT,"+ // 03
|
||||
"CART.AGENCY,"+ // 04
|
||||
"CART.USER_DEFINED,"+ // 05
|
||||
"CART.COMPOSER,"+ // 06
|
||||
"CART.CONDUCTOR,"+ // 07
|
||||
"CART.START_DATETIME,"+ // 08
|
||||
"CART.END_DATETIME,"+ // 09
|
||||
"CART.TYPE,"+ // 10
|
||||
"CART.FORCED_LENGTH,"+ // 11
|
||||
"CART.GROUP_NAME,"+ // 12
|
||||
"GROUPS.COLOR "+ // 13
|
||||
"from CART left join GROUPS "+
|
||||
"on CART.GROUP_NAME=GROUPS.NAME "+
|
||||
GetSearchFilter(cart_filter_edit->text(),group,schedcode)+"&&"+
|
||||
QString().sprintf("(TYPE=%d)",cart_type);
|
||||
}
|
||||
if(cart_limit_box->isChecked()) {
|
||||
sql+=QString().sprintf(" limit %d",RD_LIMITED_CART_SEARCH_QUANTITY);
|
||||
}
|
||||
q=new RDSqlQuery(sql);
|
||||
int step=0;
|
||||
int count=0;
|
||||
cart_progress_dialog->setMaximum(q->size()/RDCART_DIALOG_STEP_SIZE);
|
||||
cart_progress_dialog->setValue(0);
|
||||
while(q->next()) {
|
||||
l=new RDListViewItem(cart_cart_list);
|
||||
l->setId(q->value(10).toUInt());
|
||||
switch((RDCart::Type)q->value(10).toUInt()) {
|
||||
case RDCart::Audio:
|
||||
l->setPixmap(0,*cart_playout_map);
|
||||
break;
|
||||
|
||||
case RDCart::Macro:
|
||||
l->setPixmap(0,*cart_macro_map);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
l->setText(1,QString().sprintf("%06d",q->value(0).toUInt())); // Number
|
||||
l->setText(2,RDGetTimeLength(q->value(11).toInt(),false,true)); // Length
|
||||
l->setText(3,q->value(1).toString()); // Title
|
||||
l->setText(4,q->value(2).toString()); // Artist
|
||||
l->setText(5,q->value(12).toString()); // Group
|
||||
l->setText(6,q->value(6).toString()); // Composer
|
||||
l->setText(7,q->value(7).toString()); // Conductor
|
||||
l->setTextColor(5,q->value(13).toString(),QFont::Bold);
|
||||
l->setText(8,q->value(3).toString()); // Client
|
||||
l->setText(9,q->value(4).toString()); // Agency
|
||||
l->setText(10,q->value(5).toString()); // User Defined
|
||||
if(!q->value(8).toDate().isNull()) {
|
||||
l->setText(11,q->value(8).toDate().toString("MM/dd/yyyy")); // Start Date
|
||||
}
|
||||
if(!q->value(10).toDate().isNull()) {
|
||||
l->setText(12,q->value(9).toDate().toString("MM/dd/yyyy")); // End Date
|
||||
}
|
||||
else {
|
||||
l->setText(12,"TFN");
|
||||
}
|
||||
if(count++>RDCART_DIALOG_STEP_SIZE) {
|
||||
cart_progress_dialog->setValue(++step);
|
||||
count=0;
|
||||
QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
|
||||
}
|
||||
}
|
||||
cart_progress_dialog->reset();
|
||||
delete q;
|
||||
cart_search_button->setDisabled(true);
|
||||
}
|
||||
|
||||
|
||||
void RDCartDialog::BuildGroupList()
|
||||
{
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
|
||||
//
|
||||
// Groups
|
||||
//
|
||||
cart_group_box->clear();
|
||||
cart_group_box->insertItem(tr("ALL"));
|
||||
sql="select GROUP_NAME from AUDIO_PERMS";
|
||||
if(cart_service_quan>0) {
|
||||
sql+=" where ";
|
||||
for(int i=0;i<cart_service_quan;i++) {
|
||||
if(!cart_service[i].isEmpty()) {
|
||||
sql+=QString("(SERVICE_NAME=\"")+
|
||||
RDEscapeString(cart_service[i])+"\")||";
|
||||
}
|
||||
}
|
||||
sql=sql.left(sql.length()-2);
|
||||
}
|
||||
sql+=" order by GROUP_NAME";
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
cart_group_box->insertItem(q->value(0).toString(),true);
|
||||
}
|
||||
delete q;
|
||||
|
||||
//
|
||||
// Preselect Group
|
||||
//
|
||||
if(cart_group!=NULL) {
|
||||
for(int i=0;i<cart_group_box->count();i++) {
|
||||
if(*cart_group==cart_group_box->text(i)) {
|
||||
cart_group_box->setCurrentItem(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Scheduler Codes
|
||||
//
|
||||
cart_schedcode_box->clear();
|
||||
cart_schedcode_box->insertItem(tr("ALL"));
|
||||
sql="select CODE from SCHED_CODES";
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
cart_schedcode_box->insertItem(q->value(0).toString());
|
||||
}
|
||||
delete q;
|
||||
|
||||
//
|
||||
// Preselect Scheduler Code
|
||||
//
|
||||
if(cart_schedcode!=NULL) {
|
||||
for(int i=0;i<cart_schedcode_box->count();i++) {
|
||||
if(*cart_schedcode==cart_schedcode_box->text(i)) {
|
||||
cart_schedcode_box->setCurrentItem(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QString RDCartDialog::GetSearchFilter(const QString &filter,
|
||||
const QString &group,
|
||||
const QString &schedcode)
|
||||
{
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
QString sched="";
|
||||
|
||||
if(schedcode!=tr("ALL")) {
|
||||
sched=schedcode;
|
||||
}
|
||||
QString search=RDCartSearchText(filter,group,sched,false);
|
||||
|
||||
//
|
||||
// Excluded Groups
|
||||
//
|
||||
sql=QString().sprintf("select NAME from GROUPS where ");
|
||||
for(int i=1;i<cart_group_box->count();i++) {
|
||||
sql+=QString("(NAME!=\"")+RDEscapeString(cart_group_box->text(i))+"\")&&";
|
||||
}
|
||||
sql=sql.left(sql.length()-2);
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
search+=QString("&&(GROUP_NAME!=\"")+
|
||||
RDEscapeString(q->value(0).toString())+"\")";
|
||||
}
|
||||
delete q;
|
||||
return search;
|
||||
}
|
||||
|
||||
QString RDCartDialog::StateFile() {
|
||||
bool home_found = false;
|
||||
QString home = RDGetHomeDir(&home_found);
|
||||
@ -887,9 +513,8 @@ void RDCartDialog::LoadState()
|
||||
RDProfile *p=new RDProfile();
|
||||
p->setSource(state_file);
|
||||
|
||||
bool value_read = false;
|
||||
cart_limit_box->setChecked(p->boolValue("RDCartDialog", "LimitSearch", true, &value_read));
|
||||
|
||||
cart_cart_filter->
|
||||
setLimitSearch(p->boolValue("RDCartDialog","LimitSearch",true));
|
||||
delete p;
|
||||
}
|
||||
|
||||
@ -907,7 +532,7 @@ void RDCartDialog::SaveState()
|
||||
return;
|
||||
}
|
||||
fprintf(f,"[RDCartDialog]\n");
|
||||
if(cart_limit_box->isChecked()) {
|
||||
if(cart_cart_filter->limitSearch()) {
|
||||
fprintf(f,"LimitSearch=Yes\n");
|
||||
}
|
||||
else {
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// A widget to select a Rivendell Cart.
|
||||
//
|
||||
// (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
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -21,17 +21,18 @@
|
||||
#ifndef RDCART_DIALOG_H
|
||||
#define RDCART_DIALOG_H
|
||||
|
||||
#include <qcheckbox.h>
|
||||
#include <qlabel.h>
|
||||
#include <qlineedit.h>
|
||||
#include <qprogressdialog.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <QCheckBox>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QProgressDialog>
|
||||
#include <QPushButton>
|
||||
#include <QTableView>
|
||||
|
||||
#include <rdbusydialog.h>
|
||||
#include <rdcart.h>
|
||||
#include <rdcombobox.h>
|
||||
#include <rddialog.h>
|
||||
#include <rdlistviewitem.h>
|
||||
#include <rdcartfilter.h>
|
||||
#include <rdlibrarymodel.h>
|
||||
#include <rdsimpleplayer.h>
|
||||
|
||||
#define RDCART_DIALOG_STEP_SIZE 1000
|
||||
@ -41,7 +42,7 @@ class RDCartDialog : public RDDialog
|
||||
Q_OBJECT
|
||||
public:
|
||||
RDCartDialog(QString *filter,QString *group,QString *schedcode,
|
||||
const QString &caption,QWidget *parent=0);
|
||||
const QString &caption,bool user_is_admin,QWidget *parent=0);
|
||||
~RDCartDialog();
|
||||
QSize sizeHint() const;
|
||||
QSizePolicy sizePolicy() const;
|
||||
@ -52,14 +53,11 @@ class RDCartDialog : public RDDialog
|
||||
bool *temp_allowed=NULL);
|
||||
|
||||
private slots:
|
||||
void filterChangedData(const QString &);
|
||||
void filterSearchedData();
|
||||
void filterClearedData();
|
||||
void groupActivatedData(const QString &group);
|
||||
void schedcodeActivatedData(const QString &schedcode);
|
||||
void limitChangedData(int state);
|
||||
void modelResetData();
|
||||
void clickedData(Q3ListViewItem *item);
|
||||
void doubleClickedData(Q3ListViewItem *,const QPoint &,int);
|
||||
void cartDoubleClickedData(const QModelIndex &index);
|
||||
void selectionChangedData(const QItemSelection &before,
|
||||
const QItemSelection &after);
|
||||
void editorData();
|
||||
void loadFileData();
|
||||
void okData();
|
||||
@ -70,37 +68,20 @@ class RDCartDialog : public RDDialog
|
||||
void closeEvent(QCloseEvent *e);
|
||||
|
||||
private:
|
||||
void RefreshCarts();
|
||||
void BuildGroupList();
|
||||
QString GetSearchFilter(const QString &filter,const QString &group,
|
||||
const QString &schedcode);
|
||||
QString StateFile();
|
||||
void LoadState();
|
||||
void SaveState();
|
||||
int *cart_cartnum;
|
||||
QLabel *cart_cart_label;
|
||||
RDListView *cart_cart_list;
|
||||
QLabel *cart_filter_label;
|
||||
QLineEdit *cart_filter_edit;
|
||||
QLabel *cart_limit_label;
|
||||
QCheckBox *cart_limit_box;
|
||||
RDCartFilter *cart_cart_filter;
|
||||
QTableView *cart_cart_view;
|
||||
RDLibraryModel *cart_cart_model;
|
||||
QPushButton *cart_ok_button;
|
||||
QPushButton *cart_cancel_button;
|
||||
QPushButton *cart_search_button;
|
||||
QPushButton *cart_clear_button;
|
||||
QPushButton *cart_editor_button;
|
||||
QPushButton *cart_file_button;
|
||||
QLabel *cart_group_label;
|
||||
RDComboBox *cart_group_box;
|
||||
QLabel *cart_schedcode_label;
|
||||
RDComboBox *cart_schedcode_box;
|
||||
QString *cart_filter;
|
||||
QString *cart_group;
|
||||
QString *cart_schedcode;
|
||||
bool local_filter;
|
||||
RDCart::Type cart_type;
|
||||
QPixmap *cart_playout_map;
|
||||
QPixmap *cart_macro_map;
|
||||
QString *cart_service;
|
||||
int cart_service_quan;
|
||||
RDStation::FilterMode cart_filter_mode;
|
||||
|
@ -28,6 +28,9 @@
|
||||
RDCartFilter::RDCartFilter(QWidget *parent)
|
||||
: RDWidget(parent)
|
||||
{
|
||||
d_show_cart_type=RDCart::All;
|
||||
d_user_is_admin=false;
|
||||
|
||||
d_filter_edit=new QLineEdit(this);
|
||||
d_filter_label=new QLabel(d_filter_edit,tr("Filter:"),this);
|
||||
d_filter_label->setFont(labelFont());
|
||||
@ -117,23 +120,23 @@ RDCartFilter::RDCartFilter(QWidget *parent)
|
||||
//
|
||||
// Show Audio Carts Checkbox
|
||||
//
|
||||
d_showaudio_box=new QCheckBox(this);
|
||||
d_showaudio_box->setChecked(true);
|
||||
d_showaudio_label=new QLabel(d_showaudio_box,tr("Show Audio Carts"),this);
|
||||
d_showaudio_check=new QCheckBox(this);
|
||||
d_showaudio_check->setChecked(true);
|
||||
d_showaudio_label=new QLabel(d_showaudio_check,tr("Show Audio Carts"),this);
|
||||
d_showaudio_label->setFont(labelFont());
|
||||
d_showaudio_label->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
|
||||
connect(d_showaudio_box,SIGNAL(stateChanged(int)),
|
||||
connect(d_showaudio_check,SIGNAL(stateChanged(int)),
|
||||
this,SLOT(checkChangedData(int)));
|
||||
|
||||
//
|
||||
// Show Macro Carts Checkbox
|
||||
//
|
||||
d_showmacro_box=new QCheckBox(this);
|
||||
d_showmacro_box->setChecked(true);
|
||||
d_showmacro_label=new QLabel(d_showmacro_box,tr("Show Macro Carts"),this);
|
||||
d_showmacro_check=new QCheckBox(this);
|
||||
d_showmacro_check->setChecked(true);
|
||||
d_showmacro_label=new QLabel(d_showmacro_check,tr("Show Macro Carts"),this);
|
||||
d_showmacro_label->setFont(labelFont());
|
||||
d_showmacro_label->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
|
||||
connect(d_showmacro_box,SIGNAL(stateChanged(int)),
|
||||
connect(d_showmacro_check,SIGNAL(stateChanged(int)),
|
||||
this,SLOT(checkChangedData(int)));
|
||||
|
||||
//
|
||||
@ -223,8 +226,27 @@ void RDCartFilter::saveConfig(FILE *f) const
|
||||
|
||||
QString RDCartFilter::filterSql(const QStringList &and_fields) const
|
||||
{
|
||||
QString sql="";
|
||||
QString type_filter=GetTypeFilter();
|
||||
QString sql=" where ";
|
||||
sql+=RDCartFilter::typeFilter(d_showaudio_check->isChecked(),
|
||||
d_showmacro_check->isChecked(),
|
||||
d_show_cart_type);
|
||||
// sql+=RDCartFilter::phraseFilter(d_filter_edit->text().trimmed(),true);
|
||||
QStringList groups;
|
||||
for(int i=0;i<d_group_box->count();i++) {
|
||||
groups.push_back(d_group_box->text(i));
|
||||
}
|
||||
sql+=RDCartFilter::groupFilter(d_group_box->currentText(),groups);
|
||||
sql=sql.left(sql.length()-2); // Remove the final "&&"
|
||||
sql+="order by CART.NUMBER ";
|
||||
if(d_showmatches_box->isChecked()) {
|
||||
sql+=QString().sprintf("limit %d ",RD_LIMITED_CART_SEARCH_QUANTITY);
|
||||
}
|
||||
|
||||
// printf("FILTER SQL: %s\n",sql.toUtf8().constData());
|
||||
|
||||
return sql;
|
||||
|
||||
/*
|
||||
|
||||
if(type_filter.isEmpty()) {
|
||||
return QString("where CART.NUMBER=0 ");
|
||||
@ -238,11 +260,16 @@ QString RDCartFilter::filterSql(const QStringList &and_fields) const
|
||||
schedcodes << d_codes2_box->currentText();
|
||||
}
|
||||
if(d_group_box->currentText()==QString(tr("ALL"))) {
|
||||
sql=RDAllCartSearchText(d_filter_edit->text(),schedcodes,
|
||||
rda->user()->name(),true)+" "+type_filter;
|
||||
if(d_user_is_admin) {
|
||||
// sql=" where ";
|
||||
}
|
||||
else {
|
||||
sql+=RDAllCartSearchText(d_filter_edit->text(),schedcodes,
|
||||
rda->user()->name(),true)+" "+type_filter;
|
||||
}
|
||||
}
|
||||
else {
|
||||
sql=RDCartSearchText(d_filter_edit->text(),d_group_box->currentText(),
|
||||
sql+=RDCartSearchText(d_filter_edit->text(),d_group_box->currentText(),
|
||||
schedcodes,true)+" "+type_filter;
|
||||
}
|
||||
for(int i=0;i<and_fields.size();i++) {
|
||||
@ -257,6 +284,7 @@ QString RDCartFilter::filterSql(const QStringList &and_fields) const
|
||||
// printf("SQL: %s\n",sql.toUtf8().constData());
|
||||
|
||||
return sql;
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@ -284,6 +312,61 @@ bool RDCartFilter::dragEnabled() const
|
||||
}
|
||||
|
||||
|
||||
RDCart::Type RDCartFilter::showCartType() const
|
||||
{
|
||||
return d_show_cart_type;
|
||||
}
|
||||
|
||||
|
||||
void RDCartFilter::setShowCartType(RDCart::Type type)
|
||||
{
|
||||
if(type!=d_show_cart_type) {
|
||||
if(type==RDCart::All) {
|
||||
d_showaudio_check->show();
|
||||
d_showaudio_label->show();
|
||||
d_showmacro_check->show();
|
||||
d_showmacro_label->show();
|
||||
}
|
||||
else {
|
||||
d_showaudio_check->hide();
|
||||
d_showaudio_label->hide();
|
||||
d_showmacro_check->hide();
|
||||
d_showmacro_label->hide();
|
||||
}
|
||||
d_show_cart_type=type;
|
||||
|
||||
emit filterChanged(filterSql());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool RDCartFilter::limitSearch() const
|
||||
{
|
||||
return d_showmatches_box->isChecked();
|
||||
}
|
||||
|
||||
|
||||
void RDCartFilter::setLimitSearch(bool state)
|
||||
{
|
||||
d_showmatches_box->setChecked(state);
|
||||
}
|
||||
|
||||
|
||||
bool RDCartFilter::userIsAdmin() const
|
||||
{
|
||||
return d_user_is_admin;
|
||||
}
|
||||
|
||||
|
||||
void RDCartFilter::setUserIsAdmin(bool state)
|
||||
{
|
||||
if(state!=d_user_is_admin) {
|
||||
d_user_is_admin=state;
|
||||
changeUser();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void RDCartFilter::setFilterText(const QString &str)
|
||||
{
|
||||
d_filter_edit->setText(str);
|
||||
@ -315,8 +398,14 @@ void RDCartFilter::changeUser()
|
||||
|
||||
d_group_box->clear();
|
||||
d_group_box->insertItem(tr("ALL"));
|
||||
sql=QString("select GROUP_NAME from USER_PERMS where ")+
|
||||
"USER_NAME=\""+RDEscapeString(rda->user()->name())+"\" order by GROUP_NAME";
|
||||
if(d_user_is_admin) {
|
||||
sql=QString("select NAME from GROUPS order by NAME ");
|
||||
}
|
||||
else {
|
||||
sql=QString("select GROUP_NAME from USER_PERMS where ")+
|
||||
"USER_NAME=\""+RDEscapeString(rda->user()->name())+"\" "+
|
||||
"order by GROUP_NAME";
|
||||
}
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
d_group_box->insertItem(q->value(0).toString());
|
||||
@ -424,30 +513,101 @@ void RDCartFilter::resizeEvent(QResizeEvent *e)
|
||||
d_allowdrag_label->setGeometry(580,66,130,20);
|
||||
d_allowdrag_box->setGeometry(560,68,15,15);
|
||||
d_showaudio_label->setGeometry(90,66,130,20);
|
||||
d_showaudio_box->setGeometry(70,68,15,15);
|
||||
d_showaudio_check->setGeometry(70,68,15,15);
|
||||
d_showmacro_label->setGeometry(250,66,130,20);
|
||||
d_showmacro_box->setGeometry(230,68,15,15);
|
||||
d_showmacro_check->setGeometry(230,68,15,15);
|
||||
d_shownotes_label->setGeometry(410,66,130,20);
|
||||
d_shownotes_box->setGeometry(390,68,15,15);
|
||||
}
|
||||
|
||||
|
||||
QString RDCartFilter::GetTypeFilter() const
|
||||
QString RDCartFilter::phraseFilter(const QString &phrase, bool incl_cuts)
|
||||
{
|
||||
QString type_filter;
|
||||
QString sql="";
|
||||
|
||||
if(d_showaudio_box->isChecked()) {
|
||||
if(d_showmacro_box->isChecked()) {
|
||||
type_filter="&& ((TYPE=1)||(TYPE=2)||(TYPE=3))";
|
||||
}
|
||||
else {
|
||||
type_filter="&& ((TYPE=1)||(TYPE=3))";
|
||||
}
|
||||
if(phrase.isEmpty()) {
|
||||
sql=" &&";
|
||||
}
|
||||
else {
|
||||
if(d_showmacro_box->isChecked()) {
|
||||
type_filter="&& (TYPE=2)";
|
||||
sql+=QString(" (")+
|
||||
"(CART.TITLE like \"%%\")||"+
|
||||
"(CART.ARTIST like \"%%\")||"+
|
||||
"(CART.CLIENT like \"%%\")||"+
|
||||
"(CART.AGENCY like \"%%\")||"+
|
||||
"(CART.ALBUM like \"%%\")||"+
|
||||
"(CART.LABEL like \"%%\")||"+
|
||||
"(CART.NUMBER like \"%%\")||"+
|
||||
"(CART.PUBLISHER like \"%%\")||"+
|
||||
"(CART.COMPOSER like \"%%\")||"+
|
||||
"(CART.CONDUCTOR like \"%%\")||"+
|
||||
"(CART.SONG_ID like \"%%\")||"+
|
||||
"(CART.USER_DEFINED like \"%%\")";
|
||||
if(incl_cuts) {
|
||||
sql+=QString("||(CUTS.ISCI like \"%%\")")+
|
||||
"||(CUTS.ISRC like \"%%\")"+
|
||||
"||(CUTS.DESCRIPTION like \"%%\")"+
|
||||
"||(CUTS.OUTCUE like \"%%\")";
|
||||
}
|
||||
sql+=") &&";
|
||||
}
|
||||
return type_filter;
|
||||
|
||||
return sql;
|
||||
}
|
||||
|
||||
|
||||
QString RDCartFilter::groupFilter(const QString &group,
|
||||
const QStringList &groups)
|
||||
{
|
||||
QString sql=" (";
|
||||
|
||||
if(group==tr("ALL")) {
|
||||
for(int i=1;i<groups.size();i++) {
|
||||
sql+="(CART.GROUP_NAME=\""+RDEscapeString(groups.at(i))+"\")||";
|
||||
}
|
||||
sql=sql.left(sql.length()-2);
|
||||
}
|
||||
else {
|
||||
sql+="CART.GROUP_NAME=\""+RDEscapeString(group)+"\"";
|
||||
}
|
||||
|
||||
sql+=") &&";
|
||||
|
||||
return sql;
|
||||
}
|
||||
|
||||
|
||||
QString RDCartFilter::typeFilter(bool incl_audio,bool incl_macro,
|
||||
RDCart::Type mask)
|
||||
{
|
||||
QString sql;
|
||||
|
||||
switch(mask) {
|
||||
case RDCart::Audio:
|
||||
sql="((CART.TYPE=1)||(CART.TYPE=3)) &&";
|
||||
break;
|
||||
|
||||
case RDCart::Macro:
|
||||
sql="(CART.TYPE=2) &&";
|
||||
break;
|
||||
|
||||
case RDCart::All:
|
||||
if(incl_audio) {
|
||||
if(incl_macro) {
|
||||
sql="((CART.TYPE=1)||(CART.TYPE=2)||(CART.TYPE=3)) &&";
|
||||
}
|
||||
else {
|
||||
sql="((CART.TYPE=1)||(CART.TYPE=3)) &&";
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(incl_macro) {
|
||||
sql="(CART.TYPE=2) &&";
|
||||
}
|
||||
else {
|
||||
sql="(CART.TYPE=0) &&"; // NEVER matches!
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
return sql;
|
||||
}
|
||||
|
@ -46,6 +46,15 @@ class RDCartFilter : public RDWidget
|
||||
QString selectedGroup() const;
|
||||
QString selectedSchedCode() const;
|
||||
bool dragEnabled() const;
|
||||
RDCart::Type showCartType() const;
|
||||
void setShowCartType(RDCart::Type type);
|
||||
bool limitSearch() const;
|
||||
void setLimitSearch(bool state);
|
||||
bool userIsAdmin() const;
|
||||
void setUserIsAdmin(bool state);
|
||||
static QString phraseFilter(const QString &phrase,bool incl_cuts);
|
||||
static QString groupFilter(const QString &group,const QStringList &groups);
|
||||
static QString typeFilter(bool incl_audio,bool incl_macro,RDCart::Type mask);
|
||||
|
||||
public slots:
|
||||
void setFilterText(const QString &str);
|
||||
@ -71,7 +80,6 @@ class RDCartFilter : public RDWidget
|
||||
void resizeEvent(QResizeEvent *e);
|
||||
|
||||
private:
|
||||
QString GetTypeFilter() const;
|
||||
QLineEdit *d_filter_edit;
|
||||
QLabel *d_filter_label;
|
||||
QComboBox *d_group_box;
|
||||
@ -86,16 +94,17 @@ class RDCartFilter : public RDWidget
|
||||
QPushButton *d_clear_button;
|
||||
QCheckBox *d_allowdrag_box;
|
||||
QLabel *d_allowdrag_label;
|
||||
QCheckBox *d_showaudio_box;
|
||||
QCheckBox *d_showaudio_check;
|
||||
QLabel *d_showaudio_label;
|
||||
QCheckBox *d_showmacro_box;
|
||||
QCheckBox *d_showmacro_check;
|
||||
QLabel *d_shownotes_label;
|
||||
QCheckBox *d_shownotes_box;
|
||||
QLabel *d_showmatches_label;
|
||||
QCheckBox *d_showmatches_box;
|
||||
QLabel *d_showmacro_label;
|
||||
|
||||
RDCart::Type d_show_cart_type;
|
||||
QString d_default_group;
|
||||
bool d_user_is_admin;
|
||||
};
|
||||
|
||||
|
||||
|
@ -401,6 +401,7 @@ void RDLibraryModel::refreshRow(const QModelIndex &index)
|
||||
{
|
||||
if(isCart(index)) {
|
||||
updateCartLine(index.row());
|
||||
emit dataChanged(index,createIndex(index.row(),columnCount(),0));
|
||||
}
|
||||
}
|
||||
|
||||
@ -411,6 +412,7 @@ void RDLibraryModel::refreshCart(unsigned cartnum)
|
||||
for(int i=0;i<d_texts.size();i++) {
|
||||
if(d_texts.at(i).at(0).toString()==cartnum_str) {
|
||||
updateCartLine(i);
|
||||
emit dataChanged(createIndex(i,0,0),createIndex(i,columnCount(),0));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -460,6 +462,7 @@ void RDLibraryModel::updateModel(const QString &filter_sql)
|
||||
|
||||
sql=sqlFields()+
|
||||
filter_sql;
|
||||
printf("SQL: %s\n",sql.toUtf8().constData());
|
||||
beginResetModel();
|
||||
d_texts.clear();
|
||||
d_cart_numbers.clear();
|
||||
|
@ -138,7 +138,7 @@ MainWidget::MainWidget(RDConfig *config,RDWidget *parent)
|
||||
// Cart Dialog
|
||||
//
|
||||
admin_cart_dialog=new RDCartDialog(&admin_filter,&admin_group,
|
||||
&admin_schedcode,"RDAdmin",this);
|
||||
&admin_schedcode,"RDAdmin",true,this);
|
||||
|
||||
//
|
||||
// User Labels
|
||||
|
@ -339,7 +339,7 @@ MainWidget::MainWidget(RDConfig *config,QWidget *parent)
|
||||
// Cart Picker
|
||||
//
|
||||
rdcart_dialog=new RDCartDialog(&air_add_filter,&air_add_group,
|
||||
&air_add_schedcode,"RDAirPlay",this);
|
||||
&air_add_schedcode,"RDAirPlay",false,this);
|
||||
|
||||
//
|
||||
// Wall Clock
|
||||
|
@ -91,7 +91,7 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
||||
// Dialogs
|
||||
//
|
||||
panel_cart_dialog=new RDCartDialog(&panel_filter,&panel_group,
|
||||
&panel_schedcode,"RDCartSlots",this);
|
||||
&panel_schedcode,"RDCartSlots",false,this);
|
||||
panel_slot_dialog=new RDSlotDialog(tr("RDCartSlots"),this);
|
||||
panel_cue_dialog=new RDCueEditDialog(rda->cae(),rda->station()->cueCard(),
|
||||
rda->station()->cuePort(),
|
||||
|
@ -330,7 +330,7 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
||||
// Cart Picker
|
||||
//
|
||||
catch_cart_dialog=new RDCartDialog(&catch_filter,&catch_group,
|
||||
&catch_schedcode,"RDCatch",this);
|
||||
&catch_schedcode,"RDCatch",false,this);
|
||||
|
||||
//
|
||||
// Cart List
|
||||
|
@ -46,7 +46,7 @@ EditLogLine::EditLogLine(RDLogLine *line,QString *filter,QString *group,
|
||||
// Cart Picker
|
||||
//
|
||||
edit_cart_dialog=new RDCartDialog(edit_filter,edit_group,edit_schedcode,
|
||||
"RDLogEdit",this);
|
||||
"RDLogEdit",false,this);
|
||||
|
||||
//
|
||||
// Overlap Box
|
||||
|
Loading…
x
Reference in New Issue
Block a user