From 161586135095d4e43d0ca36e925088f5b2507bae Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Tue, 14 Aug 2018 21:06:37 +0000 Subject: [PATCH] 2018-08-14 Fred Gleason * Fixed style inconsistencies in dialogs within rdlibrary(1). --- ChangeLog | 2 + rdlibrary/audio_cart.cpp | 18 ++- rdlibrary/audio_cart.h | 6 +- rdlibrary/cdripper.cpp | 12 +- rdlibrary/cdripper.h | 3 +- rdlibrary/disk_gauge.cpp | 5 +- rdlibrary/disk_gauge.h | 4 +- rdlibrary/disk_ripper.cpp | 11 +- rdlibrary/disk_ripper.h | 5 +- rdlibrary/edit_cart.cpp | 17 +-- rdlibrary/edit_cart.h | 13 +- rdlibrary/edit_macro.cpp | 13 +- rdlibrary/edit_macro.h | 5 +- rdlibrary/edit_notes.cpp | 14 +-- rdlibrary/edit_notes.h | 4 +- rdlibrary/edit_schedulercodes.cpp | 11 +- rdlibrary/edit_schedulercodes.h | 5 +- rdlibrary/filter.cpp | 8 +- rdlibrary/filter.h | 2 +- rdlibrary/lib_listview.cpp | 9 +- rdlibrary/lib_listview.h | 5 +- rdlibrary/list_reports.cpp | 10 +- rdlibrary/list_reports.h | 4 +- rdlibrary/macro_cart.cpp | 8 +- rdlibrary/macro_cart.h | 3 +- rdlibrary/rdlibrary.cpp | 18 ++- rdlibrary/rdlibrary.h | 13 +- rdlibrary/rdlibrary_cs.ts | 28 ++++- rdlibrary/rdlibrary_de.ts | 28 ++++- rdlibrary/rdlibrary_es.ts | 26 +++- rdlibrary/rdlibrary_fr.ts | 32 +++-- rdlibrary/rdlibrary_nb.ts | 28 ++++- rdlibrary/rdlibrary_nn.ts | 28 ++++- rdlibrary/rdlibrary_pt_BR.ts | 28 ++++- rdlibrary/record_cut.cpp | 190 +++++++++++++----------------- rdlibrary/record_cut.h | 36 +++--- rdlibrary/validate_cut.cpp | 5 +- rdlibrary/validate_cut.h | 3 +- 38 files changed, 354 insertions(+), 306 deletions(-) diff --git a/ChangeLog b/ChangeLog index d74d2dc5..dd532bf6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17398,3 +17398,5 @@ * Fixed style inconsistencies in dialogs within rdlogedit(1). 2018-08-14 Fred Gleason * Rebased rdlogedit(1)'s main window to QWidget. +2018-08-14 Fred Gleason + * Fixed style inconsistencies in dialogs within rdlibrary(1). diff --git a/rdlibrary/audio_cart.cpp b/rdlibrary/audio_cart.cpp index 70501e7d..bee3274f 100644 --- a/rdlibrary/audio_cart.cpp +++ b/rdlibrary/audio_cart.cpp @@ -2,7 +2,7 @@ // // The audio cart editor for RDLibrary. // -// (C) Copyright 2002-2004,2016-2017 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // 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 @@ -44,16 +44,14 @@ #include #include -#include -#include -#include -#include - -#include +#include "audio_cart.h" +#include "cdripper.h" +#include "globals.h" +#include "record_cut.h" +#include "validate_cut.h" bool import_active=false; - AudioCart::AudioCart(AudioControls *controls,RDCart *cart,QString *path, bool select_cut,bool profile_rip,QWidget *parent) : QWidget(parent) @@ -66,8 +64,8 @@ AudioCart::AudioCart(AudioControls *controls,RDCart *cart,QString *path, rdcart_profile_rip=profile_rip; rdcart_modification_allowed=rda->user()->editAudio()&&cart->owner().isEmpty(); - setCaption(QString().sprintf("%u",rdcart_cart->number())+" - "+ - rdcart_cart->title()); +//setWindowTitle("RDLibrary - "+tr("Edit Cart")+QString().sprintf(" %u",rdcart_cart->number())+" ["+ +// rdcart_cart->title()+"]"); // // Generate Fonts diff --git a/rdlibrary/audio_cart.h b/rdlibrary/audio_cart.h index 10ecb341..e94b0ef3 100644 --- a/rdlibrary/audio_cart.h +++ b/rdlibrary/audio_cart.h @@ -2,7 +2,7 @@ // // The audio cart editor for RDLibrary. // -// (C) Copyright 2002-2004,2016 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // 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 @@ -41,8 +41,8 @@ #include #include -#include -#include +#include "audio_controls.h" +#include "globals.h" extern bool import_active; diff --git a/rdlibrary/cdripper.cpp b/rdlibrary/cdripper.cpp index 07a63f55..82822d9e 100644 --- a/rdlibrary/cdripper.cpp +++ b/rdlibrary/cdripper.cpp @@ -2,7 +2,7 @@ // // CD Ripper Dialog for Rivendell. // -// (C) Copyright 2002-2003,2009,2016-2017 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // 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 @@ -45,9 +45,9 @@ #include #include -#include -#include -#include +#include "cdripper.h" +#include "globals.h" +#include "rdconfig.h" // // Global Variables @@ -58,6 +58,8 @@ CdRipper::CdRipper(QString cutname,RDCddbRecord *rec,RDLibraryConf *conf, bool profile_rip,QWidget *parent) : QDialog(parent) { + setModal(true); + rip_profile_rip=profile_rip; rip_isrc_read=false; @@ -81,7 +83,7 @@ CdRipper::CdRipper(QString cutname,RDCddbRecord *rec,RDLibraryConf *conf, rip_track[1]=-1; rip_title=NULL; - setCaption("Rip CD"); + setWindowTitle("RDLibrary - "+tr("Rip CD")); // // Create Temporary Directory diff --git a/rdlibrary/cdripper.h b/rdlibrary/cdripper.h index 158b8e20..6ac6566e 100644 --- a/rdlibrary/cdripper.h +++ b/rdlibrary/cdripper.h @@ -2,7 +2,7 @@ // // CD Ripper Dialog for Rivendell // -// (C) Copyright 2002-2003,2016 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // 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 @@ -44,7 +44,6 @@ #include #include #include - #include class CdRipper : public QDialog diff --git a/rdlibrary/disk_gauge.cpp b/rdlibrary/disk_gauge.cpp index 88c9e2b7..ae9a8a93 100644 --- a/rdlibrary/disk_gauge.cpp +++ b/rdlibrary/disk_gauge.cpp @@ -2,7 +2,7 @@ // // Disk Gauge Widget for RDLibrary. // -// (C) Copyright 2002-2004,2016 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // 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,9 +21,6 @@ #include #include -//Added by qt3to4: -#include -#include #include #include diff --git a/rdlibrary/disk_gauge.h b/rdlibrary/disk_gauge.h index 83ed0f1a..ea6744b7 100644 --- a/rdlibrary/disk_gauge.h +++ b/rdlibrary/disk_gauge.h @@ -2,7 +2,7 @@ // // Disk Gauge Widget for RDLibrary. // -// (C) Copyright 2002-2004,2016 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // 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 @@ -27,8 +27,6 @@ #include #include #include -//Added by qt3to4: -#include #define DISK_GAUGE_UPDATE_INTERVAL 60000 diff --git a/rdlibrary/disk_ripper.cpp b/rdlibrary/disk_ripper.cpp index c82bf8d3..1b8c4c3e 100644 --- a/rdlibrary/disk_ripper.cpp +++ b/rdlibrary/disk_ripper.cpp @@ -2,7 +2,7 @@ // // CD Ripper Dialog for Rivendell. // -// (C) Copyright 2002-2003,2010,2016-2018 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // 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 @@ -32,10 +32,6 @@ #include #include #include -//Added by qt3to4: -#include -#include -#include #include #include @@ -55,11 +51,12 @@ #include "disk_ripper.h" #include "globals.h" - DiskRipper::DiskRipper(QString *filter,QString *group,QString *schedcode, bool profile_rip,QWidget *parent) : QDialog(parent) { + setModal(true); + rip_isrc_read=false; rip_filter_text=filter; rip_group_text=group; @@ -81,7 +78,7 @@ DiskRipper::DiskRipper(QString *filter,QString *group,QString *schedcode, QFont label_font=QFont("Helvetica",12,QFont::Bold); label_font.setPixelSize(12); - setCaption(tr("Rip Disk")); + setWindowTitle("RDLibrary - "+tr("Rip Disk")); // // Create Dialogs diff --git a/rdlibrary/disk_ripper.h b/rdlibrary/disk_ripper.h index 51abb35f..447d4741 100644 --- a/rdlibrary/disk_ripper.h +++ b/rdlibrary/disk_ripper.h @@ -2,7 +2,7 @@ // // CD Ripper Dialog for Rivendell // -// (C) Copyright 2002-2003,2016 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -36,9 +36,6 @@ #include #include #include -//Added by qt3to4: -#include -#include #include #include diff --git a/rdlibrary/edit_cart.cpp b/rdlibrary/edit_cart.cpp index 6f5a477c..8b00f72b 100644 --- a/rdlibrary/edit_cart.cpp +++ b/rdlibrary/edit_cart.cpp @@ -2,7 +2,7 @@ // // Edit a Rivendell Cart // -// (C) Copyright 2002-2004,2016 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -21,10 +21,8 @@ #include #include -//Added by qt3to4: -#include -#include #include + #include #include #include @@ -57,8 +55,10 @@ EditCart::EditCart(unsigned number,QString *path,bool new_cart,bool profile_rip, QWidget *parent,const char *name,Q3ListView *lib_cart_list) - : QDialog(parent,"",true) + : QDialog(parent) { + setModal(true); + bool modification_allowed; rdcart_cart=NULL; rdcart_profile_rip=profile_rip; @@ -86,13 +86,14 @@ EditCart::EditCart(unsigned number,QString *path,bool new_cart,bool profile_rip, if(lib_cart_list_edit==NULL) { rdcart_cart=new RDCart(number); rdcart_import_path=path; - setCaption(QString().sprintf("%06u",rdcart_cart->number())+" - "+ - rdcart_cart->title()); + setWindowTitle("RDLibrary - "+tr("Edit Cart")+ + QString().sprintf(" %06u",rdcart_cart->number())+" ["+ + rdcart_cart->title()+"]"); modification_allowed= rda->user()->modifyCarts()&&rdcart_cart->owner().isEmpty(); } else { - setCaption("Edit Carts"); + setWindowTitle("RDLibrary - "+tr("Edit Carts [multiple]")); modification_allowed=true; } diff --git a/rdlibrary/edit_cart.h b/rdlibrary/edit_cart.h index 34ea22f0..8516bb6b 100644 --- a/rdlibrary/edit_cart.h +++ b/rdlibrary/edit_cart.h @@ -2,7 +2,7 @@ // // Edit a Rivendell Cart // -// (C) Copyright 2002,2016 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // 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 @@ -29,20 +29,17 @@ #include #include #include -#include #include #include -//Added by qt3to4: -#include -#include #include #include #include -#include -#include -#include +#include "audio_cart.h" +#include "audio_controls.h" +#include "globals.h" +#include "macro_cart.h" class EditCart : public QDialog diff --git a/rdlibrary/edit_macro.cpp b/rdlibrary/edit_macro.cpp index addfa39a..3e903fee 100644 --- a/rdlibrary/edit_macro.cpp +++ b/rdlibrary/edit_macro.cpp @@ -2,7 +2,7 @@ // // Edit a Rivendell Macro // -// (C) Copyright 2002-2004,2016 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -22,17 +22,16 @@ #include #include #include -//Added by qt3to4: -#include -#include #include -#include +#include "edit_macro.h" EditMacro::EditMacro(RDMacro *cmd,bool highlight,QWidget *parent) - : QDialog(parent,"",true) + : QDialog(parent) { + setModal(true); + // // Fix the Window Size // @@ -47,8 +46,6 @@ EditMacro::EditMacro(RDMacro *cmd,bool highlight,QWidget *parent) QFont button_font("Helvetica",12,QFont::Bold); button_font.setPixelSize(12); - setCaption(tr("Edit Macro")); - // // Text Validator // diff --git a/rdlibrary/edit_macro.h b/rdlibrary/edit_macro.h index ee2aa335..2210c846 100644 --- a/rdlibrary/edit_macro.h +++ b/rdlibrary/edit_macro.h @@ -2,7 +2,7 @@ // // Edit a Rivendell Macro // -// (C) Copyright 2002-2004,2016 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -24,9 +24,6 @@ #include #include #include -//Added by qt3to4: -#include -#include #include #include diff --git a/rdlibrary/edit_notes.cpp b/rdlibrary/edit_notes.cpp index 5b5e0fea..cdcb03bd 100644 --- a/rdlibrary/edit_notes.cpp +++ b/rdlibrary/edit_notes.cpp @@ -2,7 +2,7 @@ // // Edit Cart Notes. // -// (C) Copyright 2009,2016 Fred Gleason +// (C) Copyright 2009-2018 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -21,16 +21,16 @@ #include #include -#include -//Added by qt3to4: -#include +#include "edit_notes.h" EditNotes::EditNotes(RDCart *cart,QWidget *parent) - : QDialog(parent,"",true) + : QDialog(parent) { + setModal(true); + notes_cart=cart; - setCaption("RDLibrary - "+tr("Notes for cart")+ - QString().sprintf(" %06u - ",cart->number())+cart->title()); + setWindowTitle("RDLibrary - "+tr("Notes for cart")+ + QString().sprintf(" %06u [",cart->number())+cart->title()+"]"); // // Create Fonts diff --git a/rdlibrary/edit_notes.h b/rdlibrary/edit_notes.h index be141c59..87e6fbdb 100644 --- a/rdlibrary/edit_notes.h +++ b/rdlibrary/edit_notes.h @@ -2,7 +2,7 @@ // // Edit Cart Notes. // -// (C) Copyright 2009,2016 Fred Gleason +// (C) Copyright 2009-2018 Fred Gleason // // 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 @@ -25,8 +25,6 @@ #include #include #include -//Added by qt3to4: -#include #include diff --git a/rdlibrary/edit_schedulercodes.cpp b/rdlibrary/edit_schedulercodes.cpp index 7675d7b5..a8299edf 100644 --- a/rdlibrary/edit_schedulercodes.cpp +++ b/rdlibrary/edit_schedulercodes.cpp @@ -2,7 +2,8 @@ // // Edit the scheduler codes of a cart // -// Stefan Gabriel +// (C) Copyright Stefan Gabriel +// (C) Copyright 2002-2018 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -23,8 +24,6 @@ #include #include #include -//Added by qt3to4: -#include #include #include @@ -32,8 +31,10 @@ EditSchedulerCodes::EditSchedulerCodes(QString *sched_codes, QString *remove_codes,QWidget *parent) - : QDialog(parent,"",true) + : QDialog(parent) { + setModal(true); + edit_sched_codes=sched_codes; edit_remove_codes=remove_codes; @@ -55,7 +56,7 @@ EditSchedulerCodes::EditSchedulerCodes(QString *sched_codes, setMinimumHeight(sizeHint().height()); setMaximumHeight(sizeHint().height()); - setCaption(tr("Select Scheduler Codes")); + setWindowTitle("RDLibrary - "+tr("Select Scheduler Codes")); // // Create Fonts diff --git a/rdlibrary/edit_schedulercodes.h b/rdlibrary/edit_schedulercodes.h index fc91d728..1f987e79 100644 --- a/rdlibrary/edit_schedulercodes.h +++ b/rdlibrary/edit_schedulercodes.h @@ -2,7 +2,8 @@ // // Edit the scheduler codes of a cart // -// Stefan Gabriel +// (C) Copyright Stefan Gabriel +// (C) Copyright 2002-2018 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -24,8 +25,6 @@ #include #include #include -//Added by qt3to4: -#include #include diff --git a/rdlibrary/filter.cpp b/rdlibrary/filter.cpp index c7ccdb0d..9e67fcbe 100644 --- a/rdlibrary/filter.cpp +++ b/rdlibrary/filter.cpp @@ -2,7 +2,7 @@ // // Set Filter widget for RDLibrary. // -// (C) Copyright 2002,2016 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -33,8 +33,10 @@ #include Filter::Filter(QString *filter,QWidget *parent) - : QDialog(parent,"",true) + : QDialog(parent) { + setModal(true); + // // Fix the Window Size // @@ -52,7 +54,7 @@ Filter::Filter(QString *filter,QWidget *parent) button_font.setPixelSize(14); filter_text=filter; - setCaption(tr("Library Filter")); + setWindowTitle("RDLibrary - "+tr("Library Filter")); // // OK Button diff --git a/rdlibrary/filter.h b/rdlibrary/filter.h index d86720a9..a5e3fb43 100644 --- a/rdlibrary/filter.h +++ b/rdlibrary/filter.h @@ -2,7 +2,7 @@ // // Set Filter Widget for RDLibrary. // -// (C) Copyright 2002,2016 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // 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 diff --git a/rdlibrary/lib_listview.cpp b/rdlibrary/lib_listview.cpp index 61773307..582592d9 100644 --- a/rdlibrary/lib_listview.cpp +++ b/rdlibrary/lib_listview.cpp @@ -2,7 +2,7 @@ // // A drag & drop QListView widget for Rivendell's RDLibrary // -// (C) Copyright 2002-2013,2016 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // 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,11 +21,10 @@ #include -#include #include -#include -//Added by qt3to4: -#include + +#include "globals.h" +#include "lib_listview.h" LibListView::LibListView(QWidget *parent) : RDListView(parent) diff --git a/rdlibrary/lib_listview.h b/rdlibrary/lib_listview.h index 9bebda35..e7d70483 100644 --- a/rdlibrary/lib_listview.h +++ b/rdlibrary/lib_listview.h @@ -2,7 +2,7 @@ // // A drag & drop QListView widget for Rivendell's RDLibrary // -// (C) Copyright 2002-2013,2016 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -17,14 +17,11 @@ // License along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// #ifndef LIB_LISTVIEW_H #define LIB_LISTVIEW_H #include -//Added by qt3to4: -#include class LibListView : public RDListView { diff --git a/rdlibrary/list_reports.cpp b/rdlibrary/list_reports.cpp index 28078e47..2b4ea798 100644 --- a/rdlibrary/list_reports.cpp +++ b/rdlibrary/list_reports.cpp @@ -2,7 +2,7 @@ // // List RDLibrary Reports // -// (C) Copyright 2002-2006,2016-2018 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // 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,8 +21,6 @@ #include #include #include -//Added by qt3to4: -#include #include #include @@ -38,8 +36,10 @@ ListReports::ListReports(const QString &filter,const QString &type_filter, const QString &group,const QString &schedcode, QWidget *parent) - : QDialog(parent,"",true) + : QDialog(parent) { + setModal(true); + list_filter=filter; list_type_filter=type_filter; list_group=group; @@ -53,7 +53,7 @@ ListReports::ListReports(const QString &filter,const QString &type_filter, setMinimumHeight(sizeHint().height()); setMaximumHeight(sizeHint().height()); - setCaption(tr("RDLibrary Reports")); + setWindowTitle("RDLibrary - "+tr("Select Report")); // // Create Fonts diff --git a/rdlibrary/list_reports.h b/rdlibrary/list_reports.h index 617264f7..2e7e4d14 100644 --- a/rdlibrary/list_reports.h +++ b/rdlibrary/list_reports.h @@ -2,7 +2,7 @@ // // List and Generate RDLibrary Reports // -// (C) Copyright 2002-2006,2016 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // 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 @@ -25,11 +25,9 @@ #include #include #include -#include #include - class ListReports : public QDialog { Q_OBJECT diff --git a/rdlibrary/macro_cart.cpp b/rdlibrary/macro_cart.cpp index ef172773..e44a2dc0 100644 --- a/rdlibrary/macro_cart.cpp +++ b/rdlibrary/macro_cart.cpp @@ -2,7 +2,7 @@ // // The macro cart editor for RDLibrary. // -// (C) Copyright 2002-2004,2016 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // 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 @@ -18,10 +18,9 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include -//Added by qt3to4: -#include #include + +#include #include #include #include @@ -32,7 +31,6 @@ #include #include #include -#include #include #include diff --git a/rdlibrary/macro_cart.h b/rdlibrary/macro_cart.h index fc154f71..e4ecd7eb 100644 --- a/rdlibrary/macro_cart.h +++ b/rdlibrary/macro_cart.h @@ -2,7 +2,7 @@ // // The macro cart editor for RDLibrary. // -// (C) Copyright 2002-2004,2016 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // 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 @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/rdlibrary/rdlibrary.cpp b/rdlibrary/rdlibrary.cpp index 77c7f100..5ae779d6 100644 --- a/rdlibrary/rdlibrary.cpp +++ b/rdlibrary/rdlibrary.cpp @@ -2,7 +2,7 @@ // // The Library Utility for Rivendell. // -// (C) Copyright 2002-2010,2016-2018 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // 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 @@ -37,10 +37,6 @@ #include #include #include -//Added by qt3to4: -#include -#include -#include #include #include @@ -126,7 +122,7 @@ MainWidget::MainWidget(QWidget *parent) lib_macro_map=new QPixmap(rml5_xpm); lib_track_cart_map=new QPixmap(track_cart_xpm); lib_rivendell_map=new QPixmap(rdlibrary_22x22_xpm); - setIcon(*lib_rivendell_map); + setWindowIcon(*lib_rivendell_map); // // Progress Dialog @@ -1400,7 +1396,7 @@ void MainWidget::SetCaption(QString user) str1=QString("RDLibrary")+" v"+VERSION+" - "+tr("Host")+":"; str2=tr("User")+":"; - setCaption(str1+" "+rda->config()->stationName()+", "+str2+" "+user); + setWindowTitle(str1+" "+rda->config()->stationName()+", "+str2+" "+user); } @@ -1436,8 +1432,8 @@ QString MainWidget::GeometryFile() { void MainWidget::LoadGeometry() { - QString geometry_file = GeometryFile(); - if(geometry_file==NULL) { + QString geometry_file=GeometryFile(); + if(geometry_file.isEmpty()) { return; } RDProfile *profile=new RDProfile(); @@ -1455,8 +1451,8 @@ void MainWidget::LoadGeometry() void MainWidget::SaveGeometry() { - QString geometry_file = GeometryFile(); - if(geometry_file==NULL) { + QString geometry_file=GeometryFile(); + if(geometry_file.isEmpty()) { return; } FILE *file=fopen(geometry_file,"w"); diff --git a/rdlibrary/rdlibrary.h b/rdlibrary/rdlibrary.h index f6da32b4..8cecc812 100644 --- a/rdlibrary/rdlibrary.h +++ b/rdlibrary/rdlibrary.h @@ -1,8 +1,8 @@ // rdlibrary.h // -// The Production Utility for Rivendell. +// Library Utility for Rivendell. // -// (C) Copyright 2002-2004,2016-2018 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // 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 @@ -25,9 +25,6 @@ #include #include #include -//Added by qt3to4: -#include -#include #include #include #include @@ -46,9 +43,9 @@ #include -#include -#include -//#include +//#include "cart_tip.h" +#include "disk_gauge.h" +#include "lib_listview.h" #define RDLIBRARY_GEOMETRY_FILE ".rdlibrary" #define RDLIBRARY_STEP_SIZE 5000 diff --git a/rdlibrary/rdlibrary_cs.ts b/rdlibrary/rdlibrary_cs.ts index fbe362f1..b853869b 100644 --- a/rdlibrary/rdlibrary_cs.ts +++ b/rdlibrary/rdlibrary_cs.ts @@ -415,6 +415,10 @@ vytahování Unable to create temporary directory! + + Rip CD + Vytáhnout z CD + DiskRipper @@ -908,12 +912,20 @@ poznámky Duplicate Cut Order + + Edit Carts [multiple] + + + + Edit Cart + + EditMacro Edit Macro - Upravit makro + Upravit makro &OK @@ -995,10 +1007,6 @@ poznámky ListReports - - RDLibrary Reports - - Cart Report @@ -1035,6 +1043,10 @@ poznámky Prepend Field Names + + Select Report + + MacroCart @@ -1355,7 +1367,7 @@ Přesto smazat? RecordCut RDLibrary - Record - RDLibrary - Nahrávání + RDLibrary - Nahrávání &Description @@ -1603,5 +1615,9 @@ Přesto uložit? Source + + Cut Info / Record + + diff --git a/rdlibrary/rdlibrary_de.ts b/rdlibrary/rdlibrary_de.ts index 34afd60b..aaee826d 100644 --- a/rdlibrary/rdlibrary_de.ts +++ b/rdlibrary/rdlibrary_de.ts @@ -415,6 +415,10 @@ abbrechen Unable to create temporary directory! + + Rip CD + CD rippen + DiskRipper @@ -896,12 +900,20 @@ Notes Duplicate Cut Order + + Edit Carts [multiple] + + + + Edit Cart + + EditMacro Edit Macro - Makro editieren + Makro editieren &OK @@ -983,10 +995,6 @@ Notes ListReports - - RDLibrary Reports - - Cart Report @@ -1023,6 +1031,10 @@ Notes Prepend Field Names + + Select Report + + MacroCart @@ -1332,7 +1344,7 @@ verwendet. Trotzdem löschen? RecordCut RDLibrary - Record - RDLibrary - Aufnahme + RDLibrary - Aufnahme &Description @@ -1580,5 +1592,9 @@ Trotzdem speichern? Source + + Cut Info / Record + + diff --git a/rdlibrary/rdlibrary_es.ts b/rdlibrary/rdlibrary_es.ts index 9c9800a4..3d9f8c72 100644 --- a/rdlibrary/rdlibrary_es.ts +++ b/rdlibrary/rdlibrary_es.ts @@ -415,6 +415,10 @@ Lectura Unable to create temporary directory! + + Rip CD + Leer CD + DiskRipper @@ -897,12 +901,20 @@ Notas Duplicate Cut Order + + Edit Carts [multiple] + + + + Edit Cart + + EditMacro Edit Macro - Editar macro + Editar macro &OK @@ -986,7 +998,7 @@ Notas ListReports RDLibrary Reports - Reportes de RDLibrary + Reportes de RDLibrary Cart Report @@ -1028,6 +1040,10 @@ Notas Prepend Field Names + + Select Report + + MacroCart @@ -1337,7 +1353,7 @@ Do you still want to delete it? RecordCut RDLibrary - Record - RDLibrary - Grabar + RDLibrary - Grabar &Description @@ -1585,5 +1601,9 @@ Do you still want to save? Source + + Cut Info / Record + + diff --git a/rdlibrary/rdlibrary_fr.ts b/rdlibrary/rdlibrary_fr.ts index f48d0f9a..b13acfb1 100644 --- a/rdlibrary/rdlibrary_fr.ts +++ b/rdlibrary/rdlibrary_fr.ts @@ -355,6 +355,10 @@ Rip Unable to create temporary directory! + + Rip CD + + DiskRipper @@ -766,13 +770,17 @@ Notes Duplicate Cut Order + + Edit Carts [multiple] + + + + Edit Cart + + EditMacro - - Edit Macro - - &OK @@ -853,10 +861,6 @@ Notes ListReports - - RDLibrary Reports - - Cart Report @@ -893,6 +897,10 @@ Notes Prepend Field Names + + Select Report + + MacroCart @@ -1167,10 +1175,6 @@ Do you still want to delete it? RecordCut - - RDLibrary - Record - - &Description @@ -1406,5 +1410,9 @@ Do you still want to save? Source + + Cut Info / Record + + diff --git a/rdlibrary/rdlibrary_nb.ts b/rdlibrary/rdlibrary_nb.ts index 0e9b2b17..ca20f758 100644 --- a/rdlibrary/rdlibrary_nb.ts +++ b/rdlibrary/rdlibrary_nb.ts @@ -409,6 +409,10 @@ Rip Unable to create temporary directory! + + Rip CD + Ripp CD + DiskRipper @@ -892,12 +896,20 @@ Notes Duplicate Cut Order + + Edit Carts [multiple] + + + + Edit Cart + + EditMacro Edit Macro - Rediger makro + Rediger makro &OK @@ -979,10 +991,6 @@ Notes ListReports - - RDLibrary Reports - - Cart Report @@ -1019,6 +1027,10 @@ Notes Prepend Field Names + + Select Report + + MacroCart @@ -1328,7 +1340,7 @@ Vil du sletta ho likevel? RecordCut RDLibrary - Record - RDLibrary - Opptak + RDLibrary - Opptak &Description @@ -1576,5 +1588,9 @@ Vil du lagra likevel? Source + + Cut Info / Record + + diff --git a/rdlibrary/rdlibrary_nn.ts b/rdlibrary/rdlibrary_nn.ts index 0e9b2b17..ca20f758 100644 --- a/rdlibrary/rdlibrary_nn.ts +++ b/rdlibrary/rdlibrary_nn.ts @@ -409,6 +409,10 @@ Rip Unable to create temporary directory! + + Rip CD + Ripp CD + DiskRipper @@ -892,12 +896,20 @@ Notes Duplicate Cut Order + + Edit Carts [multiple] + + + + Edit Cart + + EditMacro Edit Macro - Rediger makro + Rediger makro &OK @@ -979,10 +991,6 @@ Notes ListReports - - RDLibrary Reports - - Cart Report @@ -1019,6 +1027,10 @@ Notes Prepend Field Names + + Select Report + + MacroCart @@ -1328,7 +1340,7 @@ Vil du sletta ho likevel? RecordCut RDLibrary - Record - RDLibrary - Opptak + RDLibrary - Opptak &Description @@ -1576,5 +1588,9 @@ Vil du lagra likevel? Source + + Cut Info / Record + + diff --git a/rdlibrary/rdlibrary_pt_BR.ts b/rdlibrary/rdlibrary_pt_BR.ts index e31671e6..0823d318 100644 --- a/rdlibrary/rdlibrary_pt_BR.ts +++ b/rdlibrary/rdlibrary_pt_BR.ts @@ -410,6 +410,10 @@ Rip Unable to create temporary directory! + + Rip CD + Extrair CD + DiskRipper @@ -894,12 +898,20 @@ limite do sistema! Você ainda quer salvar? Duplicate Cut Order + + Edit Carts [multiple] + + + + Edit Cart + + EditMacro Edit Macro - Editar Macro + Editar Macro &OK @@ -981,10 +993,6 @@ limite do sistema! Você ainda quer salvar? ListReports - - RDLibrary Reports - - Cart Report @@ -1021,6 +1029,10 @@ limite do sistema! Você ainda quer salvar? Prepend Field Names + + Select Report + + MacroCart @@ -1330,7 +1342,7 @@ Você ainda quer deletá-lo? RecordCut RDLibrary - Record - RDBiblio - Gravacão + RDBiblio - Gravacão &Description @@ -1578,5 +1590,9 @@ Você ainda quer salvar? Source + + Cut Info / Record + + diff --git a/rdlibrary/record_cut.cpp b/rdlibrary/record_cut.cpp index f5a3f6b2..195dae2b 100644 --- a/rdlibrary/record_cut.cpp +++ b/rdlibrary/record_cut.cpp @@ -2,7 +2,7 @@ // // Record a Rivendell Cut // -// (C) Copyright 2002-2004,2014-2018 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // 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 @@ -25,12 +25,6 @@ #include #include #include -#include -//Added by qt3to4: -#include -#include -#include -#include #include #include @@ -42,8 +36,10 @@ #include "record_cut.h" RecordCut::RecordCut(RDCart *cart,QString cut,bool use_weight,QWidget *parent) - : QDialog(parent,"",true) + : QDialog(parent) { + setModal(true); + bool valid; bool is_track=cart->owner().isEmpty(); bool allow_modification=rda->user()->modifyCarts()&&is_track; @@ -72,7 +68,7 @@ RecordCut::RecordCut(RDCart *cart,QString cut,bool use_weight,QWidget *parent) QFont day_font=QFont("helvetica",10,QFont::Normal); day_font.setPixelSize(10); - setCaption(tr("RDLibrary - Record")); + setWindowTitle("RDLibrary - "+tr("Cut Info / Record")); rec_cut=new RDCut(cut); is_playing=false; is_ready=false; @@ -112,17 +108,17 @@ RecordCut::RecordCut(RDCart *cart,QString cut,bool use_weight,QWidget *parent) rec_card_no[1]=rda->libraryConf()->outputCard(); rec_name=rec_cut->cutName(); switch(rec_cut->codingFormat()) { - case 0: - rec_format=RDCae::Pcm16; - break; + case 0: + rec_format=RDCae::Pcm16; + break; - case 1: - rec_format=RDCae::MpegL2; - break; + case 1: + rec_format=RDCae::MpegL2; + break; - default: - rec_format=RDCae::Pcm16; - break; + default: + rec_format=RDCae::Pcm16; + break; } rec_channels=rec_cut->channels(); rec_samprate=rec_cut->sampleRate(); @@ -229,24 +225,23 @@ RecordCut::RecordCut(RDCart *cart,QString cut,bool use_weight,QWidget *parent) // // Cut Air Date Times // - cut_killdatetime_label=new QLabel(tr("Air Date/Time"),this); - cut_killdatetime_label->setAlignment(Qt::AlignHCenter); - cut_killdatetime_label->setFont(font); - Q3ButtonGroup *button_group=new Q3ButtonGroup(this); - button_group->hide(); - connect(button_group,SIGNAL(clicked(int)),this,SLOT(airDateButtonData(int))); - cut_startdatetime_enable_button=new QRadioButton(tr("Enabled"),this, - "air_date_enabled_button"); - button_group->insert(cut_startdatetime_enable_button,true); + cut_killdatetime_groupbox=new QGroupBox(tr("Air Date/Time"),this); + cut_killdatetime_groupbox->setFont(font); + cut_killdatetime_group=new QButtonGroup(this); + connect(cut_killdatetime_group,SIGNAL(buttonClicked(int)), + this,SLOT(airDateButtonData(int))); + cut_startdatetime_enable_button=new QRadioButton(tr("Enabled"),this); + cut_killdatetime_group->addButton(cut_startdatetime_enable_button,true); cut_startdatetime_disable_button=new QRadioButton(tr("Disabled"),this); - button_group->insert(cut_startdatetime_disable_button,false); + cut_killdatetime_group->addButton(cut_startdatetime_disable_button,false); - cut_startdatetime_edit=new Q3DateTimeEdit(this); + cut_startdatetime_edit=new QDateTimeEdit(this); + cut_startdatetime_edit->setDisplayFormat("MM/dd/yyyy - hh:mm:ss"); cut_startdatetime_label=new QLabel(cut_startdatetime_edit,tr("&Start"),this); cut_startdatetime_label->setFont(small_font); cut_startdatetime_label->setAlignment(Qt::AlignRight); - - cut_enddatetime_edit=new Q3DateTimeEdit(this); + cut_enddatetime_edit=new QDateTimeEdit(this); + cut_enddatetime_edit->setDisplayFormat("MM/dd/yyyy - hh:mm:ss"); cut_enddatetime_label=new QLabel(cut_enddatetime_edit,tr("End"),this); cut_enddatetime_label->setFont(small_font); cut_enddatetime_label->setAlignment(Qt::AlignRight); @@ -254,23 +249,24 @@ RecordCut::RecordCut(RDCart *cart,QString cut,bool use_weight,QWidget *parent) // // Cut Daypart // - cut_daypart_label=new QLabel(tr("Daypart"),this); - cut_daypart_label->setAlignment(Qt::AlignHCenter); - cut_daypart_label->setFont(font); - button_group=new Q3ButtonGroup(this); - button_group->hide(); - connect(button_group,SIGNAL(clicked(int)),this,SLOT(daypartButtonData(int))); + cut_daypart_groupbox=new QGroupBox(tr("Daypart"),this); + cut_daypart_groupbox->setFont(font); + cut_daypart_group=new QButtonGroup(this); + connect(cut_daypart_group,SIGNAL(buttonClicked(int)), + this,SLOT(daypartButtonData(int))); cut_starttime_enable_button=new QRadioButton(tr("Enabled"),this); - button_group->insert(cut_starttime_enable_button,true); + cut_daypart_group->addButton(cut_starttime_enable_button,true); cut_starttime_disable_button=new QRadioButton(tr("Disabled"),this); - button_group->insert(cut_starttime_disable_button,false); + cut_daypart_group->addButton(cut_starttime_disable_button,false); - cut_starttime_edit=new RDTimeEdit(this); + cut_starttime_edit=new QTimeEdit(this); + cut_starttime_edit->setDisplayFormat("hh:mm:ss"); cut_starttime_label=new QLabel(cut_starttime_edit,tr("&Start Time"),this); cut_starttime_label->setFont(small_font); cut_starttime_label->setAlignment(Qt::AlignRight); - cut_endtime_edit=new RDTimeEdit(this); + cut_endtime_edit=new QTimeEdit(this); + cut_endtime_edit->setDisplayFormat("hh:mm:ss"); cut_endtime_label=new QLabel(cut_endtime_edit,tr("End Time"),this); cut_endtime_label->setFont(small_font); cut_endtime_label->setAlignment(Qt::AlignRight); @@ -278,9 +274,8 @@ RecordCut::RecordCut(RDCart *cart,QString cut,bool use_weight,QWidget *parent) // // Days of the Week // - rec_dayofweek_label=new QLabel(tr("Day of the Week"),this); - rec_dayofweek_label->setAlignment(Qt::AlignHCenter); - rec_dayofweek_label->setFont(font); + rec_dayofweek_groupbox=new QGroupBox(tr("Day of the Week"),this); + rec_dayofweek_groupbox->setFont(font); rec_weekpart_button[0]=new QCheckBox(this); rec_weekpart_label[0]=new QLabel(rec_weekpart_button[0],tr("Monday"),this); rec_weekpart_label[0]->setFont(day_font); @@ -461,9 +456,9 @@ RecordCut::RecordCut(RDCart *cart,QString cut,bool use_weight,QWidget *parent) cut_startdatetime_disable_button->setChecked(!valid); airDateButtonData(valid); cut_starttime_edit->setTime(rec_cut->startDaypart(&valid)); - cut_endtime_edit->setTime(rec_cut->endDaypart(&valid)); cut_starttime_enable_button->setChecked(valid); cut_starttime_disable_button->setChecked(!valid); + cut_endtime_edit->setTime(rec_cut->endDaypart(&valid)); daypartButtonData(valid); for(int i=0;i<7;i++) { if(rec_cut->weekPart(i+1)) { @@ -507,20 +502,20 @@ RecordCut::RecordCut(RDCart *cart,QString cut,bool use_weight,QWidget *parent) if(!allow_modification) { cut_weight_box->setRange(cut_weight_box->value(),cut_weight_box->value()); if(cut_startdatetime_enable_button->isChecked()) { - cut_startdatetime_edit->dateEdit()-> - setRange(cut_startdatetime_edit->dateEdit()->date(), - cut_startdatetime_edit->dateEdit()->date()); - cut_startdatetime_edit->timeEdit()-> - setRange(cut_startdatetime_edit->timeEdit()->time(), - cut_startdatetime_edit->timeEdit()->time()); - cut_enddatetime_edit->dateEdit()-> - setRange(cut_enddatetime_edit->dateEdit()->date(), - cut_enddatetime_edit->dateEdit()->date()); + cut_startdatetime_edit-> + setDateRange(cut_startdatetime_edit->date(), + cut_startdatetime_edit->date()); + cut_startdatetime_edit-> + setTimeRange(cut_startdatetime_edit->time(), + cut_startdatetime_edit->time()); + cut_enddatetime_edit-> + setDateRange(cut_enddatetime_edit->date(), + cut_enddatetime_edit->date()); } if(cut_starttime_enable_button->isChecked()) { - cut_enddatetime_edit->timeEdit()-> - setRange(cut_enddatetime_edit->timeEdit()->time(), - cut_enddatetime_edit->timeEdit()->time()); + cut_enddatetime_edit-> + setTimeRange(cut_enddatetime_edit->time(), + cut_enddatetime_edit->time()); } } rec_evergreen_box->setEnabled(allow_modification); @@ -656,25 +651,25 @@ void RecordCut::recordData() cart->removeCutAudio(rda->station(),rda->user(),rec_cut->cutName(),rda->config()); delete cart; switch(rda->libraryConf()->defaultFormat()) { - case 0: - rec_cut->setCodingFormat(0); - rec_format=RDCae::Pcm16; - break; + case 0: + rec_cut->setCodingFormat(0); + rec_format=RDCae::Pcm16; + break; - case 1: - rec_cut->setCodingFormat(1); - rec_format=RDCae::MpegL2; - break; + case 1: + rec_cut->setCodingFormat(1); + rec_format=RDCae::MpegL2; + break; - case 2: - rec_cut->setCodingFormat(2); - rec_format=RDCae::Pcm24; - break; + case 2: + rec_cut->setCodingFormat(2); + rec_format=RDCae::Pcm24; + break; - default: - rec_cut->setCodingFormat(0); - rec_format=RDCae::Pcm16; - break; + default: + rec_cut->setCodingFormat(0); + rec_format=RDCae::Pcm16; + break; } rec_samprate=rda->system()->sampleRate(); rec_cut->setSampleRate(rec_samprate); @@ -876,12 +871,12 @@ void RecordCut::closeData() switch(QMessageBox::warning(this,tr("Invalid Date"), tr("The End Date has already passed!\nDo you still want to save?"), QMessageBox::Yes,QMessageBox::No)) { - case QMessageBox::No: - case QMessageBox::NoButton: - return; + case QMessageBox::No: + case QMessageBox::NoButton: + return; - default: - break; + default: + break; } } } @@ -1009,21 +1004,21 @@ void RecordCut::evergreenToggledData(bool state) { cut_weight_label->setDisabled(state); cut_weight_box->setDisabled(state); - cut_killdatetime_label->setDisabled(state); + cut_killdatetime_groupbox->setDisabled(state); cut_startdatetime_enable_button->setDisabled(state); cut_startdatetime_disable_button->setDisabled(state); cut_startdatetime_label->setDisabled(state); cut_startdatetime_edit->setDisabled(state); cut_enddatetime_edit->setDisabled(state); cut_enddatetime_label->setDisabled(state); - cut_daypart_label->setDisabled(state); + cut_daypart_groupbox->setDisabled(state); cut_starttime_enable_button->setDisabled(state); cut_starttime_disable_button->setDisabled(state); cut_starttime_edit->setDisabled(state); cut_starttime_label->setDisabled(state); cut_endtime_edit->setDisabled(state); cut_endtime_label->setDisabled(state); - rec_dayofweek_label->setDisabled(state); + rec_dayofweek_groupbox->setDisabled(state); for(int i=0;i<7;i++) { rec_weekpart_button[i]->setDisabled(state); rec_weekpart_label[i]->setDisabled(state); @@ -1075,7 +1070,8 @@ void RecordCut::resizeEvent(QResizeEvent *e) cut_startdatetime_enable_button->setGeometry(40,223,100,20); cut_startdatetime_disable_button->setGeometry(40,243,100,20); - cut_killdatetime_label->setGeometry(50,201,100,19); + cut_killdatetime_groupbox->setGeometry(30,203,size().width()-60,65); + cut_startdatetime_label->setGeometry(120,226,40,12); cut_startdatetime_edit->setGeometry(165,222,170,19); cut_enddatetime_label->setGeometry(120,245,40,12); @@ -1083,13 +1079,13 @@ void RecordCut::resizeEvent(QResizeEvent *e) cut_starttime_enable_button->setGeometry(57,303,100,20); cut_starttime_disable_button->setGeometry(57,323,100,20); - cut_daypart_label->setGeometry(50,281,65,19); + cut_daypart_groupbox->setGeometry(37,283,size().width()-64,62); cut_starttime_label->setGeometry(137,306,80,12); cut_starttime_edit->setGeometry(222,302,90,19); cut_endtime_label->setGeometry(137,326,80,12); cut_endtime_edit->setGeometry(222,322,90,19); - rec_dayofweek_label->setGeometry(50,361,125,19); + rec_dayofweek_groupbox->setGeometry(20,359,size().width()-35,85); rec_weekpart_label[0]->setGeometry(62,378,80,20); rec_weekpart_button[0]->setGeometry(40,380,15,15); rec_weekpart_label[1]->setGeometry(142,378,80,20); @@ -1104,8 +1100,8 @@ void RecordCut::resizeEvent(QResizeEvent *e) rec_weekpart_button[5]->setGeometry(80,420,15,15); rec_weekpart_label[6]->setGeometry(202,418,80,20); rec_weekpart_button[6]->setGeometry(180,420,15,15); - rec_set_button->setGeometry(sizeHint().width()-80,371,55,30); - rec_clear_button->setGeometry(sizeHint().width()-80,409,55,30); + rec_set_button->setGeometry(size().width()-80,372,55,30); + rec_clear_button->setGeometry(size().width()-80,410,55,30); rec_meter->setGeometry(20,453,rec_meter->geometry().width(), rec_meter->geometry().height()); @@ -1131,28 +1127,6 @@ void RecordCut::resizeEvent(QResizeEvent *e) } -void RecordCut::paintEvent(QPaintEvent *e) -{ - QPainter *p=new QPainter(this); - if(rec_evergreen_box->isChecked()) { - p->setPen(palette().color(QPalette::Disabled,QColorGroup::Foreground)); - } - else { - p->setPen(palette().color(QPalette::Active,QColorGroup::Foreground)); - } - p->drawRect(30,208,sizeHint().width()-60,60); - p->drawRect(37,288,sizeHint().width()-74,60); - p->drawRect(20,369,sizeHint().width()-40,75); - - /* - p->drawRect(30,275,sizeHint().width()-60,60); - p->drawRect(37,355,sizeHint().width()-74,60); - p->drawRect(20,436,sizeHint().width()-40,75); - */ - p->end(); -} - - void RecordCut::closeEvent(QCloseEvent *e) { closeData(); diff --git a/rdlibrary/record_cut.h b/rdlibrary/record_cut.h index 843815a7..2d220212 100644 --- a/rdlibrary/record_cut.h +++ b/rdlibrary/record_cut.h @@ -2,7 +2,7 @@ // // Record a Rivendell cut. // -// (C) Copyright 2002-2004,2016 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -23,19 +23,17 @@ #define RECORD_CUT_TIMER_INTERVAL 100 +#include +#include +#include +#include #include +#include +#include #include #include -#include -#include -#include #include #include -#include -//Added by qt3to4: -#include -#include -#include #include #include @@ -45,7 +43,7 @@ #include #include -#include +#include "globals.h" class RecordCut : public QDialog { @@ -80,7 +78,6 @@ class RecordCut : public QDialog protected: void resizeEvent(QResizeEvent *e); - void paintEvent(QPaintEvent *e); void closeEvent(QCloseEvent *e); private: @@ -107,19 +104,22 @@ class RecordCut : public QDialog QLineEdit *cut_playdate_edit; QLabel *cut_playcounter_label; QLineEdit *cut_playcounter_edit; - QLabel *cut_killdatetime_label; + QGroupBox *cut_killdatetime_groupbox; + QButtonGroup *cut_killdatetime_group; QRadioButton *cut_startdatetime_enable_button; QRadioButton *cut_startdatetime_disable_button; QLabel *cut_startdatetime_label; - Q3DateTimeEdit *cut_startdatetime_edit; + QGroupBox *cut_startdatetime_groupbox; + QDateTimeEdit *cut_startdatetime_edit; QLabel *cut_enddatetime_label; - Q3DateTimeEdit *cut_enddatetime_edit; - QLabel *cut_daypart_label; + QDateTimeEdit *cut_enddatetime_edit; + QGroupBox *cut_daypart_groupbox; + QButtonGroup *cut_daypart_group; QRadioButton *cut_starttime_enable_button; QRadioButton *cut_starttime_disable_button; - RDTimeEdit *cut_starttime_edit; + QTimeEdit *cut_starttime_edit; QLabel *cut_starttime_label; - RDTimeEdit *cut_endtime_edit; + QTimeEdit *cut_endtime_edit; QLabel *cut_endtime_label; QTimer *rec_timer; QLabel *rec_timer_label; @@ -137,7 +137,7 @@ class RecordCut : public QDialog QComboBox *rec_mode_box; QLabel *rec_trim_box_label; QComboBox *rec_trim_box; - QLabel *rec_dayofweek_label; + QGroupBox *rec_dayofweek_groupbox; QPushButton *rec_set_button; QPushButton *rec_clear_button; QCheckBox *rec_weekpart_button[7]; diff --git a/rdlibrary/validate_cut.cpp b/rdlibrary/validate_cut.cpp index 8298998b..e7dafefe 100644 --- a/rdlibrary/validate_cut.cpp +++ b/rdlibrary/validate_cut.cpp @@ -2,7 +2,7 @@ // // Validate a Rivendell Audio Cut // -// (C) Copyright 2006,2016-2018 Fred Gleason +// (C) Copyright 2006-2018 Fred Gleason // // 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 @@ -18,9 +18,10 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include #include +#include "validate_cut.h" + QString ValidateCutFields() { QString sql; diff --git a/rdlibrary/validate_cut.h b/rdlibrary/validate_cut.h index c9ef2a36..b4efb16e 100644 --- a/rdlibrary/validate_cut.h +++ b/rdlibrary/validate_cut.h @@ -2,7 +2,7 @@ // // Validate a Rivendell Audio Cut // -// (C) Copyright 2006,2016 Fred Gleason +// (C) Copyright 2006-2018 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -21,7 +21,6 @@ #ifndef VALIDATE_CUT_H #define VALIDATE_CUT_H -#include #include #include