From f18dacf40842b4b3bd087955f7c54052e25b4e40 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Tue, 1 Oct 2019 11:17:23 -0400 Subject: [PATCH] 2019-10-01 Fred Gleason * Added an 'RDDialog' class. * Added an 'RDWidget' class. * Refactored rdadmin(1) to use 'RDDialog' and 'RDWidget' base classes. --- ChangeLog | 5 + conf/rd.conf-sample | 19 +++ lib/Makefile.am | 6 +- lib/lib.pro | 4 + lib/rdconfig.cpp | 33 +++++ lib/rdconfig.h | 8 ++ lib/rddialog.cpp | 113 +++++++++++++++ lib/rddialog.h | 54 +++++++ lib/rdlivewire.cpp | 4 +- lib/rdwidget.cpp | 114 +++++++++++++++ lib/rdwidget.h | 54 +++++++ rdadmin/add_feed.cpp | 19 +-- rdadmin/add_feed.h | 7 +- rdadmin/add_group.cpp | 25 ++-- rdadmin/add_group.h | 7 +- rdadmin/add_hostvar.cpp | 21 +-- rdadmin/add_hostvar.h | 6 +- rdadmin/add_matrix.cpp | 19 +-- rdadmin/add_matrix.h | 6 +- rdadmin/add_replicator.cpp | 23 +-- rdadmin/add_replicator.h | 7 +- rdadmin/add_report.cpp | 19 +-- rdadmin/add_report.h | 6 +- rdadmin/add_schedcodes.cpp | 41 +++--- rdadmin/add_schedcodes.h | 11 +- rdadmin/add_station.cpp | 19 +-- rdadmin/add_station.h | 6 +- rdadmin/add_svc.cpp | 19 +-- rdadmin/add_svc.h | 6 +- rdadmin/add_user.cpp | 17 +-- rdadmin/add_user.h | 6 +- rdadmin/autofill_carts.cpp | 24 +--- rdadmin/autofill_carts.h | 6 +- rdadmin/edit_audios.cpp | 29 ++-- rdadmin/edit_audios.h | 6 +- rdadmin/edit_cartslots.cpp | 53 +++---- rdadmin/edit_cartslots.h | 6 +- rdadmin/edit_channelgpios.cpp | 28 ++-- rdadmin/edit_channelgpios.h | 6 +- rdadmin/edit_decks.cpp | 40 +++--- rdadmin/edit_decks.h | 6 +- rdadmin/edit_dropbox.cpp | 134 +++++++++--------- rdadmin/edit_dropbox.h | 6 +- rdadmin/edit_endpoint.cpp | 26 ++-- rdadmin/edit_endpoint.h | 8 +- rdadmin/edit_feed.cpp | 104 ++++++-------- rdadmin/edit_feed.h | 6 +- rdadmin/edit_feed_perms.cpp | 15 +- rdadmin/edit_feed_perms.h | 7 +- rdadmin/edit_gpi.cpp | 77 +++------- rdadmin/edit_gpi.h | 18 +-- rdadmin/edit_group.cpp | 52 +++---- rdadmin/edit_group.h | 6 +- rdadmin/edit_hostvar.cpp | 25 ++-- rdadmin/edit_hostvar.h | 8 +- rdadmin/edit_hotkeys.cpp | 84 +++++------ rdadmin/edit_hotkeys.h | 15 +- rdadmin/edit_jack.cpp | 36 ++--- rdadmin/edit_jack.h | 6 +- rdadmin/edit_jack_client.cpp | 20 +-- rdadmin/edit_jack_client.h | 6 +- rdadmin/edit_livewiregpio.cpp | 25 ++-- rdadmin/edit_livewiregpio.h | 6 +- rdadmin/edit_matrix.cpp | 130 ++++++++--------- rdadmin/edit_matrix.h | 8 +- rdadmin/edit_node.cpp | 42 ++---- rdadmin/edit_node.h | 6 +- rdadmin/edit_pypad.cpp | 19 +-- rdadmin/edit_pypad.h | 7 +- rdadmin/edit_rdairplay.cpp | 161 ++++++++++++++------- rdadmin/edit_rdairplay.h | 6 +- rdadmin/edit_rdlibrary.cpp | 212 ++++++++++++++++------------ rdadmin/edit_rdlibrary.h | 10 +- rdadmin/edit_rdlogedit.cpp | 133 +++++++++-------- rdadmin/edit_rdlogedit.h | 11 +- rdadmin/edit_rdpanel.cpp | 80 +++++------ rdadmin/edit_rdpanel.h | 16 +-- rdadmin/edit_replicator.cpp | 56 +++----- rdadmin/edit_replicator.h | 16 +-- rdadmin/edit_report.cpp | 204 ++++++++++---------------- rdadmin/edit_report.h | 12 +- rdadmin/edit_sas_resource.cpp | 38 ++--- rdadmin/edit_sas_resource.h | 14 +- rdadmin/edit_schedcodes.cpp | 83 +++++------ rdadmin/edit_schedcodes.h | 23 ++- rdadmin/edit_settings.cpp | 97 ++++++------- rdadmin/edit_settings.h | 15 +- rdadmin/edit_station.cpp | 176 +++++++++++------------ rdadmin/edit_station.h | 21 ++- rdadmin/edit_svc.cpp | 55 ++------ rdadmin/edit_svc.h | 14 +- rdadmin/edit_svc_perms.cpp | 14 +- rdadmin/edit_svc_perms.h | 7 +- rdadmin/edit_ttys.cpp | 70 ++++----- rdadmin/edit_ttys.h | 9 +- rdadmin/edit_user.cpp | 145 ++++++++----------- rdadmin/edit_user.h | 11 +- rdadmin/edit_user_perms.cpp | 20 +-- rdadmin/edit_user_perms.h | 9 +- rdadmin/edit_user_service_perms.cpp | 20 +-- rdadmin/edit_user_service_perms.h | 6 +- rdadmin/edit_vguest_resource.cpp | 34 ++--- rdadmin/edit_vguest_resource.h | 15 +- rdadmin/help_audios.cpp | 22 +-- rdadmin/help_audios.h | 7 +- rdadmin/importfields.cpp | 26 ++-- rdadmin/importfields.h | 6 +- rdadmin/info_dialog.cpp | 50 ++----- rdadmin/info_dialog.h | 12 +- rdadmin/license.cpp | 32 ++--- rdadmin/license.h | 10 +- rdadmin/list_dropboxes.cpp | 37 +---- rdadmin/list_dropboxes.h | 10 +- rdadmin/list_endpoints.cpp | 75 ++++------ rdadmin/list_endpoints.h | 22 ++- rdadmin/list_feeds.cpp | 35 +---- rdadmin/list_feeds.h | 8 +- rdadmin/list_gpis.cpp | 32 +---- rdadmin/list_gpis.h | 9 +- rdadmin/list_groups.cpp | 41 ++---- rdadmin/list_groups.h | 11 +- rdadmin/list_hostvars.cpp | 96 +++++-------- rdadmin/list_hostvars.h | 21 ++- rdadmin/list_livewiregpios.cpp | 86 +++++------ rdadmin/list_livewiregpios.h | 24 ++-- rdadmin/list_matrices.cpp | 82 +++++------ rdadmin/list_matrices.h | 21 ++- rdadmin/list_nodes.cpp | 69 ++++----- rdadmin/list_nodes.h | 18 ++- rdadmin/list_pypads.cpp | 22 +-- rdadmin/list_pypads.h | 6 +- rdadmin/list_replicator_carts.cpp | 41 ++---- rdadmin/list_replicator_carts.h | 13 +- rdadmin/list_replicators.cpp | 36 ++--- rdadmin/list_replicators.h | 11 +- rdadmin/list_reports.cpp | 77 ++++------ rdadmin/list_reports.h | 34 +++-- rdadmin/list_sas_resources.cpp | 89 +++++------- rdadmin/list_sas_resources.h | 16 ++- rdadmin/list_schedcodes.cpp | 41 ++---- rdadmin/list_schedcodes.h | 8 +- rdadmin/list_stations.cpp | 79 +++++------ rdadmin/list_stations.h | 25 ++-- rdadmin/list_svcs.cpp | 74 +++++----- rdadmin/list_svcs.h | 27 ++-- rdadmin/list_users.cpp | 37 ++--- rdadmin/list_users.h | 10 +- rdadmin/list_vguest_resources.cpp | 62 ++++---- rdadmin/list_vguest_resources.h | 16 ++- rdadmin/login.cpp | 22 ++- rdadmin/login.h | 7 +- rdadmin/rdadmin.cpp | 44 +++--- rdadmin/rdadmin.h | 7 +- rdadmin/rdadmin_cs.ts | 66 +++++++-- rdadmin/rdadmin_de.ts | 74 +++++++--- rdadmin/rdadmin_es.ts | 68 +++++++-- rdadmin/rdadmin_fr.ts | 90 ++++++------ rdadmin/rdadmin_nb.ts | 74 +++++++--- rdadmin/rdadmin_nn.ts | 74 +++++++--- rdadmin/rdadmin_pt_BR.ts | 74 +++++++--- rdadmin/rename_group.cpp | 40 ++---- rdadmin/rename_group.h | 11 +- rdadmin/test_import.cpp | 27 ++-- rdadmin/test_import.h | 8 +- rdadmin/view_adapters.cpp | 49 +++---- rdadmin/view_adapters.h | 20 ++- rdadmin/view_node_info.cpp | 78 +++++----- rdadmin/view_node_info.h | 10 +- rdadmin/view_pypad_errors.cpp | 11 +- rdadmin/view_pypad_errors.h | 7 +- 170 files changed, 2949 insertions(+), 3121 deletions(-) create mode 100644 lib/rddialog.cpp create mode 100644 lib/rddialog.h create mode 100644 lib/rdwidget.cpp create mode 100644 lib/rdwidget.h diff --git a/ChangeLog b/ChangeLog index 4275a7f0..8180e625 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19125,3 +19125,8 @@ 2019-09-27 Fred Gleason * Fixed a bug in rdimport(1) that caused it to throw an exception when given a '--metadata-pattern' of less than three characters. +2019-10-01 Fred Gleason + * Added an 'RDDialog' class. + * Added an 'RDWidget' class. + * Refactored rdadmin(1) to use 'RDDialog' and 'RDWidget' base + classes. diff --git a/conf/rd.conf-sample b/conf/rd.conf-sample index aa68c3a3..58aaecff 100644 --- a/conf/rd.conf-sample +++ b/conf/rd.conf-sample @@ -68,6 +68,25 @@ MountOptions=defaults CaeHostname= XportHostname= +[Fonts] +; Directives in the [Fonts] section allows the font used by Rivendell to +; be specified, with the default being to use the font specified by +; the underlying window manager. It should seldom be necessary to +; change these! + +; 'Family=' can be used to specify the name of the font to use +; --e.g. 'Helvetica'. +Family= + +; 'ButtonSize=' specifies the size of the font to be used for button labels. +ButtonSize= + +; 'LabelSize=' specifies the size of the font to be used for field labels. +LabelSize= + +; 'DataSize=' specifies the size of the font to be used for field data. +DataSize= + [Provisioning] ; If CreateHost=Yes, a Host entry will be automatically created in the DB ; when the 'rivendell' system service is started, using the Host definition diff --git a/lib/Makefile.am b/lib/Makefile.am index 4ffb2006..99f8dc64 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -111,6 +111,7 @@ dist_librd_la_SOURCES = dbversion.h\ rddebug.cpp rddebug.h\ rddeck.cpp rddeck.h\ rddelete.cpp rddelete.h\ + rddialog.cpp rddialog.h\ rddownload.cpp rddownload.h\ rddropbox.cpp rddropbox.h\ rdedit_audio.cpp rdedit_audio.h\ @@ -240,6 +241,7 @@ dist_librd_la_SOURCES = dbversion.h\ rdwavepainter.cpp rdwavepainter.h\ rdweb.cpp rdweb.h\ rdwebresult.cpp rdwebresult.h\ + rdwidget.cpp rdwidget.h\ rdxport_interface.h @@ -272,6 +274,7 @@ nodist_librd_la_SOURCES = moc_rdadd_cart.cpp\ moc_rddatepicker.cpp\ moc_rddbheartbeat.cpp\ moc_rddelete.cpp\ + moc_rddialog.cpp\ moc_rddownload.cpp\ moc_rdedit_audio.cpp\ moc_rdedit_panel_name.cpp\ @@ -333,7 +336,8 @@ nodist_librd_la_SOURCES = moc_rdadd_cart.cpp\ moc_rdunixserver.cpp\ moc_rdunixsocket.cpp\ moc_rdupload.cpp\ - moc_rdwavedata_dialog.cpp + moc_rdwavedata_dialog.cpp\ + moc_rdwidget.cpp librd_la_LDFLAGS = -release $(VERSION) diff --git a/lib/lib.pro b/lib/lib.pro index fd9b6553..1fe77ef1 100644 --- a/lib/lib.pro +++ b/lib/lib.pro @@ -79,6 +79,7 @@ SOURCES += rddb.cpp SOURCES += rddbheartbeat.cpp SOURCES += rddebug.cpp SOURCES += rddeck.cpp +SOURCES += rddialog.cpp SOURCES += rddropbox.cpp SOURCES += rdedit_audio.cpp SOURCES += rdedit_panel_name.cpp @@ -163,6 +164,7 @@ SOURCES += rdversion.cpp SOURCES += rdwavedata.cpp SOURCES += rdwavefile.cpp SOURCES += rdweb.cpp +SOURCES += rdwidget.cpp SOURCES += schedcartlist.cpp SOURCES += schedruleslist.cpp @@ -211,6 +213,7 @@ HEADERS += rddb.h HEADERS += rddbheartbeat.h HEADERS += rddebug.h HEADERS += rddeck.h +HEADERS += rddialog.h HEADERS += rddropbox.h HEADERS += rdedit_audio.h HEADERS += rdedit_panel_name.h @@ -297,6 +300,7 @@ HEADERS += rduser.h HEADERS += rdversion.h HEADERS += rdwavedata.h HEADERS += rdweb.h +HEADERS += rdwidget.h TRANSLATIONS += librd_cs.ts TRANSLATIONS += librd_de.ts diff --git a/lib/rdconfig.cpp b/lib/rdconfig.cpp index 74925b48..f48c9175 100644 --- a/lib/rdconfig.cpp +++ b/lib/rdconfig.cpp @@ -153,6 +153,30 @@ QString RDConfig::audioStoreXportHostname() const } +QString RDConfig::fontFamily() const +{ + return conf_font_family; +} + + +int RDConfig::fontButtonSize() const +{ + return conf_font_button_size; +} + + +int RDConfig::fontLabelSize() const +{ + return conf_font_label_size; +} + + +int RDConfig::fontDataSize() const +{ + return conf_font_data_size; +} + + QString RDConfig::mysqlHostname() const { return conf_mysql_hostname; @@ -509,6 +533,11 @@ bool RDConfig::load() conf_audio_store_xport_hostname= profile->stringValue("AudioStore","XportHostname","localhost"); + conf_font_family=profile->stringValue("Fonts","Family"); + conf_font_button_size=profile->intValue("Fonts","ButtonSize",-1); + conf_font_label_size=profile->intValue("Fonts","LabelSize",-1); + conf_font_data_size=profile->intValue("Fonts","DataSize",-1); + conf_provisioning_create_host= profile->boolValue("Provisioning","CreateHost"); conf_provisioning_host_template= @@ -675,6 +704,10 @@ void RDConfig::clear() conf_audio_store_mount_type=""; conf_audio_store_mount_options=RD_DEFAULT_AUDIO_STORE_MOUNT_OPTIONS; conf_audio_store_xport_hostname=""; + conf_font_family=""; + conf_font_button_size=-1; + conf_font_label_size=-1; + conf_font_data_size=-1; conf_audio_store_cae_hostname=""; conf_jack_ports[0].clear(); conf_jack_ports[1].clear(); diff --git a/lib/rdconfig.h b/lib/rdconfig.h index f1111dc9..f42128a4 100644 --- a/lib/rdconfig.h +++ b/lib/rdconfig.h @@ -92,6 +92,10 @@ class RDConfig QString audioStoreMountOptions() const; QString audioStoreCaeHostname() const; QString audioStoreXportHostname() const; + QString fontFamily() const; + int fontButtonSize() const; + int fontLabelSize() const; + int fontDataSize() const; int jackConnections() const; QString jackPort(int num,int endpt) const; bool disableMaintChecks() const; @@ -159,6 +163,10 @@ class RDConfig QString conf_audio_store_mount_options; QString conf_audio_store_xport_hostname; QString conf_audio_store_cae_hostname; + QString conf_font_family; + int conf_font_button_size; + int conf_font_label_size; + int conf_font_data_size; QString conf_http_user_agent; bool conf_disable_maint_checks; bool conf_lock_rdairplay_memory; diff --git a/lib/rddialog.cpp b/lib/rddialog.cpp new file mode 100644 index 00000000..280643c2 --- /dev/null +++ b/lib/rddialog.cpp @@ -0,0 +1,113 @@ +// rddialog.cpp +// +// Base class for Rivendell modal dialogs. +// +// (C) Copyright 2019 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 +// published by the Free Software Foundation. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// + +#include "rddialog.h" + +RDDialog::RDDialog(QWidget *parent,Qt::WindowFlags f) + : QDialog(parent,f) +{ + dialog_config=rda->config(); + MakeFonts(); + setFont(dataFont()); +} + + +RDDialog::RDDialog(RDConfig *config,QWidget *parent,Qt::WindowFlags f) + : QDialog(parent,f) +{ + dialog_config=config; + MakeFonts(); +} + + +QFont RDDialog::buttonFont() const +{ + return dialog_button_font; +} + + +QFont RDDialog::subButtonFont() const +{ + return dialog_sub_button_font; +} + + +QFont RDDialog::sectionLabelFont() const +{ + return dialog_section_label_font; +} + + +QFont RDDialog::labelFont() const +{ + return dialog_label_font; +} + + +QFont RDDialog::subLabelFont() const +{ + return dialog_sub_label_font; +} + + +QFont RDDialog::dataFont() const +{ + return dialog_data_font; +} + + +void RDDialog::MakeFonts() +{ + QString family=font().family(); + int button_size=font().pixelSize(); + int label_size=font().pixelSize(); + int data_size=font().pixelSize(); + + if(!dialog_config->fontFamily().isEmpty()) { + family=dialog_config->fontFamily(); + } + if(dialog_config->fontButtonSize()>0) { + button_size=dialog_config->fontButtonSize(); + } + if(dialog_config->fontLabelSize()>0) { + label_size=dialog_config->fontLabelSize(); + } + if(dialog_config->fontDataSize()>0) { + data_size=dialog_config->fontDataSize(); + } + + dialog_button_font=QFont(family,button_size,QFont::Bold); + dialog_button_font.setPixelSize(button_size); + + dialog_sub_button_font=QFont(family,button_size-2,QFont::Normal); + dialog_sub_button_font.setPixelSize(button_size-2); + + dialog_section_label_font=QFont(family,label_size+2,QFont::Bold); + dialog_section_label_font.setPixelSize(label_size+2); + + dialog_label_font=QFont(family,label_size,QFont::Bold); + dialog_label_font.setPixelSize(label_size); + + dialog_sub_label_font=QFont(family,label_size,QFont::Normal); + dialog_sub_label_font.setPixelSize(label_size); + + dialog_data_font=QFont(family,data_size,QFont::Normal); + dialog_data_font.setPixelSize(data_size); +} diff --git a/lib/rddialog.h b/lib/rddialog.h new file mode 100644 index 00000000..203fe8d0 --- /dev/null +++ b/lib/rddialog.h @@ -0,0 +1,54 @@ +// rddialog.h +// +// Base class for Rivendell modal dialogs. +// +// (C) Copyright 2019 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 +// published by the Free Software Foundation. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// + +#ifndef RDDIALOG_H +#define RDDIALOG_H + +#include +#include + +#include + +class RDDialog : public QDialog +{ + Q_OBJECT; + public: + RDDialog(QWidget *parent=0,Qt::WindowFlags f=0); + RDDialog(RDConfig *config,QWidget *parent=0,Qt::WindowFlags f=0); + QFont buttonFont() const; + QFont subButtonFont() const; + QFont sectionLabelFont() const; + QFont labelFont() const; + QFont subLabelFont() const; + QFont dataFont() const; + + private: + void MakeFonts(); + QFont dialog_button_font; + QFont dialog_sub_button_font; + QFont dialog_section_label_font; + QFont dialog_label_font; + QFont dialog_sub_label_font; + QFont dialog_data_font; + RDConfig *dialog_config; +}; + + +#endif // RDDIALOG_H diff --git a/lib/rdlivewire.cpp b/lib/rdlivewire.cpp index bbae2cfa..6192a1f9 100644 --- a/lib/rdlivewire.cpp +++ b/lib/rdlivewire.cpp @@ -99,8 +99,8 @@ RDLiveWire::RDLiveWire(unsigned id,QObject *parent) connect(live_socket,SIGNAL(connectionClosed()), this,SLOT(connectionClosedData())); connect(live_socket,SIGNAL(readyRead()),this,SLOT(readyReadData())); - connect(live_socket,SIGNAL(error(QAbstracketSocket::SocketError)), - this,SLOT(errorData(QAbstrackSocket::SocketError))); + connect(live_socket,SIGNAL(error(QAbstractSocket::SocketError)), + this,SLOT(errorData(QAbstractSocket::SocketError))); // // Watchdog Timers diff --git a/lib/rdwidget.cpp b/lib/rdwidget.cpp new file mode 100644 index 00000000..0a67acc2 --- /dev/null +++ b/lib/rdwidget.cpp @@ -0,0 +1,114 @@ +// rdwidget.cpp +// +// Base class for Rivendell modal widgets. +// +// (C) Copyright 2019 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 +// published by the Free Software Foundation. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// + +#include "rdwidget.h" + +RDWidget::RDWidget(QWidget *parent,Qt::WindowFlags f) + : QWidget(parent,f) +{ + widget_config=rda->config(); + MakeFonts(); + setFont(dataFont()); +} + + +RDWidget::RDWidget(RDConfig *config,QWidget *parent,Qt::WindowFlags f) + : QWidget(parent,f) +{ + widget_config=config; + MakeFonts(); + setFont(dataFont()); +} + + +QFont RDWidget::buttonFont() const +{ + return widget_button_font; +} + + +QFont RDWidget::subButtonFont() const +{ + return widget_sub_button_font; +} + + +QFont RDWidget::sectionLabelFont() const +{ + return widget_section_label_font; +} + + +QFont RDWidget::labelFont() const +{ + return widget_label_font; +} + + +QFont RDWidget::subLabelFont() const +{ + return widget_sub_label_font; +} + + +QFont RDWidget::dataFont() const +{ + return widget_data_font; +} + + +void RDWidget::MakeFonts() +{ + QString family=font().family(); + int button_size=font().pixelSize(); + int label_size=font().pixelSize(); + int data_size=font().pixelSize(); + + if(!widget_config->fontFamily().isEmpty()) { + family=widget_config->fontFamily(); + } + if(widget_config->fontButtonSize()>0) { + button_size=widget_config->fontButtonSize(); + } + if(widget_config->fontLabelSize()>0) { + label_size=widget_config->fontLabelSize(); + } + if(widget_config->fontDataSize()>0) { + data_size=widget_config->fontDataSize(); + } + + widget_button_font=QFont(family,button_size,QFont::Bold); + widget_button_font.setPixelSize(button_size); + + widget_sub_button_font=QFont(family,button_size-2,QFont::Normal); + widget_sub_button_font.setPixelSize(button_size-2); + + widget_section_label_font=QFont(family,label_size+2,QFont::Bold); + widget_section_label_font.setPixelSize(label_size+2); + + widget_label_font=QFont(family,label_size,QFont::Bold); + widget_label_font.setPixelSize(label_size); + + widget_sub_label_font=QFont(family,label_size,QFont::Normal); + widget_sub_label_font.setPixelSize(label_size); + + widget_data_font=QFont(family,data_size,QFont::Normal); + widget_data_font.setPixelSize(data_size); +} diff --git a/lib/rdwidget.h b/lib/rdwidget.h new file mode 100644 index 00000000..a61b5edd --- /dev/null +++ b/lib/rdwidget.h @@ -0,0 +1,54 @@ +// rdwidget.h +// +// Base class for Rivendell widgets. +// +// (C) Copyright 2019 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 +// published by the Free Software Foundation. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// + +#ifndef RDWIDGET_H +#define RDWIDGET_H + +#include +#include + +#include + +class RDWidget : public QWidget +{ + Q_OBJECT; + public: + RDWidget(QWidget *parent=0,Qt::WindowFlags f=0); + RDWidget(RDConfig *config,QWidget *parent=0,Qt::WindowFlags f=0); + QFont buttonFont() const; + QFont subButtonFont() const; + QFont sectionLabelFont() const; + QFont labelFont() const; + QFont subLabelFont() const; + QFont dataFont() const; + + private: + void MakeFonts(); + QFont widget_button_font; + QFont widget_sub_button_font; + QFont widget_section_label_font; + QFont widget_label_font; + QFont widget_sub_label_font; + QFont widget_data_font; + RDConfig *widget_config; +}; + + +#endif // RDWIDGET_H diff --git a/rdadmin/add_feed.cpp b/rdadmin/add_feed.cpp index ed8bdf53..7085973f 100644 --- a/rdadmin/add_feed.cpp +++ b/rdadmin/add_feed.cpp @@ -2,7 +2,7 @@ // // Add a Rivendell RSS Feed // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,7 +36,7 @@ #include "globals.h" AddFeed::AddFeed(unsigned *id,QString *keyname,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -53,14 +53,6 @@ AddFeed::AddFeed(unsigned *id,QString *keyname,QWidget *parent) setWindowTitle("RDADmin - "+tr("Add RSS Feed")); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont user_font=QFont("Helvetica",12,QFont::Normal); - user_font.setPixelSize(12); - // // Enable Users Checkbox // @@ -69,7 +61,6 @@ AddFeed::AddFeed(unsigned *id,QString *keyname,QWidget *parent) feed_users_box->setChecked(true); QLabel *label=new QLabel(feed_users_box,tr("Enable Feed for All Users"),this); label->setGeometry(60,38,sizeHint().width()-60,19); - label->setFont(user_font); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // @@ -86,7 +77,7 @@ AddFeed::AddFeed(unsigned *id,QString *keyname,QWidget *parent) feed_keyname_edit->setValidator(validator); label=new QLabel(feed_keyname_edit,tr("&New Feed Name:"),this); label->setGeometry(10,11,130,19); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -95,7 +86,7 @@ AddFeed::AddFeed(unsigned *id,QString *keyname,QWidget *parent) QPushButton *ok_button=new QPushButton(this); ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); ok_button->setDefault(true); - ok_button->setFont(font); + ok_button->setFont(buttonFont()); ok_button->setText(tr("&OK")); connect(ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -105,7 +96,7 @@ AddFeed::AddFeed(unsigned *id,QString *keyname,QWidget *parent) QPushButton *cancel_button=new QPushButton(this); cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, 80,50); - cancel_button->setFont(font); + cancel_button->setFont(buttonFont()); cancel_button->setText(tr("&Cancel")); connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); } diff --git a/rdadmin/add_feed.h b/rdadmin/add_feed.h index 6d2d1681..cfc10ece 100644 --- a/rdadmin/add_feed.h +++ b/rdadmin/add_feed.h @@ -2,7 +2,7 @@ // // Add a Rivendell Feed // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,9 +22,10 @@ #define ADD_FEED_H #include -#include #include +#include + // // Default XML Templates // @@ -32,7 +33,7 @@ #define DEFAULT_CHANNEL_XML "%TITLE%\n%DESCRIPTION%\n%CATEGORY%\n%LINK%\n%LANGUAGE%\n%COPYRIGHT%\n%BUILD_DATE%\n%PUBLISH_DATE%\n%WEBMASTER%\n%GENERATOR%" #define DEFAULT_ITEM_XML "%ITEM_TITLE%\n%ITEM_LINK%\n%ITEM_GUID%\n%ITEM_DESCRIPTION%\n%ITEM_AUTHOR%\n%ITEM_COMMENTS%\n%ITEM_SOURCE_TEXT%\n\n%ITEM_CATEGORY%\n%ITEM_PUBLISH_DATE%" -class AddFeed : public QDialog +class AddFeed : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/add_group.cpp b/rdadmin/add_group.cpp index fbd2b021..7be62a91 100644 --- a/rdadmin/add_group.cpp +++ b/rdadmin/add_group.cpp @@ -2,7 +2,7 @@ // // Add a Rivendell Group // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ -39,7 +39,7 @@ #include AddGroup::AddGroup(QString *group,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -53,15 +53,7 @@ AddGroup::AddGroup(QString *group,QWidget *parent) setMinimumHeight(sizeHint().height()); setMaximumHeight(sizeHint().height()); - setCaption("RDAdmin - "+tr("Add Group")); - - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont user_font=QFont("Helvetica",12,QFont::Normal); - user_font.setPixelSize(12); + setWindowTitle("RDAdmin - "+tr("Add Group")); // // Text Validator @@ -76,8 +68,9 @@ AddGroup::AddGroup(QString *group,QWidget *parent) group_name_edit->setMaxLength(10); group_name_edit->setValidator(validator); QLabel *label=new QLabel(group_name_edit,tr("&New Group Name:"),this); + label->setFont(labelFont()); label->setGeometry(10,11,130,19); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -87,8 +80,8 @@ AddGroup::AddGroup(QString *group,QWidget *parent) group_users_box->setGeometry(40,40,15,15); group_users_box->setChecked(true); label=new QLabel(group_users_box,tr("Enable Group for All Users"),this); + label->setFont(subLabelFont()); label->setGeometry(60,38,sizeHint().width()-60,19); - label->setFont(user_font); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -98,8 +91,8 @@ AddGroup::AddGroup(QString *group,QWidget *parent) group_svcs_box->setGeometry(40,61,15,15); group_svcs_box->setChecked(true); label=new QLabel(group_svcs_box,tr("Enable Group for All Services"),this); + label->setFont(subLabelFont()); label->setGeometry(60,58,sizeHint().width()-60,19); - label->setFont(user_font); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -108,7 +101,7 @@ AddGroup::AddGroup(QString *group,QWidget *parent) QPushButton *ok_button=new QPushButton(this); ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); ok_button->setDefault(true); - ok_button->setFont(font); + ok_button->setFont(buttonFont()); ok_button->setText(tr("&OK")); connect(ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -118,7 +111,7 @@ AddGroup::AddGroup(QString *group,QWidget *parent) QPushButton *cancel_button=new QPushButton(this); cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, 80,50); - cancel_button->setFont(font); + cancel_button->setFont(buttonFont()); cancel_button->setText(tr("&Cancel")); connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); } diff --git a/rdadmin/add_group.h b/rdadmin/add_group.h index b86c1f5f..d29a2cdd 100644 --- a/rdadmin/add_group.h +++ b/rdadmin/add_group.h @@ -2,7 +2,7 @@ // // Add a Rivendell Group // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,10 +22,11 @@ #define ADD_GROUP_H #include -#include #include -class AddGroup : public QDialog +#include + +class AddGroup : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/add_hostvar.cpp b/rdadmin/add_hostvar.cpp index a03543d0..26947346 100644 --- a/rdadmin/add_hostvar.cpp +++ b/rdadmin/add_hostvar.cpp @@ -2,7 +2,7 @@ // // Add a Rivendell Host Variable // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,7 +18,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include #include #include #include @@ -34,7 +33,7 @@ AddHostvar::AddHostvar(QString station,QString *var,QString *varvalue, QString *remark,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -42,12 +41,6 @@ AddHostvar::AddHostvar(QString station,QString *var,QString *varvalue, add_varvalue=varvalue; add_remark=remark; - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - setWindowTitle("RDAdmin - "+tr("Add Host Variable")); // @@ -66,7 +59,7 @@ AddHostvar::AddHostvar(QString station,QString *var,QString *varvalue, add_name_edit->setMaxLength(32); QLabel *label=new QLabel(add_name_edit,tr("Variable Name:"),this); label->setGeometry(10,11,110,19); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -77,7 +70,7 @@ AddHostvar::AddHostvar(QString station,QString *var,QString *varvalue, add_varvalue_edit->setMaxLength(255); label=new QLabel(add_varvalue_edit,tr("Variable Value:"),this); label->setGeometry(10,33,110,19); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -88,7 +81,7 @@ AddHostvar::AddHostvar(QString station,QString *var,QString *varvalue, add_remark_edit->setMaxLength(255); label=new QLabel(add_remark_edit,tr("Remark:"),this); label->setGeometry(10,55,110,19); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -97,7 +90,7 @@ AddHostvar::AddHostvar(QString station,QString *var,QString *varvalue, QPushButton *ok_button=new QPushButton(this); ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); ok_button->setDefault(true); - ok_button->setFont(font); + ok_button->setFont(buttonFont()); ok_button->setText(tr("&OK")); connect(ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -107,7 +100,7 @@ AddHostvar::AddHostvar(QString station,QString *var,QString *varvalue, QPushButton *cancel_button=new QPushButton(this); cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, 80,50); - cancel_button->setFont(font); + cancel_button->setFont(buttonFont()); cancel_button->setText(tr("&Cancel")); connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); } diff --git a/rdadmin/add_hostvar.h b/rdadmin/add_hostvar.h index 4cd44b2d..341dc6e4 100644 --- a/rdadmin/add_hostvar.h +++ b/rdadmin/add_hostvar.h @@ -2,7 +2,7 @@ // // Add a Rivendell Host Variable // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 ADD_HOSTVAR_H #define ADD_HOSTVAR_H -#include #include #include #include @@ -31,9 +30,10 @@ #include #include +#include #include -class AddHostvar : public QDialog +class AddHostvar : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/add_matrix.cpp b/rdadmin/add_matrix.cpp index 6cc8195e..63e482e4 100644 --- a/rdadmin/add_matrix.cpp +++ b/rdadmin/add_matrix.cpp @@ -2,7 +2,7 @@ // // Add a Rivendell Matrix // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,7 +18,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include #include #include #include @@ -33,7 +32,7 @@ #include "rdpasswd.h" AddMatrix::AddMatrix(QString station,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -49,12 +48,6 @@ AddMatrix::AddMatrix(QString station,QWidget *parent) setWindowTitle("RDAdmin - "+tr("Add Switcher")); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - // // Matrix Number // @@ -63,7 +56,7 @@ AddMatrix::AddMatrix(QString station,QWidget *parent) add_matrix_box->setRange(0,MAX_MATRICES-1); QLabel *label=new QLabel(add_matrix_box,tr("&New Matrix Number:"),this); label->setGeometry(10,11,150,19); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -76,7 +69,7 @@ AddMatrix::AddMatrix(QString station,QWidget *parent) } label=new QLabel(add_type_box,tr("&Switcher Type:"),this); label->setGeometry(10,36,150,19); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -85,7 +78,7 @@ AddMatrix::AddMatrix(QString station,QWidget *parent) QPushButton *ok_button=new QPushButton(this); ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); ok_button->setDefault(true); - ok_button->setFont(font); + ok_button->setFont(buttonFont()); ok_button->setText(tr("&OK")); connect(ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -95,7 +88,7 @@ AddMatrix::AddMatrix(QString station,QWidget *parent) QPushButton *cancel_button=new QPushButton(this); cancel_button-> setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50); - cancel_button->setFont(font); + cancel_button->setFont(buttonFont()); cancel_button->setText(tr("&Cancel")); connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); diff --git a/rdadmin/add_matrix.h b/rdadmin/add_matrix.h index 51e9bc37..67fc0a70 100644 --- a/rdadmin/add_matrix.h +++ b/rdadmin/add_matrix.h @@ -2,7 +2,7 @@ // // Add a Rivendell Matrix // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,13 +21,13 @@ #ifndef ADD_MATRIX_H #define ADD_MATRIX_H -#include #include #include +#include #include -class AddMatrix : public QDialog +class AddMatrix : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/add_replicator.cpp b/rdadmin/add_replicator.cpp index f34b6840..b319658c 100644 --- a/rdadmin/add_replicator.cpp +++ b/rdadmin/add_replicator.cpp @@ -2,7 +2,7 @@ // // Add a Rivendell Replicator Configuration // -// (C) Copyright 2010-2018 Fred Gleason +// (C) Copyright 2010-2019 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,7 +18,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include #include #include #include @@ -39,7 +38,7 @@ #include "add_replicator.h" AddReplicator::AddReplicator(QString *rname,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -55,18 +54,10 @@ AddReplicator::AddReplicator(QString *rname,QWidget *parent) setWindowTitle("RDAdmin - "+tr("Add Replicator")); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont user_font=QFont("Helvetica",12,QFont::Normal); - user_font.setPixelSize(12); - // // Text Validator // - RDTextValidator *validator=new RDTextValidator(this,"validator"); + RDTextValidator *validator=new RDTextValidator(this); // // Replicator Name @@ -75,9 +66,9 @@ AddReplicator::AddReplicator(QString *rname,QWidget *parent) repl_name_edit->setGeometry(145,11,sizeHint().width()-150,19); repl_name_edit->setMaxLength(10); repl_name_edit->setValidator(validator); - QLabel *label=new QLabel(repl_name_edit,tr("&New Replicator Name:"),this); + QLabel *label=new QLabel(repl_name_edit,tr("Replicator Name:"),this); label->setGeometry(10,11,130,19); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -86,7 +77,7 @@ AddReplicator::AddReplicator(QString *rname,QWidget *parent) QPushButton *ok_button=new QPushButton(this); ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); ok_button->setDefault(true); - ok_button->setFont(font); + ok_button->setFont(buttonFont()); ok_button->setText(tr("&OK")); connect(ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -96,7 +87,7 @@ AddReplicator::AddReplicator(QString *rname,QWidget *parent) QPushButton *cancel_button=new QPushButton(this); cancel_button-> setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50); - cancel_button->setFont(font); + cancel_button->setFont(buttonFont()); cancel_button->setText(tr("&Cancel")); connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); } diff --git a/rdadmin/add_replicator.h b/rdadmin/add_replicator.h index a87c74c6..4749b99c 100644 --- a/rdadmin/add_replicator.h +++ b/rdadmin/add_replicator.h @@ -2,7 +2,7 @@ // // Add a Rivendell Replicator // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,10 +22,11 @@ #define ADD_REPLICATOR_H #include -#include #include -class AddReplicator : public QDialog +#include + +class AddReplicator : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/add_report.cpp b/rdadmin/add_report.cpp index 096fc212..1c0aa7dd 100644 --- a/rdadmin/add_report.cpp +++ b/rdadmin/add_report.cpp @@ -2,7 +2,7 @@ // // Add a Rivendell Report // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,7 +18,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include #include #include #include @@ -41,7 +40,7 @@ #include "edit_svc_perms.h" AddReport::AddReport(QString *rptname,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -56,14 +55,6 @@ AddReport::AddReport(QString *rptname,QWidget *parent) setWindowTitle("RDAdmin - "+tr("Add Report")); add_name=rptname; - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont section_font=QFont("Helvetica",14,QFont::Bold); - section_font.setPixelSize(14); - // // Text Validator // @@ -78,7 +69,7 @@ AddReport::AddReport(QString *rptname,QWidget *parent) add_name_edit->setValidator(validator); QLabel *label=new QLabel(add_name_edit,tr("&Report Name:"),this); label->setGeometry(10,10,155,19); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -87,7 +78,7 @@ AddReport::AddReport(QString *rptname,QWidget *parent) QPushButton *button=new QPushButton(this); button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); button->setDefault(true); - button->setFont(font); + button->setFont(buttonFont()); button->setText(tr("&OK")); connect(button,SIGNAL(clicked()),this,SLOT(okData())); @@ -97,7 +88,7 @@ AddReport::AddReport(QString *rptname,QWidget *parent) button=new QPushButton(this); button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, 80,50); - button->setFont(font); + button->setFont(buttonFont()); button->setText(tr("&Cancel")); connect(button,SIGNAL(clicked()),this,SLOT(cancelData())); } diff --git a/rdadmin/add_report.h b/rdadmin/add_report.h index d6354bfe..7eb13487 100644 --- a/rdadmin/add_report.h +++ b/rdadmin/add_report.h @@ -2,7 +2,7 @@ // // Add a Rivendell Report // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,12 +22,12 @@ #define ADD_REPORT_H #include -#include #include +#include #include -class AddReport : public QDialog +class AddReport : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/add_schedcodes.cpp b/rdadmin/add_schedcodes.cpp index 85b8003e..0d47f29e 100644 --- a/rdadmin/add_schedcodes.cpp +++ b/rdadmin/add_schedcodes.cpp @@ -3,7 +3,7 @@ // Add scheduler codes dialog // // (C) Copyright 2005-2018 Stefan Gabriel -// (C) Copyright 2018 Fred Gleason +// (C) Copyright 2018-2019 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 @@ -19,7 +19,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include #include #include #include @@ -40,11 +39,11 @@ #include "add_schedcodes.h" AddSchedCode::AddSchedCode(QString *schedCode,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); - schedCode_schedCode=schedCode; + schedcode_schedCode=schedCode; // // Fix the Window Size @@ -56,14 +55,6 @@ AddSchedCode::AddSchedCode(QString *schedCode,QWidget *parent) setWindowTitle("RDAdmin - "+tr("Add Scheduler Code")); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont user_font=QFont("Helvetica",12,QFont::Normal); - user_font.setPixelSize(12); - // // Text Validator // @@ -73,13 +64,13 @@ AddSchedCode::AddSchedCode(QString *schedCode,QWidget *parent) // // Code Name // - schedCode_name_edit=new QLineEdit(this); - schedCode_name_edit->setGeometry(105,11,sizeHint().width()-150,19); - schedCode_name_edit->setMaxLength(10); - schedCode_name_edit->setValidator(validator); - QLabel *label=new QLabel(schedCode_name_edit,tr("&New Code:"),this); + schedcode_name_edit=new QLineEdit(this); + schedcode_name_edit->setGeometry(105,11,sizeHint().width()-150,19); + schedcode_name_edit->setMaxLength(10); + schedcode_name_edit->setValidator(validator); + QLabel *label=new QLabel(schedcode_name_edit,tr("&New Code:"),this); label->setGeometry(10,11,90,19); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -88,7 +79,7 @@ AddSchedCode::AddSchedCode(QString *schedCode,QWidget *parent) QPushButton *ok_button=new QPushButton(this); ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); ok_button->setDefault(true); - ok_button->setFont(font); + ok_button->setFont(buttonFont()); ok_button->setText(tr("&OK")); connect(ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -98,7 +89,7 @@ AddSchedCode::AddSchedCode(QString *schedCode,QWidget *parent) QPushButton *cancel_button=new QPushButton(this); cancel_button-> setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50); - cancel_button->setFont(font); + cancel_button->setFont(buttonFont()); cancel_button->setText(tr("&Cancel")); connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); } @@ -106,7 +97,7 @@ AddSchedCode::AddSchedCode(QString *schedCode,QWidget *parent) AddSchedCode::~AddSchedCode() { - delete schedCode_name_edit; + delete schedcode_name_edit; } @@ -127,13 +118,13 @@ void AddSchedCode::okData() RDSqlQuery *q; QString sql; - if(schedCode_name_edit->text().isEmpty()) { + if(schedcode_name_edit->text().isEmpty()) { QMessageBox::warning(this,tr("Invalid Name"),tr("Invalid Name!")); return; } sql=QString("insert into SCHED_CODES set ")+ - "CODE=\""+RDEscapeString(schedCode_name_edit->text())+"\""; + "CODE=\""+RDEscapeString(schedcode_name_edit->text())+"\""; q=new RDSqlQuery(sql); if(!q->isActive()) { QMessageBox::warning(this,tr("Code Exists"),tr("Code Already Exists!"), @@ -144,14 +135,14 @@ void AddSchedCode::okData() delete q; EditSchedCode *schedCode= - new EditSchedCode(schedCode_name_edit->text(),"",this); + new EditSchedCode(schedcode_name_edit->text(),"",this); if(schedCode->exec()<0) { delete schedCode; done(-1); return; } delete schedCode; - *schedCode_schedCode=schedCode_name_edit->text(); + *schedcode_schedCode=schedcode_name_edit->text(); done(0); } diff --git a/rdadmin/add_schedcodes.h b/rdadmin/add_schedcodes.h index ac4c0cdc..ffbf0ab7 100644 --- a/rdadmin/add_schedcodes.h +++ b/rdadmin/add_schedcodes.h @@ -3,7 +3,7 @@ // Add scheduler codes dialog // // (C) Copyright Stefan Gabriel -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,10 +23,11 @@ #define ADD_SCHEDCODES_H #include -#include #include -class AddSchedCode : public QDialog +#include + +class AddSchedCode : public RDDialog { Q_OBJECT public: @@ -40,8 +41,8 @@ class AddSchedCode : public QDialog void cancelData(); private: - QLineEdit *schedCode_name_edit; - QString *schedCode_schedCode; + QLineEdit *schedcode_name_edit; + QString *schedcode_schedCode; }; #endif // ADD_SCHEDCODES_H diff --git a/rdadmin/add_station.cpp b/rdadmin/add_station.cpp index 28015949..58efd71f 100644 --- a/rdadmin/add_station.cpp +++ b/rdadmin/add_station.cpp @@ -2,7 +2,7 @@ // // Add a Rivendell Workstation // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,7 +18,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include #include #include #include @@ -40,7 +39,7 @@ #include "edit_station.h" AddStation::AddStation(QString *stationname,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -56,12 +55,6 @@ AddStation::AddStation(QString *stationname,QWidget *parent) setWindowTitle("RDAdmin - "+tr("Add Host")); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - // // Text Validator // @@ -76,7 +69,7 @@ AddStation::AddStation(QString *stationname,QWidget *parent) add_name_edit->setValidator(validator); QLabel *label=new QLabel(add_name_edit,tr("New &Host Name:"),this); label->setGeometry(10,10,115,19); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -86,7 +79,7 @@ AddStation::AddStation(QString *stationname,QWidget *parent) add_exemplar_box->setGeometry(130,35,sizeHint().width()-140,19); label=new QLabel(add_exemplar_box,tr("Base Host On:"),this); label->setGeometry(10,35,115,19); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -96,7 +89,7 @@ AddStation::AddStation(QString *stationname,QWidget *parent) ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60, 80,50); ok_button->setDefault(true); - ok_button->setFont(font); + ok_button->setFont(buttonFont()); ok_button->setText(tr("&OK")); connect(ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -106,7 +99,7 @@ AddStation::AddStation(QString *stationname,QWidget *parent) QPushButton *cancel_button=new QPushButton(this); cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, 80,50); - cancel_button->setFont(font); + cancel_button->setFont(buttonFont()); cancel_button->setText(tr("&Cancel")); connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); diff --git a/rdadmin/add_station.h b/rdadmin/add_station.h index 0b0ba14d..0be478e9 100644 --- a/rdadmin/add_station.h +++ b/rdadmin/add_station.h @@ -2,7 +2,7 @@ // // Add a Rivendell Workstation // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 ADD_STATION_H #define ADD_STATION_H -#include #include #include #include @@ -29,9 +28,10 @@ #include #include +#include #include -class AddStation : public QDialog +class AddStation : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/add_svc.cpp b/rdadmin/add_svc.cpp index f1ecddfa..1532cce5 100644 --- a/rdadmin/add_svc.cpp +++ b/rdadmin/add_svc.cpp @@ -2,7 +2,7 @@ // // Add a Rivendell Service // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,7 +18,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include #include #include #include @@ -40,7 +39,7 @@ #include "globals.h" AddSvc::AddSvc(QString *svcname,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -56,12 +55,6 @@ AddSvc::AddSvc(QString *svcname,QWidget *parent) setWindowTitle("RDAdmin - "+tr("Add Service")); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - // // Text Validator // @@ -77,7 +70,7 @@ AddSvc::AddSvc(QString *svcname,QWidget *parent) QLabel *svc_name_label= new QLabel(svc_name_edit,tr("&New Service Name:"),this); svc_name_label->setGeometry(10,11,140,19); - svc_name_label->setFont(font); + svc_name_label->setFont(labelFont()); svc_name_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -88,7 +81,7 @@ AddSvc::AddSvc(QString *svcname,QWidget *parent) QLabel *svc_exemplar_label= new QLabel(svc_exemplar_box,tr("Base Service On:"),this); svc_exemplar_label->setGeometry(10,36,140,19); - svc_exemplar_label->setFont(font); + svc_exemplar_label->setFont(labelFont()); svc_exemplar_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -97,7 +90,7 @@ AddSvc::AddSvc(QString *svcname,QWidget *parent) QPushButton *ok_button=new QPushButton(this); ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); ok_button->setDefault(true); - ok_button->setFont(font); + ok_button->setFont(buttonFont()); ok_button->setText(tr("&OK")); connect(ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -107,7 +100,7 @@ AddSvc::AddSvc(QString *svcname,QWidget *parent) QPushButton *cancel_button=new QPushButton(this); cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, 80,50); - cancel_button->setFont(font); + cancel_button->setFont(buttonFont()); cancel_button->setText(tr("&Cancel")); connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); diff --git a/rdadmin/add_svc.h b/rdadmin/add_svc.h index 076d757f..d8260f83 100644 --- a/rdadmin/add_svc.h +++ b/rdadmin/add_svc.h @@ -2,7 +2,7 @@ // // Add a Rivendell Service // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 ADD_SVC_H #define ADD_SVC_H -#include #include #include #include @@ -29,9 +28,10 @@ #include #include +#include #include -class AddSvc : public QDialog +class AddSvc : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/add_user.cpp b/rdadmin/add_user.cpp index 9c1e4887..2860c4fa 100644 --- a/rdadmin/add_user.cpp +++ b/rdadmin/add_user.cpp @@ -2,7 +2,7 @@ // // Add a Rivendell User // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ -20,7 +20,6 @@ #include -#include #include #include #include @@ -39,7 +38,7 @@ #include AddUser::AddUser(QString *username,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -55,12 +54,6 @@ AddUser::AddUser(QString *username,QWidget *parent) setWindowTitle("RDAdmin - "+tr("Add User")); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - // // User Name // @@ -69,7 +62,7 @@ AddUser::AddUser(QString *username,QWidget *parent) user_name_edit->setMaxLength(255); QLabel *user_name_label=new QLabel(user_name_edit,tr("&New User Name:"),this); user_name_label->setGeometry(10,13,110,19); - user_name_label->setFont(font); + user_name_label->setFont(labelFont()); user_name_label->setAlignment(Qt::AlignRight|Qt::TextShowMnemonic); // @@ -78,7 +71,7 @@ AddUser::AddUser(QString *username,QWidget *parent) QPushButton *ok_button=new QPushButton(this); ok_button->setGeometry(size().width()-180,size().height()-60,80,50); ok_button->setDefault(true); - ok_button->setFont(font); + ok_button->setFont(buttonFont()); ok_button->setText(tr("&OK")); connect(ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -87,7 +80,7 @@ AddUser::AddUser(QString *username,QWidget *parent) // QPushButton *cancel_button=new QPushButton(this); cancel_button->setGeometry(size().width()-90,size().height()-60,80,50); - cancel_button->setFont(font); + cancel_button->setFont(buttonFont()); cancel_button->setText(tr("&Cancel")); connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); } diff --git a/rdadmin/add_user.h b/rdadmin/add_user.h index 825e8533..36238df4 100644 --- a/rdadmin/add_user.h +++ b/rdadmin/add_user.h @@ -2,7 +2,7 @@ // // Add a Rivendell User // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 ADD_USER_H #define ADD_USER_H -#include #include #include #include @@ -29,9 +28,10 @@ #include #include +#include #include -class AddUser : public QDialog +class AddUser : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/autofill_carts.cpp b/rdadmin/autofill_carts.cpp index abf125a2..b0cc5105 100644 --- a/rdadmin/autofill_carts.cpp +++ b/rdadmin/autofill_carts.cpp @@ -2,7 +2,7 @@ // // Edit a List of Autofill Carts // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,7 +18,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include #include #include #include @@ -42,7 +41,7 @@ #include "globals.h" AutofillCarts::AutofillCarts(RDSvc *svc,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -60,14 +59,6 @@ AutofillCarts::AutofillCarts(RDSvc *svc,QWidget *parent) setWindowTitle("RDAdmin - "+tr("Autofill Carts - Service:")+" "+svc_svc->name()); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont section_font=QFont("Helvetica",14,QFont::Bold); - section_font.setPixelSize(14); - // // Cart List // @@ -91,7 +82,7 @@ AutofillCarts::AutofillCarts(RDSvc *svc,QWidget *parent) // QPushButton *button=new QPushButton(this); button->setGeometry(20,sizeHint().height()-90,60,40); - button->setFont(font); + button->setFont(buttonFont()); button->setText(tr("&Add")); connect(button,SIGNAL(clicked()),this,SLOT(addData())); @@ -100,7 +91,7 @@ AutofillCarts::AutofillCarts(RDSvc *svc,QWidget *parent) // button=new QPushButton(this); button->setGeometry(90,sizeHint().height()-90,60,40); - button->setFont(font); + button->setFont(buttonFont()); button->setText(tr("&Delete")); connect(button,SIGNAL(clicked()),this,SLOT(deleteData())); @@ -110,7 +101,7 @@ AutofillCarts::AutofillCarts(RDSvc *svc,QWidget *parent) button=new QPushButton(this); button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); button->setDefault(true); - button->setFont(font); + button->setFont(buttonFont()); button->setText(tr("&OK")); connect(button,SIGNAL(clicked()),this,SLOT(okData())); @@ -118,9 +109,8 @@ AutofillCarts::AutofillCarts(RDSvc *svc,QWidget *parent) // Cancel Button // button=new QPushButton(this); - button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, - 80,50); - button->setFont(font); + button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50); + button->setFont(buttonFont()); button->setText(tr("&Cancel")); connect(button,SIGNAL(clicked()),this,SLOT(cancelData())); diff --git a/rdadmin/autofill_carts.h b/rdadmin/autofill_carts.h index 34308713..cba5d859 100644 --- a/rdadmin/autofill_carts.h +++ b/rdadmin/autofill_carts.h @@ -2,7 +2,7 @@ // // Edit a List of Autofill Carts // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,13 +21,13 @@ #ifndef AUTOFILL_CARTS_H #define AUTOFILL_CARTS_H -#include #include #include +#include #include -class AutofillCarts : public QDialog +class AutofillCarts : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_audios.cpp b/rdadmin/edit_audios.cpp index ef6a888d..d714c5c5 100644 --- a/rdadmin/edit_audios.cpp +++ b/rdadmin/edit_audios.cpp @@ -2,7 +2,7 @@ // // Edit a Rivendell Audio Port Configuration // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,7 +32,7 @@ #include "edit_audios.h" EditAudioPorts::EditAudioPorts(QString station,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -52,12 +52,6 @@ EditAudioPorts::EditAudioPorts(QString station,QWidget *parent) setWindowTitle("RDAdmin - "+tr("Edit AudioScience Audio Ports")); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - // // Card Selector // @@ -68,7 +62,7 @@ EditAudioPorts::EditAudioPorts(QString station,QWidget *parent) this,SLOT(cardSelectedData(int))); QLabel *label=new QLabel(edit_card_box,tr("Card:"),this); label->setGeometry(10,16,60,22); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight); // @@ -79,7 +73,7 @@ EditAudioPorts::EditAudioPorts(QString station,QWidget *parent) card_driver_edit->setReadOnly(true); label=new QLabel(edit_card_box,tr("Card Driver:"),this); label->setGeometry(140,16,80,22); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight); // @@ -90,10 +84,9 @@ EditAudioPorts::EditAudioPorts(QString station,QWidget *parent) edit_clock_box->setInsertionPolicy(QComboBox::NoInsert); edit_clock_label=new QLabel(edit_clock_box,tr("Clock Source:"),this); edit_clock_label->setGeometry(395,16,100,22); - edit_clock_label->setFont(font); + edit_clock_label->setFont(labelFont()); edit_clock_label->setAlignment(Qt::AlignRight); - // for(int j=0;jsetGeometry(50+170*i,55+j*180,170,22); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignHCenter); QSignalMapper *mapper=new QSignalMapper(this); connect(mapper,SIGNAL(mapped(int)),this,SLOT(inputMapData(int))); @@ -114,6 +107,7 @@ EditAudioPorts::EditAudioPorts(QString station,QWidget *parent) mapper->setMapping(edit_type_box[j*4+i],j*4+i); connect(edit_type_box[j*4+i],SIGNAL(activated(int)),mapper,SLOT(map())); edit_type_label[j*4+i]=new QLabel(edit_type_box[j*4+i],tr("Type:"),this); + edit_type_label[j*4+i]->setFont(labelFont()); edit_type_label[j*4+i]->setGeometry(50+170*i,81+j*180,40,22); edit_type_label[j*4+i]->setAlignment(Qt::AlignRight); edit_mode_box[j*4+i]=new QComboBox(this); @@ -126,6 +120,7 @@ EditAudioPorts::EditAudioPorts(QString station,QWidget *parent) mapper->setMapping(edit_mode_box[j*4+i],j*4+i); connect(edit_mode_box[j*4+i],SIGNAL(activated(int)),mapper,SLOT(map())); edit_mode_label[j*4+i]=new QLabel(edit_type_box[j*4+i],tr("Mode:"),this); + edit_mode_label[j*4+i]->setFont(labelFont()); edit_mode_label[j*4+i]->setGeometry(50+170*i,111+j*180,40,22); edit_mode_label[j*4+i]->setAlignment(Qt::AlignRight); @@ -135,6 +130,7 @@ EditAudioPorts::EditAudioPorts(QString station,QWidget *parent) edit_input_box[j*4+i]->setSuffix(tr(" dB")); edit_input_label[j*4+i]= new QLabel(edit_type_box[j*4+i],tr("Ref. Level:"),this); + edit_input_label[j*4+i]->setFont(labelFont()); edit_input_label[j*4+i]->setGeometry(10+170*i,140+j*180,80,22); edit_input_label[j*4+i]->setAlignment(Qt::AlignRight); @@ -144,7 +140,7 @@ EditAudioPorts::EditAudioPorts(QString station,QWidget *parent) str=QString(tr("Output Port")); label=new QLabel(str+QString().sprintf(" %d",j*4+i),this); label->setGeometry(50+170*i,170+j*180,170,22); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignHCenter); edit_output_box[j*4+i]=new QSpinBox(this); @@ -153,6 +149,7 @@ EditAudioPorts::EditAudioPorts(QString station,QWidget *parent) edit_output_box[j*4+i]->setSuffix(tr(" dB")); edit_output_label[j*4+i]= new QLabel(edit_type_box[j*4+i],tr("Ref. Level:"),this); + edit_output_label[j*4+i]->setFont(labelFont()); edit_output_label[j*4+i]->setGeometry(10+170*i,195+j*180,80,22); edit_output_label[j*4+i]->setAlignment(Qt::AlignRight); } @@ -163,7 +160,7 @@ EditAudioPorts::EditAudioPorts(QString station,QWidget *parent) // QPushButton *help_button=new QPushButton(this); help_button->setGeometry(10,sizeHint().height()-60, 80,50); - help_button->setFont(font); + help_button->setFont(buttonFont()); help_button->setText(tr("&Help")); connect(help_button,SIGNAL(clicked()),this,SLOT(helpData())); @@ -173,7 +170,7 @@ EditAudioPorts::EditAudioPorts(QString station,QWidget *parent) QPushButton *close_button=new QPushButton(this); close_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, 80,50); - close_button->setFont(font); + close_button->setFont(buttonFont()); close_button->setText(tr("&Close")); connect(close_button,SIGNAL(clicked()),this,SLOT(closeData())); diff --git a/rdadmin/edit_audios.h b/rdadmin/edit_audios.h index b6a495d1..e83937b3 100644 --- a/rdadmin/edit_audios.h +++ b/rdadmin/edit_audios.h @@ -2,7 +2,7 @@ // // Edit a Rivendell Audio Port Configuration // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 EDIT_AUDIOS_H #define EDIT_AUDIOS_H -#include #include #include #include @@ -31,11 +30,12 @@ #include #include +#include #include #include "help_audios.h" -class EditAudioPorts : public QDialog +class EditAudioPorts : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_cartslots.cpp b/rdadmin/edit_cartslots.cpp index 161e37aa..5baf27d4 100644 --- a/rdadmin/edit_cartslots.cpp +++ b/rdadmin/edit_cartslots.cpp @@ -2,7 +2,7 @@ // // Edit Rivendell CartSlot Configuration // -// (C) Copyright 2012-2018 Fred Gleason +// (C) Copyright 2012-2019 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 @@ -19,7 +19,6 @@ // #include -//Added by qt3to4: #include #include @@ -34,7 +33,7 @@ EditCartSlots::EditCartSlots(RDStation *station,RDStation *cae_station, QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -55,22 +54,12 @@ EditCartSlots::EditCartSlots(RDStation *station,RDStation *cae_station, setWindowTitle("RDAdmin - "+tr("Edit CartSlots")); - // - // Fonts - // - QFont font("helvetica",12,QFont::Normal); - font.setPixelSize(12); - QFont label_font("helvetica",12,QFont::Bold); - label_font.setPixelSize(12); - QFont title_font("helvetica",14,QFont::Bold); - title_font.setPixelSize(14); - // // Global Settings // QLabel *label=new QLabel(tr("Global Settings"),this); label->setGeometry(10,10,sizeHint().width()-20,20); - label->setFont(title_font); + label->setFont(sectionLabelFont()); label->setAlignment(Qt::AlignCenter); // @@ -83,7 +72,7 @@ EditCartSlots::EditCartSlots(RDStation *station,RDStation *cae_station, this,SLOT(quantityChangedData(int))); label=new QLabel(edit_slot_columns_spin,tr("Slot Columns:"),this); label->setGeometry(10,32,112,20); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -96,7 +85,7 @@ EditCartSlots::EditCartSlots(RDStation *station,RDStation *cae_station, this,SLOT(quantityChangedData(int))); label=new QLabel(edit_slot_rows_spin,tr("Slot Rows:"),this); label->setGeometry(10,54,112,20); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -108,19 +97,19 @@ EditCartSlots::EditCartSlots(RDStation *station,RDStation *cae_station, this,SLOT(slotChangedData(int))); label=new QLabel(edit_slot_box,tr("Slot"),this); label->setGeometry(10,98,92,20); - label->setFont(title_font); + label->setFont(sectionLabelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); label=new QLabel(tr("Settings"),this); label->setGeometry(172,98,sizeHint().width()-172,20); - label->setFont(title_font); + label->setFont(sectionLabelFont()); // // Channel Assignments // label=new QLabel(tr("Channel Assignments"),this); label->setGeometry(10,123,sizeHint().width()-20,20); - label->setFont(label_font); + label->setFont(sectionLabelFont()); label->setAlignment(Qt::AlignCenter); // @@ -134,7 +123,7 @@ EditCartSlots::EditCartSlots(RDStation *station,RDStation *cae_station, this,SLOT(cardChangedData(int))); label=new QLabel(edit_card_spin,tr("Card:"),this); label->setGeometry(10,145,112,20); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -146,7 +135,7 @@ EditCartSlots::EditCartSlots(RDStation *station,RDStation *cae_station, edit_input_spin->setSpecialValueText(tr("None")); label=new QLabel(edit_input_spin,tr("Input Port:"),this); label->setGeometry(10,167,112,20); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -158,7 +147,7 @@ EditCartSlots::EditCartSlots(RDStation *station,RDStation *cae_station, edit_output_spin->setSpecialValueText(tr("None")); label=new QLabel(edit_output_spin,tr("Output Port:"),this); label->setGeometry(10,189,112,20); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -166,7 +155,7 @@ EditCartSlots::EditCartSlots(RDStation *station,RDStation *cae_station, // label=new QLabel(tr("Default Settings"),this); label->setGeometry(10,218,sizeHint().width()-20,20); - label->setFont(label_font); + label->setFont(sectionLabelFont()); label->setAlignment(Qt::AlignCenter); // @@ -177,7 +166,7 @@ EditCartSlots::EditCartSlots(RDStation *station,RDStation *cae_station, edit_service_label= new QLabel(edit_service_box,tr("Service:"),this); edit_service_label->setGeometry(10,240,112,20); - edit_service_label->setFont(font); + edit_service_label->setFont(labelFont()); edit_service_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); sql="select NAME from SERVICES order by NAME"; q=new RDSqlQuery(sql); @@ -198,7 +187,7 @@ EditCartSlots::EditCartSlots(RDStation *station,RDStation *cae_station, connect(edit_mode_box,SIGNAL(activated(int)),this,SLOT(modeData(int))); label=new QLabel(edit_mode_box,tr("Slot Mode:"),this); label->setGeometry(10,262,112,20); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -211,7 +200,7 @@ EditCartSlots::EditCartSlots(RDStation *station,RDStation *cae_station, edit_play_mode_box->insertItem(tr("Hook")); edit_play_mode_label=new QLabel(edit_play_mode_box,tr("Play Mode:"),this); edit_play_mode_label->setGeometry(10,284,112,20); - edit_play_mode_label->setFont(font); + edit_play_mode_label->setFont(labelFont()); edit_play_mode_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -227,7 +216,7 @@ EditCartSlots::EditCartSlots(RDStation *station,RDStation *cae_station, edit_cartaction_label= new QLabel(edit_cartaction_box,tr("At Startup:"),this); edit_cartaction_label->setGeometry(10,306,112,20); - edit_cartaction_label->setFont(font); + edit_cartaction_label->setFont(labelFont()); edit_cartaction_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -238,11 +227,11 @@ EditCartSlots::EditCartSlots(RDStation *station,RDStation *cae_station, edit_cart_edit->setReadOnly(true); edit_cart_label=new QLabel(edit_cart_edit,tr("Cart:"),this); edit_cart_label->setGeometry(10,333,132,20); - edit_cart_label->setFont(font); + edit_cart_label->setFont(labelFont()); edit_cart_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); edit_cart_button=new QPushButton(tr("Select"),this); - edit_cart_button->setGeometry(212,333,65,26); - edit_cart_button->setFont(font); + edit_cart_button->setGeometry(212,333,50,20); + edit_cart_button->setFont(subButtonFont()); connect(edit_cart_button,SIGNAL(clicked()),this,SLOT(cartSelectData())); // @@ -257,7 +246,7 @@ EditCartSlots::EditCartSlots(RDStation *station,RDStation *cae_station, } edit_stop_action_label=new QLabel(edit_stop_action_box,tr("At Playout End:"),this); edit_stop_action_label->setGeometry(10,360,112,20); - edit_stop_action_label->setFont(font); + edit_stop_action_label->setFont(labelFont()); edit_stop_action_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -265,7 +254,7 @@ EditCartSlots::EditCartSlots(RDStation *station,RDStation *cae_station, // QPushButton *button=new QPushButton(tr("Close"),this); button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50); - button->setFont(label_font); + button->setFont(buttonFont()); connect(button,SIGNAL(clicked()),this,SLOT(closeData())); // diff --git a/rdadmin/edit_cartslots.h b/rdadmin/edit_cartslots.h index 2e69df2f..6658a6a4 100644 --- a/rdadmin/edit_cartslots.h +++ b/rdadmin/edit_cartslots.h @@ -2,7 +2,7 @@ // // Edit Rivendell CartSlot Configuration // -// (C) Copyright 2012-2018 Fred Gleason +// (C) Copyright 2012-2019 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 @@ #ifndef EDIT_CARTSLOTS_H #define EDIT_CARTSLOTS_H -#include #include #include #include #include #include +#include #include -class EditCartSlots : public QDialog +class EditCartSlots : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_channelgpios.cpp b/rdadmin/edit_channelgpios.cpp index b63c7521..5b3790a5 100644 --- a/rdadmin/edit_channelgpios.cpp +++ b/rdadmin/edit_channelgpios.cpp @@ -2,7 +2,7 @@ // // Edit Rivendell Channel GPIO Settings // -// (C) Copyright 2013-2018 Fred Gleason +// (C) Copyright 2013-2019 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,7 +22,7 @@ EditChannelGpios::EditChannelGpios(RDAirPlayConf *conf, RDAirPlayConf::Channel chan,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -31,26 +31,18 @@ EditChannelGpios::EditChannelGpios(RDAirPlayConf *conf, setWindowTitle("RDAdmin - "+tr("Edit Channel GPIOs")); - // - // Fonts - // - QFont title_font("helvetica",14,QFont::Bold); - title_font.setPixelSize(14); - QFont label_font("helvetica",12,QFont::Bold); - label_font.setPixelSize(12); - // // Title // edit_title_label=new QLabel(RDAirPlayConf::channelText(chan),this); - edit_title_label->setFont(title_font); + edit_title_label->setFont(sectionLabelFont()); edit_title_label->setAlignment(Qt::AlignCenter); // // Start GPI // edit_start_gpi_label=new QLabel(tr("Start GPI:"),this); - edit_start_gpi_label->setFont(label_font); + edit_start_gpi_label->setFont(labelFont()); edit_start_gpi_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); edit_start_gpi_matrix_spin=new QSpinBox(this); @@ -77,7 +69,7 @@ EditChannelGpios::EditChannelGpios(RDAirPlayConf *conf, // Start GPO // edit_start_gpo_label=new QLabel(tr("Start GPO:"),this); - edit_start_gpo_label->setFont(label_font); + edit_start_gpo_label->setFont(labelFont()); edit_start_gpo_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); edit_start_gpo_matrix_spin=new QSpinBox(this); @@ -93,7 +85,7 @@ EditChannelGpios::EditChannelGpios(RDAirPlayConf *conf, // Stop GPI // edit_stop_gpi_label=new QLabel(tr("Stop GPI:"),this); - edit_stop_gpi_label->setFont(label_font); + edit_stop_gpi_label->setFont(labelFont()); edit_stop_gpi_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); edit_stop_gpi_matrix_spin=new QSpinBox(this); @@ -109,7 +101,7 @@ EditChannelGpios::EditChannelGpios(RDAirPlayConf *conf, // Stop GPO // edit_stop_gpo_label=new QLabel(tr("Stop GPO:"),this); - edit_stop_gpo_label->setFont(label_font); + edit_stop_gpo_label->setFont(labelFont()); edit_stop_gpo_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); edit_stop_gpo_matrix_spin=new QSpinBox(this); @@ -125,7 +117,7 @@ EditChannelGpios::EditChannelGpios(RDAirPlayConf *conf, // Signaling Type // edit_gpio_type_label=new QLabel(tr("Signalling Type:"),this); - edit_gpio_type_label->setFont(label_font); + edit_gpio_type_label->setFont(labelFont()); edit_gpio_type_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); edit_gpio_type_box=new QComboBox(this); @@ -136,11 +128,11 @@ EditChannelGpios::EditChannelGpios(RDAirPlayConf *conf, // Buttons // edit_ok_button=new QPushButton(tr("OK"),this); - edit_ok_button->setFont(label_font); + edit_ok_button->setFont(buttonFont()); connect(edit_ok_button,SIGNAL(clicked()),this,SLOT(okData())); edit_cancel_button=new QPushButton(tr("Cancel"),this); - edit_cancel_button->setFont(label_font); + edit_cancel_button->setFont(buttonFont()); connect(edit_cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); // diff --git a/rdadmin/edit_channelgpios.h b/rdadmin/edit_channelgpios.h index 073f0e9d..c8bf4657 100644 --- a/rdadmin/edit_channelgpios.h +++ b/rdadmin/edit_channelgpios.h @@ -2,7 +2,7 @@ // // Edit Rivendell Channel GPIO Settings // -// (C) Copyright 2013-2018 Fred Gleason +// (C) Copyright 2013-2019 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,15 +21,15 @@ #ifndef EDIT_CHANNELGPIOS_H #define EDIT_CHANNELGPIOS_H -#include #include #include #include #include #include +#include -class EditChannelGpios : public QDialog +class EditChannelGpios : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_decks.cpp b/rdadmin/edit_decks.cpp index 3569d888..c4ba8c48 100644 --- a/rdadmin/edit_decks.cpp +++ b/rdadmin/edit_decks.cpp @@ -2,7 +2,7 @@ // // Edit a Rivendell RDCatch Deck Configuration // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ -40,7 +40,7 @@ #include "globals.h" EditDecks::EditDecks(RDStation *station,RDStation *cae_station,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -55,14 +55,6 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,QWidget *parent) setWindowTitle("RDAdmin - "+tr("Configure RDCatch")); - // - // Create Fonts - // - QFont small_font=QFont("Helvetica",12,QFont::Bold); - small_font.setPixelSize(12); - QFont big_font=QFont("Helvetica",14,QFont::Bold); - big_font.setPixelSize(14); - // // Create RDCatchConf // @@ -77,7 +69,7 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,QWidget *parent) connect(edit_record_deck_box,SIGNAL(activated(int)), this,SLOT(recordDeckActivatedData(int))); QLabel *label=new QLabel(edit_record_deck_box,tr("Record Deck"),this); - label->setFont(small_font); + label->setFont(sectionLabelFont()); label->setGeometry(35,14,100,22); label->setAlignment(Qt::AlignRight); @@ -86,7 +78,7 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,QWidget *parent) // label=new QLabel(tr("Settings"),this); label->setGeometry(10,40,100,24); - label->setFont(big_font); + label->setFont(sectionLabelFont()); // // Card Selector @@ -106,6 +98,7 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,QWidget *parent) connect(edit_monitor_box,SIGNAL(valueChanged(int)), this,SLOT(monitorPortChangedData(int))); edit_monitor_label=new QLabel(edit_monitor_box,tr("Monitor Port:"),this); + edit_monitor_label->setFont(labelFont()); edit_monitor_label->setGeometry(10,112,112,19); edit_monitor_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -115,6 +108,7 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,QWidget *parent) edit_default_on_box->insertItem(tr("On")); edit_default_on_label= new QLabel(edit_default_on_box,tr("Monitor defaults to"),this); + edit_default_on_label->setFont(labelFont()); edit_default_on_label->setGeometry(195,112,105,19); edit_default_on_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -127,6 +121,7 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,QWidget *parent) connect(edit_format_box,SIGNAL(activated(int)), this,SLOT(formatActivatedData(int))); label=new QLabel(edit_format_box,tr("Format:"),this); + label->setFont(labelFont()); label->setGeometry(10,136,110,24); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -137,6 +132,7 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,QWidget *parent) edit_bitrate_box->setGeometry(125,160,140,24); edit_bitrate_box->setInsertionPolicy(QComboBox::NoInsert); edit_bitrate_label=new QLabel(edit_bitrate_box,tr("Bit Rate:"),this); + edit_bitrate_label->setFont(labelFont()); edit_bitrate_label->setGeometry(10,160,110,24); edit_bitrate_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -147,6 +143,7 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,QWidget *parent) edit_swstation_box->setGeometry(125,190,250,24); edit_swstation_box->setInsertionPolicy(QComboBox::NoInsert); edit_swstation_label=new QLabel(edit_swstation_box,tr("Switcher Host:"),this); + edit_swstation_label->setFont(labelFont()); edit_swstation_label->setGeometry(10,190,110,24); edit_swstation_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); connect(edit_swstation_box,SIGNAL(activated(const QString &)), @@ -160,6 +157,7 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,QWidget *parent) edit_swmatrix_box->setInsertionPolicy(QComboBox::NoInsert); edit_swmatrix_box->setDisabled(true); edit_swmatrix_label=new QLabel(edit_swmatrix_box,tr("Switcher Matrix:"),this); + edit_swmatrix_label->setFont(labelFont()); edit_swmatrix_label->setGeometry(10,214,110,24); edit_swmatrix_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); edit_swmatrix_label->setDisabled(true); @@ -174,6 +172,7 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,QWidget *parent) edit_swoutput_box->setInsertionPolicy(QComboBox::NoInsert); edit_swoutput_box->setDisabled(true); edit_swoutput_label=new QLabel(edit_swoutput_box,tr("Switcher Output:"),this); + edit_swoutput_label->setFont(labelFont()); edit_swoutput_label->setGeometry(10,238,110,24); edit_swoutput_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); edit_swoutput_label->setDisabled(true); @@ -186,10 +185,12 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,QWidget *parent) edit_swdelay_box->setRange(0,20); edit_swdelay_box->setDisabled(true); edit_swdelay_label=new QLabel(edit_swdelay_box,tr("Switcher Delay:"),this); + edit_swdelay_label->setFont(labelFont()); edit_swdelay_label->setGeometry(10,262,110,24); edit_swdelay_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); edit_swdelay_label->setDisabled(true); edit_swdelay_unit=new QLabel(edit_swdelay_box,tr("1/10 sec"),this); + edit_swdelay_unit->setFont(labelFont()); edit_swdelay_unit->setGeometry(170,262,60,24); edit_swdelay_unit->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); edit_swdelay_unit->setDisabled(true); @@ -202,7 +203,7 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,QWidget *parent) // label=new QLabel(tr("Defaults"),this); label->setGeometry(10,276,100,24); - label->setFont(big_font); + label->setFont(sectionLabelFont()); // // Default Channels @@ -211,6 +212,7 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,QWidget *parent) edit_channels_box->setGeometry(125,300,60,24); edit_channels_box->setInsertionPolicy(QComboBox::NoInsert); label=new QLabel(edit_channels_box,tr("Channels:"),this); + label->setFont(labelFont()); label->setGeometry(10,300,110,24); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -222,6 +224,7 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,QWidget *parent) edit_threshold_box->setSuffix(" dB"); edit_threshold_box->setRange(-100,0); label=new QLabel(edit_threshold_box,tr("Trim Threshold:"),this); + label->setFont(labelFont()); label->setGeometry(10,324,110,24); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -230,11 +233,12 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,QWidget *parent) // label=new QLabel(tr("Host-Wide Settings"),this); label->setGeometry(10,369,200,24); - label->setFont(big_font); + label->setFont(sectionLabelFont()); edit_errorrml_edit=new QLineEdit(this); edit_errorrml_edit->setGeometry(125,393,248,24); label=new QLabel(edit_errorrml_edit,tr("Error RML:"),this); + label->setFont(labelFont()); label->setGeometry(10,393,110,24); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -247,7 +251,7 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,QWidget *parent) connect(edit_play_deck_box,SIGNAL(activated(int)), this,SLOT(playDeckActivatedData(int))); label=new QLabel(edit_play_deck_box,tr("Play Deck"),this); - label->setFont(small_font); + label->setFont(sectionLabelFont()); label->setGeometry(390,14,80,22); label->setAlignment(Qt::AlignRight); @@ -264,13 +268,14 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,QWidget *parent) // edit_event_section_label=new QLabel(tr("Event Carts"),this); edit_event_section_label->setGeometry(395,99,100,24); - edit_event_section_label->setFont(big_font); + edit_event_section_label->setFont(sectionLabelFont()); QSignalMapper *mapper=new QSignalMapper(this); connect(mapper,SIGNAL(mapped(int)),this,SLOT(eventCartSelectedData(int))); for(unsigned i=0;isetFont(labelFont()); edit_event_labels[i+j]->setAlignment(Qt::AlignRight|Qt::AlignVCenter); edit_event_labels[i+j]->setGeometry(387+165*j,126+14*i,20,20); @@ -280,6 +285,7 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,QWidget *parent) setValidator(new QIntValidator(1,RD_MAX_CART_NUMBER,this)); edit_event_buttons[i+j]=new QPushButton(tr("Select"),this); + edit_event_buttons[i+j]->setFont(subButtonFont()); edit_event_buttons[i+j]->setGeometry(477+165*j,124+14*i,60,24); mapper->setMapping(edit_event_buttons[i+j],i+j); connect(edit_event_buttons[i+j],SIGNAL(clicked()), @@ -293,7 +299,7 @@ EditDecks::EditDecks(RDStation *station,RDStation *cae_station,QWidget *parent) QPushButton *close_button=new QPushButton(this); close_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, 80,50); - close_button->setFont(small_font); + close_button->setFont(buttonFont()); close_button->setText(tr("&Close")); close_button->setDefault(true); connect(close_button,SIGNAL(clicked()),this,SLOT(closeData())); diff --git a/rdadmin/edit_decks.h b/rdadmin/edit_decks.h index ef4eae93..dd2144c8 100644 --- a/rdadmin/edit_decks.h +++ b/rdadmin/edit_decks.h @@ -2,7 +2,7 @@ // // Edit Rivendell Netcatcher Configuration // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,7 +23,6 @@ #include -#include #include #include #include @@ -32,11 +31,12 @@ #include #include +#include #include #include #include -class EditDecks : public QDialog +class EditDecks : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_dropbox.cpp b/rdadmin/edit_dropbox.cpp index 4150be87..e2918a6a 100644 --- a/rdadmin/edit_dropbox.cpp +++ b/rdadmin/edit_dropbox.cpp @@ -2,7 +2,7 @@ // // Edit a Rivendell Dropbox Configuration // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ -20,7 +20,6 @@ #include -#include #include #include #include @@ -43,7 +42,7 @@ #include "edit_dropbox.h" EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -63,14 +62,6 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent) setWindowTitle("RDAdmin - "+tr("Dropbox Configuration")+" ["+ tr("ID")+QString().sprintf(": %d]",id)); - // - // Create Fonts - // - QFont normal_font=QFont("Helvetica",12,QFont::Normal); - normal_font.setPixelSize(12); - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - // // Dialogs // @@ -80,43 +71,43 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent) // Group Name // box_group_name_box=new QComboBox(this); - box_group_name_box->setGeometry(120,10,100,20); + box_group_name_box->setGeometry(140,10,100,20); QLabel *label=new QLabel(box_group_name_box,tr("Default Group:"),this); - label->setGeometry(10,10,105,20); - label->setFont(font); + label->setGeometry(10,10,125,20); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Path // box_path_edit=new QLineEdit(this); - box_path_edit->setGeometry(120,32,sizeHint().width()-190,19); + box_path_edit->setGeometry(140,32,sizeHint().width()-210,19); box_path_edit->setMaxLength(255); label=new QLabel(box_path_edit,tr("&Path Spec:"),this); - label->setGeometry(10,32,105,19); - label->setFont(font); + label->setGeometry(10,32,125,19); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); QPushButton *button= new QPushButton(tr("Select"),this); button->setGeometry(sizeHint().width()-60,30,50,23); - button->setFont(normal_font); + button->setFont(subButtonFont()); connect(button,SIGNAL(clicked()),this,SLOT(selectPathData())); // // To Cart // box_to_cart_edit=new QLineEdit(this); - box_to_cart_edit->setGeometry(120,54,60,19); + box_to_cart_edit->setGeometry(140,54,60,19); box_to_cart_edit->setValidator(new QIntValidator(1,999999,this)); box_to_cart_edit->setMaxLength(6); label=new QLabel(box_to_cart_edit,tr("To &Cart:"),this); - label->setGeometry(10,54,105,19); - label->setFont(font); + label->setGeometry(10,54,125,19); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); box_select_cart_button= new QPushButton(tr("Select"),this); - box_select_cart_button->setGeometry(190,52,50,23); - box_select_cart_button->setFont(normal_font); + box_select_cart_button->setGeometry(210,52,50,23); + box_select_cart_button->setFont(subButtonFont()); connect(box_select_cart_button,SIGNAL(clicked()), this,SLOT(selectCartData())); @@ -124,33 +115,33 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent) // Delete Cuts // box_delete_cuts_box=new QCheckBox(this); - box_delete_cuts_box->setGeometry(260,56,15,15); + box_delete_cuts_box->setGeometry(280,56,15,15); box_delete_cuts_label= new QLabel(box_delete_cuts_box,tr("Delete cuts before importing"),this); - box_delete_cuts_label->setGeometry(280,54,sizeHint().width()-150,20); - box_delete_cuts_label->setFont(font); + box_delete_cuts_label->setGeometry(300,54,sizeHint().width()-150,20); + box_delete_cuts_label->setFont(labelFont()); box_delete_cuts_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // // Metadata Format // box_metadata_pattern_edit=new QLineEdit(this); - box_metadata_pattern_edit->setGeometry(120,76,sizeHint().width()-170,19); + box_metadata_pattern_edit->setGeometry(140,76,sizeHint().width()-170,19); box_metadata_pattern_edit->setMaxLength(64); label=new QLabel(box_metadata_pattern_edit,tr("&Metadata Pattern:"),this); - label->setGeometry(10,76,105,19); - label->setFont(font); + label->setGeometry(10,76,125,19); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // User Defined Field // box_user_defined_edit=new QLineEdit(this); - box_user_defined_edit->setGeometry(120,98,sizeHint().width()-170,19); + box_user_defined_edit->setGeometry(140,98,sizeHint().width()-170,19); box_user_defined_edit->setMaxLength(255); label=new QLabel(box_user_defined_edit,tr("&User Defined:"),this); - label->setGeometry(10,98,105,19); - label->setFont(font); + label->setGeometry(10,98,125,19); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -160,24 +151,24 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent) box_log_to_syslog_check->setGeometry(50,124,15,15); label=new QLabel(box_log_to_syslog_check,tr("Log events in Syslog"),this); label->setGeometry(70,122,250,19); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); box_log_path_edit=new QLineEdit(this); - box_log_path_edit->setGeometry(120,141,sizeHint().width()-190,19); + box_log_path_edit->setGeometry(140,141,sizeHint().width()-210,19); box_log_path_edit->setMaxLength(255); connect(box_log_to_syslog_check,SIGNAL(toggled(bool)), box_log_path_edit,SLOT(setDisabled(bool))); box_log_path_label= new QLabel(box_log_path_edit,tr("&Log File:"),this); - box_log_path_label->setGeometry(10,141,105,19); - box_log_path_label->setFont(font); + box_log_path_label->setGeometry(10,141,125,19); + box_log_path_label->setFont(labelFont()); box_log_path_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); connect(box_log_to_syslog_check,SIGNAL(toggled(bool)), box_log_path_label,SLOT(setDisabled(bool))); box_log_path_button=new QPushButton(tr("Select"),this); box_log_path_button->setGeometry(sizeHint().width()-60,138,50,23); - box_log_path_button->setFont(normal_font); + box_log_path_button->setFont(subButtonFont()); connect(box_log_path_button,SIGNAL(clicked()), this,SLOT(selectLogPathData())); connect(box_log_to_syslog_check,SIGNAL(toggled(bool)), @@ -188,7 +179,7 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent) // box_schedcodes_button=new QPushButton(tr("Scheduler Codes"),this); box_schedcodes_button->setGeometry(110,167,200,25); - box_schedcodes_button->setFont(font); + box_schedcodes_button->setFont(buttonFont()); connect(box_schedcodes_button,SIGNAL(clicked()),this,SLOT(schedcodesData())); // @@ -199,7 +190,7 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent) label=new QLabel(box_delete_source_box,tr("Delete source files after import"), this); label->setGeometry(110,197,sizeHint().width()-120,20); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // @@ -209,7 +200,7 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent) box_force_to_mono_box->setGeometry(90,221,15,15); label=new QLabel(box_force_to_mono_box,tr("Force to Monaural"),this); label->setGeometry(110,219,sizeHint().width()-120,20); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // @@ -219,16 +210,17 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent) box_normalization_box->setGeometry(90,243,15,15); label=new QLabel(box_normalization_box,tr("Normalize Levels"),this); label->setGeometry(110,241,100,20); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); box_normalization_level_spin=new QSpinBox(this); box_normalization_level_spin->setGeometry(275,241,50,20); box_normalization_level_spin->setRange(-100,-1); box_normalization_level_label=new QLabel(tr("Level:"),this); box_normalization_level_label->setGeometry(210,241,60,20); - box_normalization_level_label->setFont(font); + box_normalization_level_label->setFont(labelFont()); box_normalization_level_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); box_normalization_level_unit=new QLabel(tr("dBFS"),this); + box_normalization_level_unit->setFont(labelFont()); box_normalization_level_unit->setGeometry(330,241,60,20); box_normalization_level_unit->setAlignment(Qt::AlignVCenter|Qt::AlignLeft); connect(box_normalization_box,SIGNAL(toggled(bool)), @@ -241,16 +233,17 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent) box_autotrim_box->setGeometry(90,267,15,15); label=new QLabel(box_autotrim_box,tr("Autotrim Cuts"),this); label->setGeometry(110,265,100,20); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); box_autotrim_level_spin=new QSpinBox(this); box_autotrim_level_spin->setGeometry(275,265,50,20); box_autotrim_level_spin->setRange(-100,-1); box_autotrim_level_label=new QLabel(tr("Level:"),this); box_autotrim_level_label->setGeometry(210,265,60,20); - box_autotrim_level_label->setFont(font); + box_autotrim_level_label->setFont(labelFont()); box_autotrim_level_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); box_autotrim_level_unit=new QLabel(tr("dBFS"),this); + box_autotrim_level_unit->setFont(labelFont()); box_autotrim_level_unit->setGeometry(330,265,60,20); box_autotrim_level_unit->setAlignment(Qt::AlignVCenter|Qt::AlignLeft); connect(box_autotrim_box,SIGNAL(toggled(bool)), @@ -263,29 +256,31 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent) box_segue_box->setGeometry(90,293,15,15); label=new QLabel(box_segue_box,tr("Insert Segue Markers"),this); label->setGeometry(110,291,sizeHint().width()-40,20); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); box_segue_level_spin=new QSpinBox(this); - box_segue_level_spin->setGeometry(300,317,50,20); + box_segue_level_spin->setGeometry(285,317,50,20); box_segue_level_spin->setRange(-100,0); box_segue_level_label= new QLabel(box_segue_level_spin,tr("Segue Level:"),this); box_segue_level_label->setGeometry(120,317,160,20); - box_segue_level_label->setFont(font); + box_segue_level_label->setFont(labelFont()); box_segue_level_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); box_segue_level_unit=new QLabel(box_segue_level_spin,("dBFS"),this); + box_segue_level_unit->setFont(labelFont()); box_segue_level_unit->setGeometry(360,318,60,20); box_segue_level_unit->setAlignment(Qt::AlignVCenter|Qt::AlignLeft); box_segue_length_spin=new QSpinBox(this); - box_segue_length_spin->setGeometry(300,342,70,20); + box_segue_length_spin->setGeometry(285,342,70,20); box_segue_length_spin->setRange(0,180000); box_segue_length_label= new QLabel(box_segue_length_spin,tr("Segue Length:"),this); box_segue_length_label->setGeometry(120,342,160,20); - box_segue_length_label->setFont(font); + box_segue_length_label->setFont(labelFont()); box_segue_length_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); box_segue_length_unit=new QLabel(box_segue_length_spin,("msec"),this); + box_segue_length_unit->setFont(labelFont()); box_segue_length_unit->setGeometry(375,343,60,20); box_segue_length_unit->setAlignment(Qt::AlignVCenter|Qt::AlignLeft); connect(box_segue_box,SIGNAL(toggled(bool)), @@ -299,7 +294,7 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent) label=new QLabel(box_use_cartchunk_id_box, tr("Get cart number from CartChunk CutID"),this); label->setGeometry(110,370,sizeHint().width()-40,20); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // @@ -310,7 +305,7 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent) label=new QLabel(box_title_from_cartchunk_id_box, tr("Get cart title from CartChunk CutID"),this); label->setGeometry(110,394,sizeHint().width()-40,20); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // @@ -321,23 +316,22 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent) label=new QLabel(box_fix_broken_formats_box, tr("Attempt to work around malformatted input files"),this); label->setGeometry(110,418,sizeHint().width()-40,20); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // // Start Date Offset // - box_startoffset_spin= - new QSpinBox(this); + box_startoffset_spin=new QSpinBox(this); box_startoffset_spin->setGeometry(215,444,50,20); box_startoffset_spin->setRange(-7,7); label=new QLabel(box_startoffset_spin,tr("Offset start date by"),this); label->setGeometry(90,444,120,20); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); label=new QLabel(box_startoffset_spin,tr("days"),this); label->setGeometry(275,446,100,20); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // @@ -348,11 +342,11 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent) box_endoffset_spin->setRange(-7,7); label=new QLabel(box_endoffset_spin,tr("Offset end date by"),this); label->setGeometry(90,468,120,20); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); label=new QLabel(box_endoffset_spin,tr("days"),this); label->setGeometry(275,468,100,20); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // @@ -363,7 +357,7 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent) label=new QLabel(box_create_dates_box,tr("Create Dates when no Dates Exist"), this); label->setGeometry(110,490,sizeHint().width()-40,20); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); box_create_startdate_offset_spin=new QSpinBox(this); box_create_startdate_offset_spin->setGeometry(285,516,50,20); @@ -372,10 +366,11 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent) new QLabel(box_create_startdate_offset_spin,tr("Create start date offset:"), this); box_create_startdate_label->setGeometry(120,516,160,20); - box_create_startdate_label->setFont(font); + box_create_startdate_label->setFont(labelFont()); box_create_startdate_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); box_create_startdate_unit= new QLabel(box_create_startdate_offset_spin,("days"),this); + box_create_startdate_unit->setFont(labelFont()); box_create_startdate_unit->setGeometry(345,517,60,20); box_create_startdate_unit->setAlignment(Qt::AlignVCenter|Qt::AlignLeft); @@ -386,10 +381,11 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent) new QLabel(box_create_enddate_offset_spin,tr("Create end date offset:"), this); box_create_enddate_label->setGeometry(120,536,160,20); - box_create_enddate_label->setFont(font); + box_create_enddate_label->setFont(labelFont()); box_create_enddate_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); box_create_enddate_unit= new QLabel(box_create_enddate_offset_spin,("days"),this); + box_create_enddate_unit->setFont(labelFont()); box_create_enddate_unit->setGeometry(345,536,60,20); box_create_enddate_unit->setAlignment(Qt::AlignVCenter|Qt::AlignLeft); connect(box_create_dates_box,SIGNAL(toggled(bool)), @@ -400,10 +396,9 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent) // Reset Button // QPushButton *reset_button=new QPushButton(this); - reset_button-> - setGeometry(10,sizeHint().height()-60,80,50); + reset_button->setGeometry(10,sizeHint().height()-60,80,50); reset_button->setDefault(true); - reset_button->setFont(font); + reset_button->setFont(buttonFont()); reset_button->setText(tr("&Reset")); connect(reset_button,SIGNAL(clicked()),this,SLOT(resetData())); @@ -413,7 +408,7 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent) ok_button=new QPushButton(this); ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); ok_button->setDefault(true); - ok_button->setFont(font); + ok_button->setFont(buttonFont()); ok_button->setText(tr("&OK")); connect(ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -421,9 +416,9 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent) // Cancel Button // QPushButton *cancel_button=new QPushButton(this); - cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, - 80,50); - cancel_button->setFont(font); + cancel_button-> + setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50); + cancel_button->setFont(buttonFont()); cancel_button->setText(tr("&Cancel")); connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); @@ -497,7 +492,8 @@ EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent) QSize EditDropbox::sizeHint() const { - return QSize(450,644); + return QSize(490,644); + // return QSize(450,644); } diff --git a/rdadmin/edit_dropbox.h b/rdadmin/edit_dropbox.h index 4b6da681..23c549be 100644 --- a/rdadmin/edit_dropbox.h +++ b/rdadmin/edit_dropbox.h @@ -2,7 +2,7 @@ // // Edit a Rivendell Dropbox Configuration // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 EDIT_DROPBOX_H #define EDIT_DROPBOX_H -#include #include #include #include @@ -35,10 +34,11 @@ #include #include +#include #include #include -class EditDropbox : public QDialog +class EditDropbox : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_endpoint.cpp b/rdadmin/edit_endpoint.cpp index 03946d70..9c5d0aad 100644 --- a/rdadmin/edit_endpoint.cpp +++ b/rdadmin/edit_endpoint.cpp @@ -2,7 +2,7 @@ // // Edit a Rivendell Endpoint // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ -28,7 +28,7 @@ EditEndpoint::EditEndpoint(RDMatrix::Type type,RDMatrix::Endpoint endpoint, int pointnum,QString *pointname,QString *feedname, RDMatrix::Mode *mode,int *enginenum,int *devicenum, QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -61,14 +61,6 @@ EditEndpoint::EditEndpoint(RDMatrix::Type type,RDMatrix::Endpoint endpoint, setMinimumHeight(sizeHint().height()); setMaximumHeight(sizeHint().height()); - // - // Create Fonts - // - QFont bold_font=QFont("Helvetica",12,QFont::Bold); - bold_font.setPixelSize(12); - QFont font=QFont("Helvetica",12,QFont::Normal); - font.setPixelSize(12); - // // Text Validator // @@ -82,7 +74,7 @@ EditEndpoint::EditEndpoint(RDMatrix::Type type,RDMatrix::Endpoint endpoint, edit_endpoint_edit->setValidator(validator); QLabel *label=new QLabel(edit_endpoint_edit,tr("Name: "),this); label->setGeometry(10,13,60,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight); // @@ -93,7 +85,7 @@ EditEndpoint::EditEndpoint(RDMatrix::Type type,RDMatrix::Endpoint endpoint, edit_feed_edit->setValidator(validator); label=new QLabel(edit_feed_edit,tr("Feed: "),this); label->setGeometry(10,43,60,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight); if((edit_type!=RDMatrix::Unity4000)||(edit_endpoint!=RDMatrix::Input)) { edit_feed_edit->hide(); @@ -113,7 +105,7 @@ EditEndpoint::EditEndpoint(RDMatrix::Type type,RDMatrix::Endpoint endpoint, edit_mode_box->setGeometry(195,40,85,24); label->setGeometry(130,43,60,20); } - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight); if(((edit_type!=RDMatrix::Unity4000)&&(edit_type!=RDMatrix::StarGuideIII))|| (edit_endpoint!=RDMatrix::Input)) { @@ -134,7 +126,7 @@ EditEndpoint::EditEndpoint(RDMatrix::Type type,RDMatrix::Endpoint endpoint, label->setText(tr("Provider ID:")); } label->setGeometry(10,36,120,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); if((edit_type!=RDMatrix::LogitekVguest)&& ((edit_type!=RDMatrix::StarGuideIII)||(edit_endpoint!=RDMatrix::Input))) { @@ -152,7 +144,7 @@ EditEndpoint::EditEndpoint(RDMatrix::Type type,RDMatrix::Endpoint endpoint, label->setText(tr("Service ID:")); } label->setGeometry(10,62,120,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); if((edit_type!=RDMatrix::LogitekVguest)&& ((edit_type!=RDMatrix::StarGuideIII)||(edit_endpoint!=RDMatrix::Input))) { @@ -166,7 +158,7 @@ EditEndpoint::EditEndpoint(RDMatrix::Type type,RDMatrix::Endpoint endpoint, QPushButton *button=new QPushButton(this); button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); button->setDefault(true); - button->setFont(bold_font); + button->setFont(buttonFont()); button->setText(tr("&OK")); connect(button,SIGNAL(clicked()),this,SLOT(okData())); @@ -175,7 +167,7 @@ EditEndpoint::EditEndpoint(RDMatrix::Type type,RDMatrix::Endpoint endpoint, // button=new QPushButton(this); button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50); - button->setFont(bold_font); + button->setFont(buttonFont()); button->setText(tr("&Cancel")); connect(button,SIGNAL(clicked()),this,SLOT(cancelData())); diff --git a/rdadmin/edit_endpoint.h b/rdadmin/edit_endpoint.h index e7126f8d..7188c6cb 100644 --- a/rdadmin/edit_endpoint.h +++ b/rdadmin/edit_endpoint.h @@ -2,7 +2,7 @@ // // Edit a Rivendell Endpoint // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ #ifndef EDIT_ENDPOINT_H #define EDIT_ENDPOINT_H -#include #include #include #include #include -#include +#include #include +#include -class EditEndpoint : public QDialog +class EditEndpoint : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_feed.cpp b/rdadmin/edit_feed.cpp index b7dea754..f5310394 100644 --- a/rdadmin/edit_feed.cpp +++ b/rdadmin/edit_feed.cpp @@ -35,7 +35,7 @@ #include "globals.h" EditFeed::EditFeed(const QString &feed,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -51,14 +51,6 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) setWindowTitle("RDAdmin - "+tr("Feed: ")+feed); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont small_font=QFont("Helvetica",12,QFont::Normal); - small_font.setPixelSize(12); - // // Feed Name // @@ -68,14 +60,14 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) feed_keyname_edit->setReadOnly(true); QLabel *feed_keyname_label=new QLabel(feed_keyname_edit,tr("Key Name:"),this); feed_keyname_label->setGeometry(10,11,100,19); - feed_keyname_label->setFont(font); + feed_keyname_label->setFont(labelFont()); feed_keyname_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Channel Section // feed_channel_section_groupbox=new QGroupBox(tr("Channel Values"),this); - feed_channel_section_groupbox->setFont(font); + feed_channel_section_groupbox->setFont(labelFont()); feed_channel_section_groupbox->setGeometry(10,45,sizeHint().width()/2-10,227); // @@ -87,7 +79,7 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) feed_channel_title_label= new QLabel(feed_channel_title_edit,tr("Title:"),this); feed_channel_title_label->setGeometry(20,60,90,19); - feed_channel_title_label->setFont(font); + feed_channel_title_label->setFont(labelFont()); feed_channel_title_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -99,7 +91,7 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) feed_channel_category_label= new QLabel(feed_channel_category_edit,tr("Category:"),this); feed_channel_category_label->setGeometry(20,82,90,19); - feed_channel_category_label->setFont(font); + feed_channel_category_label->setFont(labelFont()); feed_channel_category_label-> setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -112,7 +104,7 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) feed_channel_link_label= new QLabel(feed_channel_link_edit,tr("Link:"),this); feed_channel_link_label->setGeometry(20,104,90,19); - feed_channel_link_label->setFont(font); + feed_channel_link_label->setFont(labelFont()); feed_channel_link_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -124,7 +116,7 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) feed_channel_copyright_label= new QLabel(feed_channel_copyright_edit,tr("Copyright:"),this); feed_channel_copyright_label->setGeometry(20,126,90,19); - feed_channel_copyright_label->setFont(font); + feed_channel_copyright_label->setFont(labelFont()); feed_channel_copyright_label-> setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -137,7 +129,7 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) feed_channel_webmaster_label= new QLabel(feed_channel_webmaster_edit,tr("Webmaster:"),this); feed_channel_webmaster_label->setGeometry(20,148,90,19); - feed_channel_webmaster_label->setFont(font); + feed_channel_webmaster_label->setFont(labelFont()); feed_channel_webmaster_label-> setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -151,22 +143,19 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) feed_channel_language_label= new QLabel(feed_channel_language_edit,tr("Language:"),this); feed_channel_language_label->setGeometry(20,170,90,19); - feed_channel_language_label->setFont(font); - feed_channel_language_label-> - setAlignment(Qt::AlignRight|Qt::AlignVCenter); + feed_channel_language_label->setFont(labelFont()); + feed_channel_language_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Channel Description // feed_channel_description_edit=new Q3TextEdit(this); - feed_channel_description_edit-> - setGeometry(115,192,375,76); + feed_channel_description_edit->setGeometry(115,192,375,76); feed_channel_description_label= new QLabel(feed_channel_description_edit,tr("Description:"),this); feed_channel_description_label->setGeometry(20,192,90,19); - feed_channel_description_label->setFont(font); - feed_channel_description_label-> - setAlignment(Qt::AlignRight|Qt::AlignVCenter); + feed_channel_description_label->setFont(labelFont()); + feed_channel_description_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Purge Audio URL @@ -179,7 +168,7 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) feed_purge_url_label= new QLabel(feed_purge_url_edit,tr("Audio Upload URL:"),this); feed_purge_url_label->setGeometry(20,280,130,19); - feed_purge_url_label->setFont(font); + feed_purge_url_label->setFont(labelFont()); feed_purge_url_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -193,7 +182,7 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) feed_purge_username_label= new QLabel(feed_purge_username_edit,tr("Username:"),this); feed_purge_username_label->setGeometry(40,302,180,19); - feed_purge_username_label->setFont(font); + feed_purge_username_label->setFont(labelFont()); feed_purge_username_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -206,7 +195,7 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) feed_purge_password_label= new QLabel(feed_purge_password_edit,tr("Password:"),this); feed_purge_password_label->setGeometry(320,302,70,19); - feed_purge_password_label->setFont(font); + feed_purge_password_label->setFont(labelFont()); feed_purge_password_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -217,11 +206,11 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) feed_format_edit->setReadOnly(true); feed_format_label=new QLabel(feed_format_edit,tr("Upload Format:"),this); feed_format_label->setGeometry(5,324,145,20); - feed_format_label->setFont(font); + feed_format_label->setFont(labelFont()); feed_format_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); feed_format_button=new QPushButton(this); feed_format_button->setGeometry(450,324,40,24); - feed_format_button->setFont(small_font); + feed_format_button->setFont(subButtonFont()); feed_format_button->setText(tr("S&et")); connect(feed_format_button,SIGNAL(clicked()),this,SLOT(setFormatData())); @@ -234,7 +223,7 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) feed_normalize_check_label= new QLabel(feed_normalize_box,tr("Normalize"),this); feed_normalize_check_label->setGeometry(175,346,83,20); - feed_normalize_check_label->setFont(font); + feed_normalize_check_label->setFont(labelFont()); feed_normalize_check_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); connect(feed_normalize_box,SIGNAL(toggled(bool)), this,SLOT(normalizeCheckData(bool))); @@ -247,11 +236,11 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) feed_normalize_spin->setRange(-30,-1); feed_normalize_label=new QLabel(feed_normalize_spin,tr("Level:"),this); feed_normalize_label->setGeometry(245,346,45,20); - feed_normalize_label->setFont(font); + feed_normalize_label->setFont(labelFont()); feed_normalize_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); feed_normalize_unit_label=new QLabel(tr("dBFS"),this); feed_normalize_unit_label->setGeometry(340,346,40,20); - feed_normalize_unit_label->setFont(font); + feed_normalize_unit_label->setFont(labelFont()); feed_normalize_unit_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // @@ -263,7 +252,7 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) feed_base_url_label= new QLabel(feed_base_url_edit,tr("Audio Download URL:"),this); feed_base_url_label->setGeometry(20,368,130,19); - feed_base_url_label->setFont(font); + feed_base_url_label->setFont(labelFont()); feed_base_url_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -274,7 +263,7 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) feed_keep_metadata_label= new QLabel(feed_keep_metadata_box,tr("Keep Expired Metadata"),this); feed_keep_metadata_label->setGeometry(175,390,180,19); - feed_keep_metadata_label->setFont(font); + feed_keep_metadata_label->setFont(labelFont()); feed_keep_metadata_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // @@ -285,7 +274,7 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) feed_autopost_label= new QLabel(feed_autopost_box,tr("Enable AutoPost"),this); feed_autopost_label->setGeometry(385,390,200,19); - feed_autopost_label->setFont(font); + feed_autopost_label->setFont(labelFont()); feed_autopost_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // @@ -297,7 +286,7 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) feed_base_preamble_label= new QLabel(feed_base_preamble_edit,tr("Enclosure Preamble:"),this); feed_base_preamble_label->setGeometry(20,412,130,19); - feed_base_preamble_label->setFont(font); + feed_base_preamble_label->setFont(labelFont()); feed_base_preamble_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -309,7 +298,7 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) feed_extension_label= new QLabel(feed_extension_edit,tr("Audio Extension:"),this); feed_extension_label->setGeometry(20,434,130,19); - feed_extension_label->setFont(font); + feed_extension_label->setFont(labelFont()); feed_extension_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -322,13 +311,13 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) feed_max_shelf_life_label= new QLabel(feed_max_shelf_life_spin,tr("Maximum Shelf Life:"),this); feed_max_shelf_life_label->setGeometry(20,456,130,19); - feed_max_shelf_life_label->setFont(font); + feed_max_shelf_life_label->setFont(labelFont()); feed_max_shelf_life_label-> setAlignment(Qt::AlignRight|Qt::AlignVCenter); feed_max_shelf_life_unit_label= new QLabel(feed_max_shelf_life_spin,tr("days"),this); feed_max_shelf_life_unit_label->setGeometry(220,456,50,19); - feed_max_shelf_life_unit_label->setFont(font); + feed_max_shelf_life_unit_label->setFont(labelFont()); feed_max_shelf_life_unit_label-> setAlignment(Qt::AlignLeft|Qt::AlignVCenter); @@ -342,7 +331,7 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) feed_castorder_label= new QLabel(feed_castorder_box,tr("Episode Sort Order:"),this); feed_castorder_label->setGeometry(20,478,130,19); - feed_castorder_label->setFont(font); + feed_castorder_label->setFont(labelFont()); feed_castorder_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -356,7 +345,7 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) feed_media_link_mode_label= new QLabel(feed_media_link_mode_box,tr("Media Link Mode:"),this); feed_media_link_mode_label->setGeometry(20,500,130,19); - feed_media_link_mode_label->setFont(font); + feed_media_link_mode_label->setFont(labelFont()); feed_media_link_mode_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -367,40 +356,36 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) QLabel *label= new QLabel(feed_redirect_check,tr("Enable Feed Redirection"),this); label->setGeometry(40,532,200,19); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); feed_redirect_edit=new QLineEdit(this); feed_redirect_edit->setGeometry(85,552,405,20); feed_redirect_label=new QLabel(feed_redirect_edit,tr("URL:"),this); feed_redirect_label->setGeometry(40,552,40,19); - feed_redirect_label->setFont(font); + feed_redirect_label->setFont(labelFont()); feed_redirect_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Header XML // feed_header_xml_edit=new Q3TextEdit(this); - feed_header_xml_edit-> - setGeometry(615,10,365,76); + feed_header_xml_edit->setGeometry(615,10,365,76); feed_header_xml_label=new QLabel(feed_header_xml_edit,tr("Header XML:"),this); feed_header_xml_label->setGeometry(520,10,90,19); - feed_header_xml_label->setFont(font); - feed_header_xml_label-> - setAlignment(Qt::AlignRight|Qt::AlignVCenter); + feed_header_xml_label->setFont(labelFont()); + feed_header_xml_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Channel XML // feed_channel_xml_edit=new Q3TextEdit(this); - feed_channel_xml_edit-> - setGeometry(615,88,365,176); + feed_channel_xml_edit->setGeometry(615,88,365,176); feed_channel_xml_label= new QLabel(feed_channel_xml_edit,tr("Channel XML:"),this); feed_channel_xml_label->setGeometry(520,88,90,19); - feed_channel_xml_label->setFont(font); - feed_channel_xml_label-> - setAlignment(Qt::AlignRight|Qt::AlignVCenter); + feed_channel_xml_label->setFont(labelFont()); + feed_channel_xml_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Item XML @@ -409,9 +394,8 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) feed_item_xml_edit->setGeometry(615,270,365,250); feed_item_xml_label=new QLabel(feed_item_xml_edit,tr("Item XML:"),this); feed_item_xml_label->setGeometry(520,270,90,19); - feed_item_xml_label->setFont(font); - feed_item_xml_label-> - setAlignment(Qt::AlignRight|Qt::AlignVCenter); + feed_item_xml_label->setFont(labelFont()); + feed_item_xml_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Ok Button @@ -419,7 +403,7 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) QPushButton *ok_button=new QPushButton(this); ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); ok_button->setDefault(true); - ok_button->setFont(font); + ok_button->setFont(buttonFont()); ok_button->setText(tr("&OK")); connect(ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -427,9 +411,9 @@ EditFeed::EditFeed(const QString &feed,QWidget *parent) // Cancel Button // QPushButton *cancel_button=new QPushButton(this); - cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, - 80,50); - cancel_button->setFont(font); + cancel_button-> + setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50); + cancel_button->setFont(buttonFont()); cancel_button->setText(tr("&Cancel")); connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); diff --git a/rdadmin/edit_feed.h b/rdadmin/edit_feed.h index ff6a3088..fa34560f 100644 --- a/rdadmin/edit_feed.h +++ b/rdadmin/edit_feed.h @@ -2,7 +2,7 @@ // // Edit a Rivendell Feed // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,7 +23,6 @@ #include #include -#include #include #include #include @@ -32,11 +31,12 @@ #include +#include #include #include #include -class EditFeed : public QDialog +class EditFeed : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_feed_perms.cpp b/rdadmin/edit_feed_perms.cpp index 8ef6eda3..2c2b05f7 100644 --- a/rdadmin/edit_feed_perms.cpp +++ b/rdadmin/edit_feed_perms.cpp @@ -2,7 +2,7 @@ // // Edit Rivendell RSS Feed Permissions // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,7 +18,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include #include #include #include @@ -38,7 +37,7 @@ #include "edit_feed_perms.h" EditFeedPerms::EditFeedPerms(RDUser *user,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -57,12 +56,6 @@ EditFeedPerms::EditFeedPerms(RDUser *user,QWidget *parent) setWindowTitle("RDAdmin - "+tr("User: ")+feed_user->name()); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - // // Feeds Selector // @@ -77,7 +70,7 @@ EditFeedPerms::EditFeedPerms(RDUser *user,QWidget *parent) QPushButton *ok_button=new QPushButton(this); ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); ok_button->setDefault(true); - ok_button->setFont(font); + ok_button->setFont(buttonFont()); ok_button->setText(tr("&OK")); connect(ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -87,7 +80,7 @@ EditFeedPerms::EditFeedPerms(RDUser *user,QWidget *parent) QPushButton *cancel_button=new QPushButton(this); cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, 80,50); - cancel_button->setFont(font); + cancel_button->setFont(buttonFont()); cancel_button->setText(tr("&Cancel")); connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); diff --git a/rdadmin/edit_feed_perms.h b/rdadmin/edit_feed_perms.h index 0dc93a42..bbae0d5b 100644 --- a/rdadmin/edit_feed_perms.h +++ b/rdadmin/edit_feed_perms.h @@ -2,7 +2,7 @@ // // Edit Rivendell RSS Feed Permissions // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,13 +21,12 @@ #ifndef EDIT_FEED_PERMS_H #define EDIT_FEED_PERMS_H -#include - +#include #include #include -class EditFeedPerms : public QDialog +class EditFeedPerms : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_gpi.cpp b/rdadmin/edit_gpi.cpp index 08601cf9..a988a269 100644 --- a/rdadmin/edit_gpi.cpp +++ b/rdadmin/edit_gpi.cpp @@ -2,7 +2,7 @@ // // Edit a Rivendell Gpi // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ -30,7 +30,7 @@ EditGpi::EditGpi(int gpi,int *oncart,QString *ondesc, int *offcart,QString *offdesc,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -49,39 +49,28 @@ EditGpi::EditGpi(int gpi,int *oncart,QString *ondesc, setMinimumHeight(sizeHint().height()); setMaximumHeight(sizeHint().height()); - // - // Create Fonts - // - QFont label_font=QFont("Helvetica",14,QFont::Bold); - label_font.setPixelSize(14); - QFont bold_font=QFont("Helvetica",12,QFont::Bold); - bold_font.setPixelSize(12); - QFont font=QFont("Helvetica",12,QFont::Normal); - font.setPixelSize(12); - // // Text Validator // RDTextValidator *validator=new RDTextValidator(this); // - // On Section Label + // On Group // - QLabel *label=new QLabel("ON Transition",this); - label->setGeometry(30,10,120,20); - label->setFont(label_font); - label->setAlignment(Qt::AlignCenter); + edit_on_group=new QGroupBox(this); + edit_on_group->setFont(sectionLabelFont()); + edit_on_group->setGeometry(10,10,sizeHint().width()-20,72); + edit_on_group->setTitle(tr("ON Transition")); // // On Cart Macro Cart // edit_onmacro_edit=new QLineEdit(this); edit_onmacro_edit->setGeometry(120,30,60,20); - edit_onmacro_edit->setFont(font); edit_onmacro_edit->setValidator(validator); - label=new QLabel(tr("Cart Number: "),this); + QLabel *label=new QLabel(tr("Cart Number: "),this); label->setGeometry(15,30,100,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -89,7 +78,7 @@ EditGpi::EditGpi(int gpi,int *oncart,QString *ondesc, // QPushButton *button=new QPushButton(this); button->setGeometry(190,30,60,20); - button->setFont(font); + button->setFont(subButtonFont()); button->setText(tr("&Select")); connect(button,SIGNAL(clicked()),this,SLOT(selectOnData())); @@ -98,7 +87,7 @@ EditGpi::EditGpi(int gpi,int *oncart,QString *ondesc, // button=new QPushButton(this); button->setGeometry(270,30,60,20); - button->setFont(font); + button->setFont(subButtonFont()); button->setText(tr("C&lear")); connect(button,SIGNAL(clicked()),this,SLOT(clearOnData())); @@ -107,31 +96,29 @@ EditGpi::EditGpi(int gpi,int *oncart,QString *ondesc, // edit_ondescription_edit=new QLineEdit(this); edit_ondescription_edit->setGeometry(120,52,sizeHint().width()-140,20); - edit_ondescription_edit->setFont(font); edit_ondescription_edit->setReadOnly(true); label=new QLabel(tr("Description: "),this); label->setGeometry(15,52,100,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // - // Off Section Label + // Off Group // - label=new QLabel("OFF Transition",this); - label->setGeometry(30,90,120,20); - label->setFont(label_font); - label->setAlignment(Qt::AlignCenter); + edit_off_group=new QGroupBox(this); + edit_off_group->setFont(sectionLabelFont()); + edit_off_group->setGeometry(10,90,sizeHint().width()-20,72); + edit_off_group->setTitle(tr("OFF Transition")); // // Off Cart Macro Cart // edit_offmacro_edit=new QLineEdit(this); edit_offmacro_edit->setGeometry(120,110,60,20); - edit_offmacro_edit->setFont(font); edit_offmacro_edit->setValidator(validator); label=new QLabel(tr("Cart Number: "),this); label->setGeometry(15,110,100,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -139,7 +126,7 @@ EditGpi::EditGpi(int gpi,int *oncart,QString *ondesc, // button=new QPushButton(this); button->setGeometry(190,110,60,20); - button->setFont(font); + button->setFont(subButtonFont()); button->setText(tr("&Select")); connect(button,SIGNAL(clicked()),this,SLOT(selectOffData())); @@ -148,7 +135,7 @@ EditGpi::EditGpi(int gpi,int *oncart,QString *ondesc, // button=new QPushButton(this); button->setGeometry(270,110,60,20); - button->setFont(font); + button->setFont(subButtonFont()); button->setText(tr("C&lear")); connect(button,SIGNAL(clicked()),this,SLOT(clearOffData())); @@ -157,11 +144,10 @@ EditGpi::EditGpi(int gpi,int *oncart,QString *ondesc, // edit_offdescription_edit=new QLineEdit(this); edit_offdescription_edit->setGeometry(120,132,sizeHint().width()-140,20); - edit_offdescription_edit->setFont(font); edit_offdescription_edit->setReadOnly(true); label=new QLabel(tr("Description: "),this); label->setGeometry(15,132,100,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -170,7 +156,7 @@ EditGpi::EditGpi(int gpi,int *oncart,QString *ondesc, button=new QPushButton(this); button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); button->setDefault(true); - button->setFont(bold_font); + button->setFont(buttonFont()); button->setText(tr("&OK")); connect(button,SIGNAL(clicked()),this,SLOT(okData())); @@ -180,7 +166,7 @@ EditGpi::EditGpi(int gpi,int *oncart,QString *ondesc, button=new QPushButton(this); button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, 80,50); - button->setFont(bold_font); + button->setFont(buttonFont()); button->setText(tr("&Cancel")); connect(button,SIGNAL(clicked()),this,SLOT(cancelData())); @@ -311,20 +297,3 @@ void EditGpi::cancelData() { done(-1); } - - -void EditGpi::paintEvent(QPaintEvent *e) -{ - QPainter *p=new QPainter(this); - p->drawLine(10,20,sizeHint().width()-10,20); - p->drawLine(sizeHint().width()-10,20,sizeHint().width()-10,82); - p->drawLine(sizeHint().width()-10,82,10,82); - p->drawLine(10,82,10,20); - - p->drawLine(10,100,sizeHint().width()-10,100); - p->drawLine(sizeHint().width()-10,10,sizeHint().width()-10,162); - p->drawLine(sizeHint().width()-10,162,10,162); - p->drawLine(10,162,10,100); - - delete p; -} diff --git a/rdadmin/edit_gpi.h b/rdadmin/edit_gpi.h index 894ede2b..1cdfd18d 100644 --- a/rdadmin/edit_gpi.h +++ b/rdadmin/edit_gpi.h @@ -2,7 +2,7 @@ // // Edit a Rivendell GPI // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,17 @@ #ifndef EDIT_GPI_H #define EDIT_GPI_H -#include -#include -#include -#include #include +#include +#include +#include +#include -#include +#include #include +#include -class EditGpi : public QDialog +class EditGpi : public RDDialog { Q_OBJECT public: @@ -48,7 +49,6 @@ class EditGpi : public QDialog void cancelData(); private: - void paintEvent(QPaintEvent *e); int edit_gpi; int *edit_oncart; QLineEdit *edit_ondescription_edit; @@ -60,6 +60,8 @@ class EditGpi : public QDialog QString edit_group; QString *edit_ondescription; QString *edit_offdescription; + QGroupBox *edit_on_group; + QGroupBox *edit_off_group; }; diff --git a/rdadmin/edit_group.cpp b/rdadmin/edit_group.cpp index 862e5831..37aa5221 100644 --- a/rdadmin/edit_group.cpp +++ b/rdadmin/edit_group.cpp @@ -2,7 +2,7 @@ // // Edit a Rivendell Group // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ -20,7 +20,6 @@ #include -#include #include #include #include @@ -41,7 +40,7 @@ #include "edit_group.h" EditGroup::EditGroup(QString group,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -60,12 +59,6 @@ EditGroup::EditGroup(QString group,QWidget *parent) setWindowTitle("RDAdmin - "+tr("Group: ")+group); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - // // Text Validator // @@ -78,7 +71,7 @@ EditGroup::EditGroup(QString group,QWidget *parent) group_name_edit->setMaxLength(10); group_name_edit->setReadOnly(true); group_name_label=new QLabel(group_name_edit,tr("&Group Name:"),this); - group_name_label->setFont(font); + group_name_label->setFont(labelFont()); group_name_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -89,7 +82,7 @@ EditGroup::EditGroup(QString group,QWidget *parent) group_description_edit->setValidator(validator); group_description_label= new QLabel(group_description_edit,tr("Group &Description:"),this); - group_description_label->setFont(font); + group_description_label->setFont(labelFont()); group_description_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -100,7 +93,7 @@ EditGroup::EditGroup(QString group,QWidget *parent) group_title_edit->setValidator(validator); group_title_label= new QLabel(group_title_edit,tr("Default Import &Title:"),this); - group_title_label->setFont(font); + group_title_label->setFont(labelFont()); group_title_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -111,7 +104,7 @@ EditGroup::EditGroup(QString group,QWidget *parent) group_carttype_box->insertItem(tr("Macro")); group_carttype_label= new QLabel(group_carttype_box,tr("Default Cart &Type:"),this); - group_carttype_label->setFont(font); + group_carttype_label->setFont(labelFont()); group_carttype_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -122,13 +115,13 @@ EditGroup::EditGroup(QString group,QWidget *parent) group_lowcart_box->setSpecialValueText(tr("None")); group_cartrange_label= new QLabel(group_lowcart_box,tr("Default Cart Number:"),this); - group_cartrange_label->setFont(font); + group_cartrange_label->setFont(labelFont()); group_cartrange_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); group_highcart_box=new QSpinBox(this); group_highcart_box->setRange(1,999999); group_highcart_label= new QLabel(group_highcart_box,tr("to"),this); - group_highcart_label->setFont(font); + group_highcart_label->setFont(labelFont()); group_highcart_label->setAlignment(Qt::AlignCenter); connect(group_lowcart_box,SIGNAL(valueChanged(int)), this,SLOT(lowCartChangedData(int))); @@ -139,7 +132,7 @@ EditGroup::EditGroup(QString group,QWidget *parent) group_enforcerange_box=new QCheckBox(this); group_enforcerange_label= new QLabel(group_enforcerange_box,tr("Enforce Cart Range"),this); - group_enforcerange_label->setFont(font); + group_enforcerange_label->setFont(labelFont()); group_enforcerange_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // @@ -149,16 +142,17 @@ EditGroup::EditGroup(QString group,QWidget *parent) group_traffic_label= new QLabel(group_traffic_check,tr("Include this group in Traffic reports"), this); - group_traffic_label->setFont(font); + group_traffic_label->setFont(labelFont()); group_traffic_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // // Music Report Checkbox // group_music_check=new QCheckBox(this); - group_music_label=new QLabel(group_music_check,tr("Include this group in Music reports"), - this); - group_music_label->setFont(font); + group_music_label= + new QLabel(group_music_check,tr("Include this group in Music reports"), + this); + group_music_label->setFont(labelFont()); group_music_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // @@ -171,11 +165,11 @@ EditGroup::EditGroup(QString group,QWidget *parent) group_cutlife_spin->setRange(0,999); group_cutlife_label= new QLabel(group_cutlife_check,tr("Set End Date/Time to"),this); - group_cutlife_label->setFont(font); + group_cutlife_label->setFont(labelFont()); group_cutlife_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); group_cutlife_unit= new QLabel(group_cutlife_check,tr("days after cut creation"),this); - group_cutlife_unit->setFont(font); + group_cutlife_unit->setFont(labelFont()); group_cutlife_unit->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // @@ -188,17 +182,17 @@ EditGroup::EditGroup(QString group,QWidget *parent) group_shelflife_spin->setRange(0,30); group_shelflife_label= new QLabel(group_shelflife_check,tr("Purge expired cuts after"),this); - group_shelflife_label->setFont(font); + group_shelflife_label->setFont(labelFont()); group_shelflife_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); group_shelflife_unit= new QLabel(group_shelflife_check,tr("days"),this); - group_shelflife_unit->setFont(font); + group_shelflife_unit->setFont(labelFont()); group_shelflife_unit->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); group_delete_carts_check=new QCheckBox(this); group_delete_carts_label= new QLabel(group_delete_carts_check,tr("Delete cart if empty"),this); - group_delete_carts_label->setFont(font); + group_delete_carts_label->setFont(labelFont()); group_delete_carts_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // @@ -207,7 +201,7 @@ EditGroup::EditGroup(QString group,QWidget *parent) group_nownext_check=new QCheckBox(this); group_nownext_label= new QLabel(group_nownext_check,tr("Transmit Now && Next data"),this); - group_nownext_label->setFont(font); + group_nownext_label->setFont(labelFont()); group_nownext_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // @@ -219,7 +213,7 @@ EditGroup::EditGroup(QString group,QWidget *parent) // Color Button // group_color_button=new QPushButton(this); - group_color_button->setFont(font); + group_color_button->setFont(buttonFont()); group_color_button->setText(tr("C&olor")); connect(group_color_button,SIGNAL(clicked()),this,SLOT(colorData())); @@ -228,7 +222,7 @@ EditGroup::EditGroup(QString group,QWidget *parent) // group_ok_button=new QPushButton(this); group_ok_button->setDefault(true); - group_ok_button->setFont(font); + group_ok_button->setFont(buttonFont()); group_ok_button->setText(tr("&OK")); connect(group_ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -236,7 +230,7 @@ EditGroup::EditGroup(QString group,QWidget *parent) // Cancel Button // group_cancel_button=new QPushButton(this); - group_cancel_button->setFont(font); + group_cancel_button->setFont(buttonFont()); group_cancel_button->setText(tr("&Cancel")); connect(group_cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); diff --git a/rdadmin/edit_group.h b/rdadmin/edit_group.h index 2d7598c3..a5e1b6ae 100644 --- a/rdadmin/edit_group.h +++ b/rdadmin/edit_group.h @@ -2,7 +2,7 @@ // // Edit a Rivendell Group // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 EDIT_GROUP_H #define EDIT_GROUP_H -#include #include #include #include @@ -32,10 +31,11 @@ #include #include +#include #include #include -class EditGroup : public QDialog +class EditGroup : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_hostvar.cpp b/rdadmin/edit_hostvar.cpp index d117ae4d..0da0ddab 100644 --- a/rdadmin/edit_hostvar.cpp +++ b/rdadmin/edit_hostvar.cpp @@ -2,7 +2,7 @@ // // Edit a Rivendell Host Variable // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,7 +18,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include #include #include #include @@ -43,18 +42,12 @@ EditHostvar::EditHostvar(QString station,QString var,QString *varvalue, QString *remark,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); edit_varvalue=varvalue; edit_remark=remark; - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - setWindowTitle("RDAdmin - "+tr("Edit Host Variable")); // @@ -73,7 +66,7 @@ EditHostvar::EditHostvar(QString station,QString var,QString *varvalue, edit_name_edit->setReadOnly(true); QLabel *label=new QLabel(edit_name_edit,tr("Variable Name:"),this); label->setGeometry(10,11,110,19); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -84,7 +77,7 @@ EditHostvar::EditHostvar(QString station,QString var,QString *varvalue, edit_varvalue_edit->setMaxLength(255); label=new QLabel(edit_varvalue_edit,tr("Variable Value:"),this); label->setGeometry(10,33,110,19); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -95,7 +88,7 @@ EditHostvar::EditHostvar(QString station,QString var,QString *varvalue, edit_remark_edit->setMaxLength(255); label=new QLabel(edit_remark_edit,tr("Remark:"),this); label->setGeometry(10,55,110,19); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -104,7 +97,7 @@ EditHostvar::EditHostvar(QString station,QString var,QString *varvalue, QPushButton *ok_button=new QPushButton(this); ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); ok_button->setDefault(true); - ok_button->setFont(font); + ok_button->setFont(buttonFont()); ok_button->setText(tr("&OK")); connect(ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -112,9 +105,9 @@ EditHostvar::EditHostvar(QString station,QString var,QString *varvalue, // Cancel Button // QPushButton *cancel_button=new QPushButton(this); - cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, - 80,50); - cancel_button->setFont(font); + cancel_button-> + setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50); + cancel_button->setFont(buttonFont()); cancel_button->setText(tr("&Cancel")); connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); diff --git a/rdadmin/edit_hostvar.h b/rdadmin/edit_hostvar.h index b0cee363..b7a799a3 100644 --- a/rdadmin/edit_hostvar.h +++ b/rdadmin/edit_hostvar.h @@ -2,7 +2,7 @@ // // Edit a Rivendell Host Variable // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 EDIT_HOSTVAR_H #define EDIT_HOSTVAR_H -#include #include #include #include @@ -31,10 +30,11 @@ #include #include -#include #include +#include +#include -class EditHostvar : public QDialog +class EditHostvar : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_hotkeys.cpp b/rdadmin/edit_hotkeys.cpp index c05ea8ca..2c26360e 100644 --- a/rdadmin/edit_hotkeys.cpp +++ b/rdadmin/edit_hotkeys.cpp @@ -2,7 +2,7 @@ // // Edit the Hot Key Configuration for a Rivendell Workstation. // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ -19,7 +19,6 @@ // #include -#include #include #include #include @@ -34,7 +33,7 @@ EditHotkeys::EditHotkeys(const QString &station,const QString &module, QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -46,16 +45,6 @@ EditHotkeys::EditHotkeys(const QString &station,const QString &module, station_hotkeys= new RDHotkeys(hotkey_conf,hotkey_module); myhotkeylist = new RDHotKeyList(); - // - // Create Fonts - // - QFont normal_font=QFont("Helvetica",12,QFont::Normal); - normal_font.setPixelSize(12); - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont section_font=QFont("Helvetica",14,QFont::Bold); - section_font.setPixelSize(14); - // // Fix the Window Size // @@ -73,9 +62,8 @@ EditHotkeys::EditHotkeys(const QString &station,const QString &module, list_view=new Q3ListView(this); list_view->setGeometry(10,24,320,220); QLabel *label=new QLabel(list_view,tr("Host Hot Key Configurations"),this); - label->setFont(font); + label->setFont(labelFont()); label->setGeometry(14,5,sizeHint().width()-28,19); - //list_view->setItemMargin(5); list_view->setSorting(-1); list_view->addColumn(tr("Button / Function ")); list_view->setColumnAlignment(0,Qt::AlignLeft|Qt::AlignVCenter); @@ -89,46 +77,50 @@ EditHotkeys::EditHotkeys(const QString &station,const QString &module, this,SLOT(showCurrentKey())); // Keystroke Value field - keystroke = new QLineEdit(this); + keystroke=new QLineEdit(this); keystroke->setFocusPolicy(Qt::StrongFocus); keystroke->setGeometry(sizeHint().width()-270,sizeHint().height()-210,200,35); // Set Button // - QPushButton *set_button = new QPushButton(this); + QPushButton *set_button=new QPushButton(this); set_button->setGeometry(sizeHint().width()-290,sizeHint().height()-160,60,30); set_button->setDefault(true); - set_button->setFont(font); + set_button->setFont(buttonFont()); set_button->setText(tr("Set")); - connect(set_button,SIGNAL(clicked()), this, SLOT(SetButtonClicked()) ); + connect(set_button,SIGNAL(clicked()),this,SLOT(SetButtonClicked()) ); // Clear Button // - QPushButton *clear_button = new QPushButton(this); - clear_button->setGeometry(sizeHint().width()-215,sizeHint().height()-160,60,30); + QPushButton *clear_button=new QPushButton(this); + clear_button-> + setGeometry(sizeHint().width()-215,sizeHint().height()-160,60,30); clear_button->setDefault(true); - clear_button->setFont(font); + clear_button->setFont(buttonFont()); clear_button->setText(tr("Clear")); - connect(clear_button,SIGNAL(clicked()), this, SLOT(clearCurrentItem()) ); + connect(clear_button,SIGNAL(clicked()),this,SLOT(clearCurrentItem()) ); // Clear All Hot Keys Button // - QPushButton *clear_all_button = new QPushButton(this); - clear_all_button->setGeometry(sizeHint().width()-140,sizeHint().height()-160,130,30); + QPushButton *clear_all_button=new QPushButton(this); + clear_all_button-> + setGeometry(sizeHint().width()-140,sizeHint().height()-160,130,30); clear_all_button->setDefault(true); - clear_all_button->setFont(font); + clear_all_button->setFont(buttonFont()); clear_all_button->setText(tr("Clear All Hotkeys")); connect(clear_all_button,SIGNAL(clicked()), this,SLOT(clearAll_Hotkeys()) ); // Clone Host Drop Box // clone_from_host_box=new QComboBox(this); - clone_from_host_box->setGeometry(sizeHint().width()-295,sizeHint().height()-110,130,30); + clone_from_host_box-> + setGeometry(sizeHint().width()-295,sizeHint().height()-110,130,30); clone_from_host_label= new QLabel(clone_from_host_box,tr("Set From Host:"),this); - clone_from_host_label->setFont(font); - clone_from_host_label->setGeometry(sizeHint().width()-420,sizeHint().height()-110,120,30); + clone_from_host_label->setFont(labelFont()); + clone_from_host_label-> + setGeometry(sizeHint().width()-420,sizeHint().height()-110,120,30); clone_from_host_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); sql=QString().sprintf("select NAME from STATIONS"); q=new RDSqlQuery(sql); @@ -149,7 +141,7 @@ EditHotkeys::EditHotkeys(const QString &station,const QString &module, QPushButton *save_button=new QPushButton(this); save_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); save_button->setDefault(true); - save_button->setFont(font); + save_button->setFont(buttonFont()); save_button->setText(tr("Save")); connect(save_button,SIGNAL(clicked()),this,SLOT(save())); @@ -157,16 +149,16 @@ EditHotkeys::EditHotkeys(const QString &station,const QString &module, // Cancel Button // QPushButton *cancel_button=new QPushButton(this); - cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, - 80,50); - cancel_button->setFont(font); + cancel_button-> + setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50); + cancel_button->setFont(buttonFont()); cancel_button->setText(tr("Cancel")); connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancel())); keystrokecount=0; - AltKeyHit = false; - CtrlKeyHit = false; + alt_key_hit=false; + ctrl_key_hit=false; RefreshList(); } @@ -305,12 +297,12 @@ void EditHotkeys::keyPressEvent (QKeyEvent *e) if (e->key() == Qt::Key_Alt) { keystrokecount++; - AltKeyHit = true; + alt_key_hit = true; } if (e->key() == Qt::Key_Control) { keystrokecount++; - CtrlKeyHit = true; + ctrl_key_hit = true; } } @@ -324,8 +316,8 @@ void EditHotkeys::keyReleaseEvent (QKeyEvent *e) keystroke->setText(""); hotkeystrokes=QString(""); keystrokecount = 0; - AltKeyHit = false; - CtrlKeyHit = false; + alt_key_hit = false; + ctrl_key_hit = false; return; } @@ -365,12 +357,12 @@ void EditHotkeys::keyReleaseEvent (QKeyEvent *e) if ((e->key() == Qt::Key_Alt) || (e->key() == Qt::Key_Control)) { if (keystrokecount != 0 ) hotkeystrokes = QString (""); - if (AltKeyHit) { - AltKeyHit = false; + if (alt_key_hit) { + alt_key_hit = false; if (keystrokecount > 0) keystrokecount--; } - if (CtrlKeyHit) { - CtrlKeyHit = false; + if (ctrl_key_hit) { + ctrl_key_hit = false; if (keystrokecount > 0) keystrokecount--; } keystroke->setText(hotkeystrokes); @@ -384,12 +376,12 @@ void EditHotkeys::keyReleaseEvent (QKeyEvent *e) if (!e->isAutoRepeat()) { if (keystrokecount == 0) hotkeystrokes = QString (""); - if (AltKeyHit) { + if (alt_key_hit) { hotkeystrokes = (*myhotkeylist).GetKeyCode(Qt::Key_Alt); hotkeystrokes += QString(" + "); } - if (CtrlKeyHit) { - if (AltKeyHit) { + if (ctrl_key_hit) { + if (alt_key_hit) { hotkeystrokes += (*myhotkeylist).GetKeyCode(Qt::Key_Control); hotkeystrokes += QString (" + "); } diff --git a/rdadmin/edit_hotkeys.h b/rdadmin/edit_hotkeys.h index 752b5079..87e2eb23 100644 --- a/rdadmin/edit_hotkeys.h +++ b/rdadmin/edit_hotkeys.h @@ -2,7 +2,7 @@ // // Edit the Hot Keys Configuration for a Workstation // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,19 +21,20 @@ #ifndef EDIT_HOTKEYS_H #define EDIT_HOTKEYS_H -#include +#include + #include #include #include #include #include -#include +#include +#include #include #include -#include -class EditHotkeys : public QDialog +class EditHotkeys : public RDDialog { Q_OBJECT public: @@ -77,8 +78,8 @@ class EditHotkeys : public QDialog QPushButton *cancel_button; int keystrokecount; bool keyupdated; - bool AltKeyHit ; - bool CtrlKeyHit; + bool alt_key_hit; + bool ctrl_key_hit; RDHotKeyList *myhotkeylist ; int current_station_clone_item; }; diff --git a/rdadmin/edit_jack.cpp b/rdadmin/edit_jack.cpp index fdf9c2a9..4b479b42 100644 --- a/rdadmin/edit_jack.cpp +++ b/rdadmin/edit_jack.cpp @@ -2,7 +2,7 @@ // // Edit a Rivendell Jack Configuration // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ -20,7 +20,6 @@ #include -#include #include #include #include @@ -42,7 +41,7 @@ #include EditJack::EditJack(RDStation *station,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -59,22 +58,15 @@ EditJack::EditJack(RDStation *station,QWidget *parent) setWindowTitle("RDAdmin - "+tr("JACK Configuration for ")+ edit_station->name()); - // - // Create Fonts - // - QFont normal_font=QFont("Helvetica",12,QFont::Normal); - normal_font.setPixelSize(12); - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - // // Start JACK Server // edit_start_jack_box=new QCheckBox(this); edit_start_jack_label= new QLabel(edit_start_jack_box,tr("Start JACK Server"),this); - edit_start_jack_label->setFont(font); - edit_start_jack_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter|Qt::TextShowMnemonic); + edit_start_jack_label->setFont(labelFont()); + edit_start_jack_label-> + setAlignment(Qt::AlignLeft|Qt::AlignVCenter|Qt::TextShowMnemonic); // // JACK Server Name @@ -82,7 +74,7 @@ EditJack::EditJack(RDStation *station,QWidget *parent) edit_jack_server_name_edit=new QLineEdit(this); edit_jack_server_name_label= new QLabel(edit_jack_server_name_edit,tr("JACK Server Name:"),this); - edit_jack_server_name_label->setFont(font); + edit_jack_server_name_label->setFont(labelFont()); edit_jack_server_name_label-> setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); @@ -94,7 +86,7 @@ EditJack::EditJack(RDStation *station,QWidget *parent) this,SLOT(startJackData(bool))); edit_jack_command_line_label= new QLabel(edit_jack_command_line_edit,tr("JACK Command Line:"),this); - edit_jack_command_line_label->setFont(font); + edit_jack_command_line_label->setFont(labelFont()); edit_jack_command_line_label-> setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); @@ -105,7 +97,7 @@ EditJack::EditJack(RDStation *station,QWidget *parent) edit_jack_audio_ports_spin->setRange(0,24); edit_jack_audio_ports_label= new QLabel(edit_jack_audio_ports_spin,tr("Active Audio Ports")+":",this); - edit_jack_audio_ports_label->setFont(font); + edit_jack_audio_ports_label->setFont(labelFont()); edit_jack_audio_ports_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -114,7 +106,7 @@ EditJack::EditJack(RDStation *station,QWidget *parent) edit_jack_client_view=new RDListView(this); edit_jack_client_label= new QLabel(edit_jack_client_view,tr("JACK Clients to Start:"),this); - edit_jack_client_label->setFont(font); + edit_jack_client_label->setFont(labelFont()); edit_jack_client_view->setAllColumnsShowFocus(true); edit_jack_client_view->setItemMargin(5); edit_jack_client_view->addColumn(tr("Client")); @@ -129,7 +121,7 @@ EditJack::EditJack(RDStation *station,QWidget *parent) // Add Button // edit_add_button=new QPushButton(this); - edit_add_button->setFont(font); + edit_add_button->setFont(buttonFont()); edit_add_button->setText(tr("&Add")); connect(edit_add_button,SIGNAL(clicked()),this,SLOT(addData())); @@ -137,7 +129,7 @@ EditJack::EditJack(RDStation *station,QWidget *parent) // Edit Button // edit_edit_button=new QPushButton(this); - edit_edit_button->setFont(font); + edit_edit_button->setFont(buttonFont()); edit_edit_button->setText(tr("&Edit")); connect(edit_edit_button,SIGNAL(clicked()),this,SLOT(editData())); @@ -145,7 +137,7 @@ EditJack::EditJack(RDStation *station,QWidget *parent) // Delete Button // edit_delete_button=new QPushButton(this); - edit_delete_button->setFont(font); + edit_delete_button->setFont(buttonFont()); edit_delete_button->setText(tr("&Delete")); connect(edit_delete_button,SIGNAL(clicked()),this,SLOT(deleteData())); @@ -154,7 +146,7 @@ EditJack::EditJack(RDStation *station,QWidget *parent) // edit_ok_button=new QPushButton(this); edit_ok_button->setDefault(true); - edit_ok_button->setFont(font); + edit_ok_button->setFont(buttonFont()); edit_ok_button->setText(tr("&OK")); connect(edit_ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -162,7 +154,7 @@ EditJack::EditJack(RDStation *station,QWidget *parent) // Cancel Button // edit_cancel_button=new QPushButton(this); - edit_cancel_button->setFont(font); + edit_cancel_button->setFont(buttonFont()); edit_cancel_button->setText(tr("&Cancel")); connect(edit_cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); diff --git a/rdadmin/edit_jack.h b/rdadmin/edit_jack.h index 591c3176..9661473d 100644 --- a/rdadmin/edit_jack.h +++ b/rdadmin/edit_jack.h @@ -2,7 +2,7 @@ // // Edit a Rivendell Jack Configuration // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,7 +22,6 @@ #define EDIT_JACK_H #include -#include #include #include #include @@ -31,12 +30,13 @@ #include #include +#include #include #include #define EDITJACK_DEFAULT_SERVERNAME QObject::tr("(default)") -class EditJack : public QDialog +class EditJack : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_jack_client.cpp b/rdadmin/edit_jack_client.cpp index bb3b783f..6bef2649 100644 --- a/rdadmin/edit_jack_client.cpp +++ b/rdadmin/edit_jack_client.cpp @@ -2,7 +2,7 @@ // // Edit a Rivendell Jack Client Configuration // -// (C) Copyright 2012-2018 Fred Gleason +// (C) Copyright 2012-2019 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,7 +25,7 @@ #include EditJackClient::EditJackClient(RDStation *station,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -42,21 +42,13 @@ EditJackClient::EditJackClient(RDStation *station,QWidget *parent) setWindowTitle("RDAdmin - "+tr("JACK Client Configuration for ")+ edit_station->name()); - // - // Create Fonts - // - QFont normal_font=QFont("Helvetica",12,QFont::Normal); - normal_font.setPixelSize(12); - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - // // JACK Client Description // edit_jack_description_edit=new QLineEdit(this); edit_jack_description_label= new QLabel(edit_jack_description_edit,tr("Description:"),this); - edit_jack_description_label->setFont(font); + edit_jack_description_label->setFont(labelFont()); edit_jack_description_label-> setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); @@ -66,7 +58,7 @@ EditJackClient::EditJackClient(RDStation *station,QWidget *parent) edit_jack_command_line_edit=new QLineEdit(this); edit_jack_command_line_label= new QLabel(edit_jack_command_line_edit,tr("Command Line:"),this); - edit_jack_command_line_label->setFont(font); + edit_jack_command_line_label->setFont(labelFont()); edit_jack_command_line_label-> setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); @@ -75,7 +67,7 @@ EditJackClient::EditJackClient(RDStation *station,QWidget *parent) // edit_ok_button=new QPushButton(this); edit_ok_button->setDefault(true); - edit_ok_button->setFont(font); + edit_ok_button->setFont(buttonFont()); edit_ok_button->setText(tr("&OK")); connect(edit_ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -83,7 +75,7 @@ EditJackClient::EditJackClient(RDStation *station,QWidget *parent) // Cancel Button // edit_cancel_button=new QPushButton(this); - edit_cancel_button->setFont(font); + edit_cancel_button->setFont(buttonFont()); edit_cancel_button->setText(tr("&Cancel")); connect(edit_cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); } diff --git a/rdadmin/edit_jack_client.h b/rdadmin/edit_jack_client.h index 0ee1e43a..2ff533de 100644 --- a/rdadmin/edit_jack_client.h +++ b/rdadmin/edit_jack_client.h @@ -2,7 +2,7 @@ // // Edit a Rivendell Jack Client Configuration // -// (C) Copyright 2012-2018 Fred Gleason +// (C) Copyright 2012-2019 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,14 +21,14 @@ #ifndef EDIT_JACK_CLIENT_H #define EDIT_JACK_CLIENT_H -#include #include #include #include +#include #include -class EditJackClient : public QDialog +class EditJackClient : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_livewiregpio.cpp b/rdadmin/edit_livewiregpio.cpp index 3eec02d4..10f781b3 100644 --- a/rdadmin/edit_livewiregpio.cpp +++ b/rdadmin/edit_livewiregpio.cpp @@ -2,7 +2,7 @@ // // Edit a Rivendell Livewire GPIO Slot Association // -// (C) Copyright 2013-2018 Fred Gleason +// (C) Copyright 2013-2019 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 @@ -28,7 +28,7 @@ EditLiveWireGpio::EditLiveWireGpio(int slot,int *source,QHostAddress *addr, QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -45,21 +45,13 @@ EditLiveWireGpio::EditLiveWireGpio(int slot,int *source,QHostAddress *addr, setMaximumHeight(sizeHint().height()); setWindowTitle("RDAdmin - "+tr("Edit GPIO Source")); - // - // Create Fonts - // - QFont bold_font=QFont("Helvetica",12,QFont::Bold); - bold_font.setPixelSize(12); - QFont font=QFont("Helvetica",12,QFont::Normal); - font.setPixelSize(12); - // // GPIO Lines // QLabel *label=new QLabel(tr("GPIO Lines")+ QString().sprintf(" %d - %d",5*slot+1,5*slot+5),this); label->setGeometry(10,10,sizeHint().width()-20,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignCenter); // @@ -71,7 +63,7 @@ EditLiveWireGpio::EditLiveWireGpio(int slot,int *source,QHostAddress *addr, edit_source_number_spin->setSpecialValueText(tr("None")); label=new QLabel(tr("Livewire Source: "),this); label->setGeometry(10,32,115,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); // @@ -81,7 +73,7 @@ EditLiveWireGpio::EditLiveWireGpio(int slot,int *source,QHostAddress *addr, edit_ip_address_edit->setGeometry(130,54,120,20); label=new QLabel(tr("Surface Address: "),this); label->setGeometry(10,54,115,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); // @@ -90,7 +82,7 @@ EditLiveWireGpio::EditLiveWireGpio(int slot,int *source,QHostAddress *addr, QPushButton *button=new QPushButton(this); button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); button->setDefault(true); - button->setFont(bold_font); + button->setFont(buttonFont()); button->setText(tr("&OK")); connect(button,SIGNAL(clicked()),this,SLOT(okData())); @@ -98,9 +90,8 @@ EditLiveWireGpio::EditLiveWireGpio(int slot,int *source,QHostAddress *addr, // Cancel Button // button=new QPushButton(this); - button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, - 80,50); - button->setFont(bold_font); + button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50); + button->setFont(buttonFont()); button->setText(tr("&Cancel")); connect(button,SIGNAL(clicked()),this,SLOT(cancelData())); diff --git a/rdadmin/edit_livewiregpio.h b/rdadmin/edit_livewiregpio.h index 6d49a13b..764e69ca 100644 --- a/rdadmin/edit_livewiregpio.h +++ b/rdadmin/edit_livewiregpio.h @@ -2,7 +2,7 @@ // // Edit a Rivendell Livewire GPIO Slot Association // -// (C) Copyright 2013-2018 Fred Gleason +// (C) Copyright 2013-2019 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,14 +21,14 @@ #ifndef EDIT_LIVEWIREGPIO_H #define EDIT_LIVEWIREGPIO_H -#include #include #include #include +#include #include -class EditLiveWireGpio : public QDialog +class EditLiveWireGpio : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_matrix.cpp b/rdadmin/edit_matrix.cpp index 702ce94f..5c20d3f9 100644 --- a/rdadmin/edit_matrix.cpp +++ b/rdadmin/edit_matrix.cpp @@ -2,7 +2,7 @@ // // Edit a Rivendell Matrix // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,7 +18,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include #include #include #include @@ -43,7 +42,7 @@ #include "list_sas_resources.h" EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -63,14 +62,6 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) setWindowTitle("RDAdmin - "+tr("Edit Switcher")); - // - // Create Fonts - // - QFont bold_font=QFont("Helvetica",12,QFont::Bold); - bold_font.setPixelSize(12); - QFont font=QFont("Helvetica",12,QFont::Normal); - font.setPixelSize(12); - // // Text Validator // @@ -81,10 +72,9 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) // QLabel *label=new QLabel(QString().sprintf("%d",edit_matrix_number),this); label->setGeometry(135,10,30,19); - label->setFont(font); label=new QLabel(tr("Matrix Number:"),this); label->setGeometry(10,10,120,19); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -92,10 +82,10 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) // label=new QLabel(RDMatrix::typeString(edit_matrix->type()),this); label->setGeometry(135,30,200,19); - label->setFont(font); + label->setFont(labelFont()); label=new QLabel(tr("Switcher Type:"),this); label->setGeometry(10,30,120,19); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -106,7 +96,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) edit_name_edit->setValidator(validator); label=new QLabel(edit_name_edit,tr("Description:"),this); label->setGeometry(10,50,120,19); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -114,7 +104,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) // label=new QLabel(tr("Primary Connection"),this); label->setGeometry(20,74,130,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignCenter); // @@ -124,7 +114,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) edit_porttype_box->setGeometry(90,96,70,19); edit_porttype_label=new QLabel(edit_porttype_box,tr("Type:"),this); edit_porttype_label->setGeometry(15,96,70,19); - edit_porttype_label->setFont(bold_font); + edit_porttype_label->setFont(labelFont()); edit_porttype_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); edit_porttype_box->insertItem(tr("Serial")); edit_porttype_box->insertItem(tr("TCP/IP")); @@ -140,7 +130,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) edit_port_label= new QLabel(edit_port_box,tr("Serial Port:"),this); edit_port_label->setGeometry(195,96,90,19); - edit_port_label->setFont(bold_font); + edit_port_label->setFont(labelFont()); edit_port_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -150,7 +140,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) edit_ipaddress_edit->setGeometry(90,118,115,19); edit_ipaddress_label=new QLabel(edit_ipaddress_edit,tr("IP Address:"),this); edit_ipaddress_label->setGeometry(15,118,70,19); - edit_ipaddress_label->setFont(bold_font); + edit_ipaddress_label->setFont(labelFont()); edit_ipaddress_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -159,10 +149,9 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) edit_ipport_spin=new QSpinBox(this); edit_ipport_spin->setGeometry(290,118,65,19); edit_ipport_spin->setRange(0,0xFFFF); - edit_ipport_label= - new QLabel(edit_ipport_spin,tr("IP Port:"),this); + edit_ipport_label=new QLabel(edit_ipport_spin,tr("IP Port:"),this); edit_ipport_label->setGeometry(215,118,70,19); - edit_ipport_label->setFont(bold_font); + edit_ipport_label->setFont(labelFont()); edit_ipport_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -172,7 +161,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) edit_username_edit->setGeometry(90,140,115,19); edit_username_label=new QLabel(edit_username_edit,tr("Username:"),this); edit_username_label->setGeometry(15,140,70,19); - edit_username_label->setFont(bold_font); + edit_username_label->setFont(labelFont()); edit_username_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -183,7 +172,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) edit_password_edit->setEchoMode(QLineEdit::Password); edit_password_label=new QLabel(edit_password_edit,tr("Password:"),this); edit_password_label->setGeometry(215,140,70,19); - edit_password_label->setFont(bold_font); + edit_password_label->setFont(labelFont()); edit_password_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -191,14 +180,13 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) // edit_start_cart_edit=new QLineEdit(this); edit_start_cart_edit->setGeometry(120,164,80,19); - edit_start_cart_label=new QLabel(edit_start_cart_edit,tr("Startup Cart:"), - this); + edit_start_cart_label= + new QLabel(edit_start_cart_edit,tr("Startup Cart:"),this); edit_start_cart_label->setGeometry(15,164,100,19); - edit_start_cart_label->setFont(bold_font); + edit_start_cart_label->setFont(labelFont()); edit_start_cart_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); - edit_start_cart_button= - new QPushButton(tr("Select"),this); - edit_start_cart_button->setFont(font); + edit_start_cart_button=new QPushButton(tr("Select"),this); + edit_start_cart_button->setFont(subButtonFont()); edit_start_cart_button->setGeometry(205,162,60,24); connect(edit_start_cart_button,SIGNAL(clicked()),this,SLOT(startCartData())); @@ -207,13 +195,13 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) // edit_stop_cart_edit=new QLineEdit(this); edit_stop_cart_edit->setGeometry(120,188,80,19); - edit_stop_cart_label=new QLabel(edit_stop_cart_edit,tr("Shutdown Cart:"), - this); + edit_stop_cart_label= + new QLabel(edit_stop_cart_edit,tr("Shutdown Cart:"),this); edit_stop_cart_label->setGeometry(15,188,100,19); - edit_stop_cart_label->setFont(bold_font); + edit_stop_cart_label->setFont(labelFont()); edit_stop_cart_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); edit_stop_cart_button=new QPushButton(tr("Select"),this); - edit_stop_cart_button->setFont(font); + edit_stop_cart_button->setFont(subButtonFont()); edit_stop_cart_button->setGeometry(205,186,60,24); connect(edit_stop_cart_button,SIGNAL(clicked()),this,SLOT(stopCartData())); @@ -222,7 +210,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) // label=new QLabel(tr("Backup Connection"),this); label->setGeometry(20,221,130,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignCenter); // @@ -232,7 +220,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) edit_porttype2_box->setGeometry(90,243,70,19); edit_porttype2_label=new QLabel(edit_porttype2_box,tr("Type:"),this); edit_porttype2_label->setGeometry(15,243,70,19); - edit_porttype2_label->setFont(bold_font); + edit_porttype2_label->setFont(labelFont()); edit_porttype2_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); edit_porttype2_box->insertItem(tr("Serial")); edit_porttype2_box->insertItem(tr("TCP/IP")); @@ -246,10 +234,9 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) edit_port2_box=new QComboBox(this); edit_port2_box->setGeometry(290,243,90,19); edit_port2_box->setEditable(false); - edit_port2_label= - new QLabel(edit_port2_box,tr("Serial Port:"),this); + edit_port2_label=new QLabel(edit_port2_box,tr("Serial Port:"),this); edit_port2_label->setGeometry(195,243,90,19); - edit_port2_label->setFont(bold_font); + edit_port2_label->setFont(labelFont()); edit_port2_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -257,10 +244,9 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) // edit_ipaddress2_edit=new QLineEdit(this); edit_ipaddress2_edit->setGeometry(90,265,115,19); - edit_ipaddress2_label= - new QLabel(edit_ipaddress2_edit,tr("IP Address:"),this); + edit_ipaddress2_label=new QLabel(edit_ipaddress2_edit,tr("IP Address:"),this); edit_ipaddress2_label->setGeometry(15,265,70,19); - edit_ipaddress2_label->setFont(bold_font); + edit_ipaddress2_label->setFont(labelFont()); edit_ipaddress2_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -269,10 +255,9 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) edit_ipport2_spin=new QSpinBox(this); edit_ipport2_spin->setGeometry(290,265,65,19); edit_ipport2_spin->setRange(0,0xFFFF); - edit_ipport2_label= - new QLabel(edit_ipport2_spin,tr("IP Port:"),this); + edit_ipport2_label=new QLabel(edit_ipport2_spin,tr("IP Port:"),this); edit_ipport2_label->setGeometry(215,265,70,19); - edit_ipport2_label->setFont(bold_font); + edit_ipport2_label->setFont(labelFont()); edit_ipport2_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -282,7 +267,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) edit_username2_edit->setGeometry(90,288,115,19); edit_username2_label=new QLabel(edit_username2_edit,tr("Username:"),this); edit_username2_label->setGeometry(15,288,70,19); - edit_username2_label->setFont(bold_font); + edit_username2_label->setFont(labelFont()); edit_username2_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -293,7 +278,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) edit_password2_edit->setEchoMode(QLineEdit::Password); edit_password2_label=new QLabel(edit_password2_edit,tr("Password:"),this); edit_password2_label->setGeometry(215,288,70,19); - edit_password2_label->setFont(bold_font); + edit_password2_label->setFont(labelFont()); edit_password2_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -304,10 +289,10 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) edit_start_cart2_label=new QLabel(edit_start_cart2_edit,tr("Startup Cart:"), this); edit_start_cart2_label->setGeometry(15,312,100,19); - edit_start_cart2_label->setFont(bold_font); + edit_start_cart2_label->setFont(labelFont()); edit_start_cart2_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); edit_start_cart2_button=new QPushButton(tr("Select"),this); - edit_start_cart2_button->setFont(font); + edit_start_cart2_button->setFont(subButtonFont()); edit_start_cart2_button->setGeometry(205,310,60,24); connect(edit_start_cart2_button,SIGNAL(clicked()), this,SLOT(startCart2Data())); @@ -320,10 +305,10 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) edit_stop_cart2_label=new QLabel(edit_stop_cart2_edit,tr("Shutdown Cart:"), this); edit_stop_cart2_label->setGeometry(15,336,100,19); - edit_stop_cart2_label->setFont(bold_font); + edit_stop_cart2_label->setFont(labelFont()); edit_stop_cart2_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); edit_stop_cart2_button=new QPushButton(tr("Select"),this); - edit_stop_cart2_button->setFont(font); + edit_stop_cart2_button->setFont(subButtonFont()); edit_stop_cart2_button->setGeometry(205,334,60,24); connect(edit_stop_cart2_button,SIGNAL(clicked()),this,SLOT(stopCart2Data())); @@ -335,7 +320,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) edit_card_box->setRange(0,9999); edit_card_label=new QLabel(edit_card_box,tr("Card:"),this); edit_card_label->setGeometry(10,371,60,19); - edit_card_label->setFont(bold_font); + edit_card_label->setFont(labelFont()); edit_card_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -346,7 +331,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) edit_inputs_box->setRange(0,MAX_ENDPOINTS); edit_inputs_label=new QLabel(edit_inputs_box,tr("Inputs:"),this); edit_inputs_label->setGeometry(175,371,50,19); - edit_inputs_label->setFont(bold_font); + edit_inputs_label->setFont(labelFont()); edit_inputs_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); connect(edit_inputs_box,SIGNAL(valueChanged(int)), this,SLOT(inputsChangedData(int))); @@ -359,7 +344,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) edit_outputs_box->setRange(0,MAX_ENDPOINTS); edit_outputs_label=new QLabel(edit_outputs_box,tr("Outputs:"),this); edit_outputs_label->setGeometry(280,371,70,19); - edit_outputs_label->setFont(bold_font); + edit_outputs_label->setFont(labelFont()); edit_outputs_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -370,7 +355,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) edit_device_edit->setValidator(validator); edit_device_label=new QLabel(edit_device_edit,tr("Device:"),this); edit_device_label->setGeometry(5,396,65,19); - edit_device_label->setFont(bold_font); + edit_device_label->setFont(labelFont()); edit_device_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -381,7 +366,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) edit_gpis_box->setRange(0,MAX_GPIO_PINS); edit_gpis_label=new QLabel(edit_gpis_box,tr("GPIs:"),this); edit_gpis_label->setGeometry(175,396,50,19); - edit_gpis_label->setFont(bold_font); + edit_gpis_label->setFont(labelFont()); edit_gpis_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); connect(edit_gpis_box,SIGNAL(valueChanged(int)), this,SLOT(gpisChangedData(int))); @@ -394,7 +379,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) edit_gpos_box->setRange(0,MAX_GPIO_PINS); edit_gpos_label=new QLabel(edit_gpos_box,tr("GPOs:"),this); edit_gpos_label->setGeometry(280,396,70,19); - edit_gpos_label->setFont(bold_font); + edit_gpos_label->setFont(labelFont()); edit_gpos_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); connect(edit_gpos_box,SIGNAL(valueChanged(int)), this,SLOT(gposChangedData(int))); @@ -406,7 +391,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) edit_layer_box->setGeometry(75,421,50,19); edit_layer_label=new QLabel(edit_layer_box,tr("Layer:"),this); edit_layer_label->setGeometry(10,421,60,19); - edit_layer_label->setFont(bold_font); + edit_layer_label->setFont(labelFont()); edit_layer_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); edit_layer_box->insertItem("V"); edit_layer_box->insertItem("A"); @@ -433,7 +418,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) edit_displays_box->setRange(0,1024); edit_displays_label=new QLabel(edit_displays_box,tr("Displays:"),this); edit_displays_label->setGeometry(280,421,70,19); - edit_displays_label->setFont(bold_font); + edit_displays_label->setFont(labelFont()); edit_displays_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -441,7 +426,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) // edit_inputs_button=new QPushButton(this); edit_inputs_button->setGeometry(35,446,80,50); - edit_inputs_button->setFont(bold_font); + edit_inputs_button->setFont(buttonFont()); edit_inputs_button->setText(tr("Configure\n&Inputs")); connect(edit_inputs_button,SIGNAL(clicked()),this,SLOT(inputsButtonData())); @@ -450,7 +435,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) // edit_outputs_button=new QPushButton(this); edit_outputs_button->setGeometry(125,446,80,50); - edit_outputs_button->setFont(bold_font); + edit_outputs_button->setFont(buttonFont()); edit_outputs_button->setText(tr("Configure\n&Outputs")); connect(edit_outputs_button,SIGNAL(clicked()), this,SLOT(outputsButtonData())); @@ -461,7 +446,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) edit_gpis_button=new QPushButton(this); edit_gpis_button->setGeometry(215,446,80,50); edit_gpis_button->setDefault(true); - edit_gpis_button->setFont(bold_font); + edit_gpis_button->setFont(buttonFont()); edit_gpis_button->setText(tr("Configure\n&GPIs")); connect(edit_gpis_button,SIGNAL(clicked()),this,SLOT(gpisButtonData())); @@ -471,7 +456,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) edit_gpos_button=new QPushButton(this); edit_gpos_button->setGeometry(305,446,80,50); edit_gpos_button->setDefault(true); - edit_gpos_button->setFont(bold_font); + edit_gpos_button->setFont(buttonFont()); edit_gpos_button->setText(tr("Configure\nG&POs")); connect(edit_gpos_button,SIGNAL(clicked()),this,SLOT(gposButtonData())); @@ -480,7 +465,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) // edit_livewire_button=new QPushButton(this); edit_livewire_button->setGeometry(35,506,80,50); - edit_livewire_button->setFont(bold_font); + edit_livewire_button->setFont(buttonFont()); edit_livewire_button->setText(tr("LiveWire\nNodes")); connect(edit_livewire_button,SIGNAL(clicked()), this,SLOT(livewireButtonData())); @@ -490,7 +475,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) // edit_livewire_gpio_button=new QPushButton(this); edit_livewire_gpio_button->setGeometry(125,506,80,50); - edit_livewire_gpio_button->setFont(bold_font); + edit_livewire_gpio_button->setFont(buttonFont()); edit_livewire_gpio_button->setText(tr("LiveWire\nGPIOs")); connect(edit_livewire_gpio_button,SIGNAL(clicked()), this,SLOT(livewireGpioButtonData())); @@ -500,7 +485,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) // edit_vguestrelays_button=new QPushButton(this); edit_vguestrelays_button->setGeometry(215,506,80,50); - edit_vguestrelays_button->setFont(bold_font); + edit_vguestrelays_button->setFont(buttonFont()); edit_vguestrelays_button->setText(tr("vGuest\nSwitches")); connect(edit_vguestrelays_button,SIGNAL(clicked()), this,SLOT(vguestRelaysButtonData())); @@ -510,7 +495,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) // edit_vguestdisplays_button=new QPushButton(this); edit_vguestdisplays_button->setGeometry(305,506,80,50); - edit_vguestdisplays_button->setFont(bold_font); + edit_vguestdisplays_button->setFont(buttonFont()); edit_vguestdisplays_button->setText(tr("vGuest\nDisplays")); connect(edit_vguestdisplays_button,SIGNAL(clicked()), this,SLOT(vguestDisplaysButtonData())); @@ -520,7 +505,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) // edit_sasresources_button=new QPushButton(this); edit_sasresources_button->setGeometry(170,561,80,50); - edit_sasresources_button->setFont(bold_font); + edit_sasresources_button->setFont(buttonFont()); edit_sasresources_button->setText(tr("SAS\nSwitches")); connect(edit_sasresources_button,SIGNAL(clicked()), this,SLOT(sasResourcesButtonData())); @@ -531,7 +516,7 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) QPushButton *button=new QPushButton(this); button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); button->setDefault(true); - button->setFont(bold_font); + button->setFont(buttonFont()); button->setText(tr("&OK")); connect(button,SIGNAL(clicked()),this,SLOT(okData())); @@ -539,9 +524,8 @@ EditMatrix::EditMatrix(RDMatrix *matrix,QWidget *parent) // Cancel Button // button=new QPushButton(this); - button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, - 80,50); - button->setFont(bold_font); + button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50); + button->setFont(buttonFont()); button->setText(tr("&Cancel")); connect(button,SIGNAL(clicked()),this,SLOT(cancelData())); diff --git a/rdadmin/edit_matrix.h b/rdadmin/edit_matrix.h index a7668ef6..4abb2f3e 100644 --- a/rdadmin/edit_matrix.h +++ b/rdadmin/edit_matrix.h @@ -2,7 +2,7 @@ // // Edit a Rivendell Matrix // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,17 +21,17 @@ #ifndef EDIT_MATRIX_H #define EDIT_MATRIX_H -#include #include #include #include #include #include -#include +#include #include +#include -class EditMatrix : public QDialog +class EditMatrix : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_node.cpp b/rdadmin/edit_node.cpp index c6e96265..1dfebab9 100644 --- a/rdadmin/edit_node.cpp +++ b/rdadmin/edit_node.cpp @@ -2,7 +2,7 @@ // // Edit a Rivendell LiveWire Node // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ -30,7 +30,7 @@ #include "view_node_info.h" EditNode::EditNode(int *id,RDMatrix *matrix,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -47,23 +47,14 @@ EditNode::EditNode(int *id,RDMatrix *matrix,QWidget *parent) setMinimumHeight(sizeHint().height()); setMaximumHeight(sizeHint().height()); - // - // Create Fonts - // - QFont bold_font=QFont("Helvetica",12,QFont::Bold); - bold_font.setPixelSize(12); - QFont font=QFont("Helvetica",12,QFont::Normal); - font.setPixelSize(12); - // // Node Hostname // edit_hostname_edit=new QLineEdit(this); edit_hostname_edit->setGeometry(90,10,190,20); - QLabel *label= - new QLabel(edit_hostname_edit,tr("Hostname: "),this); + QLabel *label=new QLabel(edit_hostname_edit,tr("Hostname: "),this); label->setGeometry(10,10,80,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -74,7 +65,7 @@ EditNode::EditNode(int *id,RDMatrix *matrix,QWidget *parent) edit_tcpport_spin->setRange(0,0xFFFF); label=new QLabel(edit_tcpport_spin,tr("Port: "),this); label->setGeometry(290,10,45,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -84,7 +75,7 @@ EditNode::EditNode(int *id,RDMatrix *matrix,QWidget *parent) edit_description_edit->setGeometry(90,32,sizeHint().width()-100,20); label=new QLabel(edit_description_edit,tr("Description: "),this); label->setGeometry(10,32,80,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -94,10 +85,9 @@ EditNode::EditNode(int *id,RDMatrix *matrix,QWidget *parent) edit_output_spin->setGeometry(90,54,60,20); edit_output_spin->setRange(0,0x7FFF); edit_output_spin->setSpecialValueText(tr("None")); - label= - new QLabel(edit_output_spin,tr("First Output: "),this); + label=new QLabel(edit_output_spin,tr("First Output: "),this); label->setGeometry(10,54,80,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -109,10 +99,9 @@ EditNode::EditNode(int *id,RDMatrix *matrix,QWidget *parent) edit_password_edit->setText("********"); connect(edit_password_edit,SIGNAL(textChanged(const QString &)), this,SLOT(passwordChangedData(const QString &))); - label= - new QLabel(edit_password_edit,tr("Password: "),this); + label=new QLabel(edit_password_edit,tr("Password: "),this); label->setGeometry(160,54,80,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -120,7 +109,7 @@ EditNode::EditNode(int *id,RDMatrix *matrix,QWidget *parent) // QPushButton *button=new QPushButton(this); button->setGeometry(10,sizeHint().height()-60,80,50); - button->setFont(bold_font); + button->setFont(buttonFont()); button->setText(tr("&View Node\nInfo")); connect(button,SIGNAL(clicked()),this,SLOT(viewData())); @@ -130,7 +119,7 @@ EditNode::EditNode(int *id,RDMatrix *matrix,QWidget *parent) button=new QPushButton(this); button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); button->setDefault(true); - button->setFont(bold_font); + button->setFont(buttonFont()); button->setText(tr("&OK")); connect(button,SIGNAL(clicked()),this,SLOT(okData())); @@ -138,9 +127,8 @@ EditNode::EditNode(int *id,RDMatrix *matrix,QWidget *parent) // Cancel Button // button=new QPushButton(this); - button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, - 80,50); - button->setFont(bold_font); + button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50); + button->setFont(buttonFont()); button->setText(tr("&Cancel")); connect(button,SIGNAL(clicked()),this,SLOT(cancelData())); @@ -240,7 +228,7 @@ void EditNode::okData() QString().sprintf("MATRIX=%d,",edit_matrix->matrix())+ "HOSTNAME=\""+RDEscapeString(edit_hostname_edit->text())+"\","+ QString().sprintf("TCP_PORT=%d,",edit_tcpport_spin->value())+ - "DESCRIPTION=\""+RDEscapeString(edit_description_edit->text())+"\""+ + "DESCRIPTION=\""+RDEscapeString(edit_description_edit->text())+"\","+ QString().sprintf("BASE_OUTPUT=%d,",edit_output_spin->value())+ "PASSWORD=\""+RDEscapeString(edit_password)+"\""; q=new RDSqlQuery(sql); diff --git a/rdadmin/edit_node.h b/rdadmin/edit_node.h index 8b849571..8055e81d 100644 --- a/rdadmin/edit_node.h +++ b/rdadmin/edit_node.h @@ -2,7 +2,7 @@ // // Edit a Rivendell LiveWire Node // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,14 +21,14 @@ #ifndef EDIT_NODE_H #define EDIT_NODE_H -#include #include #include #include +#include #include -class EditNode : public QDialog +class EditNode : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_pypad.cpp b/rdadmin/edit_pypad.cpp index d442816a..39ddf3da 100644 --- a/rdadmin/edit_pypad.cpp +++ b/rdadmin/edit_pypad.cpp @@ -2,7 +2,7 @@ // // Edit a PyPAD Instance Configuration // -// (C) Copyright 2018 Fred Gleason +// (C) Copyright 2018-2019 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,7 +24,7 @@ #include "edit_pypad.h" EditPypad::EditPypad(int id,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { edit_id=id; @@ -32,16 +32,11 @@ EditPypad::EditPypad(int id,QWidget *parent) setWindowTitle(tr("Edit PyPAD Instance")+ " ["+tr("ID")+QString().sprintf(": %u]",id)); - // - // Fonts - // - QFont label_font(font().family(),font().pointSize(),QFont::Bold); - // // Script Path // edit_script_path_label=new QLabel(tr("Script Path")+":",this); - edit_script_path_label->setFont(label_font); + edit_script_path_label->setFont(labelFont()); edit_script_path_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); edit_script_path_edit=new QLineEdit(this); edit_script_path_edit->setReadOnly(true); @@ -50,7 +45,7 @@ EditPypad::EditPypad(int id,QWidget *parent) // Description // edit_description_label=new QLabel(tr("Description")+":",this); - edit_description_label->setFont(label_font); + edit_description_label->setFont(labelFont()); edit_description_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); edit_description_edit=new QLineEdit(this); @@ -58,7 +53,7 @@ EditPypad::EditPypad(int id,QWidget *parent) // Configuration // edit_config_label=new QLabel(tr("Configuration"),this); - edit_config_label->setFont(label_font); + edit_config_label->setFont(labelFont()); edit_config_label->setAlignment(Qt::AlignVCenter|Qt::AlignLeft); edit_config_text=new QTextEdit(this); edit_config_text->setAcceptRichText(false); @@ -68,14 +63,14 @@ EditPypad::EditPypad(int id,QWidget *parent) // OK Button // edit_ok_button=new QPushButton(tr("OK"),this); - edit_ok_button->setFont(label_font); + edit_ok_button->setFont(buttonFont()); connect(edit_ok_button,SIGNAL(clicked()),this,SLOT(okData())); // // Cancel Button // edit_cancel_button=new QPushButton(tr("Cancel"),this); - edit_cancel_button->setFont(label_font); + edit_cancel_button->setFont(buttonFont()); connect(edit_cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); // diff --git a/rdadmin/edit_pypad.h b/rdadmin/edit_pypad.h index 104503f7..dac2cb32 100644 --- a/rdadmin/edit_pypad.h +++ b/rdadmin/edit_pypad.h @@ -2,7 +2,7 @@ // // Edit a PyPAD Instance Configuration // -// (C) Copyright 2018 Fred Gleason +// (C) Copyright 2018-2019 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,13 +21,14 @@ #ifndef EDIT_PYPAD_H #define EDIT_PYPAD_H -#include #include #include #include #include -class EditPypad : public QDialog +#include + +class EditPypad : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_rdairplay.cpp b/rdadmin/edit_rdairplay.cpp index d7cd8be2..8c06770f 100644 --- a/rdadmin/edit_rdairplay.cpp +++ b/rdadmin/edit_rdairplay.cpp @@ -2,7 +2,7 @@ // // Edit an RDAirPlay Configuration // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,7 +45,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -67,16 +67,6 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_conf=new RDAirPlayConf(station->name(),"RDAIRPLAY"); - // - // Create Fonts - // - QFont unit_font=QFont("Helvetica",12,QFont::Normal); - unit_font.setPixelSize(12); - QFont small_font=QFont("Helvetica",12,QFont::Bold); - small_font.setPixelSize(12); - QFont big_font=QFont("Helvetica",14,QFont::Bold); - big_font.setPixelSize(14); - // // Text Validator // @@ -91,7 +81,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, // Channel Assignments Section // QLabel *label=new QLabel(tr("Channel Assignments"),this); - label->setFont(big_font); + label->setFont(sectionLabelFont()); label->setGeometry(10,10,200,16); QSignalMapper *mapper=new QSignalMapper(this); @@ -101,7 +91,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, // Main Log Output 1 // label=new QLabel(tr("Main Log Output 1"),this); - label->setFont(small_font); + label->setFont(labelFont()); label->setGeometry(25,32,200,16); air_card_sel[0]=new RDCardSelector(this); air_card_sel[0]->setId(0); @@ -109,19 +99,22 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_start_rml_edit[0]=new QLineEdit(this); air_start_rml_edit[0]->setGeometry(210,50,95,19); air_start_rml_edit[0]->setValidator(validator); - air_start_rml_label[0]=new QLabel(air_start_rml_edit[0],tr("Start RML:"),this); + air_start_rml_label[0]= + new QLabel(air_start_rml_edit[0],tr("Start RML:"),this); + air_start_rml_label[0]->setFont(subLabelFont()); air_start_rml_label[0]->setGeometry(140,50,65,19); air_start_rml_label[0]->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_stop_rml_edit[0]=new QLineEdit(this); air_stop_rml_edit[0]->setGeometry(210,71,95,19); air_stop_rml_edit[0]->setValidator(validator); air_stop_rml_label[0]=new QLabel(air_start_rml_edit[0],tr("Stop RML:"),this); + air_stop_rml_label[0]->setFont(subLabelFont()); air_stop_rml_label[0]->setGeometry(140,71,65,19); air_stop_rml_label[0]->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_channel_button[0]=new QPushButton(tr("Edit\nGPIOs"),this); air_channel_button[0]->setGeometry(310,46,60,50); - air_channel_button[0]->setFont(small_font); + air_channel_button[0]->setFont(buttonFont()); mapper->setMapping(air_channel_button[0],RDAirPlayConf::MainLog1Channel); connect(air_channel_button[0],SIGNAL(clicked()),mapper,SLOT(map())); connect(air_card_sel[0],SIGNAL(settingsChanged(int,int,int)), @@ -131,7 +124,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, // Main Log Output 2 // label=new QLabel(tr("Main Log Output 2"),this); - label->setFont(small_font); + label->setFont(labelFont()); label->setGeometry(25,100,200,16); air_card_sel[1]=new RDCardSelector(this); air_card_sel[1]->setId(1); @@ -139,19 +132,22 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_start_rml_edit[1]=new QLineEdit(this); air_start_rml_edit[1]->setGeometry(210,118,95,19); air_start_rml_edit[1]->setValidator(validator); - air_start_rml_label[1]=new QLabel(air_start_rml_edit[1],tr("Start RML:"),this); + air_start_rml_label[1]= + new QLabel(air_start_rml_edit[1],tr("Start RML:"),this); + air_start_rml_label[1]->setFont(subLabelFont()); air_start_rml_label[1]->setGeometry(140,118,65,19); air_start_rml_label[1]->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_stop_rml_edit[1]=new QLineEdit(this); air_stop_rml_edit[1]->setGeometry(210,139,95,19); air_stop_rml_edit[1]->setValidator(validator); air_stop_rml_label[1]=new QLabel(air_start_rml_edit[1],tr("Stop RML:"),this); + air_stop_rml_label[1]->setFont(subLabelFont()); air_stop_rml_label[1]->setGeometry(140,139,65,19); air_stop_rml_label[1]->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_channel_button[1]=new QPushButton(tr("Edit\nGPIOs"),this); air_channel_button[1]->setGeometry(310,114,60,50); - air_channel_button[1]->setFont(small_font); + air_channel_button[1]->setFont(buttonFont()); mapper->setMapping(air_channel_button[1],RDAirPlayConf::MainLog2Channel); connect(air_channel_button[1],SIGNAL(clicked()),mapper,SLOT(map())); connect(air_card_sel[1],SIGNAL(settingsChanged(int,int,int)), @@ -161,7 +157,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, // Aux Log 1 Output // label=new QLabel(tr("Aux Log 1 Output"),this); - label->setFont(small_font); + label->setFont(labelFont()); label->setGeometry(25,168,200,16); air_card_sel[4]=new RDCardSelector(this); air_card_sel[4]->setId(4); @@ -169,19 +165,22 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_start_rml_edit[4]=new QLineEdit(this); air_start_rml_edit[4]->setGeometry(210,186,95,19); air_start_rml_edit[4]->setValidator(validator); - air_start_rml_label[4]=new QLabel(air_start_rml_edit[4],tr("Start RML:"),this); + air_start_rml_label[4]= + new QLabel(air_start_rml_edit[4],tr("Start RML:"),this); + air_start_rml_label[4]->setFont(subLabelFont()); air_start_rml_label[4]->setGeometry(140,186,65,19); air_start_rml_label[4]->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_stop_rml_edit[4]=new QLineEdit(this); air_stop_rml_edit[4]->setGeometry(210,207,95,19); air_stop_rml_edit[4]->setValidator(validator); air_stop_rml_label[4]=new QLabel(air_start_rml_edit[4],tr("Stop RML:"),this); + air_stop_rml_label[4]->setFont(subLabelFont()); air_stop_rml_label[4]->setGeometry(140,207,65,19); air_stop_rml_label[4]->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_channel_button[4]=new QPushButton(tr("Edit\nGPIOs"),this); air_channel_button[4]->setGeometry(310,182,60,50); - air_channel_button[4]->setFont(small_font); + air_channel_button[4]->setFont(buttonFont()); mapper->setMapping(air_channel_button[4],RDAirPlayConf::AuxLog1Channel); connect(air_channel_button[4],SIGNAL(clicked()),mapper,SLOT(map())); connect(air_card_sel[4],SIGNAL(settingsChanged(int,int,int)), @@ -191,7 +190,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, // Aux Log 2 Output // label=new QLabel(tr("Aux Log 2 Output"),this); - label->setFont(small_font); + label->setFont(labelFont()); label->setGeometry(25,236,200,16); air_card_sel[5]=new RDCardSelector(this); air_card_sel[5]->setId(5); @@ -199,19 +198,22 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_start_rml_edit[5]=new QLineEdit(this); air_start_rml_edit[5]->setGeometry(210,254,95,19); air_start_rml_edit[5]->setValidator(validator); - air_start_rml_label[5]=new QLabel(air_start_rml_edit[5],tr("Start RML:"),this); + air_start_rml_label[5]= + new QLabel(air_start_rml_edit[5],tr("Start RML:"),this); + air_start_rml_label[5]->setFont(subLabelFont()); air_start_rml_label[5]->setGeometry(140,254,65,19); air_start_rml_label[5]->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_stop_rml_edit[5]=new QLineEdit(this); air_stop_rml_edit[5]->setGeometry(210,275,95,19); air_stop_rml_edit[5]->setValidator(validator); air_stop_rml_label[5]=new QLabel(air_start_rml_edit[5],tr("Stop RML:"),this); + air_stop_rml_label[5]->setFont(subLabelFont()); air_stop_rml_label[5]->setGeometry(140,275,65,19); air_stop_rml_label[5]->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_channel_button[5]=new QPushButton(tr("Edit\nGPIOs"),this); air_channel_button[5]->setGeometry(310,250,60,50); - air_channel_button[5]->setFont(small_font); + air_channel_button[5]->setFont(buttonFont()); mapper->setMapping(air_channel_button[5],RDAirPlayConf::AuxLog2Channel); connect(air_channel_button[5],SIGNAL(clicked()),mapper,SLOT(map())); connect(air_card_sel[5],SIGNAL(settingsChanged(int,int,int)), @@ -221,7 +223,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, // Virtual Log Output // label=new QLabel(tr("Virtual Log Outputs"),this); - label->setFont(small_font); + label->setFont(labelFont()); label->setGeometry(25,309,190,20); air_virtual_machine_box=new QComboBox(this); air_virtual_machine_box->setGeometry(270,309,100,20); @@ -232,7 +234,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, connect(air_virtual_machine_box,SIGNAL(activated(int)), this,SLOT(virtualLogActivatedData(int))); label=new QLabel(air_virtual_machine_box,tr("Log Machine")+":",this); - label->setFont(small_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); label->setGeometry(165,309,100,20); air_virtual_card_sel=new RDCardSelector(this); @@ -242,6 +244,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_virtual_start_rml_edit->setValidator(validator); air_virtual_start_rml_label= new QLabel(air_virtual_start_rml_edit,tr("Start RML:"),this); + air_virtual_start_rml_label->setFont(subLabelFont()); air_virtual_start_rml_label->setGeometry(140,332,65,19); air_virtual_start_rml_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_virtual_stop_rml_edit=new QLineEdit(this); @@ -249,6 +252,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_virtual_stop_rml_edit->setValidator(validator); air_virtual_stop_rml_label= new QLabel(air_virtual_start_rml_edit,tr("Stop RML:"),this); + air_virtual_stop_rml_label->setFont(subLabelFont()); air_virtual_stop_rml_label->setGeometry(140,353,65,19); air_virtual_stop_rml_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); @@ -263,12 +267,14 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_start_rml_edit[3]->setGeometry(210,322,160,19); air_start_rml_edit[3]->setValidator(validator); air_start_rml_label[3]=new QLabel(air_start_rml_edit[3],tr("Start RML:"),this); + air_start_rml_label[3]->setFont(subLabelFont()); air_start_rml_label[3]->setGeometry(140,322,65,19); air_start_rml_label[3]->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_stop_rml_edit[3]=new QLineEdit(this); air_stop_rml_edit[3]->setGeometry(210,343,160,19); air_stop_rml_edit[3]->setValidator(validator); air_stop_rml_label[3]=new QLabel(air_start_rml_edit[3],tr("Stop RML:"),this); + air_stop_rml_label[3]->setFont(subLabelFont()); air_stop_rml_label[3]->setGeometry(140,343,65,19); air_stop_rml_label[3]->setAlignment(Qt::AlignVCenter|Qt::AlignRight); @@ -287,7 +293,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, // QPushButton *button=new QPushButton(this); button->setGeometry(10,385,180,50); - button->setFont(small_font); + button->setFont(buttonFont()); button->setText(tr("Configure Hot Keys")); connect(button,SIGNAL(clicked()),this,SLOT(editHotKeys())); @@ -295,7 +301,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, // Sound Panel First Play Output // label=new QLabel(tr("SoundPanel First Play Output"),this); - label->setFont(small_font); + label->setFont(labelFont()); label->setGeometry(395,32,300,16); air_card_sel[2]=new RDCardSelector(this); air_card_sel[2]->setId(2); @@ -304,18 +310,20 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_start_rml_edit[2]->setGeometry(580,50,95,19); air_start_rml_edit[2]->setValidator(validator); air_start_rml_label[2]=new QLabel(air_start_rml_edit[2],tr("Start RML:"),this); + air_start_rml_label[2]->setFont(subLabelFont()); air_start_rml_label[2]->setGeometry(510,50,65,19); air_start_rml_label[2]->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_stop_rml_edit[2]=new QLineEdit(this); air_stop_rml_edit[2]->setGeometry(580,71,95,19); air_stop_rml_edit[2]->setValidator(validator); air_stop_rml_label[2]=new QLabel(air_start_rml_edit[2],tr("Stop RML:"),this); + air_stop_rml_label[2]->setFont(subLabelFont()); air_stop_rml_label[2]->setGeometry(510,71,65,19); air_stop_rml_label[2]->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_channel_button[2]=new QPushButton(tr("Edit\nGPIOs"),this); air_channel_button[2]->setGeometry(680,46,60,50); - air_channel_button[2]->setFont(small_font); + air_channel_button[2]->setFont(buttonFont()); mapper->setMapping(air_channel_button[2],RDAirPlayConf::SoundPanel1Channel); connect(air_channel_button[2],SIGNAL(clicked()),mapper,SLOT(map())); connect(air_card_sel[2],SIGNAL(settingsChanged(int,int,int)), @@ -325,7 +333,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, // Sound Panel Second Play Output // label=new QLabel(tr("SoundPanel Second Play Output"),this); - label->setFont(small_font); + label->setFont(labelFont()); label->setGeometry(395,100,300,16); air_card_sel[6]=new RDCardSelector(this); air_card_sel[6]->setId(6); @@ -333,19 +341,22 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_start_rml_edit[6]=new QLineEdit(this); air_start_rml_edit[6]->setGeometry(580,118,95,19); air_start_rml_edit[6]->setValidator(validator); - air_start_rml_label[6]=new QLabel(air_start_rml_edit[6],tr("Start RML:"),this); + air_start_rml_label[6]= + new QLabel(air_start_rml_edit[6],tr("Start RML:"),this); + air_start_rml_label[6]->setFont(subLabelFont()); air_start_rml_label[6]->setGeometry(510,118,65,19); air_start_rml_label[6]->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_stop_rml_edit[6]=new QLineEdit(this); air_stop_rml_edit[6]->setGeometry(580,139,95,19); air_stop_rml_edit[6]->setValidator(validator); air_stop_rml_label[6]=new QLabel(air_start_rml_edit[6],tr("Stop RML:"),this); + air_stop_rml_label[6]->setFont(subLabelFont()); air_stop_rml_label[6]->setGeometry(510,139,65,19); air_stop_rml_label[6]->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_channel_button[6]=new QPushButton(tr("Edit\nGPIOs"),this); air_channel_button[6]->setGeometry(680,114,60,50); - air_channel_button[6]->setFont(small_font); + air_channel_button[6]->setFont(buttonFont()); mapper->setMapping(air_channel_button[6],RDAirPlayConf::SoundPanel2Channel); connect(air_channel_button[6],SIGNAL(clicked()),mapper,SLOT(map())); connect(air_card_sel[6],SIGNAL(settingsChanged(int,int,int)), @@ -355,7 +366,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, // Sound Panel Third Play Output // label=new QLabel(tr("SoundPanel Third Play Output"),this); - label->setFont(small_font); + label->setFont(labelFont()); label->setGeometry(395,168,300,16); air_card_sel[7]=new RDCardSelector(this); air_card_sel[7]->setId(7); @@ -363,19 +374,22 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_start_rml_edit[7]=new QLineEdit(this); air_start_rml_edit[7]->setGeometry(580,186,95,19); air_start_rml_edit[7]->setValidator(validator); - air_start_rml_label[7]=new QLabel(air_start_rml_edit[7],tr("Start RML:"),this); + air_start_rml_label[7]= + new QLabel(air_start_rml_edit[7],tr("Start RML:"),this); + air_start_rml_label[7]->setFont(subLabelFont()); air_start_rml_label[7]->setGeometry(510,186,65,19); air_start_rml_label[7]->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_stop_rml_edit[7]=new QLineEdit(this); air_stop_rml_edit[7]->setGeometry(580,207,95,19); air_stop_rml_edit[7]->setValidator(validator); air_stop_rml_label[7]=new QLabel(air_start_rml_edit[7],tr("Stop RML:"),this); + air_stop_rml_label[7]->setFont(subLabelFont()); air_stop_rml_label[7]->setGeometry(510,207,65,19); air_stop_rml_label[7]->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_channel_button[7]=new QPushButton(tr("Edit\nGPIOs"),this); air_channel_button[7]->setGeometry(680,182,60,50); - air_channel_button[7]->setFont(small_font); + air_channel_button[7]->setFont(buttonFont()); mapper->setMapping(air_channel_button[7],RDAirPlayConf::SoundPanel3Channel); connect(air_channel_button[7],SIGNAL(clicked()),mapper,SLOT(map())); connect(air_card_sel[7],SIGNAL(settingsChanged(int,int,int)), @@ -385,7 +399,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, // Sound Panel Fourth Play Output // label=new QLabel(tr("SoundPanel Fourth Play Output"),this); - label->setFont(small_font); + label->setFont(labelFont()); label->setGeometry(395,236,300,16); air_card_sel[8]=new RDCardSelector(this); air_card_sel[8]->setId(8); @@ -393,19 +407,22 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_start_rml_edit[8]=new QLineEdit(this); air_start_rml_edit[8]->setGeometry(580,254,95,19); air_start_rml_edit[8]->setValidator(validator); - air_start_rml_label[8]=new QLabel(air_start_rml_edit[8],tr("Start RML:"),this); + air_start_rml_label[8]= + new QLabel(air_start_rml_edit[8],tr("Start RML:"),this); + air_start_rml_label[8]->setFont(subLabelFont()); air_start_rml_label[8]->setGeometry(510,254,65,19); air_start_rml_label[8]->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_stop_rml_edit[8]=new QLineEdit(this); air_stop_rml_edit[8]->setGeometry(580,275,95,19); air_stop_rml_edit[8]->setValidator(validator); air_stop_rml_label[8]=new QLabel(air_start_rml_edit[8],tr("Stop RML:"),this); + air_stop_rml_label[8]->setFont(subLabelFont()); air_stop_rml_label[8]->setGeometry(510,275,65,19); air_stop_rml_label[8]->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_channel_button[8]=new QPushButton(tr("Edit\nGPIOs"),this); air_channel_button[8]->setGeometry(680,250,60,50); - air_channel_button[8]->setFont(small_font); + air_channel_button[8]->setFont(buttonFont()); mapper->setMapping(air_channel_button[8],RDAirPlayConf::SoundPanel4Channel); connect(air_channel_button[8],SIGNAL(clicked()),mapper,SLOT(map())); connect(air_card_sel[8],SIGNAL(settingsChanged(int,int,int)), @@ -415,7 +432,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, // Sound Panel Fifth Play Output // label=new QLabel(tr("SoundPanel Fifth and Later Play Output"),this); - label->setFont(small_font); + label->setFont(labelFont()); label->setGeometry(395,304,300,16); air_card_sel[9]=new RDCardSelector(this); air_card_sel[9]->setId(9); @@ -423,19 +440,22 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_start_rml_edit[9]=new QLineEdit(this); air_start_rml_edit[9]->setGeometry(580,322,95,19); air_start_rml_edit[9]->setValidator(validator); - air_start_rml_label[9]=new QLabel(air_start_rml_edit[9],tr("Start RML:"),this); + air_start_rml_label[9]= + new QLabel(air_start_rml_edit[9],tr("Start RML:"),this); + air_start_rml_label[9]->setFont(subLabelFont()); air_start_rml_label[9]->setGeometry(510,322,65,19); air_start_rml_label[9]->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_stop_rml_edit[9]=new QLineEdit(this); air_stop_rml_edit[9]->setGeometry(580,343,95,19); air_stop_rml_edit[9]->setValidator(validator); air_stop_rml_label[9]=new QLabel(air_start_rml_edit[9],tr("Stop RML:"),this); + air_stop_rml_label[9]->setFont(subLabelFont()); air_stop_rml_label[9]->setGeometry(510,343,65,19); air_stop_rml_label[9]->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_channel_button[9]=new QPushButton(tr("Edit\nGPIOs"),this); air_channel_button[9]->setGeometry(680,318,60,50); - air_channel_button[9]->setFont(small_font); + air_channel_button[9]->setFont(buttonFont()); mapper->setMapping(air_channel_button[9],RDAirPlayConf::SoundPanel5Channel); connect(air_channel_button[9],SIGNAL(clicked()),mapper,SLOT(map())); connect(air_card_sel[9],SIGNAL(settingsChanged(int,int,int)), @@ -445,7 +465,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, // Main Log Play Section // label=new QLabel("Log Settings",this); - label->setFont(big_font); + label->setFont(sectionLabelFont()); label->setGeometry(805,10,200,16); // @@ -454,9 +474,11 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_segue_edit=new QLineEdit(this); air_segue_edit->setGeometry(895,32,50,20); air_segue_label=new QLabel(air_segue_edit,tr("Manual Segue:"),this); + air_segue_label->setFont(subLabelFont()); air_segue_label->setGeometry(790,32,100,20); air_segue_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); air_segue_unit=new QLabel(air_segue_edit,tr("msecs"),this); + air_segue_unit->setFont(subLabelFont()); air_segue_unit->setGeometry(950,32,40,20); air_segue_unit->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); @@ -466,9 +488,11 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_trans_edit=new QLineEdit(this); air_trans_edit->setGeometry(895,54,50,20); air_trans_label=new QLabel(air_trans_edit,tr("Forced Segue:"),this); + air_trans_label->setFont(subLabelFont()); air_trans_label->setGeometry(790,54,100,20); air_trans_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); air_trans_unit=new QLabel(air_trans_edit,tr("msecs"),this); + air_trans_unit->setFont(subLabelFont()); air_trans_unit->setGeometry(950,54,40,20); air_trans_unit->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); @@ -479,9 +503,11 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_piecount_box->setGeometry(895,76,50,20); air_piecount_box->setRange(0,60); air_piecount_label=new QLabel(air_piecount_box,tr("Pie Counts Last:"),this); + air_piecount_label->setFont(subLabelFont()); air_piecount_label->setGeometry(785,76,105,20); air_piecount_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); air_piecount_unit=new QLabel(tr("secs"),this); + air_piecount_unit->setFont(subLabelFont()); air_piecount_unit->setGeometry(950,76,40,20); air_piecount_unit->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); @@ -491,6 +517,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_countto_box=new QComboBox(this); air_countto_box->setGeometry(895,98,100,20); air_countto_label=new QLabel(air_countto_box,tr("Pie Counts To:"),this); + air_countto_label->setFont(subLabelFont()); air_countto_label->setGeometry(785,98,105,20); air_countto_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); air_countto_box->insertItem(tr("Cart End")); @@ -502,6 +529,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_default_transtype_box=new QComboBox(this); air_default_transtype_box->setGeometry(895,120,100,20); label=new QLabel(air_default_transtype_box,tr("Default Trans. Type:"),this); + label->setFont(subLabelFont()); label->setGeometry(760,120,130,20); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); air_default_transtype_box->insertItem(tr("Play")); @@ -514,6 +542,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_defaultsvc_box=new QComboBox(this); air_defaultsvc_box->setGeometry(895,142,100,20); label=new QLabel(air_defaultsvc_box,tr("Default Service:"),this); + label->setFont(subLabelFont()); label->setGeometry(760,142,130,20); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -521,7 +550,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, // Sound Panel Section // label=new QLabel(tr("Sound Panel Settings"),this); - label->setFont(big_font); + label->setFont(sectionLabelFont()); label->setGeometry(805,179,200,16); // @@ -532,6 +561,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_station_box->setRange(0,MAX_PANELS); air_station_box->setSpecialValueText(tr("None")); air_station_label=new QLabel(air_station_box,tr("System Panels:"),this); + air_station_label->setFont(subLabelFont()); air_station_label->setGeometry(750,204,140,20); air_station_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -543,6 +573,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_user_box->setRange(0,MAX_PANELS); air_user_box->setSpecialValueText(tr("None")); air_user_label=new QLabel(air_user_box,tr("User Panels:"),this); + air_user_label->setFont(subLabelFont()); air_user_label->setGeometry(750,226,140,20); air_user_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -552,6 +583,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_flash_box=new QCheckBox(this); air_flash_box->setGeometry(810,254,15,15); label=new QLabel(air_flash_box,tr("Flash Active Buttons"),this); + label->setFont(subLabelFont()); label->setGeometry(830,254,150,15); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); @@ -561,6 +593,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_panel_pause_box=new QCheckBox(this); air_panel_pause_box->setGeometry(810,276,15,15); label=new QLabel(air_panel_pause_box,tr("Enable Button Pausing"),this); + label->setFont(subLabelFont()); label->setGeometry(830,276,150,15); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); @@ -570,6 +603,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_label_template_edit=new QLineEdit(this); air_label_template_edit->setGeometry(895,298,sizeHint().width()-910,20); label=new QLabel(air_label_template_edit,tr("Label Template:"),this); + label->setFont(subLabelFont()); label->setGeometry(790,298,100,20); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -577,7 +611,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, // Miscellaneous Section // label=new QLabel(tr("Miscellaneous Settings"),this); - label->setFont(big_font); + label->setFont(sectionLabelFont()); label->setGeometry(805,330,200,16); // @@ -586,6 +620,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_timesync_box=new QCheckBox(this); air_timesync_box->setGeometry(810,356,15,15); air_timesync_label=new QLabel(air_timesync_box,tr("Check TimeSync"),this); + air_timesync_label->setFont(subLabelFont()); air_timesync_label->setGeometry(830,356,100,15); air_timesync_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); @@ -595,12 +630,14 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_auxlog_box[0]=new QCheckBox(this); air_auxlog_box[0]->setGeometry(810,378,15,15); label=new QLabel(air_auxlog_box[0],tr("Show Auxlog 1 Button"),this); + label->setFont(subLabelFont()); label->setGeometry(830,378,150,15); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); air_auxlog_box[1]=new QCheckBox(this); air_auxlog_box[1]->setGeometry(810,400,15,15); label=new QLabel(air_auxlog_box[1],tr("Show Auxlog 2 Button"),this); + label->setFont(subLabelFont()); label->setGeometry(830,400,150,15); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); @@ -610,6 +647,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_clearfilter_box=new QCheckBox(this); air_clearfilter_box->setGeometry(810,422,15,15); label=new QLabel(air_clearfilter_box,tr("Clear Cart Search Filter"),this); + label->setFont(subLabelFont()); label->setGeometry(830,422,150,15); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); @@ -619,6 +657,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_pause_box=new QCheckBox(this); air_pause_box->setGeometry(810,444,15,15); label=new QLabel(air_pause_box,tr("Enable Paused Events"),this); + label->setFont(subLabelFont()); label->setGeometry(830,444,150,15); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); @@ -629,6 +668,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_show_counters_box->setGeometry(810,466,15,15); label= new QLabel(air_show_counters_box,tr("Show Extra Buttons/Counters"),this); + label->setFont(subLabelFont()); label->setGeometry(830,466,170,15); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); @@ -638,6 +678,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_hour_selector_box=new QCheckBox(this); air_hour_selector_box->setGeometry(810,488,15,15); label=new QLabel(air_hour_selector_box,tr("Show Hour Selector"),this); + label->setFont(subLabelFont()); label->setGeometry(830,488,170,15); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); @@ -649,9 +690,11 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_audition_preroll_spin->setRange(1,60); air_audition_preroll_label= new QLabel(air_audition_preroll_spin,tr("Audition Preroll:"),this); + air_audition_preroll_label->setFont(subLabelFont()); air_audition_preroll_label->setGeometry(800,510,90,15); air_audition_preroll_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); air_audition_preroll_unit=new QLabel(tr("secs"),this); + air_audition_preroll_unit->setFont(subLabelFont()); air_audition_preroll_unit->setGeometry(945,510,100,15); air_audition_preroll_unit->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); @@ -659,6 +702,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, // Space Bar Action // air_bar_group=new Q3ButtonGroup(1,Qt::Vertical,tr("Space Bar Action"),this); + air_bar_group->setFont(subLabelFont()); air_bar_group->setGeometry(805,532,sizeHint().width()-815,55); new QRadioButton(tr("None"),air_bar_group); new QRadioButton(tr("Start Next"),air_bar_group); @@ -667,7 +711,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, // Start/Stop Section // label=new QLabel(tr("Start/Stop Settings"),this); - label->setFont(big_font); + label->setFont(sectionLabelFont()); label->setGeometry(10,451,200,16); // @@ -678,6 +722,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_exitpasswd_edit->setEchoMode(QLineEdit::Password); air_exitpasswd_edit->setText("******"); label=new QLabel(air_exitpasswd_edit,tr("Exit Password:"),this); + label->setFont(subLabelFont()); label->setGeometry(0,474,95,20); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); connect(air_exitpasswd_edit,SIGNAL(textChanged(const QString &)), @@ -707,6 +752,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_startmode_box->insertItem(tr("load previous log")); air_startmode_box->insertItem(tr("load specified log")); label=new QLabel(air_exitpasswd_edit,tr("At Startup:"),this); + label->setFont(subLabelFont()); label->setGeometry(30,524,65,20); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); connect(air_startmode_box,SIGNAL(activated(int)), @@ -720,6 +766,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_autorestart_label= new QLabel(air_autorestart_box, tr("Restart Log After Unclean Shutdown"),this); + air_autorestart_label->setFont(subLabelFont()); air_autorestart_label->setGeometry(125,549,250,15); air_autorestart_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); @@ -729,6 +776,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_startlog_edit=new QLineEdit(this); air_startlog_edit->setGeometry(100,569,240,20); air_startlog_label=new QLabel(air_startlog_edit,tr("Log:"),this); + air_startlog_label->setFont(subLabelFont()); air_startlog_label->setGeometry(30,569,65,20); air_startlog_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -737,15 +785,15 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, // air_startlog_button=new QPushButton(this); air_startlog_button->setGeometry(350,567,50,24); - air_startlog_button->setFont(small_font); + air_startlog_button->setFont(subButtonFont()); air_startlog_button->setText(tr("&Select")); connect(air_startlog_button,SIGNAL(clicked()),this,SLOT(selectData())); // // Display Settings Section // - label=new QLabel(tr("Display Settings"),this,"globals_label"); - label->setFont(big_font); + label=new QLabel(tr("Display Settings"),this); + label->setFont(sectionLabelFont()); label->setGeometry(435,381,200,16); // @@ -754,9 +802,11 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_skin_edit=new QLineEdit(this); air_skin_edit->setGeometry(555,403,180,20); label=new QLabel(air_skin_edit,tr("Background Image:"),this); + label->setFont(subLabelFont()); label->setGeometry(435,403,115,20); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); button=new QPushButton(tr("Select"),this); + button->setFont(subButtonFont()); button->setGeometry(745,400,50,25); connect(button,SIGNAL(clicked()),this,SLOT(selectSkinData())); @@ -766,6 +816,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_title_template_edit=new QLineEdit(this); air_title_template_edit->setGeometry(555,425,180,20); label=new QLabel(air_label_template_edit,tr("Title Template:"),this); + label->setFont(subLabelFont()); label->setGeometry(430,425,120,20); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -775,6 +826,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_artist_template_edit=new QLineEdit(this); air_artist_template_edit->setGeometry(555,447,180,20); label=new QLabel(air_label_template_edit,tr("Artist Template:"),this); + label->setFont(subLabelFont()); label->setGeometry(430,447,120,20); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -784,6 +836,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_outcue_template_edit=new QLineEdit(this); air_outcue_template_edit->setGeometry(555,469,180,20); label=new QLabel(air_label_template_edit,tr("Outcue Template:"),this); + label->setFont(subLabelFont()); label->setGeometry(430,469,120,20); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -793,6 +846,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, air_description_template_edit=new QLineEdit(this); air_description_template_edit->setGeometry(555,491,180,20); label=new QLabel(air_label_template_edit,tr("Description Template:"),this); + label->setFont(subLabelFont()); label->setGeometry(430,491,120,20); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -800,7 +854,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, // Log Mode Control Section // label=new QLabel(tr("Log Mode Control"),this); - label->setFont(big_font); + label->setFont(sectionLabelFont()); label->setGeometry(435,530,200,16); // @@ -811,6 +865,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, connect(air_modecontrol_box,SIGNAL(activated(int)), this,SLOT(modeControlActivatedData(int))); label=new QLabel(air_modecontrol_box,tr("Mode Control Style:"),this); + label->setFont(subLabelFont()); label->setGeometry(435,550,120,20); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); air_modecontrol_box->insertItem(tr("Unified")); @@ -825,6 +880,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, connect(air_logstartmode_box[i],SIGNAL(activated(int)), this,SLOT(logStartupModeActivatedData(int))); air_logstartmode_label[i]=new QLabel(air_logstartmode_box[i],"",this); + air_logstartmode_label[i]->setFont(subLabelFont()); air_logstartmode_label[i]->setGeometry(470,572+i*22,140,20); air_logstartmode_label[i]->setAlignment(Qt::AlignRight|Qt::AlignVCenter); air_logstartmode_box[i]->insertItem(tr("Previous")); @@ -845,6 +901,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, insertItem(QString().sprintf("vLog %d",i+RD_RDVAIRPLAY_LOG_BASE+1)); } label=new QLabel(":",this); + label->setFont(subLabelFont()); label->setGeometry(555,638,5,20); label->setAlignment(Qt::AlignCenter|Qt::AlignVCenter); air_virtual_logstartmode_box=new QComboBox(this); @@ -860,7 +917,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, button=new QPushButton(this); button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); button->setDefault(true); - button->setFont(small_font); + button->setFont(buttonFont()); button->setText(tr("&OK")); connect(button,SIGNAL(clicked()),this,SLOT(okData())); @@ -869,7 +926,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station, // button=new QPushButton(this); button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50); - button->setFont(small_font); + button->setFont(buttonFont()); button->setText(tr("&Cancel")); connect(button,SIGNAL(clicked()),this,SLOT(cancelData())); diff --git a/rdadmin/edit_rdairplay.h b/rdadmin/edit_rdairplay.h index 15e6db7a..b5f93068 100644 --- a/rdadmin/edit_rdairplay.h +++ b/rdadmin/edit_rdairplay.h @@ -2,7 +2,7 @@ // // Edit an RDAirPlay Configuration // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 EDIT_RDAIRPLAY_H #define EDIT_RDAIRPLAY_H -#include #include #include #include @@ -33,6 +32,7 @@ #include #include #include +#include #include /* @@ -41,7 +41,7 @@ #define LOG_PLAY_PORTS 2 #define MAX_MANUAL_SEGUE 10 -class EditRDAirPlay : public QDialog +class EditRDAirPlay : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_rdlibrary.cpp b/rdadmin/edit_rdlibrary.cpp index 26351542..cd4a4ca2 100644 --- a/rdadmin/edit_rdlibrary.cpp +++ b/rdadmin/edit_rdlibrary.cpp @@ -2,7 +2,7 @@ // // Edit an RDLibrary Configuration // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ -39,28 +39,18 @@ EditRDLibrary::EditRDLibrary(RDStation *station,RDStation *cae_station, QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); + setMinimumSize(sizeHint()); + setMaximumSize(sizeHint()); lib_lib=new RDLibraryConf(station->name()); - // - // Create Fonts - // - QFont small_font=QFont("Helvetica",12,QFont::Bold); - small_font.setPixelSize(12); - QFont big_font=QFont("Helvetica",14,QFont::Bold); - big_font.setPixelSize(14); - // // Text Validator // @@ -75,236 +65,278 @@ EditRDLibrary::EditRDLibrary(RDStation *station,RDStation *cae_station, // Input Configuration // lib_input_card=new RDCardSelector(this); - lib_input_card->setGeometry(10,29,120,117); - QLabel *label=new QLabel(lib_input_card,tr("INPUT"),this); - label->setGeometry(10,10,110,19); - label->setFont(big_font); - label->setAlignment(Qt::AlignCenter); + lib_input_card->setGeometry(sizeHint().width()/5,29,120,117); + QLabel *label=new QLabel(lib_input_card,tr("Input"),this); + label->setGeometry(sizeHint().width()/5,10,120,19); + // label->setGeometry(10,10,110,19); + label->setFont(sectionLabelFont()); + label->setAlignment(Qt::AlignCenter|Qt::AlignVCenter); // // Output Configuration // lib_output_card=new RDCardSelector(this); - lib_output_card->setGeometry(170,29,120,87); - label=new QLabel(lib_output_card,tr("OUTPUT"),this); - label->setGeometry(170,10,110,19); - label->setFont(big_font); + lib_output_card->setGeometry(4*sizeHint().width()/5-120,29,120,87); + label=new QLabel(lib_output_card,tr("Output"),this); + label->setGeometry(4*sizeHint().width()/5-120,10,110,19); + label->setFont(sectionLabelFont()); label->setAlignment(Qt::AlignCenter); // // Settings // QLabel *setting_label=new QLabel(tr("Settings"),this); - setting_label->setGeometry(25,79,120,19); - setting_label->setFont(big_font); + setting_label->setGeometry(25,80,120,19); + setting_label->setFont(sectionLabelFont()); setting_label->setAlignment(Qt::AlignRight|Qt::TextShowMnemonic); // // Maximum Record Length // lib_maxlength_time=new Q3TimeEdit(this); - lib_maxlength_time->setGeometry(160,100,85,19); + lib_maxlength_time->setGeometry(190,100,85,19); QLabel *lib_maxlength_label= new QLabel(lib_maxlength_time,tr("&Max Record Time:"),this); - lib_maxlength_label->setGeometry(25,101,130,19); - lib_maxlength_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); + lib_maxlength_label->setFont(labelFont()); + lib_maxlength_label->setGeometry(25,101,160,19); + lib_maxlength_label-> + setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // // VOX threshold // lib_vox_spin=new QSpinBox(this); - lib_vox_spin->setGeometry(160,122,40,19); + lib_vox_spin->setGeometry(190,122,40,19); lib_vox_spin->setMinValue(-99); lib_vox_spin->setMaxValue(0); QLabel *lib_vox_spin_label= new QLabel(lib_vox_spin,tr("&VOX Threshold:"),this); - lib_vox_spin_label->setGeometry(25,122,130,19); - lib_vox_spin_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); + lib_vox_spin_label->setFont(labelFont()); + lib_vox_spin_label->setGeometry(25,122,160,19); + lib_vox_spin_label-> + setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); QLabel *lib_vox_spin_unit=new QLabel(tr("dbFS"),this); - lib_vox_spin_unit->setGeometry(205,122,120,19); - lib_vox_spin_unit->setAlignment(Qt::AlignLeft|Qt::AlignVCenter|Qt::TextShowMnemonic); + lib_vox_spin_unit->setFont(labelFont()); + lib_vox_spin_unit->setGeometry(235,122,120,19); + lib_vox_spin_unit-> + setAlignment(Qt::AlignLeft|Qt::AlignVCenter|Qt::TextShowMnemonic); // // AutoTrim threshold // lib_trim_spin=new QSpinBox(this); - lib_trim_spin->setGeometry(160,144,40,19); + lib_trim_spin->setGeometry(190,144,40,19); lib_trim_spin->setMinValue(-99); lib_trim_spin->setMaxValue(0); QLabel *lib_trim_spin_label= new QLabel(lib_trim_spin,tr("&AutoTrim Threshold:"),this); - lib_trim_spin_label->setGeometry(25,144,130,19); - lib_trim_spin_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); + lib_trim_spin_label->setFont(labelFont()); + lib_trim_spin_label->setGeometry(25,144,160,19); + lib_trim_spin_label-> + setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); QLabel *lib_trim_spin_unit=new QLabel(tr("dbFS"),this); - lib_trim_spin_unit->setGeometry(205,144,120,19); - lib_trim_spin_unit->setAlignment(Qt::AlignLeft|Qt::AlignVCenter|Qt::TextShowMnemonic); + lib_trim_spin_unit->setFont(labelFont()); + lib_trim_spin_unit->setGeometry(235,144,120,19); + lib_trim_spin_unit-> + setAlignment(Qt::AlignLeft|Qt::AlignVCenter|Qt::TextShowMnemonic); // // Tail Preroll // lib_preroll_spin=new QSpinBox(this); - lib_preroll_spin->setGeometry(160,166,50,19); + lib_preroll_spin->setGeometry(190,166,50,19); lib_preroll_spin->setMinValue(0); lib_preroll_spin->setMaxValue(10000); lib_preroll_spin->setLineStep(100); QLabel *lib_preroll_spin_label= new QLabel(lib_preroll_spin,tr("&Tail Preroll:"),this); - lib_preroll_spin_label->setGeometry(25,166,130,19); - lib_preroll_spin_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); + lib_preroll_spin_label->setFont(labelFont()); + lib_preroll_spin_label->setGeometry(25,166,160,19); + lib_preroll_spin_label-> + setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); QLabel *lib_preroll_spin_unit=new QLabel(tr("milliseconds"),this); - lib_preroll_spin_unit->setGeometry(215,166,120,19); - lib_preroll_spin_unit->setAlignment(Qt::AlignLeft|Qt::AlignVCenter|Qt::TextShowMnemonic); + lib_preroll_spin_unit->setFont(labelFont()); + lib_preroll_spin_unit->setGeometry(245,166,120,19); + lib_preroll_spin_unit-> + setAlignment(Qt::AlignLeft|Qt::AlignVCenter|Qt::TextShowMnemonic); // // Ripper Device // lib_ripdev_edit=new QLineEdit(this); - lib_ripdev_edit->setGeometry(160,188,100,19); + lib_ripdev_edit->setGeometry(190,188,100,19); lib_ripdev_edit->setValidator(validator); QLabel *lib_ripdev_label= new QLabel(lib_ripdev_edit,tr("&Ripper Device:"),this); - lib_ripdev_label->setGeometry(25,188,130,19); - lib_ripdev_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); + lib_ripdev_label->setFont(labelFont()); + lib_ripdev_label->setGeometry(25,188,160,19); + lib_ripdev_label-> + setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // // Paranoia Level // lib_paranoia_box=new QComboBox(this); - lib_paranoia_box->setGeometry(160,210,100,19); + lib_paranoia_box->setGeometry(190,210,100,19); QLabel *lib_paranoia_label= new QLabel(lib_paranoia_box,tr("&Paranoia Level:"),this); - lib_paranoia_label->setGeometry(25,210,130,19); - lib_paranoia_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); + lib_paranoia_label->setFont(labelFont()); + lib_paranoia_label->setGeometry(25,210,160,19); + lib_paranoia_label-> + setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // // Read ISRC // lib_isrc_box=new QComboBox(this); - lib_isrc_box->setGeometry(160,232,60,19); + lib_isrc_box->setGeometry(190,232,60,19); QLabel *lib_isrc_label= new QLabel(lib_isrc_box,tr("&Read ISRCs from CD:"),this); - lib_isrc_label->setGeometry(25,232,130,19); - lib_isrc_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); + lib_isrc_label->setFont(labelFont()); + lib_isrc_label->setGeometry(25,232,160,19); + lib_isrc_label-> + setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // // FreeDB Server // lib_cddb_edit=new QLineEdit(this); - lib_cddb_edit->setGeometry(160,254,160,19); + lib_cddb_edit->setGeometry(190,254,160,19); lib_cddb_edit->setValidator(validator); QLabel *lib_cddb_label=new QLabel(lib_cddb_edit,tr("&FreeDB Server:"),this); - lib_cddb_label->setGeometry(25,254,130,19); - lib_cddb_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); + lib_cddb_label->setFont(labelFont()); + lib_cddb_label->setGeometry(25,254,160,19); + lib_cddb_label-> + setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // // Format // lib_format_box=new QComboBox(this); - lib_format_box->setGeometry(160,278,150,19); + lib_format_box->setGeometry(190,278,150,19); connect(lib_format_box,SIGNAL(activated(int)),this,SLOT(formatData(int))); QLabel *lib_format_label=new QLabel(lib_format_box,tr("&Format:"),this); - - lib_format_label->setGeometry(25,278,130,19); - lib_format_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); + lib_format_label->setFont(labelFont()); + lib_format_label->setGeometry(25,278,160,19); + lib_format_label-> + setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // // Bitrate // lib_bitrate_box=new QComboBox(this); - lib_bitrate_box->setGeometry(160,302,130,19); + lib_bitrate_box->setGeometry(190,302,130,19); QLabel *lib_bitrate_label=new QLabel(lib_bitrate_box,tr("&Bitrate:"),this); - lib_bitrate_label->setGeometry(25,302,130,19); - lib_bitrate_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); + lib_bitrate_label->setFont(labelFont()); + lib_bitrate_label->setGeometry(25,302,160,19); + lib_bitrate_label-> + setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // // Enable Editor // lib_editor_box=new QComboBox(this); - lib_editor_box->setGeometry(160,326,60,19); + lib_editor_box->setGeometry(190,326,60,19); lib_editor_box->insertItem(tr("No")); lib_editor_box->insertItem(tr("Yes")); QLabel *lib_editor_label= new QLabel(lib_editor_box,tr("Allow E&xternal Editing:"),this); - lib_editor_label->setGeometry(25,326,130,19); - lib_editor_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); + lib_editor_label->setFont(labelFont()); + lib_editor_label->setGeometry(25,326,160,19); + lib_editor_label-> + setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // // Sample Rate Converter // lib_converter_box=new QComboBox(this); - lib_converter_box->setGeometry(160,350,sizeHint().width()-170,19); + lib_converter_box->setGeometry(190,350,sizeHint().width()-200,19); int conv=0; while(src_get_name(conv)!=NULL) { lib_converter_box->insertItem(src_get_name(conv++)); } QLabel *lib_converter_label= new QLabel(lib_converter_box,tr("Sample Rate Converter:"),this); - lib_converter_label->setGeometry(10,350,145,19); - lib_converter_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); + lib_converter_label->setFont(labelFont()); + lib_converter_label->setGeometry(10,350,175,19); + lib_converter_label-> + setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // // Limit Searches at Startup // lib_limit_search_box=new QComboBox(this); - lib_limit_search_box->setGeometry(160,374,80,19); + lib_limit_search_box->setGeometry(190,374,80,19); lib_limit_search_box->insertItem(tr("No")); lib_limit_search_box->insertItem(tr("Yes")); lib_limit_search_box->insertItem(tr("Previous")); QLabel *lib_limit_search_label= new QLabel(lib_limit_search_box,tr("Limit Searches at Startup")+":",this); - lib_limit_search_label->setGeometry(10,374,145,19); - lib_limit_search_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); + lib_limit_search_label->setFont(labelFont()); + lib_limit_search_label->setGeometry(10,374,175,19); + lib_limit_search_label-> + setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // // Defaults // QLabel *default_label=new QLabel(tr("Defaults"),this); - default_label->setGeometry(25,408,120,19); - default_label->setFont(big_font); + default_label->setGeometry(25,412,120,19); + default_label->setFont(sectionLabelFont()); default_label->setAlignment(Qt::AlignRight|Qt::TextShowMnemonic); // // Default Channels // lib_channels_box=new QComboBox(this); - lib_channels_box->setGeometry(160,430,60,19); + lib_channels_box->setGeometry(190,430,60,19); QLabel *lib_channels_label=new QLabel(lib_channels_box,tr("&Channels:"),this); - lib_channels_label->setGeometry(25,430,130,19); - lib_channels_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); + lib_channels_label->setFont(labelFont()); + lib_channels_label->setGeometry(25,430,160,19); + lib_channels_label-> + setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // // Default Record Mode // lib_recmode_box=new QComboBox(this); - lib_recmode_box->setGeometry(160,454,100,19); + lib_recmode_box->setGeometry(190,454,100,19); QLabel *lib_recmode_label=new QLabel(lib_recmode_box,tr("Record Mode:"),this); - lib_recmode_label->setGeometry(25,454,130,19); - lib_recmode_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); + lib_recmode_label->setFont(labelFont()); + lib_recmode_label->setGeometry(25,454,160,19); + lib_recmode_label-> + setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // // Default Trim State // lib_trimstate_box=new QComboBox(this); - lib_trimstate_box->setGeometry(160,478,100,19); + lib_trimstate_box->setGeometry(190,478,100,19); QLabel *lib_trimstate_label= new QLabel(lib_trimstate_box,tr("AutoTrim:"),this); - lib_trimstate_label->setGeometry(25,478,130,19); - lib_trimstate_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); + lib_trimstate_label->setFont(labelFont()); + lib_trimstate_label->setGeometry(25,478,160,19); + lib_trimstate_label-> + setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // // Normalization Level // lib_riplevel_spin=new QSpinBox(this); - lib_riplevel_spin->setGeometry(160,502,40,19); + lib_riplevel_spin->setGeometry(190,502,40,19); lib_riplevel_spin->setMinValue(-99); lib_riplevel_spin->setMaxValue(0); QLabel *lib_riplevel_spin_label= new QLabel(lib_riplevel_spin,tr("Normalization Level:"),this); - lib_riplevel_spin_label->setGeometry(25,502,130,19); - lib_riplevel_spin_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); + lib_riplevel_spin_label->setFont(labelFont()); + lib_riplevel_spin_label->setGeometry(25,502,160,19); + lib_riplevel_spin_label-> + setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); QLabel *lib_riplevel_spin_unit=new QLabel(tr("dbFS"),this); - lib_riplevel_spin_unit->setGeometry(205,502,120,19); - lib_riplevel_spin_unit->setAlignment(Qt::AlignLeft|Qt::AlignVCenter|Qt::TextShowMnemonic); + lib_riplevel_spin_unit->setFont(labelFont()); + lib_riplevel_spin_unit->setGeometry(235,502,120,19); + lib_riplevel_spin_unit-> + setAlignment(Qt::AlignLeft|Qt::AlignVCenter|Qt::TextShowMnemonic); // // Ok Button @@ -312,7 +344,7 @@ EditRDLibrary::EditRDLibrary(RDStation *station,RDStation *cae_station, QPushButton *ok_button=new QPushButton(this); ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); ok_button->setDefault(true); - ok_button->setFont(small_font); + ok_button->setFont(buttonFont()); ok_button->setText(tr("&OK")); connect(ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -322,7 +354,7 @@ EditRDLibrary::EditRDLibrary(RDStation *station,RDStation *cae_station, QPushButton *cancel_button=new QPushButton(this); cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, 80,50); - cancel_button->setFont(small_font); + cancel_button->setFont(buttonFont()); cancel_button->setText(tr("&Cancel")); connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); @@ -421,7 +453,7 @@ EditRDLibrary::~EditRDLibrary() QSize EditRDLibrary::sizeHint() const { - return QSize(375,606); + return QSize(405,606); } diff --git a/rdadmin/edit_rdlibrary.h b/rdadmin/edit_rdlibrary.h index 0058365e..8e3e2150 100644 --- a/rdadmin/edit_rdlibrary.h +++ b/rdadmin/edit_rdlibrary.h @@ -2,7 +2,7 @@ // // Edit an RDLibrry Configuration // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,17 +21,17 @@ #ifndef EDIT_RDLIBRARY_H #define EDIT_RDLIBRARY_H -#include #include #include #include #include -#include -#include #include +#include +#include +#include -class EditRDLibrary : public QDialog +class EditRDLibrary : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_rdlogedit.cpp b/rdadmin/edit_rdlogedit.cpp index 02a7b73c..c15ff646 100644 --- a/rdadmin/edit_rdlogedit.cpp +++ b/rdadmin/edit_rdlogedit.cpp @@ -2,7 +2,7 @@ // // Edit an RDLogedit Configuration // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,18 +18,8 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include -#include #include -#include -#include -#include -#include -#include #include -#include -#include -#include #include #include @@ -41,7 +31,7 @@ EditRDLogedit::EditRDLogedit(RDStation *station,RDStation *cae_station, QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -55,14 +45,6 @@ EditRDLogedit::EditRDLogedit(RDStation *station,RDStation *cae_station, lib_lib=new RDLogeditConf(station->name()); - // - // Create Fonts - // - QFont small_font=QFont("Helvetica",12,QFont::Bold); - small_font.setPixelSize(12); - QFont big_font=QFont("Helvetica",14,QFont::Bold); - big_font.setPixelSize(14); - // // Dialog Name // @@ -72,113 +54,123 @@ EditRDLogedit::EditRDLogedit(RDStation *station,RDStation *cae_station, // Input Configuration // lib_input_card=new RDCardSelector(this); - lib_input_card->setGeometry(10,29,120,117); - QLabel *label=new QLabel(lib_input_card,tr("INPUT"),this); - label->setGeometry(10,10,110,19); - label->setFont(big_font); - label->setAlignment(Qt::AlignCenter); + lib_input_card->setGeometry(sizeHint().width()/5,29,120,117); + QLabel *label=new QLabel(lib_input_card,tr("Input"),this); + label->setGeometry(sizeHint().width()/5,10,120,19); + label->setFont(sectionLabelFont()); + label->setAlignment(Qt::AlignCenter|Qt::AlignVCenter); // // Output Configuration // lib_output_card=new RDCardSelector(this); - lib_output_card->setGeometry(170,29,120,87); - label=new QLabel(lib_output_card,tr("OUTPUT"),this); - label->setGeometry(170,10,110,19); - label->setFont(big_font); + lib_output_card->setGeometry(4*sizeHint().width()/5-120,29,120,87); + label=new QLabel(lib_output_card,tr("Output"),this); + label->setGeometry(4*sizeHint().width()/5-120,10,120,19); + label->setFont(sectionLabelFont()); label->setAlignment(Qt::AlignCenter); // // Settings // QLabel *setting_label=new QLabel(tr("Voice Tracker Settings"),this); - setting_label->setGeometry(70,79,sizeHint().width()-80,19); - setting_label->setFont(big_font); + setting_label->setGeometry(70,80,sizeHint().width()-80,19); + setting_label->setFont(sectionLabelFont()); setting_label->setAlignment(Qt::AlignLeft); // // Maximum Record Length // lib_maxlength_time=new Q3TimeEdit(this); - lib_maxlength_time->setGeometry(160,100,85,19); + lib_maxlength_time->setGeometry(180,100,85,19); QLabel *lib_maxlength_label= new QLabel(lib_maxlength_time,tr("&Max Record Time:"),this); - lib_maxlength_label->setGeometry(25,101,130,19); + lib_maxlength_label->setFont(labelFont()); + lib_maxlength_label->setGeometry(25,101,150,19); lib_maxlength_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Autotrim Level // lib_threshold_spin=new QSpinBox(this); - lib_threshold_spin->setGeometry(160,124,50,19); + lib_threshold_spin->setGeometry(180,124,50,19); lib_threshold_spin->setMinValue(-99); lib_threshold_spin->setMaxValue(0); label=new QLabel(lib_threshold_spin,tr("&AutoTrim Threshold:"),this); - label->setGeometry(25,124,130,19); + label->setFont(labelFont()); + label->setGeometry(25,124,150,19); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); label=new QLabel(tr("dbFS"),this); - label->setGeometry(215,124,120,19); + label->setFont(labelFont()); + label->setGeometry(235,124,120,19); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // // Normalization Level // lib_normalization_spin=new QSpinBox(this); - lib_normalization_spin->setGeometry(160,148,50,19); + lib_normalization_spin->setGeometry(180,148,50,19); lib_normalization_spin->setMinValue(-99); lib_normalization_spin->setMaxValue(0); label=new QLabel(lib_normalization_spin,tr("&Normalization Level:"),this); - label->setGeometry(25,148,130,19); + label->setFont(labelFont()); + label->setGeometry(25,148,150,19); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); label=new QLabel(tr("dbFS"),this); - label->setGeometry(215,148,120,19); + label->setFont(labelFont()); + label->setGeometry(235,148,120,19); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // // Audio Margin // lib_preroll_spin=new QSpinBox(this); - lib_preroll_spin->setGeometry(160,172,60,19); + lib_preroll_spin->setGeometry(180,172,60,19); lib_preroll_spin->setMinValue(0); lib_preroll_spin->setMaxValue(10000); lib_preroll_spin->setLineStep(100); QLabel *lib_preroll_spin_label= new QLabel(lib_preroll_spin,tr("&Audio Margin:"),this); - lib_preroll_spin_label->setGeometry(25,172,130,19); + lib_preroll_spin_label->setFont(labelFont()); + lib_preroll_spin_label->setGeometry(25,172,150,19); lib_preroll_spin_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); QLabel *lib_preroll_spin_unit=new QLabel(tr("milliseconds"),this); - lib_preroll_spin_unit->setGeometry(225,172,120,19); + lib_preroll_spin_unit->setFont(labelFont()); + lib_preroll_spin_unit->setGeometry(245,172,120,19); lib_preroll_spin_unit->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // // Format // lib_format_box=new QComboBox(this); - lib_format_box->setGeometry(160,196,150,19); + lib_format_box->setGeometry(180,196,150,19); connect(lib_format_box,SIGNAL(activated(int)),this,SLOT(formatData(int))); QLabel *lib_format_label=new QLabel(lib_format_box,tr("&Format:"),this); - lib_format_label->setGeometry(25,196,130,19); + lib_format_label->setFont(labelFont()); + lib_format_label->setGeometry(25,196,150,19); lib_format_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Bitrate // lib_bitrate_box=new QComboBox(this); - lib_bitrate_box->setGeometry(160,220,130,19); + lib_bitrate_box->setGeometry(180,220,130,19); QLabel *lib_bitrate_label=new QLabel(lib_bitrate_box,tr("&Bitrate:"),this); - lib_bitrate_label->setGeometry(25,220,130,19); + lib_bitrate_label->setFont(labelFont()); + lib_bitrate_label->setGeometry(25,220,150,19); lib_bitrate_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Enable Second Start Button // lib_enable_second_start_box=new QComboBox(this); - lib_enable_second_start_box->setGeometry(160,244,60,19); + lib_enable_second_start_box->setGeometry(180,244,60,19); lib_enable_second_start_box->insertItem(tr("No")); lib_enable_second_start_box->insertItem(tr("Yes")); QLabel *lib_enable_second_start_label= new QLabel(lib_enable_second_start_box,tr("Enable &2nd Start Button:"),this); - lib_enable_second_start_label->setGeometry(10,244,145,19); + lib_enable_second_start_label->setFont(labelFont()); + lib_enable_second_start_label->setGeometry(10,244,165,19); lib_enable_second_start_label-> setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -192,14 +184,16 @@ EditRDLogedit::EditRDLogedit(RDStation *station,RDStation *cae_station, // Play Start Cart // lib_startcart_edit=new QLineEdit(this); - lib_startcart_edit->setGeometry(160,268,70,19); + lib_startcart_edit->setGeometry(180,268,70,19); lib_startcart_edit->setValidator(validator); QLabel *lib_startcart_label= new QLabel(lib_startcart_edit,tr("Play &Start Cart:"),this); - lib_startcart_label->setGeometry(25,268,130,19); + lib_startcart_label->setFont(labelFont()); + lib_startcart_label->setGeometry(25,268,150,19); lib_startcart_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); QPushButton *button=new QPushButton(this); - button->setGeometry(240,266,55,23); + button->setFont(subButtonFont()); + button->setGeometry(260,266,55,23); button->setText(tr("Select")); connect(button,SIGNAL(clicked()),this,SLOT(selectStartData())); @@ -207,14 +201,15 @@ EditRDLogedit::EditRDLogedit(RDStation *station,RDStation *cae_station, // Play End Cart // lib_endcart_edit=new QLineEdit(this); - lib_endcart_edit->setGeometry(160,292,70,19); + lib_endcart_edit->setGeometry(180,292,70,19); lib_endcart_edit->setValidator(validator); QLabel *lib_endcart_label= new QLabel(lib_endcart_edit,tr("Play &End Cart:"),this); - lib_endcart_label->setGeometry(25,292,130,19); + lib_endcart_label->setGeometry(25,292,150,19); lib_endcart_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); button=new QPushButton(this); - button->setGeometry(240,290,55,23); + button->setFont(subButtonFont()); + button->setGeometry(260,290,55,23); button->setText(tr("Select")); connect(button,SIGNAL(clicked()),this,SLOT(selectEndData())); @@ -222,14 +217,15 @@ EditRDLogedit::EditRDLogedit(RDStation *station,RDStation *cae_station, // Record Start Cart // lib_recstartcart_edit=new QLineEdit(this); - lib_recstartcart_edit->setGeometry(160,316,70,19); + lib_recstartcart_edit->setGeometry(180,316,70,19); lib_recstartcart_edit->setValidator(validator); QLabel *lib_recstartcart_label= new QLabel(lib_recstartcart_edit,tr("&Record Start Cart:"),this); - lib_recstartcart_label->setGeometry(25,316,130,19); + lib_recstartcart_label->setGeometry(25,316,150,19); lib_recstartcart_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); button=new QPushButton(this); - button->setGeometry(240,314,55,23); + button->setFont(subButtonFont()); + button->setGeometry(260,314,55,23); button->setText(tr("Select")); connect(button,SIGNAL(clicked()),this,SLOT(selectRecordStartData())); @@ -237,14 +233,15 @@ EditRDLogedit::EditRDLogedit(RDStation *station,RDStation *cae_station, // Record End Cart // lib_recendcart_edit=new QLineEdit(this); - lib_recendcart_edit->setGeometry(160,340,70,19); + lib_recendcart_edit->setGeometry(180,340,70,19); lib_recendcart_edit->setValidator(validator); QLabel *lib_recendcart_label= new QLabel(lib_recendcart_edit,tr("Re&cord End Cart:"),this); - lib_recendcart_label->setGeometry(25,340,130,19); + lib_recendcart_label->setGeometry(25,340,150,19); lib_recendcart_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); button=new QPushButton(this); - button->setGeometry(240,338,55,23); + button->setFont(subButtonFont()); + button->setGeometry(260,338,55,23); button->setText(tr("Select")); connect(button,SIGNAL(clicked()),this,SLOT(selectRecordEndData())); @@ -252,19 +249,21 @@ EditRDLogedit::EditRDLogedit(RDStation *station,RDStation *cae_station, // Default Channels // lib_channels_box=new QComboBox(this); - lib_channels_box->setGeometry(160,364,60,19); + lib_channels_box->setGeometry(180,364,60,19); QLabel *lib_channels_label=new QLabel(lib_channels_box,tr("&Channels:"),this); - lib_channels_label->setGeometry(25,364,130,19); + lib_channels_label->setFont(labelFont()); + lib_channels_label->setGeometry(25,364,150,19); lib_channels_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Default Transition Type // lib_default_transtype_box=new QComboBox(this); - lib_default_transtype_box->setGeometry(160,388,100,19); + lib_default_transtype_box->setGeometry(180,388,100,19); QLabel *lib_default_transtype_label= new QLabel(lib_default_transtype_box,tr("Default Transition:"),this); - lib_default_transtype_label->setGeometry(20,388,130,19); + lib_default_transtype_label->setFont(labelFont()); + lib_default_transtype_label->setGeometry(25,388,150,19); lib_default_transtype_label-> setAlignment(Qt::AlignRight|Qt::AlignVCenter); lib_default_transtype_box->insertItem(tr("Play")); @@ -277,7 +276,7 @@ EditRDLogedit::EditRDLogedit(RDStation *station,RDStation *cae_station, QPushButton *ok_button=new QPushButton(this); ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); ok_button->setDefault(true); - ok_button->setFont(small_font); + ok_button->setFont(buttonFont()); ok_button->setText(tr("&OK")); connect(ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -287,7 +286,7 @@ EditRDLogedit::EditRDLogedit(RDStation *station,RDStation *cae_station, QPushButton *cancel_button=new QPushButton(this); cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, 80,50); - cancel_button->setFont(small_font); + cancel_button->setFont(buttonFont()); cancel_button->setText(tr("&Cancel")); connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); @@ -369,7 +368,7 @@ EditRDLogedit::~EditRDLogedit() QSize EditRDLogedit::sizeHint() const { - return QSize(375,478); + return QSize(395,478); } diff --git a/rdadmin/edit_rdlogedit.h b/rdadmin/edit_rdlogedit.h index b1d998f4..fd50fc6c 100644 --- a/rdadmin/edit_rdlogedit.h +++ b/rdadmin/edit_rdlogedit.h @@ -2,7 +2,7 @@ // // Edit an RDLogEdit Configuration // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,18 +21,17 @@ #ifndef EDIT_RDLOGEDIT_H #define EDIT_RDLOGEDIT_H -#include -#include #include #include #include #include -#include -#include #include +#include +#include +#include -class EditRDLogedit : public QDialog +class EditRDLogedit : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_rdpanel.cpp b/rdadmin/edit_rdpanel.cpp index 40b59dc3..537f494c 100644 --- a/rdadmin/edit_rdpanel.cpp +++ b/rdadmin/edit_rdpanel.cpp @@ -2,7 +2,7 @@ // // Edit an RDPanel Configuration // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,19 +18,9 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include +#include +#include #include #include @@ -42,7 +32,7 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -52,23 +42,11 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); + setMinimumSize(sizeHint()); + setMaximumSize(sizeHint()); air_conf=new RDAirPlayConf(station->name(),"RDPANEL"); - // - // Create Fonts - // - QFont unit_font=QFont("Helvetica",12,QFont::Normal); - unit_font.setPixelSize(12); - QFont small_font=QFont("Helvetica",12,QFont::Bold); - small_font.setPixelSize(12); - QFont big_font=QFont("Helvetica",14,QFont::Bold); - big_font.setPixelSize(14); - // // Text Validator // @@ -83,15 +61,14 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, // Channel Assignments Section // QLabel *label=new QLabel(tr("Channel Assignments"),this); - label->setFont(big_font); + label->setFont(sectionLabelFont()); label->setGeometry(10,10,200,16); // // Sound Panel First Play Output // label=new QLabel(tr("SoundPanel First Play Output"),this); - label->setFont(small_font); -// label->setGeometry(395,32,300,16); + label->setFont(labelFont()); label->setGeometry(20,32,300,16); air_card_sel[0]=new RDCardSelector(this); air_card_sel[0]->setGeometry(15,50,120,117); @@ -99,12 +76,14 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, air_start_rml_edit[0]->setGeometry(205,50,160,19); air_start_rml_edit[0]->setValidator(validator); label=new QLabel(air_start_rml_edit[0],tr("Start RML:"),this); + label->setFont(subLabelFont()); label->setGeometry(135,50,65,19); label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_stop_rml_edit[0]=new QLineEdit(this); air_stop_rml_edit[0]->setGeometry(205,71,160,19); air_stop_rml_edit[0]->setValidator(validator); label=new QLabel(air_start_rml_edit[0],tr("Stop RML:"),this); + label->setFont(subLabelFont()); label->setGeometry(135,71,65,19); label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); @@ -112,7 +91,7 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, // Sound Panel Second Play Output // label=new QLabel(tr("SoundPanel Second Play Output"),this); - label->setFont(small_font); + label->setFont(labelFont()); label->setGeometry(20,100,300,16); air_card_sel[1]=new RDCardSelector(this); air_card_sel[1]->setGeometry(15,118,120,117); @@ -120,12 +99,14 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, air_start_rml_edit[1]->setGeometry(205,118,160,19); air_start_rml_edit[1]->setValidator(validator); label=new QLabel(air_start_rml_edit[1],tr("Start RML:"),this); + label->setFont(subLabelFont()); label->setGeometry(135,118,65,19); label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_stop_rml_edit[1]=new QLineEdit(this); air_stop_rml_edit[1]->setGeometry(205,139,160,19); air_stop_rml_edit[1]->setValidator(validator); label=new QLabel(air_start_rml_edit[1],tr("Stop RML:"),this); + label->setFont(subLabelFont()); label->setGeometry(135,139,65,19); label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); @@ -133,7 +114,7 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, // Sound Panel Third Play Output // label=new QLabel(tr("SoundPanel Third Play Output"),this); - label->setFont(small_font); + label->setFont(labelFont()); label->setGeometry(20,168,300,16); air_card_sel[2]=new RDCardSelector(this); air_card_sel[2]->setGeometry(15,186,120,117); @@ -141,12 +122,14 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, air_start_rml_edit[2]->setGeometry(205,186,160,19); air_start_rml_edit[2]->setValidator(validator); label=new QLabel(air_start_rml_edit[2],tr("Start RML:"),this); + label->setFont(subLabelFont()); label->setGeometry(135,186,65,19); label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_stop_rml_edit[2]=new QLineEdit(this); air_stop_rml_edit[2]->setGeometry(205,207,160,19); air_stop_rml_edit[2]->setValidator(validator); label=new QLabel(air_start_rml_edit[2],tr("Stop RML:"),this); + label->setFont(subLabelFont()); label->setGeometry(135,207,65,19); label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); @@ -154,7 +137,7 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, // Sound Panel Fourth Play Output // label=new QLabel(tr("SoundPanel Fourth Play Output"),this); - label->setFont(small_font); + label->setFont(labelFont()); label->setGeometry(20,236,300,16); air_card_sel[3]=new RDCardSelector(this); air_card_sel[3]->setGeometry(15,254,120,117); @@ -162,12 +145,14 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, air_start_rml_edit[3]->setGeometry(205,254,160,19); air_start_rml_edit[3]->setValidator(validator); label=new QLabel(air_start_rml_edit[3],tr("Start RML:"),this); + label->setFont(subLabelFont()); label->setGeometry(135,254,65,19); label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_stop_rml_edit[3]=new QLineEdit(this); air_stop_rml_edit[3]->setGeometry(205,275,160,19); air_stop_rml_edit[3]->setValidator(validator); label=new QLabel(air_start_rml_edit[3],tr("Stop RML:"),this); + label->setFont(subLabelFont()); label->setGeometry(135,275,65,19); label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); @@ -175,7 +160,7 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, // Sound Panel Fifth Play Output // label=new QLabel(tr("SoundPanel Fifth and Later Play Output"),this); - label->setFont(small_font); + label->setFont(labelFont()); label->setGeometry(20,304,300,16); air_card_sel[4]=new RDCardSelector(this); air_card_sel[4]->setGeometry(15,322,120,117); @@ -183,12 +168,14 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, air_start_rml_edit[4]->setGeometry(205,322,160,19); air_start_rml_edit[4]->setValidator(validator); label=new QLabel(air_start_rml_edit[4],tr("Start RML:"),this); + label->setFont(subLabelFont()); label->setGeometry(135,322,65,19); label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_stop_rml_edit[4]=new QLineEdit(this); air_stop_rml_edit[4]->setGeometry(205,343,160,19); air_stop_rml_edit[4]->setValidator(validator); label=new QLabel(air_start_rml_edit[4],tr("Stop RML:"),this); + label->setFont(subLabelFont()); label->setGeometry(135,343,65,19); label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); @@ -196,7 +183,7 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, // Sound Panel Cue Play Output // label=new QLabel(tr("SoundPanel Cue Output"),this); - label->setFont(small_font); + label->setFont(labelFont()); label->setGeometry(20,372,300,16); air_card_sel[5]=new RDCardSelector(this); air_card_sel[5]->setGeometry(15,390,120,117); @@ -204,12 +191,14 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, air_start_rml_edit[5]->setGeometry(205,390,160,19); air_start_rml_edit[5]->setValidator(validator); label=new QLabel(air_start_rml_edit[5],tr("Start RML:"),this); + label->setFont(subLabelFont()); label->setGeometry(135,390,65,19); label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); air_stop_rml_edit[5]=new QLineEdit(this); air_stop_rml_edit[5]->setGeometry(205,411,160,19); air_stop_rml_edit[5]->setValidator(validator); label=new QLabel(air_start_rml_edit[5],tr("Stop RML:"),this); + label->setFont(subLabelFont()); label->setGeometry(135,411,65,19); label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); @@ -217,8 +206,8 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, // Display Settings Section // label=new QLabel(tr("Display Settings"),this); - label->setFont(big_font); - label->setGeometry(20,438,200,16); + label->setFont(sectionLabelFont()); + label->setGeometry(20,440,200,16); // // Skin Path @@ -226,6 +215,7 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, air_skin_edit=new QLineEdit(this); air_skin_edit->setGeometry(135,460,180,20); label=new QLabel(air_skin_edit,tr("Background Image:"),this); + label->setFont(subLabelFont()); label->setGeometry(10,460,115,20); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); QPushButton *button=new QPushButton(tr("Select"),this); @@ -236,8 +226,7 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, // Sound Panel Section // label=new QLabel(tr("Sound Panel Settings"),this); - label->setFont(big_font); -// label->setGeometry(430,179,200,16); + label->setFont(sectionLabelFont()); label->setGeometry(430,10,200,16); // @@ -248,6 +237,7 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, air_station_box->setRange(0,MAX_PANELS); air_station_box->setSpecialValueText(tr("None")); air_station_label=new QLabel(air_station_box,tr("Host Panels:"),this); + air_station_label->setFont(subLabelFont()); air_station_label->setGeometry(405,35,100,20); air_station_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -259,6 +249,7 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, air_user_box->setRange(0,MAX_PANELS); air_user_box->setSpecialValueText(tr("None")); air_user_label=new QLabel(air_user_box,tr("User Panels:"),this); + air_user_label->setFont(subLabelFont()); air_user_label->setGeometry(405,57,100,20); air_user_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -268,6 +259,7 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, air_flash_box=new QCheckBox(this); air_flash_box->setGeometry(435,85,15,15); label=new QLabel(air_flash_box,tr("Flash Active Buttons"),this); + label->setFont(subLabelFont()); label->setGeometry(455,85,150,15); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); @@ -277,6 +269,7 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, air_panel_pause_box=new QCheckBox(this); air_panel_pause_box->setGeometry(435,107,15,15); label=new QLabel(air_panel_pause_box,tr("Enable Button Pausing"),this); + label->setFont(subLabelFont()); label->setGeometry(455,107,150,15); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); @@ -286,6 +279,7 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, air_clearfilter_box=new QCheckBox(this); air_clearfilter_box->setGeometry(435,129,15,15); label=new QLabel(air_clearfilter_box,tr("Clear Cart Search Filter"),this); + label->setFont(subLabelFont()); label->setGeometry(455,129,150,15); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); @@ -295,6 +289,7 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, air_defaultsvc_box=new QComboBox(this); air_defaultsvc_box->setGeometry(520,151,100,20); label=new QLabel(air_defaultsvc_box,tr("Default Service:"),this); + label->setFont(subLabelFont()); label->setGeometry(385,151,130,20); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -304,6 +299,7 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, air_label_template_edit=new QLineEdit(this); air_label_template_edit->setGeometry(520,173,sizeHint().width()-530,20); label=new QLabel(air_label_template_edit,tr("Label Template:"),this); + label->setFont(subLabelFont()); label->setGeometry(415,173,100,20); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -313,7 +309,7 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, button=new QPushButton(this); button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); button->setDefault(true); - button->setFont(small_font); + button->setFont(buttonFont()); button->setText(tr("&OK")); connect(button,SIGNAL(clicked()),this,SLOT(okData())); @@ -322,7 +318,7 @@ EditRDPanel::EditRDPanel(RDStation *station,RDStation *cae_station, // button=new QPushButton(this); button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50); - button->setFont(small_font); + button->setFont(buttonFont()); button->setText(tr("&Cancel")); connect(button,SIGNAL(clicked()),this,SLOT(cancelData())); diff --git a/rdadmin/edit_rdpanel.h b/rdadmin/edit_rdpanel.h index f9a3ad90..11f136a4 100644 --- a/rdadmin/edit_rdpanel.h +++ b/rdadmin/edit_rdpanel.h @@ -2,7 +2,7 @@ // // Edit an RDPanel Configuration // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,18 +21,16 @@ #ifndef EDIT_RDPANEL_H #define EDIT_RDPANEL_H -#include -#include -#include -#include -#include -#include #include -#include +#include +#include +#include +#include #include #include #include +#include #include /* @@ -41,7 +39,7 @@ #define LOG_PLAY_PORTS 2 #define MAX_MANUAL_SEGUE 10 -class EditRDPanel : public QDialog +class EditRDPanel : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_replicator.cpp b/rdadmin/edit_replicator.cpp index 313b1208..601ca17e 100644 --- a/rdadmin/edit_replicator.cpp +++ b/rdadmin/edit_replicator.cpp @@ -2,7 +2,7 @@ // // Edit a Rivendell Replicator // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ -20,16 +20,6 @@ #include -#include -#include -#include -#include -#include -#include -#include -//Added by qt3to4: -#include - #include #include #include @@ -38,7 +28,7 @@ #include "globals.h" EditReplicator::EditReplicator(const QString &repl_name,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -48,24 +38,14 @@ EditReplicator::EditReplicator(const QString &repl_name,QWidget *parent) // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); + setMinimumSize(sizeHint()); + setMaximumSize(sizeHint()); repl_replicator=new RDReplicator(repl_name); repl_settings=new RDSettings(); setWindowTitle("RDAdmin - "+tr("Replicator: ")+repl_name); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont small_font=QFont("Helvetica",12,QFont::Normal); - small_font.setPixelSize(12); - // // Replicator Name // @@ -74,8 +54,8 @@ EditReplicator::EditReplicator(const QString &repl_name,QWidget *parent) repl_name_edit->setMaxLength(32); repl_name_edit->setReadOnly(true); QLabel *repl_name_label=new QLabel(repl_name_edit,tr("Name:"),this); + repl_name_label->setFont(labelFont()); repl_name_label->setGeometry(10,11,90,19); - repl_name_label->setFont(font); repl_name_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -86,8 +66,8 @@ EditReplicator::EditReplicator(const QString &repl_name,QWidget *parent) repl_description_edit->setMaxLength(64); QLabel *repl_description_label= new QLabel(repl_description_edit,tr("Description:"),this); + repl_description_label->setFont(labelFont()); repl_description_label->setGeometry(10,33,90,19); - repl_description_label->setFont(font); repl_description_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -102,8 +82,8 @@ EditReplicator::EditReplicator(const QString &repl_name,QWidget *parent) } } QLabel *repl_type_label=new QLabel(repl_type_box,tr("Type:"),this); + repl_type_label->setFont(labelFont()); repl_type_label->setGeometry(10,55,90,19); - repl_type_label->setFont(font); repl_type_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -122,8 +102,8 @@ EditReplicator::EditReplicator(const QString &repl_name,QWidget *parent) delete q; QLabel *repl_station_label= new QLabel(repl_station_box,tr("Host System:"),this); + repl_station_label->setFont(labelFont()); repl_station_label->setGeometry(10,77,140,19); - repl_station_label->setFont(font); repl_station_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -133,8 +113,8 @@ EditReplicator::EditReplicator(const QString &repl_name,QWidget *parent) repl_url_edit->setGeometry(155,99,335,19); repl_url_edit->setMaxLength(255); repl_url_label=new QLabel(repl_url_edit,tr("Audio Upload URL:"),this); + repl_url_label->setFont(labelFont()); repl_url_label->setGeometry(20,99,130,19); - repl_url_label->setFont(font); repl_url_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -144,8 +124,8 @@ EditReplicator::EditReplicator(const QString &repl_name,QWidget *parent) repl_username_edit->setGeometry(225,121,95,19); repl_username_edit->setMaxLength(64); repl_username_label=new QLabel(repl_username_edit,tr("Username:"),this); + repl_username_label->setFont(labelFont()); repl_username_label->setGeometry(40,121,180,19); - repl_username_label->setFont(font); repl_username_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -156,8 +136,8 @@ EditReplicator::EditReplicator(const QString &repl_name,QWidget *parent) repl_password_edit->setMaxLength(64); repl_password_edit->setEchoMode(QLineEdit::Password); repl_password_label=new QLabel(repl_password_edit,tr("Password:"),this); + repl_password_label->setFont(labelFont()); repl_password_label->setGeometry(320,121,70,19); - repl_password_label->setFont(font); repl_password_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -167,12 +147,12 @@ EditReplicator::EditReplicator(const QString &repl_name,QWidget *parent) repl_format_edit->setGeometry(155,143,285,20); repl_format_edit->setReadOnly(true); repl_format_label=new QLabel(repl_format_edit,tr("Upload Format:"),this); + repl_format_label->setFont(labelFont()); repl_format_label->setGeometry(5,143,145,20); - repl_format_label->setFont(font); repl_format_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); repl_format_button=new QPushButton(this); repl_format_button->setGeometry(450,142,40,24); - repl_format_button->setFont(small_font); + repl_format_button->setFont(subButtonFont()); repl_format_button->setText(tr("S&et")); connect(repl_format_button,SIGNAL(clicked()),this,SLOT(setFormatData())); @@ -184,8 +164,8 @@ EditReplicator::EditReplicator(const QString &repl_name,QWidget *parent) repl_normalize_box->setChecked(true); repl_normalize_check_label= new QLabel(repl_normalize_box,tr("Normalize"),this); + repl_normalize_check_label->setFont(labelFont()); repl_normalize_check_label->setGeometry(175,165,83,20); - repl_normalize_check_label->setFont(font); repl_normalize_check_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); connect(repl_normalize_box,SIGNAL(toggled(bool)), this,SLOT(normalizeCheckData(bool))); @@ -197,12 +177,12 @@ EditReplicator::EditReplicator(const QString &repl_name,QWidget *parent) repl_normalize_spin->setGeometry(295,165,40,20); repl_normalize_spin->setRange(-30,-1); repl_normalize_label=new QLabel(repl_normalize_spin,tr("Level:"),this); + repl_normalize_label->setFont(labelFont()); repl_normalize_label->setGeometry(245,165,45,20); - repl_normalize_label->setFont(font); repl_normalize_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); repl_normalize_unit_label=new QLabel(tr("dBFS"),this); + repl_normalize_unit_label->setFont(labelFont()); repl_normalize_unit_label->setGeometry(340,165,40,20); - repl_normalize_unit_label->setFont(font); repl_normalize_unit_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // @@ -219,7 +199,7 @@ EditReplicator::EditReplicator(const QString &repl_name,QWidget *parent) QPushButton *ok_button=new QPushButton(this); ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); ok_button->setDefault(true); - ok_button->setFont(font); + ok_button->setFont(buttonFont()); ok_button->setText(tr("&OK")); connect(ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -229,7 +209,7 @@ EditReplicator::EditReplicator(const QString &repl_name,QWidget *parent) QPushButton *cancel_button=new QPushButton(this); cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, 80,50); - cancel_button->setFont(font); + cancel_button->setFont(buttonFont()); cancel_button->setText(tr("&Cancel")); connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); diff --git a/rdadmin/edit_replicator.h b/rdadmin/edit_replicator.h index 9cc86dc0..46a6a36b 100644 --- a/rdadmin/edit_replicator.h +++ b/rdadmin/edit_replicator.h @@ -2,7 +2,7 @@ // // Edit a Rivendell Replicator // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,22 +21,20 @@ #ifndef EDIT_REPLICATOR_H #define EDIT_REPLICATOR_H -#include -#include -#include -#include -#include #include -#include #include +#include +#include #include +#include +#include +#include #include #include #include -#include -class EditReplicator : public QDialog +class EditReplicator : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_report.cpp b/rdadmin/edit_report.cpp index 75d3049d..3e24c122 100644 --- a/rdadmin/edit_report.cpp +++ b/rdadmin/edit_report.cpp @@ -2,7 +2,7 @@ // // Edit a Rivendell Report // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,18 +18,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include #include #include @@ -43,7 +31,7 @@ #include "test_import.h" EditReport::EditReport(QString rptname,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -62,16 +50,6 @@ EditReport::EditReport(QString rptname,QWidget *parent) edit_report=new RDReport(rptname,rda->station(),rda->config()); setWindowTitle("RDAdmin - "+tr("Edit Report")+" "+rptname); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont check_font=QFont("Helvetica",12,QFont::Normal); - check_font.setPixelSize(12); - QFont section_font=QFont("Helvetica",14,QFont::Bold); - section_font.setPixelSize(14); - // // Text Validator // @@ -81,77 +59,77 @@ EditReport::EditReport(QString rptname,QWidget *parent) // Report Description // edit_description_edit=new QLineEdit(this); - edit_description_edit->setGeometry(170,10,sizeHint().width()-180,19); + edit_description_edit->setGeometry(200,10,sizeHint().width()-210,19); edit_description_edit->setMaxLength(64); QLabel *label= new QLabel(edit_description_edit,tr("&Report Description:"),this); - label->setGeometry(10,10,155,19); - label->setFont(font); + label->setGeometry(10,10,185,19); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Export Filter Type // edit_filter_box=new QComboBox(this); - edit_filter_box->setGeometry(170,31,sizeHint().width()-180,19); + edit_filter_box->setGeometry(200,31,sizeHint().width()-210,19); for(int i=0;i<(int)RDReport::LastFilter;i++) { edit_filter_box-> insertItem(RDReport::filterText((RDReport::ExportFilter)i)); } label=new QLabel(edit_description_edit,tr("Export &Filter:"),this); - label->setGeometry(10,31,155,19); - label->setFont(font); + label->setGeometry(10,31,185,19); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Station ID // edit_stationid_edit=new QLineEdit(this); - edit_stationid_edit->setGeometry(170,52,180,19); + edit_stationid_edit->setGeometry(200,52,180,19); edit_stationid_edit->setMaxLength(16); edit_stationid_edit->setValidator(validator); label=new QLabel(edit_stationid_edit,tr("Station ID:"),this); - label->setGeometry(10,52,155,19); - label->setFont(font); + label->setGeometry(10,52,185,19); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Cart Number Parameters // label=new QLabel(tr("Cart Number Parameters:"),this); - label->setGeometry(10,73,155,19); - label->setFont(font); + label->setGeometry(10,73,185,19); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); edit_cartzeros_box=new QCheckBox(this); - edit_cartzeros_box->setGeometry(170,75,15,15); + edit_cartzeros_box->setGeometry(200,75,15,15); connect(edit_cartzeros_box,SIGNAL(toggled(bool)), this,SLOT(leadingZerosToggled(bool))); label=new QLabel(edit_cartzeros_box,tr("Use Leading Zeros"),this); - label->setGeometry(187,73,120,19); - label->setFont(check_font); + label->setGeometry(217,73,120,19); + label->setFont(subLabelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); edit_cartdigits_spin=new QSpinBox(this); - edit_cartdigits_spin->setGeometry(350,73,40,19); + edit_cartdigits_spin->setGeometry(380,73,40,19); edit_cartdigits_spin->setRange(1,6); edit_cartdigits_label=new QLabel(edit_cartdigits_spin,tr("Digits:"),this); - edit_cartdigits_label->setGeometry(300,73,45,19); - edit_cartdigits_label->setFont(check_font); + edit_cartdigits_label->setGeometry(330,73,45,19); + edit_cartdigits_label->setFont(subLabelFont()); edit_cartdigits_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Station Type // edit_stationtype_box=new QComboBox(this); - edit_stationtype_box->setGeometry(170,94,70,19); + edit_stationtype_box->setGeometry(200,94,70,19); for(int i=0;i insertItem(RDReport::stationTypeText((RDReport::StationType)i)); } label=new QLabel(edit_stationtype_box,tr("Station Type:"),this); - label->setGeometry(10,94,155,19); - label->setFont(font); + label->setGeometry(10,94,185,19); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -162,7 +140,7 @@ EditReport::EditReport(QString rptname,QWidget *parent) edit_linesperpage_spin->setRange(10,200); label=new QLabel(edit_linesperpage_spin,tr("Lines per Page:"),this); label->setGeometry(255,94,100,19); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); edit_linesperpage_spin->hide(); label->hide(); @@ -171,96 +149,74 @@ EditReport::EditReport(QString rptname,QWidget *parent) // Service Name // edit_servicename_edit=new QLineEdit(this); - edit_servicename_edit->setGeometry(170,115,sizeHint().width()-180,19); + edit_servicename_edit->setGeometry(200,115,sizeHint().width()-210,19); edit_servicename_edit->setMaxLength(64); label=new QLabel(edit_servicename_edit,tr("Ser&vice Name:"),this); - label->setGeometry(10,115,155,19); - label->setFont(font); + label->setGeometry(10,115,185,19); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Station Format // edit_stationformat_edit=new QLineEdit(this); - edit_stationformat_edit->setGeometry(170,136,sizeHint().width()-180,19); + edit_stationformat_edit->setGeometry(200,136,sizeHint().width()-210,19); edit_stationformat_edit->setMaxLength(64); label=new QLabel(edit_stationformat_edit,tr("Station &Format:"),this); - label->setGeometry(10,136,155,19); - label->setFont(font); + label->setGeometry(10,136,185,19); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Linux Export Path // edit_path_edit=new QLineEdit(this); - edit_path_edit->setGeometry(170,157,sizeHint().width()-180,19); + edit_path_edit->setGeometry(200,157,sizeHint().width()-210,19); edit_path_edit->setMaxLength(255); edit_path_edit->setValidator(validator); - label=new QLabel(edit_path_edit,tr("Linux Export Path:"),this); - label->setGeometry(10,157,155,19); - label->setFont(font); + label=new QLabel(edit_path_edit,tr("Export Path:"),this); + label->setGeometry(10,157,185,19); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Linux Post Export Command // edit_postexport_cmd_edit=new QLineEdit(this); - edit_postexport_cmd_edit->setGeometry(170,178,sizeHint().width()-180,19); + edit_postexport_cmd_edit->setGeometry(200,178,sizeHint().width()-210,19); edit_postexport_cmd_edit->setValidator(validator); - label=new QLabel(edit_path_edit,tr("Linux Post Export Cmd:"),this); - label->setGeometry(10,178,155,19); - label->setFont(font); - label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); - - // - // Windows Export Path - // - edit_winpath_edit=new QLineEdit(this); - edit_winpath_edit->setGeometry(170,199,sizeHint().width()-180,19); - edit_winpath_edit->setMaxLength(255); - label=new QLabel(edit_winpath_edit,tr("Windows Export Path:"),this); - label->setGeometry(10,199,155,19); - label->setFont(font); - label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); - - // - // Windows Post Export Command - // - edit_winpostexport_cmd_edit=new QLineEdit(this); - edit_winpostexport_cmd_edit->setGeometry(170,219,sizeHint().width()-180,19); - edit_winpostexport_cmd_edit->setValidator(validator); - label=new QLabel(edit_path_edit,tr("Windows Post Export Cmd:"),this); - label->setGeometry(10,219,155,19); - label->setFont(font); + label=new QLabel(edit_path_edit,tr("Post Export Cmd:"),this); + label->setGeometry(10,178,185,19); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Type Selectors // label=new QLabel(tr("Export Event Types:"),this); - label->setGeometry(10,240,155,19); - label->setFont(font); + label->setGeometry(10,200,185,19); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); edit_traffic_box=new QCheckBox(this); - edit_traffic_box->setGeometry(170,242,15,15); + edit_traffic_box->setGeometry(200,202,15,15); edit_traffic_label=new QLabel(tr("Traffic"),this); - edit_traffic_label->setGeometry(187,241,80,19); - edit_traffic_label->setFont(check_font); + edit_traffic_label->setGeometry(217,201,80,19); + edit_traffic_label->setFont(subLabelFont()); edit_traffic_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); edit_music_box=new QCheckBox(this); - edit_music_box->setGeometry(270,243,15,15); + edit_music_box->setGeometry(300,203,15,15); edit_music_label=new QLabel(tr("Music"),this); - edit_music_label->setGeometry(287,241,80,19); - edit_music_label->setFont(check_font); + edit_music_label->setGeometry(317,201,80,19); + edit_music_label->setFont(subLabelFont()); edit_music_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); edit_generic_box=new QCheckBox(this); - edit_generic_box->setGeometry(370,243,15,15); + edit_generic_box->setGeometry(400,203,15,15); label=new QLabel(tr("All"),this); - label->setGeometry(387,241,80,19); - label->setFont(check_font); + label->setGeometry(417,201,80,19); + label->setFont(subLabelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); connect(edit_generic_box,SIGNAL(toggled(bool)), this,SLOT(genericEventsToggledData(bool))); @@ -269,59 +225,59 @@ EditReport::EditReport(QString rptname,QWidget *parent) // Force Event Source Selectors // label=new QLabel(tr("Export Events From:"),this); - label->setGeometry(10,262,155,19); - label->setFont(font); + label->setGeometry(10,222,185,19); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); edit_forcetraffic_box=new QCheckBox(this); - edit_forcetraffic_box->setGeometry(170,264,15,15); + edit_forcetraffic_box->setGeometry(200,224,15,15); label=new QLabel(tr("Traffic Log"),this); - label->setGeometry(187,262,80,19); - label->setFont(check_font); + label->setGeometry(217,222,80,19); + label->setFont(subLabelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); edit_forcemusic_box=new QCheckBox(this); - edit_forcemusic_box->setGeometry(270,264,15,15); + edit_forcemusic_box->setGeometry(300,224,15,15); label=new QLabel(tr("Music Log"),this); - label->setGeometry(287,262,80,19); - label->setFont(check_font); + label->setGeometry(317,222,80,19); + label->setFont(subLabelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // // Include Only On Air Events // edit_onairflag_box=new QComboBox(this); - edit_onairflag_box->setGeometry(170,283,60,19); + edit_onairflag_box->setGeometry(200,243,60,19); edit_onairflag_box->insertItem(tr("No")); edit_onairflag_box->insertItem(tr("Yes")); label=new QLabel(edit_onairflag_box,tr("Include Only OnAir Events:"),this); - label->setGeometry(10,283,155,19); - label->setFont(font); + label->setGeometry(10,243,185,19); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Daypart Filter // edit_daypart_check=new QCheckBox(this); - edit_daypart_check->setGeometry(60,313,15,15); + edit_daypart_check->setGeometry(60,273,15,15); edit_daypart_label= new QLabel(edit_daypart_check,tr("Filter by Daypart"),this); - edit_daypart_label->setGeometry(edit_daypart_check->geometry().x()+20,313,155,19); - edit_daypart_label->setFont(font); + edit_daypart_label->setGeometry(edit_daypart_check->geometry().x()+20,273,155,19); + edit_daypart_label->setFont(labelFont()); edit_daypart_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); edit_starttime_edit=new Q3TimeEdit(this); - edit_starttime_edit->setGeometry(150,334,80,20); + edit_starttime_edit->setGeometry(150,294,80,20); edit_starttime_label=new QLabel(edit_starttime_edit,tr("Start Time:"),this); - edit_starttime_label->setGeometry(65,334,80,20); - edit_starttime_label->setFont(font); + edit_starttime_label->setGeometry(65,294,80,20); + edit_starttime_label->setFont(labelFont()); edit_starttime_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); edit_endtime_edit=new Q3TimeEdit(this); - edit_endtime_edit->setGeometry(335,334,80,20); + edit_endtime_edit->setGeometry(335,294,80,20); edit_endtime_label=new QLabel(edit_endtime_edit,tr("End Time:"),this); - edit_endtime_label->setGeometry(250,334,80,20); - edit_endtime_label->setFont(font); + edit_endtime_label->setGeometry(250,294,80,20); + edit_endtime_label->setFont(labelFont()); edit_endtime_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); connect(edit_daypart_check,SIGNAL(toggled(bool)), @@ -339,7 +295,7 @@ EditReport::EditReport(QString rptname,QWidget *parent) edit_service_sel=new RDListSelector(this); edit_service_sel-> setGeometry((sizeHint().width()-edit_service_sel->sizeHint().width())/2, - 373,edit_service_sel->sizeHint().width(), + 333,edit_service_sel->sizeHint().width(), edit_service_sel->sizeHint().height()); edit_service_sel->sourceSetLabel(tr("Available Services")); edit_service_sel->destSetLabel(tr("Source Services")); @@ -350,7 +306,7 @@ EditReport::EditReport(QString rptname,QWidget *parent) edit_station_sel=new RDListSelector(this); edit_station_sel-> setGeometry((sizeHint().width()-edit_station_sel->sizeHint().width())/2, - 477,edit_station_sel->sizeHint().width(), + 437,edit_station_sel->sizeHint().width(), edit_station_sel->sizeHint().height()); edit_station_sel->sourceSetLabel(tr("Available Hosts")); edit_station_sel->destSetLabel(tr("Source Hosts")); @@ -361,16 +317,16 @@ EditReport::EditReport(QString rptname,QWidget *parent) edit_group_sel=new RDListSelector(this); edit_group_sel-> setGeometry((sizeHint().width()-edit_group_sel->sizeHint().width())/2, - 593,edit_group_sel->sizeHint().width(), + 553,edit_group_sel->sizeHint().width(), edit_group_sel->sizeHint().height()); edit_group_sel->sourceSetLabel(tr("Available Groups")); edit_group_sel->destSetLabel(tr("Allowed Groups")); edit_group_box=new QCheckBox(this); - edit_group_box->setGeometry(60,574,15,15); + edit_group_box->setGeometry(60,534,15,15); label=new QLabel(edit_group_box,tr("Filter by Groups"),this); - label->setGeometry(edit_group_box->geometry().x()+20,573,155,19); - label->setFont(font); + label->setGeometry(edit_group_box->geometry().x()+20,533,155,19); + label->setFont(labelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); connect(edit_group_box,SIGNAL(toggled(bool)), edit_group_sel,SLOT(setEnabled(bool))); @@ -382,7 +338,7 @@ EditReport::EditReport(QString rptname,QWidget *parent) QPushButton *button=new QPushButton(this); button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); button->setDefault(true); - button->setFont(font); + button->setFont(buttonFont()); button->setText(tr("&OK")); connect(button,SIGNAL(clicked()),this,SLOT(okData())); @@ -391,7 +347,7 @@ EditReport::EditReport(QString rptname,QWidget *parent) // button=new QPushButton(this); button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50); - button->setFont(font); + button->setFont(buttonFont()); button->setText(tr("&Cancel")); connect(button,SIGNAL(clicked()),this,SLOT(cancelData())); @@ -411,9 +367,6 @@ EditReport::EditReport(QString rptname,QWidget *parent) edit_path_edit->setText(edit_report->exportPath(RDReport::Linux)); edit_postexport_cmd_edit-> setText(edit_report->postExportCommand(RDReport::Linux)); - edit_winpath_edit->setText(edit_report->exportPath(RDReport::Windows)); - edit_winpostexport_cmd_edit-> - setText(edit_report->postExportCommand(RDReport::Windows)); edit_traffic_box-> setChecked(edit_report->exportTypeEnabled(RDReport::Traffic)); edit_music_box-> @@ -501,7 +454,7 @@ EditReport::~EditReport() QSize EditReport::sizeHint() const { - return QSize(500,749); + return QSize(530,709); } @@ -546,9 +499,6 @@ void EditReport::okData() edit_report->setExportPath(RDReport::Linux,edit_path_edit->text()); edit_report-> setPostExportCommand(RDReport::Linux,edit_postexport_cmd_edit->text()); - edit_report->setExportPath(RDReport::Windows,edit_winpath_edit->text()); - edit_report-> - setPostExportCommand(RDReport::Windows,edit_winpostexport_cmd_edit->text()); edit_report-> setExportTypeEnabled(RDReport::Traffic,edit_traffic_box->isChecked()); edit_report-> diff --git a/rdadmin/edit_report.h b/rdadmin/edit_report.h index 94a76f2b..94906d3f 100644 --- a/rdadmin/edit_report.h +++ b/rdadmin/edit_report.h @@ -2,7 +2,7 @@ // // Edit a Rivendell Report // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,19 +21,19 @@ #ifndef EDIT_REPORT_H #define EDIT_REPORT_H -#include -#include -#include #include +#include #include +#include #include #include +#include #include #include -class EditReport : public QDialog +class EditReport : public RDDialog { Q_OBJECT public: @@ -62,8 +62,6 @@ class EditReport : public QDialog QSpinBox *edit_linesperpage_spin; QLineEdit *edit_path_edit; QLineEdit *edit_postexport_cmd_edit; - QLineEdit *edit_winpath_edit; - QLineEdit *edit_winpostexport_cmd_edit; QLabel *edit_traffic_label; QCheckBox *edit_traffic_box; QLabel *edit_music_label; diff --git a/rdadmin/edit_sas_resource.cpp b/rdadmin/edit_sas_resource.cpp index ec9ea7f2..7177d0c3 100644 --- a/rdadmin/edit_sas_resource.cpp +++ b/rdadmin/edit_sas_resource.cpp @@ -26,7 +26,7 @@ EditSasResource::EditSasResource(int *enginenum,int *devicenum,int *relaynum, QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -38,48 +38,38 @@ EditSasResource::EditSasResource(int *enginenum,int *devicenum,int *relaynum, // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); - - // - // Create Fonts - // - QFont bold_font=QFont("Helvetica",12,QFont::Bold); - bold_font.setPixelSize(12); - QFont font=QFont("Helvetica",12,QFont::Normal); - font.setPixelSize(12); + setMinimumSize(sizeHint()); + setMaximumSize(sizeHint()); // // Console Number // edit_enginenum_edit=new QLineEdit(this); - edit_enginenum_edit->setGeometry(135,10,50,20); + edit_enginenum_edit->setGeometry(165,10,50,20); QLabel *label=new QLabel(edit_enginenum_edit,tr("Console Number: "),this); - label->setGeometry(10,10,120,20); - label->setFont(bold_font); + label->setGeometry(10,10,150,20); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Source Number // edit_devicenum_edit=new QLineEdit(this); - edit_devicenum_edit->setGeometry(135,36,50,20); + edit_devicenum_edit->setGeometry(165,36,50,20); label=new QLabel(edit_devicenum_edit,tr("Source Number: "),this); - label->setGeometry(10,36,120,20); - label->setFont(bold_font); + label->setGeometry(10,36,150,20); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Opto/Relay Number // edit_relaynum_edit=new QLineEdit(this); - edit_relaynum_edit->setGeometry(135,62,50,20); + edit_relaynum_edit->setGeometry(165,62,50,20); edit_relaynum_label= new QLabel(edit_relaynum_edit,tr("Opto/Relay Number: "),this); - edit_relaynum_label->setGeometry(10,62,120,20); - edit_relaynum_label->setFont(bold_font); + edit_relaynum_label->setGeometry(10,62,150,20); + edit_relaynum_label->setFont(labelFont()); edit_relaynum_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -88,7 +78,7 @@ EditSasResource::EditSasResource(int *enginenum,int *devicenum,int *relaynum, QPushButton *button=new QPushButton(this); button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); button->setDefault(true); - button->setFont(bold_font); + button->setFont(buttonFont()); button->setText(tr("&OK")); connect(button,SIGNAL(clicked()),this,SLOT(okData())); @@ -98,7 +88,7 @@ EditSasResource::EditSasResource(int *enginenum,int *devicenum,int *relaynum, button=new QPushButton(this); button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, 80,50); - button->setFont(bold_font); + button->setFont(buttonFont()); button->setText(tr("&Cancel")); connect(button,SIGNAL(clicked()),this,SLOT(cancelData())); diff --git a/rdadmin/edit_sas_resource.h b/rdadmin/edit_sas_resource.h index 54d90a11..627cc219 100644 --- a/rdadmin/edit_sas_resource.h +++ b/rdadmin/edit_sas_resource.h @@ -2,7 +2,7 @@ // // Edit an SAS Resource Record. // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ #ifndef EDIT_SAS_RESOURCE_H #define EDIT_SAS_RESOURCE_H -#include -#include -#include -#include #include +#include +#include +#include -#include +#include #include +#include -class EditSasResource : public QDialog +class EditSasResource : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_schedcodes.cpp b/rdadmin/edit_schedcodes.cpp index 62bf6db0..5bf23634 100644 --- a/rdadmin/edit_schedcodes.cpp +++ b/rdadmin/edit_schedcodes.cpp @@ -4,7 +4,7 @@ // // Stefan Gabriel // (C) Copyright 2005-2018 -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ -20,27 +20,16 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include -#include -#include -#include -#include -#include -#include -#include - #include #include -#include #include -#include #include "edit_group.h" #include "edit_schedcodes.h" -EditSchedCode::EditSchedCode(QString schedCode,QString description, +EditSchedCode::EditSchedCode(QString schedcode,QString description, QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -52,16 +41,10 @@ EditSchedCode::EditSchedCode(QString schedCode,QString description, setMinimumHeight(sizeHint().height()); setMaximumHeight(sizeHint().height()); - schedCode_code=new QString(schedCode); - schedCode_description=new QString(description); + schedcode_code=new QString(schedcode); + schedcode_description=new QString(description); - setWindowTitle("RDAdmin - "+tr("Scheduler Code: ")+schedCode); - - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); + setWindowTitle("RDAdmin - "+tr("Scheduler Code: ")+schedcode); // // Text Validators @@ -71,28 +54,28 @@ EditSchedCode::EditSchedCode(QString schedCode,QString description, // // Code Name // - schedCode_name_edit=new QLineEdit(this); - schedCode_name_edit->setGeometry(125,11,100,19); - schedCode_name_edit->setMaxLength(10); - schedCode_name_edit->setReadOnly(true); - QLabel *schedCode_name_label= - new QLabel(schedCode_name_edit,tr("Scheduler Code:"),this); - schedCode_name_label->setGeometry(10,11,110,19); - schedCode_name_label->setFont(font); - schedCode_name_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); + schedcode_name_edit=new QLineEdit(this); + schedcode_name_edit->setGeometry(125,11,100,19); + schedcode_name_edit->setMaxLength(10); + schedcode_name_edit->setReadOnly(true); + QLabel *schedcode_name_label= + new QLabel(schedcode_name_edit,tr("Scheduler Code:"),this); + schedcode_name_label->setGeometry(10,11,110,19); + schedcode_name_label->setFont(labelFont()); + schedcode_name_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Code Description // - schedCode_description_edit=new QLineEdit(this); - schedCode_description_edit->setGeometry(125,32,sizeHint().width()-135,19); - schedCode_description_edit->setMaxLength(255); - schedCode_description_edit->setValidator(validator); - QLabel *schedCode_description_label= - new QLabel(schedCode_description_edit,tr("Code Description:"),this); - schedCode_description_label->setGeometry(10,32,110,19); - schedCode_description_label->setFont(font); - schedCode_description_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); + schedcode_description_edit=new QLineEdit(this); + schedcode_description_edit->setGeometry(125,32,sizeHint().width()-135,19); + schedcode_description_edit->setMaxLength(255); + schedcode_description_edit->setValidator(validator); + QLabel *schedcode_description_label= + new QLabel(schedcode_description_edit,tr("Code Description:"),this); + schedcode_description_label->setGeometry(10,32,110,19); + schedcode_description_label->setFont(labelFont()); + schedcode_description_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Ok Button @@ -100,7 +83,7 @@ EditSchedCode::EditSchedCode(QString schedCode,QString description, QPushButton *ok_button=new QPushButton(this); ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); ok_button->setDefault(true); - ok_button->setFont(font); + ok_button->setFont(buttonFont()); ok_button->setText(tr("&OK")); connect(ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -110,22 +93,22 @@ EditSchedCode::EditSchedCode(QString schedCode,QString description, QPushButton *cancel_button=new QPushButton(this); cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, 80,50); - cancel_button->setFont(font); + cancel_button->setFont(buttonFont()); cancel_button->setText(tr("&Cancel")); connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); // // Populate Fields // - schedCode_name_edit->setText(*schedCode_code); - schedCode_description_edit->setText(*schedCode_description); + schedcode_name_edit->setText(*schedcode_code); + schedcode_description_edit->setText(*schedcode_description); } EditSchedCode::~EditSchedCode() { - delete schedCode_name_edit; - delete schedCode_description_edit; + delete schedcode_name_edit; + delete schedcode_description_edit; } @@ -147,12 +130,12 @@ void EditSchedCode::okData() QString sql; sql=QString("update SCHED_CODES set ")+ - "DESCRIPTION=\""+RDEscapeString(schedCode_description_edit->text())+"\" "+ - "where CODE=\""+RDEscapeString(schedCode_name_edit->text())+"\""; + "DESCRIPTION=\""+RDEscapeString(schedcode_description_edit->text())+"\" "+ + "where CODE=\""+RDEscapeString(schedcode_name_edit->text())+"\""; q=new RDSqlQuery(sql); delete q; - *schedCode_description=schedCode_description_edit->text(); + *schedcode_description=schedcode_description_edit->text(); done(0); } diff --git a/rdadmin/edit_schedcodes.h b/rdadmin/edit_schedcodes.h index 2e119b89..be3c72ba 100644 --- a/rdadmin/edit_schedcodes.h +++ b/rdadmin/edit_schedcodes.h @@ -3,7 +3,7 @@ // Edit scheduler codes dialog // // Stefan Gabriel -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,18 +22,15 @@ #ifndef EDIT_SCHEDCODES_H #define EDIT_SCHEDCODES_H -#include -#include -#include -#include #include -#include -class EditSchedCode : public QDialog +#include + +class EditSchedCode : public RDDialog { Q_OBJECT public: - EditSchedCode(QString schedCode,QString description,QWidget *parent=0); + EditSchedCode(QString schedcode,QString description,QWidget *parent=0); ~EditSchedCode(); QSize sizeHint() const; QSizePolicy sizePolicy() const; @@ -43,11 +40,11 @@ class EditSchedCode : public QDialog void cancelData(); private: - QString *schedCode_code; - QString *schedCode_description; - QLineEdit *schedCode_name_edit; - QLineEdit *schedCode_description_edit; - }; + QString *schedcode_code; + QString *schedcode_description; + QLineEdit *schedcode_name_edit; + QLineEdit *schedcode_description_edit; +}; #endif // EDIT_SCHEDCODES_H diff --git a/rdadmin/edit_settings.cpp b/rdadmin/edit_settings.cpp index c2ba22e3..2907afec 100644 --- a/rdadmin/edit_settings.cpp +++ b/rdadmin/edit_settings.cpp @@ -2,7 +2,7 @@ // // Edit Rivendell System-Wide Configuration // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,51 +18,34 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include -#include -#include -#include #include -#include -#include -#include + #include -#include +#include -#include -#include -#include #include +#include +#include +#include -#include -#include +#include "edit_settings.h" +#include "globals.h" EditSettings::EditSettings(QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); QString sql; RDSqlQuery *q; - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - - QFont normal_font=QFont("Helvetica",12,QFont::Normal); - normal_font.setPixelSize(12); - y_pos=0; // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); + setMinimumSize(sizeHint()); + setMaximumSize(sizeHint()); edit_system=new RDSystem(); @@ -74,17 +57,17 @@ EditSettings::EditSettings(QWidget *parent) // System Sample Rate // edit_sample_rate_box=new QComboBox(this); - edit_sample_rate_box->setGeometry(200,10,70,20); + edit_sample_rate_box->setGeometry(250,10,70,20); edit_sample_rate_box->insertItem("32000"); edit_sample_rate_box->insertItem("44100"); edit_sample_rate_box->insertItem("48000"); QLabel *label=new QLabel(edit_sample_rate_box,tr("System Sample Rate:"),this); - label->setGeometry(10,10,185,20); - label->setFont(font); + label->setGeometry(10,10,235,20); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); label=new QLabel(tr("samples/second"),this); - label->setGeometry(275,10,sizeHint().width()-285,20); - label->setFont(font); + label->setGeometry(325,10,sizeHint().width()-285,20); + label->setFont(labelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -97,7 +80,7 @@ EditSettings::EditSettings(QWidget *parent) label= new QLabel(edit_duplicate_carts_box,tr("Allow Duplicate Cart Titles"),this); label->setGeometry(40,30,sizeHint().width()-50,20); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter|Qt::TextShowMnemonic); edit_fix_duplicate_carts_box=new QCheckBox(this); @@ -105,7 +88,7 @@ EditSettings::EditSettings(QWidget *parent) edit_fix_duplicate_carts_label=new QLabel(edit_fix_duplicate_carts_box, tr("Auto-Correct Duplicate Cart Titles"),this); edit_fix_duplicate_carts_label->setGeometry(50,50,sizeHint().width()-60,20); - edit_fix_duplicate_carts_label->setFont(font); + edit_fix_duplicate_carts_label->setFont(labelFont()); edit_fix_duplicate_carts_label-> setAlignment(Qt::AlignLeft|Qt::AlignVCenter|Qt::TextShowMnemonic); @@ -113,42 +96,42 @@ EditSettings::EditSettings(QWidget *parent) // ISCI Cross Reference Path // edit_isci_path_edit=new QLineEdit(this); - edit_isci_path_edit->setGeometry(200,76,sizeHint().width()-210,20); + edit_isci_path_edit->setGeometry(250,76,sizeHint().width()-260,20); label=new QLabel(edit_isci_path_edit,tr("ISCI Cross Reference Path:"),this); - label->setGeometry(10,76,185,20); - label->setFont(font); + label->setGeometry(10,76,235,20); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // // Notification Address // edit_notification_address_edit=new QLineEdit(this); - edit_notification_address_edit->setGeometry(200,98,150,20); - label=new QLabel(edit_notification_address_edit,tr("Mcast Address for Notifications"),this); - label->setGeometry(10,98,185,20); - label->setFont(font); + edit_notification_address_edit->setGeometry(250,98,150,20); + label=new QLabel(edit_notification_address_edit,tr("Multicast Address for Notifications"),this); + label->setGeometry(10,98,235,20); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // // Maximum POST Size // edit_maxpost_spin=new QSpinBox(this); - edit_maxpost_spin->setGeometry(200,120,60,20); + edit_maxpost_spin->setGeometry(250,120,60,20); edit_maxpost_spin->setRange(1,1000); label=new QLabel(edit_maxpost_spin,tr("Maximum Remote Post Length:"),this); - label->setGeometry(10,120,185,20); - label->setFont(font); + label->setGeometry(10,120,235,20); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); label=new QLabel(tr("Mbytes"),this); - label->setGeometry(265,120,60,20); - label->setFont(font); + label->setGeometry(315,120,60,20); + label->setFont(labelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter|Qt::TextShowMnemonic); // // Temporary Cart Group // edit_temp_cart_group_box=new QComboBox(this); - edit_temp_cart_group_box->setGeometry(200,141,100,20); + edit_temp_cart_group_box->setGeometry(250,141,100,20); sql="select NAME from GROUPS order by NAME"; q=new RDSqlQuery(sql); while(q->next()) { @@ -156,8 +139,8 @@ EditSettings::EditSettings(QWidget *parent) } delete q; label=new QLabel(edit_temp_cart_group_box,tr("Temporary Cart Group:"),this); - label->setGeometry(10,141,185,20); - label->setFont(font); + label->setGeometry(10,141,235,20); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -170,7 +153,7 @@ EditSettings::EditSettings(QWidget *parent) label= new QLabel(edit_show_user_list_box,tr("Show User List in RDLogin"),this); label->setGeometry(40,163,sizeHint().width()-50,20); - label->setFont(font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -180,21 +163,21 @@ EditSettings::EditSettings(QWidget *parent) edit_duplicate_label->setText(tr("The following duplicate titles must be corrected before \"Allow Duplicate Values\" can be turned off.")); edit_duplicate_label->setWordWrap(true); edit_duplicate_label->setGeometry(15,186,sizeHint().width()-30,50); - edit_duplicate_label->setFont(normal_font); + edit_duplicate_label->setFont(subLabelFont()); edit_duplicate_label->hide(); edit_duplicate_list=new Q3ListView(this); edit_duplicate_list->setGeometry(10,234,sizeHint().width()-20,215); edit_duplicate_list->setItemMargin(5); edit_duplicate_list->setAllColumnsShowFocus(true); - edit_duplicate_list->addColumn(tr("CART")); + edit_duplicate_list->addColumn(tr("Cart")); edit_duplicate_list->setColumnAlignment(0,Qt::AlignCenter); - edit_duplicate_list->addColumn(tr("TITLE")); + edit_duplicate_list->addColumn(tr("Title")); edit_duplicate_list->setColumnAlignment(1,Qt::AlignLeft); edit_duplicate_list->hide(); edit_save_button=new QPushButton(this); edit_save_button-> setGeometry(sizeHint().width()-85,454,70,25); - edit_save_button->setFont(normal_font); + edit_save_button->setFont(buttonFont()); edit_save_button->setText(tr("&Save List")); connect(edit_save_button,SIGNAL(clicked()),this,SLOT(saveData())); edit_save_button->hide(); @@ -205,7 +188,7 @@ EditSettings::EditSettings(QWidget *parent) edit_ok_button=new QPushButton(this); edit_ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60, 80,50); - edit_ok_button->setFont(font); + edit_ok_button->setFont(buttonFont()); edit_ok_button->setText(tr("&OK")); connect(edit_ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -215,7 +198,7 @@ EditSettings::EditSettings(QWidget *parent) edit_cancel_button=new QPushButton(this); edit_cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, 80,50); - edit_cancel_button->setFont(font); + edit_cancel_button->setFont(buttonFont()); edit_cancel_button->setText(tr("&Cancel")); connect(edit_cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); diff --git a/rdadmin/edit_settings.h b/rdadmin/edit_settings.h index af2a2d60..ad530f13 100644 --- a/rdadmin/edit_settings.h +++ b/rdadmin/edit_settings.h @@ -2,7 +2,7 @@ // // Edit Rivendell System-wide Settings. // -// (C) Copyright 2009-2018 Fred Gleason +// (C) Copyright 2009-2019 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,22 +21,21 @@ #ifndef EDIT_SETTINGS_H #define EDIT_SETTINGS_H -#include +#include #include #include #include -#include -#include #include #include +#include +#include -#include - -#include #include +#include +#include -class EditSettings : public QDialog +class EditSettings : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_station.cpp b/rdadmin/edit_station.cpp index c3e99764..80532fd3 100644 --- a/rdadmin/edit_station.cpp +++ b/rdadmin/edit_station.cpp @@ -2,7 +2,7 @@ // // Edit a Rivendell Workstation Configuration // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,16 +18,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include -#include -#include -#include -#include -#include #include -#include -#include -#include #include #include @@ -37,26 +28,25 @@ #include #include -#include "view_adapters.h" #include "edit_audios.h" #include "edit_cartslots.h" #include "edit_decks.h" -#include "list_dropboxes.h" -#include "list_hostvars.h" #include "edit_jack.h" -#include "list_matrices.h" -#include "list_pypads.h" #include "edit_rdairplay.h" - #include "edit_rdlibrary.h" #include "edit_rdlogedit.h" #include "edit_rdpanel.h" #include "edit_station.h" #include "edit_ttys.h" #include "globals.h" +#include "list_dropboxes.h" +#include "list_hostvars.h" +#include "list_matrices.h" +#include "list_pypads.h" +#include "view_adapters.h" EditStation::EditStation(QString sname,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -65,14 +55,6 @@ EditStation::EditStation(QString sname,QWidget *parent) int item=0; char temp[256]; - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont small_font=QFont("Helvetica",10,QFont::Normal); - small_font.setPixelSize(10); - // // Fix the Window Size // @@ -101,7 +83,7 @@ EditStation::EditStation(QString sname,QWidget *parent) station_name_edit=new QLineEdit(this); station_name_edit->setReadOnly(true); station_name_label=new QLabel(station_name_edit,tr("Ho&st Name:"),this); - station_name_label->setFont(font); + station_name_label->setFont(labelFont()); station_name_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -111,7 +93,7 @@ EditStation::EditStation(QString sname,QWidget *parent) station_short_name_edit->setMaxLength(64); station_short_name_label= new QLabel(station_short_name_edit,tr("Short Name:"),this); - station_short_name_label->setFont(font); + station_short_name_label->setFont(labelFont()); station_short_name_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -122,7 +104,7 @@ EditStation::EditStation(QString sname,QWidget *parent) station_description_edit->setValidator(validator); station_description_label= new QLabel(station_description_edit,tr("&Description:"),this); - station_description_label->setFont(font); + station_description_label->setFont(labelFont()); station_description_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -132,7 +114,7 @@ EditStation::EditStation(QString sname,QWidget *parent) station_default_name_edit->setEditable(false); station_default_name_label= new QLabel(station_default_name_edit,tr("Default &User:"),this); - station_default_name_label->setFont(font); + station_default_name_label->setFont(labelFont()); station_default_name_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -143,7 +125,7 @@ EditStation::EditStation(QString sname,QWidget *parent) station_address_edit->setValidator(validator); station_address_label= new QLabel(station_address_edit,tr("&IP Address:"),this); - station_address_label->setFont(font); + station_address_label->setFont(labelFont()); station_address_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -153,7 +135,7 @@ EditStation::EditStation(QString sname,QWidget *parent) station_audio_editor_edit->setMaxLength(191); station_audio_editor_label= new QLabel(station_audio_editor_edit,tr("Audio Editor")+":",this); - station_audio_editor_label->setFont(font); + station_audio_editor_label->setFont(labelFont()); station_audio_editor_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -163,7 +145,7 @@ EditStation::EditStation(QString sname,QWidget *parent) station_report_editor_edit->setMaxLength(191); station_report_editor_label= new QLabel(station_report_editor_edit,tr("Report Editor")+":",this); - station_report_editor_label->setFont(font); + station_report_editor_label->setFont(labelFont()); station_report_editor_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -174,7 +156,7 @@ EditStation::EditStation(QString sname,QWidget *parent) station_timeoffset_box->setSuffix(tr(" mS")); station_timeoffset_label= new QLabel(station_timeoffset_box,tr("&Time Offset:"),this); - station_timeoffset_label->setFont(font); + station_timeoffset_label->setFont(labelFont()); station_timeoffset_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -185,11 +167,11 @@ EditStation::EditStation(QString sname,QWidget *parent) station_startup_cart_edit->setValidator(macro_validator); station_startup_cart_label= new QLabel(station_startup_cart_edit,tr("&Startup Cart:"),this); - station_startup_cart_label->setFont(font); + station_startup_cart_label->setFont(labelFont()); station_startup_cart_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); station_startup_select_button=new QPushButton(tr("Select"),this); - station_startup_select_button->setFont(small_font); + station_startup_select_button->setFont(subButtonFont()); connect(station_startup_select_button,SIGNAL(clicked()), this,SLOT(selectClicked())); @@ -199,17 +181,18 @@ EditStation::EditStation(QString sname,QWidget *parent) station_cue_sel=new RDCardSelector(this); station_cue_sel_label= new QLabel(station_cue_sel,tr("Cue &Output:"),this); - station_cue_sel_label->setFont(font); + station_cue_sel_label->setFont(labelFont()); station_cue_sel_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); station_start_cart_edit=new QLineEdit(this); station_start_cart_edit->setValidator(macro_validator); station_start_cart_label= new QLabel(station_start_cart_edit,tr("Start Cart")+":",this); + station_start_cart_label->setFont(subLabelFont()); station_start_cart_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); station_start_cart_button=new QPushButton(tr("Select"),this); - station_start_cart_button->setFont(small_font); + station_start_cart_button->setFont(subButtonFont()); connect(station_start_cart_button,SIGNAL(clicked()), this,SLOT(startCartClickedData())); @@ -217,10 +200,11 @@ EditStation::EditStation(QString sname,QWidget *parent) station_stop_cart_edit->setValidator(macro_validator); station_stop_cart_label= new QLabel(station_stop_cart_edit,tr("Stop Cart")+":",this); + station_stop_cart_label->setFont(subLabelFont()); station_stop_cart_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); station_stop_cart_button=new QPushButton(tr("Select"),this); - station_stop_cart_button->setFont(small_font); + station_stop_cart_button->setFont(subButtonFont()); connect(station_stop_cart_button,SIGNAL(clicked()), this,SLOT(stopCartClickedData())); @@ -230,7 +214,7 @@ EditStation::EditStation(QString sname,QWidget *parent) station_heartbeat_box=new QCheckBox(this); station_heartbeat_label= new QLabel(station_heartbeat_box,tr("Enable Heartbeat"),this); - station_heartbeat_label->setFont(font); + station_heartbeat_label->setFont(labelFont()); station_heartbeat_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); connect(station_heartbeat_box,SIGNAL(toggled(bool)), this,SLOT(heartbeatToggledData(bool))); @@ -241,7 +225,7 @@ EditStation::EditStation(QString sname,QWidget *parent) station_filter_box=new QCheckBox(this); station_filter_label= new QLabel(station_filter_box,tr("Use Realtime Filtering"),this); - station_filter_label->setFont(font); + station_filter_label->setFont(labelFont()); station_filter_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // @@ -250,10 +234,10 @@ EditStation::EditStation(QString sname,QWidget *parent) station_hbcart_edit=new QLineEdit(this); station_hbcart_edit->setValidator(macro_validator); station_hbcart_label=new QLabel(station_hbcart_edit,tr("Cart:"),this); - station_hbcart_label->setFont(font); + station_hbcart_label->setFont(labelFont()); station_hbcart_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); station_hbcart_button=new QPushButton(this); - station_hbcart_button->setFont(font); + station_hbcart_button->setFont(subButtonFont()); station_hbcart_button->setText(tr("Select")); connect(station_hbcart_button,SIGNAL(clicked()), this,SLOT(heartbeatClickedData())); @@ -265,10 +249,10 @@ EditStation::EditStation(QString sname,QWidget *parent) station_hbinterval_spin->setRange(1,300); station_hbinterval_label= new QLabel(station_hbinterval_spin,tr("Interval:"),this); - station_hbinterval_label->setFont(font); + station_hbinterval_label->setFont(labelFont()); station_hbinterval_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); station_hbinterval_unit=new QLabel(tr("secs"),this); - station_hbinterval_unit->setFont(font); + station_hbinterval_unit->setFont(labelFont()); station_hbinterval_unit->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // @@ -277,15 +261,16 @@ EditStation::EditStation(QString sname,QWidget *parent) station_maint_box=new QCheckBox(this); station_maint_label= new QLabel(station_maint_box,tr("Include in System Maintenance Pool"),this); - station_maint_label->setFont(font); + station_maint_label->setFont(labelFont()); station_maint_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // // Enable Drag & Drop Checkbox // station_dragdrop_box=new QCheckBox(this); - station_dragdrop_label=new QLabel(station_dragdrop_box,tr("Enable Drag && Drop"),this); - station_dragdrop_label->setFont(font); + station_dragdrop_label= + new QLabel(station_dragdrop_box,tr("Enable Drag && Drop"),this); + station_dragdrop_label->setFont(labelFont()); station_dragdrop_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // @@ -295,7 +280,7 @@ EditStation::EditStation(QString sname,QWidget *parent) station_panel_enforce_label= new QLabel(station_panel_enforce_box, tr("Allow Drops on Panels not in Setup Mode"),this); - station_panel_enforce_label->setFont(font); + station_panel_enforce_label->setFont(labelFont()); station_panel_enforce_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); connect(station_dragdrop_box,SIGNAL(toggled(bool)), station_panel_enforce_label,SLOT(setEnabled(bool))); @@ -306,7 +291,7 @@ EditStation::EditStation(QString sname,QWidget *parent) // System Services Section // station_systemservices_groupbox=new QGroupBox(tr("System Services"),this); - station_systemservices_groupbox->setFont(font); + station_systemservices_groupbox->setFont(labelFont()); // // HTTP Service Host @@ -315,7 +300,7 @@ EditStation::EditStation(QString sname,QWidget *parent) station_http_station_box->setEditable(false); station_http_station_label= new QLabel(station_http_station_box,tr("HTTP Xport:"),this); - station_http_station_label->setFont(font); + station_http_station_label->setFont(labelFont()); station_http_station_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -327,14 +312,14 @@ EditStation::EditStation(QString sname,QWidget *parent) this,SLOT(caeStationActivatedData(const QString &))); station_cae_station_label= new QLabel(station_cae_station_box,tr("Core Audio Engine:"),this); - station_cae_station_label->setFont(font); + station_cae_station_label->setFont(labelFont()); station_cae_station_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // RDLibrary Configuration Button // station_rdlibrary_button=new QPushButton(this); - station_rdlibrary_button->setFont(font); + station_rdlibrary_button->setFont(buttonFont()); station_rdlibrary_button->setText(tr("RD&Library")); connect(station_rdlibrary_button,SIGNAL(clicked()),this,SLOT(editLibraryData())); @@ -342,7 +327,7 @@ EditStation::EditStation(QString sname,QWidget *parent) // RDCatch Configuration Button // station_rdcatch_button=new QPushButton(this); - station_rdcatch_button->setFont(font); + station_rdcatch_button->setFont(buttonFont()); station_rdcatch_button->setText(tr("RDCatch")); connect(station_rdcatch_button,SIGNAL(clicked()),this,SLOT(editDeckData())); @@ -350,7 +335,7 @@ EditStation::EditStation(QString sname,QWidget *parent) // RDAirPlay Configuration Button // station_rdairplay_button=new QPushButton(this); - station_rdairplay_button->setFont(font); + station_rdairplay_button->setFont(buttonFont()); station_rdairplay_button->setText(tr("RDAirPlay")); connect(station_rdairplay_button,SIGNAL(clicked()), this,SLOT(editAirPlayData())); @@ -359,7 +344,7 @@ EditStation::EditStation(QString sname,QWidget *parent) // RDPanel Configuration Button // station_rdpanel_button=new QPushButton(this); - station_rdpanel_button->setFont(font); + station_rdpanel_button->setFont(buttonFont()); station_rdpanel_button->setText(tr("RDPanel")); connect(station_rdpanel_button,SIGNAL(clicked()),this,SLOT(editPanelData())); @@ -367,7 +352,7 @@ EditStation::EditStation(QString sname,QWidget *parent) // RDLogEdit Configuration Button // station_rdlogedit_button=new QPushButton(this); - station_rdlogedit_button->setFont(font); + station_rdlogedit_button->setFont(buttonFont()); station_rdlogedit_button->setText(tr("RDLogEdit")); connect(station_rdlogedit_button,SIGNAL(clicked()), this,SLOT(editLogEditData())); @@ -376,7 +361,7 @@ EditStation::EditStation(QString sname,QWidget *parent) // RDCartSlots Configuration Button // station_rdcartslots_button=new QPushButton(this); - station_rdcartslots_button->setFont(font); + station_rdcartslots_button->setFont(buttonFont()); station_rdcartslots_button->setText(tr("RDCart\nSlots")); connect(station_rdcartslots_button,SIGNAL(clicked()), this,SLOT(editCartSlotsData())); @@ -385,7 +370,7 @@ EditStation::EditStation(QString sname,QWidget *parent) // Dropboxes Configuration Button // station_dropboxes_button=new QPushButton(this); - station_dropboxes_button->setFont(font); + station_dropboxes_button->setFont(buttonFont()); station_dropboxes_button->setText(tr("Dropboxes")); connect(station_dropboxes_button,SIGNAL(clicked()), this,SLOT(editDropboxesData())); @@ -394,7 +379,7 @@ EditStation::EditStation(QString sname,QWidget *parent) // Switcher Configuration Button // station_switchers_button=new QPushButton(this); - station_switchers_button->setFont(font); + station_switchers_button->setFont(buttonFont()); station_switchers_button->setText(tr("Switchers\nGPIO")); connect(station_switchers_button,SIGNAL(clicked()), this,SLOT(editSwitcherData())); @@ -403,7 +388,7 @@ EditStation::EditStation(QString sname,QWidget *parent) // Host Variables Configuration Button // station_hostvars_button=new QPushButton(this); - station_hostvars_button->setFont(font); + station_hostvars_button->setFont(buttonFont()); station_hostvars_button->setText(tr("Host\nVariables")); connect(station_hostvars_button,SIGNAL(clicked()), this,SLOT(editHostvarsData())); @@ -412,7 +397,7 @@ EditStation::EditStation(QString sname,QWidget *parent) // Audio Ports Configuration Button // station_audioports_button=new QPushButton(this); - station_audioports_button->setFont(font); + station_audioports_button->setFont(buttonFont()); station_audioports_button->setText(tr("ASI Audio\nPorts")); connect(station_audioports_button,SIGNAL(clicked()), this,SLOT(editAudioData())); @@ -421,7 +406,7 @@ EditStation::EditStation(QString sname,QWidget *parent) // TTY Configuration Button // station_ttys_button=new QPushButton(this); - station_ttys_button->setFont(font); + station_ttys_button->setFont(buttonFont()); station_ttys_button->setText(tr("Serial\nPorts")); connect(station_ttys_button,SIGNAL(clicked()),this,SLOT(editTtyData())); @@ -429,7 +414,7 @@ EditStation::EditStation(QString sname,QWidget *parent) // View Adapters (Audio Resources) Configuration Button // station_adapters_button=new QPushButton(this); - station_adapters_button->setFont(font); + station_adapters_button->setFont(buttonFont()); station_adapters_button->setText(tr("Audio\nResources")); connect(station_adapters_button,SIGNAL(clicked()), this,SLOT(viewAdaptersData())); @@ -438,7 +423,7 @@ EditStation::EditStation(QString sname,QWidget *parent) // JACK Settings Button // station_jack_button=new QPushButton(this); - station_jack_button->setFont(font); + station_jack_button->setFont(buttonFont()); station_jack_button->setText(tr("JACK\nSettings")); connect(station_jack_button,SIGNAL(clicked()),this,SLOT(jackSettingsData())); @@ -446,7 +431,7 @@ EditStation::EditStation(QString sname,QWidget *parent) // PyPAD Instances Button // station_pypad_button=new QPushButton(this); - station_pypad_button->setFont(font); + station_pypad_button->setFont(buttonFont()); station_pypad_button->setText(tr("PyPAD\nInstances")); connect(station_pypad_button,SIGNAL(clicked()), this,SLOT(pypadInstancesData())); @@ -456,7 +441,7 @@ EditStation::EditStation(QString sname,QWidget *parent) // station_ok_button=new QPushButton(this); station_ok_button->setDefault(true); - station_ok_button->setFont(font); + station_ok_button->setFont(buttonFont()); station_ok_button->setText(tr("&OK")); connect(station_ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -464,7 +449,7 @@ EditStation::EditStation(QString sname,QWidget *parent) // Cancel Button // station_cancel_button=new QPushButton(this); - station_cancel_button->setFont(font); + station_cancel_button->setFont(buttonFont()); station_cancel_button->setText(tr("&Cancel")); connect(station_cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); @@ -590,7 +575,8 @@ EditStation::~EditStation() QSize EditStation::sizeHint() const { - return QSize(395,744); + return QSize(415,744); + // return QSize(395,744); } @@ -900,13 +886,13 @@ void EditStation::stopCartClickedData() void EditStation::resizeEvent(QResizeEvent *e) { - station_name_edit->setGeometry(115,11,size().width()-125,19); + station_name_edit->setGeometry(115,11,size().width()-120,19); station_name_label->setGeometry(10,11,100,19); - station_short_name_edit->setGeometry(115,32,size().width()-125,19); + station_short_name_edit->setGeometry(115,32,size().width()-120,19); station_short_name_label->setGeometry(10,32,100,19); - station_description_edit->setGeometry(115,53,size().width()-125,19); + station_description_edit->setGeometry(115,53,size().width()-120,19); station_description_label->setGeometry(10,53,100,19); station_default_name_edit->setGeometry(115,74,160,19); @@ -915,10 +901,10 @@ void EditStation::resizeEvent(QResizeEvent *e) station_address_edit->setGeometry(115,95,120,19); station_address_label->setGeometry(10,95,100,19); - station_audio_editor_edit->setGeometry(115,116,size().width()-130,19); + station_audio_editor_edit->setGeometry(115,116,size().width()-120,19); station_audio_editor_label->setGeometry(10,116,100,19); - station_report_editor_edit->setGeometry(115,137,size().width()-130,19); + station_report_editor_edit->setGeometry(115,137,size().width()-120,19); station_report_editor_label->setGeometry(10,137,100,19); station_timeoffset_box->setGeometry(115,158,80,19); @@ -926,24 +912,24 @@ void EditStation::resizeEvent(QResizeEvent *e) station_startup_cart_edit->setGeometry(115,179,60,19); station_startup_cart_label->setGeometry(10,179,100,19); - station_startup_select_button->setGeometry(180,179,50,22); + station_startup_select_button->setGeometry(180,178,50,22); station_cue_sel->setGeometry(90,200,110,117); station_cue_sel_label->setGeometry(10,200,100,19); - station_start_cart_edit->setGeometry(270,200,60,20); - station_start_cart_label->setGeometry(205,200,60,20); - station_start_cart_button->setGeometry(335,199,50,22); + station_start_cart_edit->setGeometry(290,200,60,20); + station_start_cart_label->setGeometry(205,200,80,20); + station_start_cart_button->setGeometry(355,199,50,22); - station_stop_cart_edit->setGeometry(270,222,60,20); - station_stop_cart_label->setGeometry(205,222,60,20); - station_stop_cart_button->setGeometry(335,221,50,22); + station_stop_cart_edit->setGeometry(290,222,60,20); + station_stop_cart_label->setGeometry(205,222,80,20); + station_stop_cart_button->setGeometry(355,221,50,22); station_heartbeat_box->setGeometry(10,247,15,15); station_heartbeat_label->setGeometry(30,245,150,20); station_filter_box->setGeometry(210,247,15,15); - station_filter_label->setGeometry(230,247,150,20); + station_filter_label->setGeometry(230,245,150,20); station_hbcart_edit->setGeometry(65,269,60,19); station_hbcart_label->setGeometry(10,269,50,19); @@ -970,33 +956,33 @@ void EditStation::resizeEvent(QResizeEvent *e) station_cae_station_box->setGeometry(145,396,size().width()-165,19); station_cae_station_label->setGeometry(11,396,130,19); - station_rdlibrary_button->setGeometry(20,434,80,50); + station_rdlibrary_button->setGeometry(30,434,80,50); - station_rdcatch_button->setGeometry(110,434,80,50); + station_rdcatch_button->setGeometry(120,434,80,50); - station_rdairplay_button->setGeometry(200,434,80,50); + station_rdairplay_button->setGeometry(210,434,80,50); - station_rdpanel_button->setGeometry(290,434,80,50); + station_rdpanel_button->setGeometry(300,434,80,50); - station_rdlogedit_button->setGeometry(20,494,80,50); + station_rdlogedit_button->setGeometry(30,494,80,50); - station_rdcartslots_button->setGeometry(110,494,80,50); + station_rdcartslots_button->setGeometry(120,494,80,50); - station_dropboxes_button->setGeometry(200,494,80,50); + station_dropboxes_button->setGeometry(210,494,80,50); - station_switchers_button->setGeometry(290,494,80,50); + station_switchers_button->setGeometry(300,494,80,50); - station_hostvars_button->setGeometry(20,554,80,50); + station_hostvars_button->setGeometry(30,554,80,50); - station_audioports_button->setGeometry(110,554,80,50); + station_audioports_button->setGeometry(120,554,80,50); - station_ttys_button->setGeometry(200,554,80,50); + station_ttys_button->setGeometry(210,554,80,50); - station_adapters_button->setGeometry(290,554,80,50); + station_adapters_button->setGeometry(300,554,80,50); - station_jack_button->setGeometry(110,614,80,50); + station_jack_button->setGeometry(120,614,80,50); - station_pypad_button->setGeometry(200,614,80,50); + station_pypad_button->setGeometry(210,614,80,50); station_ok_button->setGeometry(size().width()-180,size().height()-60,80,50); station_cancel_button-> diff --git a/rdadmin/edit_station.h b/rdadmin/edit_station.h index 6162b775..8ab28f20 100644 --- a/rdadmin/edit_station.h +++ b/rdadmin/edit_station.h @@ -2,7 +2,7 @@ // // Edit a Rivendell Workstation // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,24 +21,21 @@ #ifndef EDIT_STATION_H #define EDIT_STATION_H -#include -#include -#include -#include +#include #include #include -#include -#include -#include -#include #include +#include +#include +#include -#include +#include +#include #include #include -#include +#include -class EditStation : public QDialog +class EditStation : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_svc.cpp b/rdadmin/edit_svc.cpp index 8ce8c305..082475fb 100644 --- a/rdadmin/edit_svc.cpp +++ b/rdadmin/edit_svc.cpp @@ -2,7 +2,7 @@ // // Edit a Rivendell Service // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ -34,7 +34,7 @@ #include "test_import.h" EditSvc::EditSvc(QString svc,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -55,14 +55,6 @@ EditSvc::EditSvc(QString svc,QWidget *parent) setWindowTitle("RDAdmin - "+tr("Edit Service")); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont section_font=QFont("Helvetica",14,QFont::Bold); - section_font.setPixelSize(14); - // // Text Validators // @@ -75,7 +67,7 @@ EditSvc::EditSvc(QString svc,QWidget *parent) // QLabel *label=new QLabel("General",this); label->setGeometry(10,10,120,24); - label->setFont(section_font); + label->setFont(sectionLabelFont()); label->setAlignment(Qt::AlignLeft); // @@ -177,7 +169,7 @@ EditSvc::EditSvc(QString svc,QWidget *parent) // QPushButton *button=new QPushButton(this); button->setGeometry(455,31,150,50); - button->setFont(font); + button->setFont(buttonFont()); button->setText(tr("Configure \n&Autofill Carts")); connect(button,SIGNAL(clicked()),this,SLOT(autofillData())); @@ -239,7 +231,7 @@ EditSvc::EditSvc(QString svc,QWidget *parent) // button=new QPushButton(this); button->setGeometry(625,31,150,50); - button->setFont(font); + button->setFont(buttonFont()); button->setText(tr("Enable &Hosts")); connect(button,SIGNAL(clicked()),this,SLOT(enableHostsData())); @@ -248,7 +240,7 @@ EditSvc::EditSvc(QString svc,QWidget *parent) // label=new QLabel(tr("Traffic Data Import"),this); label->setGeometry(10,213,160,24); - label->setFont(section_font); + label->setFont(sectionLabelFont()); label->setAlignment(Qt::AlignLeft); // @@ -277,31 +269,6 @@ EditSvc::EditSvc(QString svc,QWidget *parent) connect(svc_tfc_preimport_cmd_edit,SIGNAL(textChanged(const QString &)), this,SLOT(textChangedData(const QString &))); - /* - // - // Windows Traffic Import Path - // - svc_tfc_win_path_edit=new QLineEdit(this); - svc_tfc_win_path_edit->setGeometry(185,276,240,19); - svc_tfc_win_path_edit->setMaxLength(255); - label=new QLabel(svc_tfc_win_path_edit,tr("Windows Import Path:"),this); - label->setGeometry(10,276,170,19); - label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); - connect(svc_tfc_win_path_edit,SIGNAL(textChanged(const QString &)), - this,SLOT(textChangedData(const QString &))); - - // - // Linux Traffic Preimport Command - // - svc_tfc_win_preimport_cmd_edit=new QLineEdit(this); - svc_tfc_win_preimport_cmd_edit->setGeometry(185,297,240,19); - label=new QLabel(svc_tfc_win_preimport_cmd_edit, - tr("Windows Preimport Command:"),this); - label->setGeometry(10,297,170,19); - label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); - connect(svc_tfc_win_preimport_cmd_edit,SIGNAL(textChanged(const QString &)), - this,SLOT(textChangedData(const QString &))); - */ // // Note Cart // @@ -349,7 +316,7 @@ EditSvc::EditSvc(QString svc,QWidget *parent) // button=new QPushButton(this); button->setGeometry(360,339,60,40); - button->setFont(font); + button->setFont(buttonFont()); button->setText(tr("Test \n&Traffic")); connect(button,SIGNAL(clicked()),this,SLOT(trafficData())); @@ -358,7 +325,7 @@ EditSvc::EditSvc(QString svc,QWidget *parent) // label=new QLabel(tr("Music Data Import"),this); label->setGeometry(445,213,160,24); - label->setFont(section_font); + label->setFont(sectionLabelFont()); label->setAlignment(Qt::AlignLeft); // @@ -446,7 +413,7 @@ EditSvc::EditSvc(QString svc,QWidget *parent) // button=new QPushButton(this); button->setGeometry(795,360,60,40); - button->setFont(font); + button->setFont(buttonFont()); button->setText(tr("Test \n&Music")); connect(button,SIGNAL(clicked()),this,SLOT(musicData())); @@ -456,7 +423,7 @@ EditSvc::EditSvc(QString svc,QWidget *parent) button=new QPushButton(this); button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); button->setDefault(true); - button->setFont(font); + button->setFont(buttonFont()); button->setText(tr("&OK")); connect(button,SIGNAL(clicked()),this,SLOT(okData())); @@ -466,7 +433,7 @@ EditSvc::EditSvc(QString svc,QWidget *parent) button=new QPushButton(this); button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, 80,50); - button->setFont(font); + button->setFont(buttonFont()); button->setText(tr("&Cancel")); connect(button,SIGNAL(clicked()),this,SLOT(cancelData())); diff --git a/rdadmin/edit_svc.h b/rdadmin/edit_svc.h index 22bd9c1a..6194fd5b 100644 --- a/rdadmin/edit_svc.h +++ b/rdadmin/edit_svc.h @@ -2,7 +2,7 @@ // // Edit a Rivendell Service // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,18 +21,18 @@ #ifndef EDIT_SVC_H #define EDIT_SVC_H -#include -#include +#include +#include #include #include #include -#include -#include +#include #include -#include -class EditSvc : public QDialog +#include "importfields.h" + +class EditSvc : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_svc_perms.cpp b/rdadmin/edit_svc_perms.cpp index bd733b58..8c02ee67 100644 --- a/rdadmin/edit_svc_perms.cpp +++ b/rdadmin/edit_svc_perms.cpp @@ -2,7 +2,7 @@ // // Edit Rivendell Service Permissions // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,7 +24,7 @@ #include "edit_svc_perms.h" EditSvcPerms::EditSvcPerms(RDSvc *svc,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -43,12 +43,6 @@ EditSvcPerms::EditSvcPerms(RDSvc *svc,QWidget *parent) setWindowTitle("RDAdmin - "+tr("Service: ")+svc_svc->name()); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - // // Services Selector // @@ -63,7 +57,7 @@ EditSvcPerms::EditSvcPerms(RDSvc *svc,QWidget *parent) QPushButton *ok_button=new QPushButton(this); ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); ok_button->setDefault(true); - ok_button->setFont(font); + ok_button->setFont(buttonFont()); ok_button->setText(tr("&OK")); connect(ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -73,7 +67,7 @@ EditSvcPerms::EditSvcPerms(RDSvc *svc,QWidget *parent) QPushButton *cancel_button=new QPushButton(this); cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, 80,50); - cancel_button->setFont(font); + cancel_button->setFont(buttonFont()); cancel_button->setText(tr("&Cancel")); connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); diff --git a/rdadmin/edit_svc_perms.h b/rdadmin/edit_svc_perms.h index 71bc113e..626836bc 100644 --- a/rdadmin/edit_svc_perms.h +++ b/rdadmin/edit_svc_perms.h @@ -2,7 +2,7 @@ // // Edit Rivendell Service Permissions // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,13 +21,12 @@ #ifndef EDIT_SVC_PERMS_H #define EDIT_SVC_PERMS_H -#include - #include +#include #include #include -class EditSvcPerms : public QDialog +class EditSvcPerms : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_ttys.cpp b/rdadmin/edit_ttys.cpp index 0824897c..72bb8b61 100644 --- a/rdadmin/edit_ttys.cpp +++ b/rdadmin/edit_ttys.cpp @@ -2,7 +2,7 @@ // // Edit a Rivendell TTY Configuration // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,18 +18,8 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include -#include -#include -#include -#include -#include -#include -#include - #include #include -#include #include #include @@ -37,7 +27,7 @@ #include "globals.h" EditTtys::EditTtys(QString station,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -55,12 +45,6 @@ EditTtys::EditTtys(QString station,QWidget *parent) } setWindowTitle("RDAdmin- "+tr("Edit Serial Ports")); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - // // Text Validator // @@ -74,9 +58,9 @@ EditTtys::EditTtys(QString station,QWidget *parent) edit_port_box->setInsertionPolicy(QComboBox::NoInsertion); connect(edit_port_box,SIGNAL(activated(int)),this,SLOT(idSelectedData())); QLabel *label=new QLabel(edit_port_box,tr("Port ID:"),this); - label->setGeometry(10,14,60,22); - label->setFont(font); - label->setAlignment(Qt::AlignRight); + label->setGeometry(10,10,60,24); + label->setFont(labelFont()); + label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Enable Button @@ -86,9 +70,9 @@ EditTtys::EditTtys(QString station,QWidget *parent) connect(edit_enable_button,SIGNAL(stateChanged(int)), this,SLOT(enableButtonData(int))); label=new QLabel(edit_enable_button,tr("Enabled"),this); - label->setGeometry(200,14,60,22); - label->setFont(font); - label->setAlignment(Qt::AlignRight); + label->setGeometry(200,10,60,22); + label->setFont(labelFont()); + label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // The TTY Port @@ -97,9 +81,9 @@ EditTtys::EditTtys(QString station,QWidget *parent) edit_port_edit->setGeometry(145,54,100,20); edit_port_edit->setValidator(validator); edit_port_label=new QLabel(edit_port_edit,tr("TTY Device:"),this); - edit_port_label->setGeometry(20,56,120,22); - edit_port_label->setFont(font); - edit_port_label->setAlignment(Qt::AlignRight); + edit_port_label->setGeometry(20,54,120,20); + edit_port_label->setFont(labelFont()); + edit_port_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Baudrate Selector @@ -108,9 +92,9 @@ EditTtys::EditTtys(QString station,QWidget *parent) edit_baudrate_box->setGeometry(145,80,90,24); edit_baudrate_box->setInsertionPolicy(QComboBox::NoInsertion); edit_baudrate_label=new QLabel(edit_baudrate_box,tr("Baud Rate:"),this); - edit_baudrate_label->setGeometry(20,84,120,22); - edit_baudrate_label->setFont(font); - edit_baudrate_label->setAlignment(Qt::AlignRight); + edit_baudrate_label->setGeometry(20,80,120,24); + edit_baudrate_label->setFont(labelFont()); + edit_baudrate_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Parity Selector @@ -119,9 +103,9 @@ EditTtys::EditTtys(QString station,QWidget *parent) edit_parity_box->setGeometry(145,108,90,24); edit_parity_box->setInsertionPolicy(QComboBox::NoInsertion); edit_parity_label=new QLabel(edit_parity_box,tr("Parity:"),this); - edit_parity_label->setGeometry(20,110,120,22); - edit_parity_label->setFont(font); - edit_parity_label->setAlignment(Qt::AlignRight); + edit_parity_label->setGeometry(20,108,120,24); + edit_parity_label->setFont(labelFont()); + edit_parity_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Data Bits Selector @@ -130,9 +114,9 @@ EditTtys::EditTtys(QString station,QWidget *parent) edit_databits_box->setGeometry(145,136,60,24); edit_databits_box->setInsertionPolicy(QComboBox::NoInsertion); edit_databits_label=new QLabel(edit_databits_box,tr("Data Bits:"),this); - edit_databits_label->setGeometry(20,138,120,22); - edit_databits_label->setFont(font); - edit_databits_label->setAlignment(Qt::AlignRight); + edit_databits_label->setGeometry(20,136,120,24); + edit_databits_label->setFont(labelFont()); + edit_databits_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Stop Bits Selector @@ -141,9 +125,9 @@ EditTtys::EditTtys(QString station,QWidget *parent) edit_stopbits_box->setGeometry(145,164,60,24); edit_stopbits_box->setInsertionPolicy(QComboBox::NoInsertion); edit_stopbits_label=new QLabel(edit_stopbits_box,tr("Stop Bits:"),this); - edit_stopbits_label->setGeometry(20,166,120,22); - edit_stopbits_label->setFont(font); - edit_stopbits_label->setAlignment(Qt::AlignRight); + edit_stopbits_label->setGeometry(20,164,120,24); + edit_stopbits_label->setFont(labelFont()); + edit_stopbits_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Termination Character Selector @@ -153,16 +137,16 @@ EditTtys::EditTtys(QString station,QWidget *parent) edit_termination_box->setInsertionPolicy(QComboBox::NoInsertion); edit_termination_label= new QLabel(edit_termination_box,tr("Terminator:"),this); - edit_termination_label->setGeometry(20,194,120,22); - edit_termination_label->setFont(font); - edit_termination_label->setAlignment(Qt::AlignRight); + edit_termination_label->setGeometry(20,192,120,24); + edit_termination_label->setFont(labelFont()); + edit_termination_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Close Button // QPushButton *close_button=new QPushButton(this); close_button->setGeometry(210,230,80,50); - close_button->setFont(font); + close_button->setFont(buttonFont()); close_button->setText(tr("&Close")); connect(close_button,SIGNAL(clicked()),this,SLOT(closeData())); diff --git a/rdadmin/edit_ttys.h b/rdadmin/edit_ttys.h index e104f0b7..83c475b8 100644 --- a/rdadmin/edit_ttys.h +++ b/rdadmin/edit_ttys.h @@ -2,7 +2,7 @@ // // Edit a Rivendell TTY Configuration // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,18 +21,17 @@ #ifndef EDIT_TTYS_H #define EDIT_TTYS_H -#include -#include #include #include #include #include #include -#include #include +#include +#include -class EditTtys : public QDialog +class EditTtys : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_user.cpp b/rdadmin/edit_user.cpp index f97b42cb..b56f316d 100644 --- a/rdadmin/edit_user.cpp +++ b/rdadmin/edit_user.cpp @@ -2,7 +2,7 @@ // // Edit a Rivendell User // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,18 +18,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include #include #include @@ -42,29 +30,19 @@ #include "globals.h" EditUser::EditUser(const QString &user,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); + setMinimumSize(sizeHint()); + setMaximumSize(sizeHint()); setWindowTitle("RDAdmin - "+tr("User: ")+user); user_user=new RDUser(user); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont small_font=QFont("Helvetica",10,QFont::Normal); - small_font.setPixelSize(10); - // // Text Validator // @@ -74,50 +52,50 @@ EditUser::EditUser(const QString &user,QWidget *parent) // User Name // user_name_edit=new QLineEdit(this); - user_name_edit->setGeometry(120,11,sizeHint().width()-130,19); + user_name_edit->setGeometry(130,11,sizeHint().width()-140,19); user_name_edit->setMaxLength(255); user_name_edit->setValidator(validator); QLabel *user_name_label=new QLabel(user_name_edit,tr("&User Name:"),this); - user_name_label->setGeometry(5,11,110,19); - user_name_label->setFont(font); + user_name_label->setGeometry(5,11,120,19); + user_name_label->setFont(labelFont()); user_name_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // Full Name // user_full_name_edit=new QLineEdit(this); - user_full_name_edit->setGeometry(120,32,sizeHint().width()-130,19); + user_full_name_edit->setGeometry(130,32,sizeHint().width()-140,19); user_full_name_edit->setMaxLength(255); user_full_name_edit->setValidator(validator); QLabel *user_full_name_label= new QLabel(user_full_name_edit,tr("&Full Name:"),this); - user_full_name_label->setGeometry(10,32,105,19); - user_full_name_label->setFont(font); + user_full_name_label->setGeometry(10,32,115,19); + user_full_name_label->setFont(labelFont()); user_full_name_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // User Description // user_description_edit=new QLineEdit(this); - user_description_edit->setGeometry(120,53,sizeHint().width()-130,19); + user_description_edit->setGeometry(130,53,sizeHint().width()-140,19); user_description_edit->setMaxLength(255); user_description_edit->setValidator(validator); QLabel *user_description_label= new QLabel(user_description_edit,tr("&Description:"),this); - user_description_label->setGeometry(5,53,110,19); - user_description_label->setFont(font); + user_description_label->setGeometry(5,53,120,19); + user_description_label->setFont(labelFont()); user_description_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // // User Phone // user_phone_edit=new QLineEdit(this); - user_phone_edit->setGeometry(120,75,sizeHint().width()-130,19); + user_phone_edit->setGeometry(130,75,sizeHint().width()-140,19); user_phone_edit->setMaxLength(20); user_phone_edit->setValidator(validator); QLabel *user_phone_label=new QLabel(user_phone_edit,tr("&Phone:"),this); - user_phone_label->setGeometry(10,75,105,19); - user_phone_label->setFont(font); + user_phone_label->setGeometry(10,75,115,19); + user_phone_label->setFont(labelFont()); user_phone_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -129,20 +107,20 @@ EditUser::EditUser(const QString &user,QWidget *parent) this,SLOT(localAuthToggledData(bool))); user_localauth_label=new QLabel(user_localauth_check, tr("Authenticate This User Locally"),this); - user_localauth_label->setGeometry(40,97,180,19); - user_localauth_label->setFont(font); + user_localauth_label->setGeometry(40,95,200,19); + user_localauth_label->setFont(labelFont()); user_localauth_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); // // PAM Service // user_pamservice_edit=new QLineEdit(this); - user_pamservice_edit->setGeometry(120,119,150,19); + user_pamservice_edit->setGeometry(130,119,140,19); user_pamservice_edit->setMaxLength(32); user_pamservice_label= new QLabel(user_pamservice_edit,tr("PAM Service")+":",this); - user_pamservice_label->setGeometry(10,119,105,19); - user_pamservice_label->setFont(font); + user_pamservice_label->setGeometry(10,119,115,19); + user_pamservice_label->setFont(labelFont()); user_pamservice_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -150,7 +128,7 @@ EditUser::EditUser(const QString &user,QWidget *parent) // user_password_button=new QPushButton(this); user_password_button->setGeometry(sizeHint().width()-90,97,80,50); - user_password_button->setFont(font); + user_password_button->setFont(buttonFont()); user_password_button->setText(tr("Change\n&Password")); connect(user_password_button,SIGNAL(clicked()),this,SLOT(passwordData())); @@ -158,32 +136,21 @@ EditUser::EditUser(const QString &user,QWidget *parent) // WebAPI Authorization Timeout // user_webapi_auth_spin=new QSpinBox(this); - user_webapi_auth_spin->setGeometry(120,141,80,19); + user_webapi_auth_spin->setGeometry(130,141,80,19); user_webapi_auth_spin->setRange(0,86400); user_webapi_auth_spin->setSpecialValueText(tr("Disabled")); QLabel *user_webapi_auth_label= new QLabel(user_webapi_auth_spin,tr("WebAPI Timeout:"),this); - user_webapi_auth_label->setGeometry(10,141,105,19); - user_webapi_auth_label->setFont(font); + user_webapi_auth_label->setGeometry(10,141,115,19); + user_webapi_auth_label->setFont(labelFont()); user_webapi_auth_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); - /* - // - // Enable Web Login - // - user_web_box=new QCheckBox(this); - user_web_box->setGeometry(20,162,15,15); - user_web_label=new QLabel(user_web_box,tr("Allow RDCastManager Web Logins"),this); - user_web_label->setGeometry(40,162,sizeHint().width()-50,19); - user_web_label->setFont(font); - user_web_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); - */ // // Administrative Group Priviledges // user_admin_group=new Q3ButtonGroup(tr("Administrative Rights"),this); user_admin_group->setGeometry(10,170,355,45); - user_admin_group->setFont(font); + user_admin_group->setFont(labelFont()); user_admin_config_button=new QCheckBox(user_admin_group); user_admin_config_button->setGeometry(10,21,15,15); @@ -194,7 +161,7 @@ EditUser::EditUser(const QString &user,QWidget *parent) user_admin_group); user_admin_config_label->setGeometry(192,21,150,19); user_admin_config_label->setGeometry(30,21,150,19); - user_admin_config_label->setFont(small_font); + user_admin_config_label->setFont(subLabelFont()); user_admin_config_label->setAlignment(Qt::AlignLeft); // @@ -202,14 +169,14 @@ EditUser::EditUser(const QString &user,QWidget *parent) // user_prod_group=new Q3ButtonGroup(tr("Production Rights"),this); user_prod_group->setGeometry(10,225,355,106); - user_prod_group->setFont(font); + user_prod_group->setFont(labelFont()); user_create_carts_button=new QCheckBox(user_prod_group); user_create_carts_button->setGeometry(10,21,15,15); user_create_carts_label= new QLabel(user_create_carts_button,tr("&Create Carts"),user_prod_group); user_create_carts_label->setGeometry(30,21,150,19); - user_create_carts_label->setFont(small_font); + user_create_carts_label->setFont(subLabelFont()); user_create_carts_label->setAlignment(Qt::AlignLeft); user_delete_carts_button=new QCheckBox(user_prod_group); @@ -217,7 +184,7 @@ EditUser::EditUser(const QString &user,QWidget *parent) user_delete_carts_label= new QLabel(user_delete_carts_button,tr("&Delete Carts"),user_prod_group); user_delete_carts_label->setGeometry(192,21,150,19); - user_delete_carts_label->setFont(small_font); + user_delete_carts_label->setFont(subLabelFont()); user_delete_carts_label->setAlignment(Qt::AlignLeft); user_modify_carts_button=new QCheckBox(user_prod_group); @@ -225,7 +192,7 @@ EditUser::EditUser(const QString &user,QWidget *parent) user_modify_carts_label= new QLabel(user_modify_carts_button,tr("&Modify Carts"),user_prod_group); user_modify_carts_label->setGeometry(30,41,150,19); - user_modify_carts_label->setFont(small_font); + user_modify_carts_label->setFont(subLabelFont()); user_modify_carts_label->setAlignment(Qt::AlignLeft); user_edit_audio_button=new QCheckBox(user_prod_group); @@ -233,7 +200,7 @@ EditUser::EditUser(const QString &user,QWidget *parent) user_edit_audio_label= new QLabel(user_edit_audio_button,tr("&Edit Audio"),user_prod_group); user_edit_audio_label->setGeometry(30,62,150,19); - user_edit_audio_label->setFont(small_font); + user_edit_audio_label->setFont(subLabelFont()); user_edit_audio_label->setAlignment(Qt::AlignLeft); user_webget_login_button=new QCheckBox(user_prod_group); @@ -242,7 +209,7 @@ EditUser::EditUser(const QString &user,QWidget *parent) new QLabel(user_webget_login_button,tr("Allow &WebGet Login"), user_prod_group); user_webget_login_label->setGeometry(30,83,150,19); - user_webget_login_label->setFont(small_font); + user_webget_login_label->setFont(subLabelFont()); user_webget_login_label->setAlignment(Qt::AlignLeft); user_edit_catches_button=new QCheckBox(user_prod_group); @@ -251,7 +218,7 @@ EditUser::EditUser(const QString &user,QWidget *parent) new QLabel(user_edit_catches_button,tr("&Edit Netcatch Schedule"), user_prod_group); user_edit_catches_label->setGeometry(192,41,150,19); - user_edit_catches_label->setFont(small_font); + user_edit_catches_label->setFont(subLabelFont()); user_edit_catches_label->setAlignment(Qt::AlignLeft); user_voicetrack_log_button=new QCheckBox(user_prod_group); @@ -260,7 +227,7 @@ EditUser::EditUser(const QString &user,QWidget *parent) new QLabel(user_voicetrack_log_button,tr("&Voicetrack Logs"), user_prod_group); user_voicetrack_log_label->setGeometry(192,62,150,19); - user_voicetrack_log_label->setFont(small_font); + user_voicetrack_log_label->setFont(subLabelFont()); user_voicetrack_log_label->setAlignment(Qt::AlignLeft); // @@ -268,14 +235,14 @@ EditUser::EditUser(const QString &user,QWidget *parent) // user_traffic_group=new Q3ButtonGroup(tr("Traffic Rights"),this); user_traffic_group->setGeometry(10,341,355,66); - user_traffic_group->setFont(font); + user_traffic_group->setFont(labelFont()); user_create_log_button=new QCheckBox(user_traffic_group); user_create_log_button->setGeometry(10,21,15,15); user_create_log_label= new QLabel(user_create_log_button,tr("Create &Log"),user_traffic_group); user_create_log_label->setGeometry(30,21,150,19); - user_create_log_label->setFont(small_font); + user_create_log_label->setFont(subLabelFont()); user_create_log_label->setAlignment(Qt::AlignLeft); user_delete_log_button=new QCheckBox(user_traffic_group); @@ -283,7 +250,7 @@ EditUser::EditUser(const QString &user,QWidget *parent) user_delete_log_label= new QLabel(user_delete_log_button,tr("De&lete Log"),user_traffic_group); user_delete_log_label->setGeometry(192,21,150,19); - user_delete_log_label->setFont(small_font); + user_delete_log_label->setFont(subLabelFont()); user_delete_log_label->setAlignment(Qt::AlignLeft); user_delete_rec_button=new QCheckBox(user_traffic_group); @@ -292,7 +259,7 @@ EditUser::EditUser(const QString &user,QWidget *parent) new QLabel(user_delete_rec_button,tr("Delete &Report Data"), user_traffic_group); user_delete_rec_label->setGeometry(192,42,150,19); - user_delete_rec_label->setFont(small_font); + user_delete_rec_label->setFont(subLabelFont()); user_delete_rec_label->setAlignment(Qt::AlignLeft); user_modify_template_button=new QCheckBox(user_traffic_group); @@ -301,7 +268,7 @@ EditUser::EditUser(const QString &user,QWidget *parent) new QLabel(user_modify_template_button,tr("&Modify Template"), user_traffic_group); user_modify_template_label->setGeometry(30,42,100,19); - user_modify_template_label->setFont(small_font); + user_modify_template_label->setFont(subLabelFont()); user_modify_template_label->setAlignment(Qt::AlignLeft); // @@ -309,14 +276,14 @@ EditUser::EditUser(const QString &user,QWidget *parent) // user_onair_group=new Q3ButtonGroup(tr("OnAir Rights"),this); user_onair_group->setGeometry(10,417,355,85); - user_onair_group->setFont(font); + user_onair_group->setFont(labelFont()); user_playout_log_button=new QCheckBox(user_onair_group); user_playout_log_button->setGeometry(10,21,15,15); user_playout_log_label= new QLabel(user_playout_log_button,tr("&Playout Logs"),user_onair_group); user_playout_log_label->setGeometry(30,21,150,19); - user_playout_log_label->setFont(small_font); + user_playout_log_label->setFont(subLabelFont()); user_playout_log_label->setAlignment(Qt::AlignLeft); user_arrange_log_button=new QCheckBox(user_onair_group); @@ -325,7 +292,7 @@ EditUser::EditUser(const QString &user,QWidget *parent) new QLabel(user_arrange_log_button,tr("&Rearrange Log Items"), user_onair_group); user_arrange_log_label->setGeometry(192,21,150,19); - user_arrange_log_label->setFont(small_font); + user_arrange_log_label->setFont(subLabelFont()); user_arrange_log_label->setAlignment(Qt::AlignLeft); user_addto_log_button=new QCheckBox(user_onair_group); @@ -333,7 +300,7 @@ EditUser::EditUser(const QString &user,QWidget *parent) user_addto_log_label= new QLabel(user_addto_log_button,tr("Add Log &Items"),user_onair_group); user_addto_log_label->setGeometry(30,42,150,19); - user_addto_log_label->setFont(small_font); + user_addto_log_label->setFont(subLabelFont()); user_addto_log_label->setAlignment(Qt::AlignLeft); user_removefrom_log_button=new QCheckBox(user_onair_group); @@ -342,7 +309,7 @@ EditUser::EditUser(const QString &user,QWidget *parent) new QLabel(user_removefrom_log_button,tr("Delete Lo&g Items"), user_onair_group); user_removefrom_log_label->setGeometry(192,42,150,19); - user_removefrom_log_label->setFont(small_font); + user_removefrom_log_label->setFont(subLabelFont()); user_removefrom_log_label->setAlignment(Qt::AlignLeft); user_config_panels_button=new QCheckBox(user_onair_group); @@ -351,7 +318,7 @@ EditUser::EditUser(const QString &user,QWidget *parent) new QLabel(user_config_panels_button,tr("Configure System Panels"), user_onair_group); user_config_panels_label->setGeometry(30,63,150,19); - user_config_panels_label->setFont(small_font); + user_config_panels_label->setFont(subLabelFont()); user_config_panels_label->setAlignment(Qt::AlignLeft); // @@ -359,7 +326,7 @@ EditUser::EditUser(const QString &user,QWidget *parent) // user_podcast_group=new Q3ButtonGroup(tr("Podcasting Rights"),this); user_podcast_group->setGeometry(10,512,355,66); - user_podcast_group->setFont(font); + user_podcast_group->setFont(labelFont()); user_add_podcast_button=new QCheckBox(user_podcast_group); user_add_podcast_button->setGeometry(10,21,15,15); @@ -367,7 +334,7 @@ EditUser::EditUser(const QString &user,QWidget *parent) new QLabel(user_add_podcast_button,tr("Cre&ate Podcast"), user_podcast_group); user_add_podcast_label->setGeometry(30,21,150,19); - user_add_podcast_label->setFont(small_font); + user_add_podcast_label->setFont(subLabelFont()); user_add_podcast_label->setAlignment(Qt::AlignLeft); user_edit_podcast_button=new QCheckBox(user_podcast_group); @@ -375,7 +342,7 @@ EditUser::EditUser(const QString &user,QWidget *parent) user_edit_podcast_label= new QLabel(user_edit_podcast_button,tr("E&dit Podcast"),user_podcast_group); user_edit_podcast_label->setGeometry(192,21,150,19); - user_edit_podcast_label->setFont(small_font); + user_edit_podcast_label->setFont(subLabelFont()); user_edit_podcast_label->setAlignment(Qt::AlignLeft); user_delete_podcast_button=new QCheckBox(user_podcast_group); @@ -384,7 +351,7 @@ EditUser::EditUser(const QString &user,QWidget *parent) new QLabel(user_delete_podcast_button,tr("Dele&te Podcast"), user_podcast_group); user_delete_podcast_label->setGeometry(30,42,150,19); - user_delete_podcast_label->setFont(small_font); + user_delete_podcast_label->setFont(subLabelFont()); user_delete_podcast_label->setAlignment(Qt::AlignLeft); user_web_box=new QCheckBox(user_podcast_group); @@ -392,7 +359,7 @@ EditUser::EditUser(const QString &user,QWidget *parent) user_web_label=new QLabel(user_web_box,tr("Allow Web Login"), user_podcast_group); user_web_label->setGeometry(192,42,150,19); - user_web_label->setFont(small_font); + user_web_label->setFont(subLabelFont()); user_web_label->setAlignment(Qt::AlignLeft); // @@ -400,7 +367,7 @@ EditUser::EditUser(const QString &user,QWidget *parent) // user_assign_perms_button=new QPushButton(this); user_assign_perms_button->setGeometry(10,582,sizeHint().width()/3-20,50); - user_assign_perms_button->setFont(font); + user_assign_perms_button->setFont(buttonFont()); user_assign_perms_button->setText(tr("Group\nPermissions")); connect(user_assign_perms_button,SIGNAL(clicked()),this,SLOT(groupsData())); @@ -409,7 +376,7 @@ EditUser::EditUser(const QString &user,QWidget *parent) // user_assign_svcs_button=new QPushButton(this); user_assign_svcs_button->setGeometry(sizeHint().width()/3+10,582,sizeHint().width()/3-20,50); - user_assign_svcs_button->setFont(font); + user_assign_svcs_button->setFont(buttonFont()); user_assign_svcs_button->setText(tr("Service\nPermissions")); connect(user_assign_svcs_button,SIGNAL(clicked()),this,SLOT(servicesData())); @@ -419,7 +386,7 @@ EditUser::EditUser(const QString &user,QWidget *parent) user_assign_feeds_button=new QPushButton(this); user_assign_feeds_button-> setGeometry(2*sizeHint().width()/3+10,582,sizeHint().width()/3-20,50); - user_assign_feeds_button->setFont(font); + user_assign_feeds_button->setFont(buttonFont()); user_assign_feeds_button->setText(tr("Podcast Feed\nPermissions")); connect(user_assign_feeds_button,SIGNAL(clicked()),this,SLOT(feedsData())); @@ -429,7 +396,7 @@ EditUser::EditUser(const QString &user,QWidget *parent) QPushButton *button=new QPushButton(this); button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); button->setDefault(true); - button->setFont(font); + button->setFont(buttonFont()); button->setText(tr("&OK")); connect(button,SIGNAL(clicked()),this,SLOT(okData())); @@ -439,7 +406,7 @@ EditUser::EditUser(const QString &user,QWidget *parent) button=new QPushButton(this); button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, 80,50); - button->setFont(font); + button->setFont(buttonFont()); button->setText(tr("&Cancel")); connect(button,SIGNAL(clicked()),this,SLOT(cancelData())); diff --git a/rdadmin/edit_user.h b/rdadmin/edit_user.h index 2b34b3d6..b7572549 100644 --- a/rdadmin/edit_user.h +++ b/rdadmin/edit_user.h @@ -2,7 +2,7 @@ // // Edit a Rivendell User // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,20 +22,17 @@ #define EDIT_USER_H #include -#include -#include -#include -#include + #include -#include #include #include #include #include +#include #include -class EditUser : public QDialog +class EditUser : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_user_perms.cpp b/rdadmin/edit_user_perms.cpp index be8b5ab9..deea1d83 100644 --- a/rdadmin/edit_user_perms.cpp +++ b/rdadmin/edit_user_perms.cpp @@ -2,7 +2,7 @@ // // Edit Rivendell User/Group Permissions // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ -26,7 +26,7 @@ #include "edit_user_perms.h" EditUserPerms::EditUserPerms(RDUser *user,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -38,19 +38,11 @@ EditUserPerms::EditUserPerms(RDUser *user,QWidget *parent) // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); + setMinimumSize(sizeHint()); + setMaximumSize(sizeHint()); setWindowTitle("RDAdmin - "+tr("User: ")+user_user->name()); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - // // Groups Selector // @@ -65,7 +57,7 @@ EditUserPerms::EditUserPerms(RDUser *user,QWidget *parent) QPushButton *ok_button=new QPushButton(this); ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); ok_button->setDefault(true); - ok_button->setFont(font); + ok_button->setFont(buttonFont()); ok_button->setText(tr("&OK")); connect(ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -75,7 +67,7 @@ EditUserPerms::EditUserPerms(RDUser *user,QWidget *parent) QPushButton *cancel_button=new QPushButton(this); cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, 80,50); - cancel_button->setFont(font); + cancel_button->setFont(buttonFont()); cancel_button->setText(tr("&Cancel")); connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); diff --git a/rdadmin/edit_user_perms.h b/rdadmin/edit_user_perms.h index 6a6a4c95..77117b88 100644 --- a/rdadmin/edit_user_perms.h +++ b/rdadmin/edit_user_perms.h @@ -2,7 +2,7 @@ // // Edit Rivendell User/Group Permissions // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,12 +21,12 @@ #ifndef EDIT_USER_PERMS_H #define EDIT_USER_PERMS_H -#include +#include #include #include -class EditUserPerms : public QDialog +class EditUserPerms : public RDDialog { Q_OBJECT public: @@ -45,5 +45,4 @@ class EditUserPerms : public QDialog }; -#endif - +#endif // EDIT_USER_PERMS_H diff --git a/rdadmin/edit_user_service_perms.cpp b/rdadmin/edit_user_service_perms.cpp index 3522fa0e..96c878bc 100644 --- a/rdadmin/edit_user_service_perms.cpp +++ b/rdadmin/edit_user_service_perms.cpp @@ -2,7 +2,7 @@ // // Edit Rivendell User/Group Permissions // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ -26,7 +26,7 @@ #include "edit_user_service_perms.h" EditUserServicePerms::EditUserServicePerms(RDUser *user,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -38,19 +38,11 @@ EditUserServicePerms::EditUserServicePerms(RDUser *user,QWidget *parent) // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); + setMinimumSize(sizeHint()); + setMaximumSize(sizeHint()); setWindowTitle("RDAdmin - "+tr("User: ")+user_user->name()); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - // // Groups Selector // @@ -65,7 +57,7 @@ EditUserServicePerms::EditUserServicePerms(RDUser *user,QWidget *parent) QPushButton *ok_button=new QPushButton(this); ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); ok_button->setDefault(true); - ok_button->setFont(font); + ok_button->setFont(buttonFont()); ok_button->setText(tr("&OK")); connect(ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -75,7 +67,7 @@ EditUserServicePerms::EditUserServicePerms(RDUser *user,QWidget *parent) QPushButton *cancel_button=new QPushButton(this); cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, 80,50); - cancel_button->setFont(font); + cancel_button->setFont(buttonFont()); cancel_button->setText(tr("&Cancel")); connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); diff --git a/rdadmin/edit_user_service_perms.h b/rdadmin/edit_user_service_perms.h index 40cfac48..2772dd88 100644 --- a/rdadmin/edit_user_service_perms.h +++ b/rdadmin/edit_user_service_perms.h @@ -2,7 +2,7 @@ // // Edit Rivendell User/Group Permissions // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,12 +21,12 @@ #ifndef EDIT_USER_SERVICE_PERMS_H #define EDIT_USER_SERVICE_PERMS_H -#include +#include #include #include -class EditUserServicePerms : public QDialog +class EditUserServicePerms : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/edit_vguest_resource.cpp b/rdadmin/edit_vguest_resource.cpp index 9a570053..961ccf60 100644 --- a/rdadmin/edit_vguest_resource.cpp +++ b/rdadmin/edit_vguest_resource.cpp @@ -2,7 +2,7 @@ // // Edit a vGuest Resource Record. // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,13 +22,13 @@ #include -#include +#include "edit_vguest_resource.h" EditVguestResource::EditVguestResource(RDMatrix::VguestType type, int *enginenum,int *devicenum, int *surfacenum,int *relaynum, QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -41,18 +41,8 @@ EditVguestResource::EditVguestResource(RDMatrix::VguestType type, // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); - - // - // Create Fonts - // - QFont bold_font=QFont("Helvetica",12,QFont::Bold); - bold_font.setPixelSize(12); - QFont font=QFont("Helvetica",12,QFont::Normal); - font.setPixelSize(12); + setMinimumSize(sizeHint()); + setMaximumSize(sizeHint()); // // Logitek Engine Number @@ -61,7 +51,7 @@ EditVguestResource::EditVguestResource(RDMatrix::VguestType type, edit_enginenum_edit->setGeometry(135,10,50,20); QLabel *label=new QLabel(edit_enginenum_edit,tr("Engine (Hex): "),this); label->setGeometry(10,10,120,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -71,7 +61,7 @@ EditVguestResource::EditVguestResource(RDMatrix::VguestType type, edit_devicenum_edit->setGeometry(135,36,50,20); label=new QLabel(edit_devicenum_edit,tr("Device (Hex): "),this); label->setGeometry(10,36,120,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -81,7 +71,7 @@ EditVguestResource::EditVguestResource(RDMatrix::VguestType type, edit_surfacenum_edit->setGeometry(135,62,50,20); label=new QLabel(edit_surfacenum_edit,tr("Surface (Hex): "),this); label->setGeometry(10,62,120,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -92,7 +82,7 @@ EditVguestResource::EditVguestResource(RDMatrix::VguestType type, edit_relaynum_label= new QLabel(edit_relaynum_edit,tr("Bus/Relay (Hex): "),this); edit_relaynum_label->setGeometry(10,88,120,20); - edit_relaynum_label->setFont(bold_font); + edit_relaynum_label->setFont(labelFont()); edit_relaynum_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -101,7 +91,7 @@ EditVguestResource::EditVguestResource(RDMatrix::VguestType type, QPushButton *button=new QPushButton(this); button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); button->setDefault(true); - button->setFont(bold_font); + button->setFont(buttonFont()); button->setText(tr("&OK")); connect(button,SIGNAL(clicked()),this,SLOT(okData())); @@ -111,7 +101,7 @@ EditVguestResource::EditVguestResource(RDMatrix::VguestType type, button=new QPushButton(this); button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, 80,50); - button->setFont(bold_font); + button->setFont(buttonFont()); button->setText(tr("&Cancel")); connect(button,SIGNAL(clicked()),this,SLOT(cancelData())); @@ -145,7 +135,7 @@ EditVguestResource::EditVguestResource(RDMatrix::VguestType type, QSize EditVguestResource::sizeHint() const { - return QSize(400,174); + return QSize(200,190); } diff --git a/rdadmin/edit_vguest_resource.h b/rdadmin/edit_vguest_resource.h index 9b4e32b9..83320924 100644 --- a/rdadmin/edit_vguest_resource.h +++ b/rdadmin/edit_vguest_resource.h @@ -2,7 +2,7 @@ // // Edit a vGuest Resource Record. // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,17 +21,16 @@ #ifndef EDIT_VGUEST_RESOURCE_H #define EDIT_VGUEST_RESOURCE_H -#include -#include -#include -#include -#include #include +#include +#include +#include -#include +#include #include +#include -class EditVguestResource : public QDialog +class EditVguestResource : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/help_audios.cpp b/rdadmin/help_audios.cpp index 21914b22..78e10059 100644 --- a/rdadmin/help_audios.cpp +++ b/rdadmin/help_audios.cpp @@ -2,7 +2,7 @@ // // Display help for audio ports (edit_audios.*) // -// (C) Copyright 2006-2018 Fred Gleason +// (C) Copyright 2006-2019 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 @@ -20,33 +20,25 @@ #include -#include +#include "help_audios.h" HelpAudioPorts::HelpAudioPorts(QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); + setMinimumSize(sizeHint()); + setMaximumSize(sizeHint()); setWindowTitle("RDAdmin - "+tr("Audio Ports Help")); - // - // Create Fonts - // - QFont button_font=QFont("Helvetica",14,QFont::Bold); - button_font.setPixelSize(14); - // Help Text help_edit=new Q3TextEdit(this,"help_edit"); help_edit-> - setGeometry(10,10,sizeHint().width()-20,sizeHint().height()-70); + setGeometry(10,10,sizeHint().width()-20,sizeHint().height()-80); help_edit->setTextFormat(Qt::RichText); help_edit->setReadOnly(true); // FIXME: add context sensitive help for other options on the Audio Port screen. @@ -69,7 +61,7 @@ HelpAudioPorts::HelpAudioPorts(QWidget *parent) // QPushButton *button=new QPushButton(this); button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50); - button->setFont(button_font); + button->setFont(buttonFont()); button->setText(tr("&Close")); connect(button,SIGNAL(clicked()),this,SLOT(closeData())); } diff --git a/rdadmin/help_audios.h b/rdadmin/help_audios.h index a68137d3..0d0a9c38 100644 --- a/rdadmin/help_audios.h +++ b/rdadmin/help_audios.h @@ -2,7 +2,7 @@ // // Display help for audio ports (edit_audios.*) // -// (C) Copyright 2006-2018 Fred Gleason +// (C) Copyright 2006-2019 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,16 +17,15 @@ // License along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// #ifndef HELP_AUDIOS_H #define HELP_AUDIOS_H -#include #include +#include -class HelpAudioPorts : public QDialog +class HelpAudioPorts : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/importfields.cpp b/rdadmin/importfields.cpp index 23d8a0a0..401b6e02 100644 --- a/rdadmin/importfields.cpp +++ b/rdadmin/importfields.cpp @@ -2,7 +2,7 @@ // // Import Parser Parameters for RDAdmin. // -// (C) Copyright 2010-2018 Fred Gleason +// (C) Copyright 2010-2019 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,7 +23,7 @@ #include ImportFields::ImportFields(QWidget *parent) - : QWidget(parent) + : RDWidget(parent) { QLabel *label; import_changed=false; @@ -32,7 +32,7 @@ ImportFields::ImportFields(QWidget *parent) // Traffic Cartname Parser Data Section // label=new QLabel(tr("Cart Number:"),this); - label->setGeometry(0,0,120,19); + label->setGeometry(0,0,125,19); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -63,7 +63,7 @@ ImportFields::ImportFields(QWidget *parent) // Title Parser Data Section // label=new QLabel(tr("Title:"),this); - label->setGeometry(0,21,120,19); + label->setGeometry(0,21,125,19); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -94,7 +94,7 @@ ImportFields::ImportFields(QWidget *parent) // Traffic Start Hours Parser Data Section // label=new QLabel(tr("Start Time - Hours:"),this); - label->setGeometry(0,42,120,19); + label->setGeometry(0,42,125,19); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -125,7 +125,7 @@ ImportFields::ImportFields(QWidget *parent) // Traffic Start Minutes Parser Data Section // label=new QLabel(tr("Start Time - Minutes:"),this); - label->setGeometry(0,63,120,19); + label->setGeometry(0,63,125,19); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -156,7 +156,7 @@ ImportFields::ImportFields(QWidget *parent) // Traffic Start Seconds Parser Data Section // label=new QLabel(tr("Start Time - Seconds:"),this); - label->setGeometry(0,84,120,19); + label->setGeometry(0,84,125,19); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -187,7 +187,7 @@ ImportFields::ImportFields(QWidget *parent) // Traffic Length Hours Parser Data Section // label=new QLabel(tr("Length - Hours:"),this); - label->setGeometry(0,106,120,19); + label->setGeometry(0,106,125,19); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -218,7 +218,7 @@ ImportFields::ImportFields(QWidget *parent) // Traffic Length Minutes Parser Data Section // label=new QLabel(tr("Length - Minutes:"),this); - label->setGeometry(0,127,120,19); + label->setGeometry(0,127,125,19); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -249,7 +249,7 @@ ImportFields::ImportFields(QWidget *parent) // Traffic Length Seconds Parser Data Section // label=new QLabel(tr("Length - Seconds:"),this); - label->setGeometry(0,148,120,19); + label->setGeometry(0,148,125,19); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -280,7 +280,7 @@ ImportFields::ImportFields(QWidget *parent) // Traffic GUID Parser Data Section // label=new QLabel(tr("Globally Unique ID:"),this); - label->setGeometry(0,169,120,19); + label->setGeometry(0,169,125,19); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -311,7 +311,7 @@ ImportFields::ImportFields(QWidget *parent) // Traffic Event ID Parser Data Section // label=new QLabel(tr("Event ID:"),this); - label->setGeometry(0,190,120,19); + label->setGeometry(0,190,125,19); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -342,7 +342,7 @@ ImportFields::ImportFields(QWidget *parent) // Traffic Announcement Type Parser Data Section // label=new QLabel(tr("Annc. Type:"),this); - label->setGeometry(0,211,120,19); + label->setGeometry(0,211,125,19); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // diff --git a/rdadmin/importfields.h b/rdadmin/importfields.h index 7fd45842..b6539fd7 100644 --- a/rdadmin/importfields.h +++ b/rdadmin/importfields.h @@ -2,7 +2,7 @@ // // Import Parser Parameters for RDAdmin. // -// (C) Copyright 2010-2018 Fred Gleason +// (C) Copyright 2010-2019 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,13 +22,13 @@ #ifndef IMPORTFIELDS_H #define IMPORTFIELDS_H -#include #include #include #include +#include -class ImportFields : public QWidget +class ImportFields : public RDWidget { Q_OBJECT public: diff --git a/rdadmin/info_dialog.cpp b/rdadmin/info_dialog.cpp index b3adb248..46af6c98 100644 --- a/rdadmin/info_dialog.cpp +++ b/rdadmin/info_dialog.cpp @@ -18,22 +18,9 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -//Added by qt3to4: -#include -#include #include -#include #include #include @@ -49,17 +36,15 @@ #include "xpm_info_banner2.cpp" InfoDialog::InfoDialog(QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); + setMinimumSize(sizeHint()); + setMaximumSize(sizeHint()); setWindowTitle("RDAdmin - "+tr("System Information")); @@ -70,12 +55,6 @@ InfoDialog::InfoDialog(QWidget *parent) title_font.setPixelSize(22); QFont slogan_font=QFont("Helvetica",14,QFont::Normal); slogan_font.setPixelSize(14); - QFont button_font=QFont("Helvetica",12,QFont::Bold); - button_font.setPixelSize(12); - QFont bold_font=QFont("Helvetica",10,QFont::Bold); - bold_font.setPixelSize(10); - QFont font=QFont("Helvetica",10,QFont::Normal); - font.setPixelSize(10); // // Banners @@ -116,35 +95,37 @@ InfoDialog::InfoDialog(QWidget *parent) // label=new QLabel(tr("Version")+" "+VERSION,this); label->setGeometry(10,73,200,14); - label->setFont(font); + label->setFont(subLabelFont()); label=new QLabel(tr("Database Schema")+ QString().sprintf(" %d",RD_VERSION_DATABASE),this); - label->setGeometry(210,73,120,14); + label->setGeometry(210,73,sizeHint().width()-220,14); label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); - label->setFont(font); + label->setFont(subLabelFont()); // // Signature // label=new QLabel(QString::fromUtf8(RD_COPYRIGHT_NOTICE),this); label->setGeometry(10,87,sizeHint().width()-20,14); - label->setFont(font); + label->setFont(subLabelFont()); // // Disclaimer // label=new RDLabel(this); label->setGeometry(10,104,sizeHint().width()-20,60); - label->setFont(font); - label->setText(tr("This program is free software, and comes with ABSOLUTELY NO WARRANTY,\nnot even the implied warranties of MERCHANTIBILITY or FITNESS FOR A\nPARTICULAR PURPOSE. Touch the \"View License\" button for details.")); + label->setFont(subLabelFont()); + label->setWordWrap(true); + label->setText(tr("This program is free software, and comes with ABSOLUTELY NO WARRANTY, not even the implied warranties of MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. Touch the \"View License\" button for details.")); + // label->setText(tr("This program is free software, and comes with ABSOLUTELY NO WARRANTY,\nnot even the implied warranties of MERCHANTIBILITY or FITNESS FOR A\nPARTICULAR PURPOSE. Touch the \"View License\" button for details.")); // // Credits Button // QPushButton *button=new QPushButton(this); button->setGeometry(sizeHint().width()/2-145,174,80,50); - button->setFont(button_font); + button->setFont(buttonFont()); button->setText(tr("View\n&Credits")); connect(button,SIGNAL(clicked()),this,SLOT(viewCreditsData())); @@ -153,7 +134,7 @@ InfoDialog::InfoDialog(QWidget *parent) // button=new QPushButton(this); button->setGeometry(sizeHint().width()/2-45,174,80,50); - button->setFont(button_font); + button->setFont(buttonFont()); button->setText(tr("View\n&License")); connect(button,SIGNAL(clicked()),this,SLOT(viewLicenseData())); @@ -161,9 +142,8 @@ InfoDialog::InfoDialog(QWidget *parent) // Close Button // button=new QPushButton(this); - button->setGeometry(sizeHint().width()-90,sizeHint().height()-90, - 80,50); - button->setFont(button_font); + button->setGeometry(sizeHint().width()-90,sizeHint().height()-90,80,50); + button->setFont(buttonFont()); button->setText(tr("&Close")); button->setDefault(true); connect(button,SIGNAL(clicked()),this,SLOT(closeData())); diff --git a/rdadmin/info_dialog.h b/rdadmin/info_dialog.h index d0496feb..2cd8cbd6 100644 --- a/rdadmin/info_dialog.h +++ b/rdadmin/info_dialog.h @@ -20,15 +20,7 @@ #ifndef INFO_DIALOG_H #define INFO_DIALOG_H -#include -#include -#include -#include -#include -#include -#include - -#include +#include // // Globals @@ -36,7 +28,7 @@ extern const unsigned char xpm_infobanner1[]; extern const unsigned char xpm_infobanner2[]; -class InfoDialog : public QDialog +class InfoDialog : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/license.cpp b/rdadmin/license.cpp index e8402637..afd1ebc9 100644 --- a/rdadmin/license.cpp +++ b/rdadmin/license.cpp @@ -30,35 +30,23 @@ extern const unsigned char global_credits[]; extern const unsigned char global_gpl2[]; License::License(QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); - - // - // Create Fonts - // - QFont button_font=QFont("Helvetica",14,QFont::Bold); - button_font.setPixelSize(14); + setMinimumSize(sizeHint()); license_edit=new QTextEdit(this); - license_edit-> - setGeometry(10,10,sizeHint().width()-20,sizeHint().height()-80); license_edit->setReadOnly(true); // // Close Button // - QPushButton *button=new QPushButton(this,"close_button"); - button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50); - button->setFont(button_font); - button->setText(tr("&Close")); - connect(button,SIGNAL(clicked()),this,SLOT(closeData())); + close_button=new QPushButton(this); + close_button->setFont(buttonFont()); + close_button->setText(tr("&Close")); + connect(close_button,SIGNAL(clicked()),this,SLOT(closeData())); } @@ -97,3 +85,11 @@ void License::closeData() { done(0); } + + +void License::resizeEvent(QResizeEvent *e) +{ + license_edit-> + setGeometry(10,10,size().width()-20,size().height()-80); + close_button->setGeometry(size().width()-90,size().height()-60,80,50); +} diff --git a/rdadmin/license.h b/rdadmin/license.h index dd07e34e..af1ecbd8 100644 --- a/rdadmin/license.h +++ b/rdadmin/license.h @@ -22,10 +22,12 @@ #ifndef LICENSE_H #define LICENSE_H -#include +#include #include -class License : public QDialog +#include + +class License : public RDDialog { Q_OBJECT public: @@ -40,8 +42,12 @@ class License : public QDialog private slots: void closeData(); + protected: + void resizeEvent(QResizeEvent *e); + private: QTextEdit *license_edit; + QPushButton *close_button; }; diff --git a/rdadmin/list_dropboxes.cpp b/rdadmin/list_dropboxes.cpp index de171878..76d5175a 100644 --- a/rdadmin/list_dropboxes.cpp +++ b/rdadmin/list_dropboxes.cpp @@ -2,7 +2,7 @@ // // List Rivendell Dropboxes // -// (C) Copyright 2002-2018 Gleason +// (C) Copyright 2002-2019 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,19 +18,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include -#include #include #include @@ -38,7 +26,7 @@ #include "list_dropboxes.h" ListDropboxes::ListDropboxes(const QString &stationname,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -53,21 +41,11 @@ ListDropboxes::ListDropboxes(const QString &stationname,QWidget *parent) setWindowTitle("RDAdmin - "+tr("Rivendell Dropbox Configurations on")+" "+ stationname); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont list_font=QFont("Helvetica",12,QFont::Normal); - list_font.setPixelSize(12); - QFont small_font=QFont("Helvetica",10,QFont::Normal); - small_font.setPixelSize(10); - // // Add Button // list_add_button=new QPushButton(this); - list_add_button->setFont(font); + list_add_button->setFont(buttonFont()); list_add_button->setText(tr("&Add")); connect(list_add_button,SIGNAL(clicked()),this,SLOT(addData())); @@ -75,7 +53,7 @@ ListDropboxes::ListDropboxes(const QString &stationname,QWidget *parent) // Edit Button // list_edit_button=new QPushButton(this); - list_edit_button->setFont(font); + list_edit_button->setFont(buttonFont()); list_edit_button->setText(tr("&Edit")); connect(list_edit_button,SIGNAL(clicked()),this,SLOT(editData())); @@ -83,7 +61,7 @@ ListDropboxes::ListDropboxes(const QString &stationname,QWidget *parent) // Duplicate Button // list_duplicate_button=new QPushButton(this); - list_duplicate_button->setFont(font); + list_duplicate_button->setFont(buttonFont()); list_duplicate_button->setText(tr("D&uplicate")); connect(list_duplicate_button,SIGNAL(clicked()),this,SLOT(duplicateData())); @@ -91,7 +69,7 @@ ListDropboxes::ListDropboxes(const QString &stationname,QWidget *parent) // Delete Button // list_delete_button=new QPushButton(this); - list_delete_button->setFont(font); + list_delete_button->setFont(buttonFont()); list_delete_button->setText(tr("&Delete")); connect(list_delete_button,SIGNAL(clicked()),this,SLOT(deleteData())); @@ -100,7 +78,7 @@ ListDropboxes::ListDropboxes(const QString &stationname,QWidget *parent) // list_close_button=new QPushButton(this); list_close_button->setDefault(true); - list_close_button->setFont(font); + list_close_button->setFont(buttonFont()); list_close_button->setText(tr("&Close")); connect(list_close_button,SIGNAL(clicked()),this,SLOT(closeData())); @@ -108,7 +86,6 @@ ListDropboxes::ListDropboxes(const QString &stationname,QWidget *parent) // Group List // list_dropboxes_view=new RDListView(this); - list_dropboxes_view->setFont(list_font); list_dropboxes_view->setAllColumnsShowFocus(true); list_dropboxes_view->addColumn(tr("ID")); list_dropboxes_view->setColumnAlignment(0,Qt::AlignVCenter|Qt::AlignRight); diff --git a/rdadmin/list_dropboxes.h b/rdadmin/list_dropboxes.h index 5ba6cf3b..67277286 100644 --- a/rdadmin/list_dropboxes.h +++ b/rdadmin/list_dropboxes.h @@ -2,7 +2,7 @@ // // List Rivendell Dropbox Configurations // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,15 +21,13 @@ #ifndef LIST_DROPBOXES_H #define LIST_DROPBOXES_H -#include -#include -#include #include -#include #include +#include +#include -class ListDropboxes : public QDialog +class ListDropboxes : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/list_endpoints.cpp b/rdadmin/list_endpoints.cpp index 8bf9427a..f20416e5 100644 --- a/rdadmin/list_endpoints.cpp +++ b/rdadmin/list_endpoints.cpp @@ -2,7 +2,7 @@ // // List a Rivendell Endpoints // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,16 +18,9 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include -#include -#include -#include -#include - #include #include #include -#include #include "edit_user.h" #include "list_endpoints.h" @@ -35,7 +28,7 @@ ListEndpoints::ListEndpoints(RDMatrix *matrix,RDMatrix::Endpoint endpoint, QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -63,29 +56,15 @@ ListEndpoints::ListEndpoints(RDMatrix *matrix,RDMatrix::Endpoint endpoint, // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); - - // - // Create Fonts - // - QFont bold_font=QFont("Helvetica",12,QFont::Bold); - bold_font.setPixelSize(12); - QFont font=QFont("Helvetica",12,QFont::Normal); - font.setPixelSize(12); + setMinimumSize(sizeHint()); // // Endpoints List Box // list_list_view=new Q3ListView(this); - list_list_view-> - setGeometry(10,24,sizeHint().width()-20,sizeHint().height()-94); - QLabel *label= - new QLabel(list_list_view,list_table,this); - label->setFont(bold_font); - label->setGeometry(14,5,85,19); + list_type_label=new QLabel(list_list_view,list_table,this); + list_type_label->setFont(labelFont()); + list_type_label->setGeometry(14,5,85,19); list_list_view->setAllColumnsShowFocus(true); list_list_view->setItemMargin(5); switch(list_endpoint) { @@ -157,32 +136,28 @@ ListEndpoints::ListEndpoints(RDMatrix *matrix,RDMatrix::Endpoint endpoint, // // Edit Button // - QPushButton *button=new QPushButton(this); - button->setGeometry(10,sizeHint().height()-60,80,50); - button->setFont(bold_font); - button->setText(tr("&Edit")); - connect(button,SIGNAL(clicked()),this,SLOT(editData())); - button->setDisabled(list_readonly); + list_edit_button=new QPushButton(this); + list_edit_button->setFont(buttonFont()); + list_edit_button->setText(tr("&Edit")); + connect(list_edit_button,SIGNAL(clicked()),this,SLOT(editData())); + list_edit_button->setDisabled(list_readonly); // // Ok Button // - button=new QPushButton(this); - button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); - button->setDefault(true); - button->setFont(bold_font); - button->setText(tr("&OK")); - connect(button,SIGNAL(clicked()),this,SLOT(okData())); + list_ok_button=new QPushButton(this); + list_ok_button->setDefault(true); + list_ok_button->setFont(buttonFont()); + list_ok_button->setText(tr("&OK")); + connect(list_ok_button,SIGNAL(clicked()),this,SLOT(okData())); // // Cancel Button // - button=new QPushButton(this); - button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, - 80,50); - button->setFont(bold_font); - button->setText(tr("&Cancel")); - connect(button,SIGNAL(clicked()),this,SLOT(cancelData())); + list_cancel_button=new QPushButton(this); + list_cancel_button->setFont(buttonFont()); + list_cancel_button->setText(tr("&Cancel")); + connect(list_cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); // // Load Values @@ -719,3 +694,13 @@ void ListEndpoints::cancelData() { done(1); } + + +void ListEndpoints::resizeEvent(QResizeEvent *e) +{ + list_list_view-> + setGeometry(10,24,size().width()-20,size().height()-94); + list_edit_button->setGeometry(10,size().height()-60,80,50); + list_ok_button->setGeometry(size().width()-180,size().height()-60,80,50); + list_cancel_button->setGeometry(size().width()-90,size().height()-60,80,50); +} diff --git a/rdadmin/list_endpoints.h b/rdadmin/list_endpoints.h index 8d1f24c2..dedf0b70 100644 --- a/rdadmin/list_endpoints.h +++ b/rdadmin/list_endpoints.h @@ -2,7 +2,7 @@ // // List Rivendell Endpoints // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,15 +21,16 @@ #ifndef LIST_ENDPOINTS_H #define LIST_ENDPOINTS_H -#include -#include -#include #include -#include -#include +#include +#include -class ListEndpoints : public QDialog +#include +#include +#include + +class ListEndpoints : public RDDialog { Q_OBJECT public: @@ -43,10 +44,17 @@ class ListEndpoints : public QDialog void okData(); void cancelData(); + protected: + void resizeEvent(QResizeEvent *e); + private: RDMatrix *list_matrix; RDMatrix::Endpoint list_endpoint; Q3ListView *list_list_view; + QLabel *list_type_label; + QPushButton *list_edit_button; + QPushButton *list_ok_button; + QPushButton *list_cancel_button; int list_size; QString list_table; bool list_readonly; diff --git a/rdadmin/list_feeds.cpp b/rdadmin/list_feeds.cpp index 6c4dbfc9..45638514 100644 --- a/rdadmin/list_feeds.cpp +++ b/rdadmin/list_feeds.cpp @@ -2,7 +2,7 @@ // // List Rivendell Feeds // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,21 +22,11 @@ #include #include -#include -#include -#include -#include -#include #include -#include -#include #include -#include -#include #include #include -#include #include #include #include @@ -49,7 +39,7 @@ #include "list_feeds.h" ListFeeds::ListFeeds(QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -61,21 +51,11 @@ ListFeeds::ListFeeds(QWidget *parent) setWindowTitle("RDAdmin - "+tr("Rivendell Feed List")); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont list_font=QFont("Helvetica",12,QFont::Normal); - list_font.setPixelSize(12); - QFont small_font=QFont("Helvetica",10,QFont::Normal); - small_font.setPixelSize(10); - // // Add Button // list_add_button=new QPushButton(this); - list_add_button->setFont(font); + list_add_button->setFont(buttonFont()); list_add_button->setText(tr("&Add")); connect(list_add_button,SIGNAL(clicked()),this,SLOT(addData())); @@ -83,7 +63,7 @@ ListFeeds::ListFeeds(QWidget *parent) // Edit Button // list_edit_button=new QPushButton(this); - list_edit_button->setFont(font); + list_edit_button->setFont(buttonFont()); list_edit_button->setText(tr("&Edit")); connect(list_edit_button,SIGNAL(clicked()),this,SLOT(editData())); @@ -91,7 +71,7 @@ ListFeeds::ListFeeds(QWidget *parent) // Delete Button // list_delete_button=new QPushButton(this); - list_delete_button->setFont(font); + list_delete_button->setFont(buttonFont()); list_delete_button->setText(tr("&Delete")); connect(list_delete_button,SIGNAL(clicked()),this,SLOT(deleteData())); @@ -100,7 +80,7 @@ ListFeeds::ListFeeds(QWidget *parent) // list_close_button=new QPushButton(this); list_close_button->setDefault(true); - list_close_button->setFont(font); + list_close_button->setFont(buttonFont()); list_close_button->setText(tr("&Close")); connect(list_close_button,SIGNAL(clicked()),this,SLOT(closeData())); @@ -108,7 +88,6 @@ ListFeeds::ListFeeds(QWidget *parent) // Group List // list_feeds_view=new RDListView(this); - list_feeds_view->setFont(list_font); list_feeds_view->setAllColumnsShowFocus(true); list_feeds_view->addColumn(tr("Key")); list_feeds_view->setColumnAlignment(0,Qt::AlignCenter); @@ -121,7 +100,7 @@ ListFeeds::ListFeeds(QWidget *parent) list_feeds_view->addColumn(tr("Creation Date")); list_feeds_view->setColumnAlignment(4,Qt::AlignCenter); QLabel *list_box_label=new QLabel(list_feeds_view,tr("&Feeds:"),this); - list_box_label->setFont(font); + list_box_label->setFont(labelFont()); list_box_label->setGeometry(14,11,85,19); connect(list_feeds_view, SIGNAL(doubleClicked(Q3ListViewItem *,const QPoint &,int)), diff --git a/rdadmin/list_feeds.h b/rdadmin/list_feeds.h index 7f628d87..c3cb6b30 100644 --- a/rdadmin/list_feeds.h +++ b/rdadmin/list_feeds.h @@ -2,7 +2,7 @@ // // List Rivendell Feeds // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,14 +21,12 @@ #ifndef LIST_FEEDS_H #define LIST_FEEDS_H -#include -#include -#include #include +#include #include -class ListFeeds : public QDialog +class ListFeeds : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/list_gpis.cpp b/rdadmin/list_gpis.cpp index e37f193a..4520d775 100644 --- a/rdadmin/list_gpis.cpp +++ b/rdadmin/list_gpis.cpp @@ -2,7 +2,7 @@ // // List Rivendell GPIOs // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,26 +18,17 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include -#include -#include -#include -#include - #include #include #include #include -#include -#include -#include #include "edit_gpi.h" #include "globals.h" #include "list_gpis.h" ListGpis::ListGpis(RDMatrix *matrix,RDMatrix::GpioType type,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -67,16 +58,7 @@ ListGpis::ListGpis(RDMatrix *matrix,RDMatrix::GpioType type,QWidget *parent) // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - - // - // Create Fonts - // - QFont bold_font=QFont("Helvetica",12,QFont::Bold); - bold_font.setPixelSize(12); - QFont font=QFont("Helvetica",12,QFont::Normal); - font.setPixelSize(12); + setMinimumSize(sizeHint()); // // Gpis List Box @@ -84,7 +66,7 @@ ListGpis::ListGpis(RDMatrix *matrix,RDMatrix::GpioType type,QWidget *parent) list_list_view=new Q3ListView(this); list_list_label= new QLabel(list_list_view,list_label,this); - list_list_label->setFont(bold_font); + list_list_label->setFont(labelFont()); list_list_view->setAllColumnsShowFocus(true); list_list_view->setItemMargin(5); connect(list_list_view, @@ -119,7 +101,7 @@ ListGpis::ListGpis(RDMatrix *matrix,RDMatrix::GpioType type,QWidget *parent) // Edit Button // list_edit_button=new QPushButton(this); - list_edit_button->setFont(bold_font); + list_edit_button->setFont(buttonFont()); list_edit_button->setText(tr("&Edit")); connect(list_edit_button,SIGNAL(clicked()),this,SLOT(editData())); @@ -128,7 +110,7 @@ ListGpis::ListGpis(RDMatrix *matrix,RDMatrix::GpioType type,QWidget *parent) // list_ok_button=new QPushButton(this); list_ok_button->setDefault(true); - list_ok_button->setFont(bold_font); + list_ok_button->setFont(buttonFont()); list_ok_button->setText(tr("&OK")); connect(list_ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -136,7 +118,7 @@ ListGpis::ListGpis(RDMatrix *matrix,RDMatrix::GpioType type,QWidget *parent) // Cancel Button // list_cancel_button=new QPushButton(this); - list_cancel_button->setFont(bold_font); + list_cancel_button->setFont(buttonFont()); list_cancel_button->setText(tr("&Cancel")); connect(list_cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); diff --git a/rdadmin/list_gpis.h b/rdadmin/list_gpis.h index 22f89bbc..030e085d 100644 --- a/rdadmin/list_gpis.h +++ b/rdadmin/list_gpis.h @@ -2,7 +2,7 @@ // // List Rivendell GPIs // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,15 @@ #ifndef LIST_GPIS_H #define LIST_GPIS_H -#include -#include #include #include #include -#include +#include #include +#include -class ListGpis : public QDialog +class ListGpis : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/list_groups.cpp b/rdadmin/list_groups.cpp index f154d047..01dffc64 100644 --- a/rdadmin/list_groups.cpp +++ b/rdadmin/list_groups.cpp @@ -2,7 +2,7 @@ // // List Rivendell Groups // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ -20,16 +20,7 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include #include #include @@ -45,33 +36,22 @@ #include "rename_group.h" ListGroups::ListGroups(QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); + setMinimumSize(sizeHint()); setWindowTitle("RDAdmin - "+tr("Rivendell Group List")); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont list_font=QFont("Helvetica",12,QFont::Normal); - list_font.setPixelSize(12); - QFont small_font=QFont("Helvetica",10,QFont::Normal); - small_font.setPixelSize(10); - // // Add Button // list_add_button=new QPushButton(this); - list_add_button->setFont(font); + list_add_button->setFont(buttonFont()); list_add_button->setText(tr("&Add")); connect(list_add_button,SIGNAL(clicked()),this,SLOT(addData())); @@ -79,7 +59,7 @@ ListGroups::ListGroups(QWidget *parent) // Edit Button // list_edit_button=new QPushButton(this); - list_edit_button->setFont(font); + list_edit_button->setFont(buttonFont()); list_edit_button->setText(tr("&Edit")); connect(list_edit_button,SIGNAL(clicked()),this,SLOT(editData())); @@ -87,7 +67,7 @@ ListGroups::ListGroups(QWidget *parent) // Rename Button // list_rename_button=new QPushButton(this); - list_rename_button->setFont(font); + list_rename_button->setFont(buttonFont()); list_rename_button->setText(tr("&Rename")); connect(list_rename_button,SIGNAL(clicked()),this,SLOT(renameData())); @@ -95,7 +75,7 @@ ListGroups::ListGroups(QWidget *parent) // Delete Button // list_delete_button=new QPushButton(this); - list_delete_button->setFont(font); + list_delete_button->setFont(buttonFont()); list_delete_button->setText(tr("&Delete")); connect(list_delete_button,SIGNAL(clicked()),this,SLOT(deleteData())); @@ -103,7 +83,7 @@ ListGroups::ListGroups(QWidget *parent) // Report Button // list_report_button=new QPushButton(this); - list_report_button->setFont(font); + list_report_button->setFont(buttonFont()); list_report_button->setText(tr("Generate\n&Report")); connect(list_report_button,SIGNAL(clicked()),this,SLOT(reportData())); @@ -112,7 +92,7 @@ ListGroups::ListGroups(QWidget *parent) // list_close_button=new QPushButton(this); list_close_button->setDefault(true); - list_close_button->setFont(font); + list_close_button->setFont(buttonFont()); list_close_button->setText(tr("&Close")); connect(list_close_button,SIGNAL(clicked()),this,SLOT(closeData())); @@ -120,7 +100,6 @@ ListGroups::ListGroups(QWidget *parent) // Group List // list_groups_view=new RDListView(this); - list_groups_view->setFont(list_font); list_groups_view->setAllColumnsShowFocus(true); list_groups_view->addColumn(tr("NAME")); list_groups_view->addColumn(tr("DESCRIPTION")); @@ -139,7 +118,7 @@ ListGroups::ListGroups(QWidget *parent) list_groups_view->addColumn(tr("NOW & NEXT")); list_groups_view->setColumnAlignment(8,Qt::AlignHCenter); QLabel *list_box_label=new QLabel(list_groups_view,tr("&Groups:"),this); - list_box_label->setFont(font); + list_box_label->setFont(labelFont()); list_box_label->setGeometry(14,11,85,19); connect(list_groups_view, SIGNAL(doubleClicked(Q3ListViewItem *,const QPoint &,int)), diff --git a/rdadmin/list_groups.h b/rdadmin/list_groups.h index dd3bbb10..68ee770f 100644 --- a/rdadmin/list_groups.h +++ b/rdadmin/list_groups.h @@ -2,7 +2,7 @@ // // List Rivendell Groups // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,13 @@ #ifndef LIST_GROUPS_H #define LIST_GROUPS_H -#include -#include -#include -#include #include -#include #include +#include +#include -class ListGroups : public QDialog +class ListGroups : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/list_hostvars.cpp b/rdadmin/list_hostvars.cpp index 4865beb3..da40f6ec 100644 --- a/rdadmin/list_hostvars.cpp +++ b/rdadmin/list_hostvars.cpp @@ -2,7 +2,7 @@ // // List Rivendell Host Variables // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,20 +18,10 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include -#include -#include -#include -#include -#include -#include -#include #include -#include #include #include -#include #include "add_hostvar.h" #include "edit_hostvar.h" @@ -39,7 +29,7 @@ #include "list_hostvars.h" ListHostvars::ListHostvars(QString station,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -48,31 +38,19 @@ ListHostvars::ListHostvars(QString station,QWidget *parent) // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); + setMinimumSize(sizeHint()); list_station=station; str=QString(tr("Host Variables for")); setWindowTitle("RDAdmin - "+tr("Host Variables for")+" "+station); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont small_font=QFont("Helvetica",10,QFont::Bold); - small_font.setPixelSize(10); - // // Matrix List Box // list_view=new Q3ListView(this); - list_view->setGeometry(10,24,sizeHint().width()-20,sizeHint().height()-114); - QLabel *label=new QLabel(list_view,tr("Host Variables"),this); - label->setFont(font); - label->setGeometry(14,5,sizeHint().width()-28,19); + list_title_label=new QLabel(list_view,tr("Host Variables"),this); + list_title_label->setFont(labelFont()); + list_title_label->setGeometry(14,5,sizeHint().width()-28,19); list_view->setAllColumnsShowFocus(true); list_view->setItemMargin(5); list_view->addColumn(tr("NAME")); @@ -89,51 +67,44 @@ ListHostvars::ListHostvars(QString station,QWidget *parent) // // Add Button // - QPushButton *add_button=new QPushButton(this); - add_button->setGeometry(10,sizeHint().height()-80,80,50); - add_button->setFont(font); - add_button->setText(tr("&Add")); - connect(add_button,SIGNAL(clicked()),this,SLOT(addData())); + list_add_button=new QPushButton(this); + list_add_button->setFont(buttonFont()); + list_add_button->setText(tr("&Add")); + connect(list_add_button,SIGNAL(clicked()),this,SLOT(addData())); // // Edit Button // - QPushButton *edit_button=new QPushButton(this); - edit_button->setGeometry(100,sizeHint().height()-80,80,50); - edit_button->setFont(font); - edit_button->setText(tr("&Edit")); - connect(edit_button,SIGNAL(clicked()),this,SLOT(editData())); + list_edit_button=new QPushButton(this); + list_edit_button->setFont(buttonFont()); + list_edit_button->setText(tr("&Edit")); + connect(list_edit_button,SIGNAL(clicked()),this,SLOT(editData())); // // Delete Button // - QPushButton *delete_button=new QPushButton(this); - delete_button->setGeometry(190,sizeHint().height()-80,80,50); - delete_button->setFont(font); - delete_button->setText(tr("&Delete")); - connect(delete_button,SIGNAL(clicked()),this,SLOT(deleteData())); + list_delete_button=new QPushButton(this); + list_delete_button->setFont(buttonFont()); + list_delete_button->setText(tr("&Delete")); + connect(list_delete_button,SIGNAL(clicked()),this,SLOT(deleteData())); // // OK Button // - QPushButton *button=new QPushButton(this); - button->setGeometry(sizeHint().width()-180,sizeHint().height()-60, - 80,50); - button->setDefault(true); - button->setFont(font); - button->setText(tr("&OK")); - connect(button,SIGNAL(clicked()),this,SLOT(okData())); + list_ok_button=new QPushButton(this); + list_ok_button->setDefault(true); + list_ok_button->setFont(buttonFont()); + list_ok_button->setText(tr("&OK")); + connect(list_ok_button,SIGNAL(clicked()),this,SLOT(okData())); // // Cancel Button // - button=new QPushButton(this); - button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, - 80,50); - button->setDefault(true); - button->setFont(font); - button->setText(tr("&Cancel")); - connect(button,SIGNAL(clicked()),this,SLOT(cancelData())); + list_cancel_button=new QPushButton(this); + list_cancel_button->setDefault(true); + list_cancel_button->setFont(buttonFont()); + list_cancel_button->setText(tr("&Cancel")); + connect(list_cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); } @@ -242,6 +213,17 @@ void ListHostvars::cancelData() } +void ListHostvars::resizeEvent(QResizeEvent *e) +{ + list_view->setGeometry(10,24,size().width()-20,size().height()-114); + list_add_button->setGeometry(10,size().height()-80,80,50); + list_edit_button->setGeometry(100,size().height()-80,80,50); + list_delete_button->setGeometry(190,size().height()-80,80,50); + list_ok_button->setGeometry(size().width()-180,size().height()-60,80,50); + list_cancel_button->setGeometry(size().width()-90,size().height()-60,80,50); +} + + void ListHostvars::RefreshList() { Q3ListViewItem *l; diff --git a/rdadmin/list_hostvars.h b/rdadmin/list_hostvars.h index d43bbb30..bc2b01e5 100644 --- a/rdadmin/list_hostvars.h +++ b/rdadmin/list_hostvars.h @@ -2,7 +2,7 @@ // // List Rivendell Host Variables // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ #ifndef LIST_HOSTVARS_H #define LIST_HOSTVARS_H -#include #include -#include -#include -#include + +#include +#include #include +#include #include -class ListHostvars : public QDialog +class ListHostvars : public RDDialog { Q_OBJECT public: @@ -47,9 +47,18 @@ class ListHostvars : public QDialog void okData(); void cancelData(); + protected: + void resizeEvent(QResizeEvent *e); + private: void RefreshList(); + QLabel *list_title_label; Q3ListView *list_view; + QPushButton *list_add_button; + QPushButton *list_edit_button; + QPushButton *list_delete_button; + QPushButton *list_ok_button; + QPushButton *list_cancel_button; QString list_station; }; diff --git a/rdadmin/list_livewiregpios.cpp b/rdadmin/list_livewiregpios.cpp index c423a45e..da0976b3 100644 --- a/rdadmin/list_livewiregpios.cpp +++ b/rdadmin/list_livewiregpios.cpp @@ -2,7 +2,7 @@ // // List Rivendell Livewire GPIO Slot Associations // -// (C) Copyright 2013-2018 Fred Gleason +// (C) Copyright 2013-2019 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,58 +18,35 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "globals.h" -#include -#include #include -#include -#include -#include +#include + +#include "edit_livewiregpio.h" +#include "list_livewiregpios.h" ListLiveWireGpios::ListLiveWireGpios(RDMatrix *matrix,int slot_quan, QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); + setMinimumSize(sizeHint()); list_matrix=matrix; list_slot_quan=slot_quan; setWindowTitle("RDAdmin - "+tr("Livewire GPIO Source Assignments")); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont small_font=QFont("Helvetica",10,QFont::Bold); - small_font.setPixelSize(10); - // // Matrix List Box // list_view=new RDListView(this); - list_view->setGeometry(10,24,sizeHint().width()-20,sizeHint().height()-94); - QLabel *label=new QLabel(list_view,tr("Switchers:"),this); - label->setFont(font); - label->setGeometry(14,5,85,19); + list_title_label=new QLabel(list_view,tr("Switchers:"),this); + list_title_label->setFont(labelFont()); list_view->setAllColumnsShowFocus(true); list_view->setItemMargin(5); list_view->addColumn(tr("Lines")); @@ -87,33 +64,28 @@ ListLiveWireGpios::ListLiveWireGpios(RDMatrix *matrix,int slot_quan, // // Edit Button // - QPushButton *edit_button=new QPushButton(this); - edit_button->setGeometry(10,sizeHint().height()-60,80,50); - edit_button->setFont(font); - edit_button->setText(tr("&Edit")); - connect(edit_button,SIGNAL(clicked()),this,SLOT(editData())); + list_edit_button=new QPushButton(this); + list_edit_button->setFont(buttonFont()); + list_edit_button->setText(tr("&Edit")); + connect(list_edit_button,SIGNAL(clicked()),this,SLOT(editData())); // // Ok Button // - QPushButton *ok_button=new QPushButton(this); - ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60, - 80,50); - ok_button->setDefault(true); - ok_button->setFont(font); - ok_button->setText(tr("&OK")); - connect(ok_button,SIGNAL(clicked()),this,SLOT(okData())); + list_ok_button=new QPushButton(this); + list_ok_button->setDefault(true); + list_ok_button->setFont(buttonFont()); + list_ok_button->setText(tr("&OK")); + connect(list_ok_button,SIGNAL(clicked()),this,SLOT(okData())); // // Cancel Button // - QPushButton *cancel_button=new QPushButton(this); - cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, - 80,50); - cancel_button->setDefault(true); - cancel_button->setFont(font); - cancel_button->setText(tr("&Cancel")); - connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); + list_cancel_button=new QPushButton(this); + list_cancel_button->setDefault(true); + list_cancel_button->setFont(buttonFont()); + list_cancel_button->setText(tr("&Cancel")); + connect(list_cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); } @@ -208,6 +180,16 @@ void ListLiveWireGpios::cancelData() } +void ListLiveWireGpios::resizeEvent(QResizeEvent *e) +{ + list_view->setGeometry(10,24,size().width()-20,size().height()-94); + list_title_label->setGeometry(14,5,85,19); + list_edit_button->setGeometry(10,size().height()-60,80,50); + list_ok_button->setGeometry(size().width()-180,size().height()-60,80,50); + list_cancel_button->setGeometry(size().width()-90,size().height()-60,80,50); +} + + void ListLiveWireGpios::RefreshList() { Q3ListViewItem *l; diff --git a/rdadmin/list_livewiregpios.h b/rdadmin/list_livewiregpios.h index 46829472..3e188e6d 100644 --- a/rdadmin/list_livewiregpios.h +++ b/rdadmin/list_livewiregpios.h @@ -2,7 +2,7 @@ // // List Rivendell Livewire GPIO Slot Associations // -// (C) Copyright 2013-2018 Fred Gleason +// (C) Copyright 2013-2019 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,17 +21,15 @@ #ifndef LIST_LIVEWIREGPIOS_H #define LIST_LIVEWIREGPIOS_H -#include -#include -#include -#include -#include +#include +#include #include -#include +#include #include +#include -class ListLiveWireGpios : public QDialog +class ListLiveWireGpios : public RDDialog { Q_OBJECT public: @@ -46,13 +44,19 @@ class ListLiveWireGpios : public QDialog void okData(); void cancelData(); + protected: + void resizeEvent(QResizeEvent *e); + private: void RefreshList(); + QLabel *list_title_label; + QPushButton *list_edit_button; + QPushButton *list_ok_button; + QPushButton *list_cancel_button; RDListView *list_view; RDMatrix *list_matrix; int list_slot_quan; }; -#endif - +#endif // LIST_LIVEWIREGPIOS_H diff --git a/rdadmin/list_matrices.cpp b/rdadmin/list_matrices.cpp index 727855c7..4a59031a 100644 --- a/rdadmin/list_matrices.cpp +++ b/rdadmin/list_matrices.cpp @@ -2,7 +2,7 @@ // // List Rivendell Matrices // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,16 +18,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include -#include -#include -#include -#include -#include -#include -#include #include -#include #include #include @@ -39,29 +30,18 @@ #include "list_matrices.h" ListMatrices::ListMatrices(QString station,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); + setMinimumSize(sizeHint()); list_station=station; setWindowTitle("RDAdmin - "+tr("Rivendell Switcher List")); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont small_font=QFont("Helvetica",10,QFont::Bold); - small_font.setPixelSize(10); - // // Initialize Data Structures // @@ -73,10 +53,8 @@ ListMatrices::ListMatrices(QString station,QWidget *parent) // Matrix List Box // list_view=new Q3ListView(this,"list_box"); - list_view->setGeometry(10,24,sizeHint().width()-20,sizeHint().height()-94); - QLabel *label=new QLabel(list_view,tr("Switchers:"),this); - label->setFont(font); - label->setGeometry(14,5,85,19); + list_title_label=new QLabel(list_view,tr("Switchers:"),this); + list_title_label->setFont(labelFont()); list_view->setAllColumnsShowFocus(true); list_view->setItemMargin(5); list_view->addColumn(tr("MATRIX")); @@ -93,40 +71,35 @@ ListMatrices::ListMatrices(QString station,QWidget *parent) // // Add Button // - QPushButton *add_button=new QPushButton(this); - add_button->setGeometry(10,sizeHint().height()-60,80,50); - add_button->setFont(font); - add_button->setText(tr("&Add")); - connect(add_button,SIGNAL(clicked()),this,SLOT(addData())); + list_add_button=new QPushButton(this); + list_add_button->setFont(buttonFont()); + list_add_button->setText(tr("&Add")); + connect(list_add_button,SIGNAL(clicked()),this,SLOT(addData())); // // Edit Button // - QPushButton *edit_button=new QPushButton(this); - edit_button->setGeometry(100,sizeHint().height()-60,80,50); - edit_button->setFont(font); - edit_button->setText(tr("&Edit")); - connect(edit_button,SIGNAL(clicked()),this,SLOT(editData())); + list_edit_button=new QPushButton(this); + list_edit_button->setFont(buttonFont()); + list_edit_button->setText(tr("&Edit")); + connect(list_edit_button,SIGNAL(clicked()),this,SLOT(editData())); // // Delete Button // - QPushButton *delete_button=new QPushButton(this); - delete_button->setGeometry(190,sizeHint().height()-60,80,50); - delete_button->setFont(font); - delete_button->setText(tr("&Delete")); - connect(delete_button,SIGNAL(clicked()),this,SLOT(deleteData())); + list_delete_button=new QPushButton(this); + list_delete_button->setFont(buttonFont()); + list_delete_button->setText(tr("&Delete")); + connect(list_delete_button,SIGNAL(clicked()),this,SLOT(deleteData())); // // Close Button // - QPushButton *close_button=new QPushButton(this); - close_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, - 80,50); - close_button->setDefault(true); - close_button->setFont(font); - close_button->setText(tr("&Close")); - connect(close_button,SIGNAL(clicked()),this,SLOT(closeData())); + list_close_button=new QPushButton(this); + list_close_button->setDefault(true); + list_close_button->setFont(buttonFont()); + list_close_button->setText(tr("&Close")); + connect(list_close_button,SIGNAL(clicked()),this,SLOT(closeData())); } @@ -240,6 +213,17 @@ void ListMatrices::closeData() } +void ListMatrices::resizeEvent(QResizeEvent *e) +{ + list_view->setGeometry(10,24,size().width()-20,size().height()-94); + list_title_label->setGeometry(14,5,85,19); + list_add_button->setGeometry(10,size().height()-60,80,50); + list_edit_button->setGeometry(100,size().height()-60,80,50); + list_delete_button->setGeometry(190,size().height()-60,80,50); + list_close_button->setGeometry(size().width()-90,size().height()-60,80,50); +} + + void ListMatrices::DeleteMatrix(int matrix) { QString sql=QString("delete from MATRICES where ")+ diff --git a/rdadmin/list_matrices.h b/rdadmin/list_matrices.h index 8853a3c9..e9f3e515 100644 --- a/rdadmin/list_matrices.h +++ b/rdadmin/list_matrices.h @@ -2,7 +2,7 @@ // // List Rivendell Matrices // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,17 +21,16 @@ #ifndef LIST_MATRICES_H #define LIST_MATRICES_H -#include #include -#include -#include -#include -#include + +#include +#include #include +#include #include -class ListMatrices : public QDialog +class ListMatrices : public RDDialog { Q_OBJECT public: @@ -47,12 +46,20 @@ class ListMatrices : public QDialog void doubleClickedData(Q3ListViewItem *item,const QPoint &pt,int col); void closeData(); + protected: + void resizeEvent(QResizeEvent *e); + private: void DeleteMatrix(int matrix); void RefreshList(); void AddList(int matrix_num); void RefreshRecord(Q3ListViewItem *item); + QLabel *list_title_label; Q3ListView *list_view; + QPushButton *list_add_button; + QPushButton *list_edit_button; + QPushButton *list_delete_button; + QPushButton *list_close_button; QString list_station; bool list_matrix_modified[MAX_MATRICES]; }; diff --git a/rdadmin/list_nodes.cpp b/rdadmin/list_nodes.cpp index a2a51921..9e6aa0c5 100644 --- a/rdadmin/list_nodes.cpp +++ b/rdadmin/list_nodes.cpp @@ -18,10 +18,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include -#include -#include -#include #include #include @@ -34,7 +30,7 @@ #include "edit_endpoint.h" ListNodes::ListNodes(RDMatrix *matrix,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -44,25 +40,12 @@ ListNodes::ListNodes(RDMatrix *matrix,QWidget *parent) // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); - - // - // Create Fonts - // - QFont bold_font=QFont("Helvetica",12,QFont::Bold); - bold_font.setPixelSize(12); - QFont font=QFont("Helvetica",12,QFont::Normal); - font.setPixelSize(12); + setMinimumSize(sizeHint()); // // Nodes List Box // list_list_view=new RDListView(this); - list_list_view-> - setGeometry(10,10,sizeHint().width()-20,sizeHint().height()-80); list_list_view->setAllColumnsShowFocus(true); list_list_view->setItemMargin(5); list_list_view->addColumn(tr("HOSTNAME")); @@ -81,39 +64,35 @@ ListNodes::ListNodes(RDMatrix *matrix,QWidget *parent) // // Add Button // - QPushButton *button=new QPushButton(this); - button->setGeometry(10,sizeHint().height()-60,80,50); - button->setFont(bold_font); - button->setText(tr("&Add")); - connect(button,SIGNAL(clicked()),this,SLOT(addData())); + list_add_button=new QPushButton(this); + list_add_button->setFont(buttonFont()); + list_add_button->setText(tr("&Add")); + connect(list_add_button,SIGNAL(clicked()),this,SLOT(addData())); // // Edit Button // - button=new QPushButton(this); - button->setGeometry(100,sizeHint().height()-60,80,50); - button->setFont(bold_font); - button->setText(tr("&Edit")); - connect(button,SIGNAL(clicked()),this,SLOT(editData())); + list_edit_button=new QPushButton(this); + list_edit_button->setFont(buttonFont()); + list_edit_button->setText(tr("&Edit")); + connect(list_edit_button,SIGNAL(clicked()),this,SLOT(editData())); // // Delete Button // - button=new QPushButton(this); - button->setGeometry(190,sizeHint().height()-60,80,50); - button->setFont(bold_font); - button->setText(tr("&Delete")); - connect(button,SIGNAL(clicked()),this,SLOT(deleteData())); + list_delete_button=new QPushButton(this); + list_delete_button->setFont(buttonFont()); + list_delete_button->setText(tr("&Delete")); + connect(list_delete_button,SIGNAL(clicked()),this,SLOT(deleteData())); // // Close Button // - button=new QPushButton(this); - button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50); - button->setDefault(true); - button->setFont(bold_font); - button->setText(tr("&Close")); - connect(button,SIGNAL(clicked()),this,SLOT(closeData())); + list_close_button=new QPushButton(this); + list_close_button->setDefault(true); + list_close_button->setFont(buttonFont()); + list_close_button->setText(tr("&Close")); + connect(list_close_button,SIGNAL(clicked()),this,SLOT(closeData())); // // Load Values @@ -203,6 +182,16 @@ void ListNodes::closeData() } +void ListNodes::resizeEvent(QResizeEvent *e) +{ + list_list_view->setGeometry(10,10,size().width()-20,size().height()-80); + list_add_button->setGeometry(10,size().height()-60,80,50); + list_edit_button->setGeometry(100,size().height()-60,80,50); + list_delete_button->setGeometry(190,size().height()-60,80,50); + list_close_button->setGeometry(size().width()-90,size().height()-60,80,50); +} + + void ListNodes::RefreshList() { QString sql; diff --git a/rdadmin/list_nodes.h b/rdadmin/list_nodes.h index e05105b5..cd996122 100644 --- a/rdadmin/list_nodes.h +++ b/rdadmin/list_nodes.h @@ -2,7 +2,7 @@ // // List Rivendell LiveWire Nodes // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,15 @@ #ifndef LIST_NODES_H #define LIST_NODES_H -#include -#include #include -#include -#include +#include #include #include +#include +#include -class ListNodes : public QDialog +class ListNodes : public RDDialog { Q_OBJECT public: @@ -45,12 +44,19 @@ class ListNodes : public QDialog void doubleClickedData(Q3ListViewItem *item,const QPoint &pt,int col); void closeData(); + protected: + void resizeEvent(QResizeEvent *e); + private: void RefreshList(); void RefreshItem(RDListViewItem *item); void PurgeEndpoints(const QString &tablename); RDMatrix *list_matrix; RDListView *list_list_view; + QPushButton *list_add_button; + QPushButton *list_edit_button; + QPushButton *list_delete_button; + QPushButton *list_close_button; }; diff --git a/rdadmin/list_pypads.cpp b/rdadmin/list_pypads.cpp index 3bb889b6..30dbdb5a 100644 --- a/rdadmin/list_pypads.cpp +++ b/rdadmin/list_pypads.cpp @@ -2,7 +2,7 @@ // // List PyPAD Instances // -// (C) Copyright 2018 Fred Gleason +// (C) Copyright 2018-2019 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,7 +41,7 @@ #include "../icons/redball.xpm" ListPypads::ListPypads(RDStation *station,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { list_station=station; @@ -57,14 +57,6 @@ ListPypads::ListPypads(RDStation *station,QWidget *parent) setMinimumWidth(sizeHint().width()); setMinimumHeight(sizeHint().height()); - // - // Create Fonts - // - QFont bold_font=QFont("Helvetica",12,QFont::Bold); - bold_font.setPixelSize(12); - QFont font=QFont("Helvetica",12,QFont::Normal); - font.setPixelSize(12); - // // Icons // @@ -97,7 +89,7 @@ ListPypads::ListPypads(RDStation *station,QWidget *parent) // Add Button // list_add_button=new QPushButton(this); - list_add_button->setFont(bold_font); + list_add_button->setFont(buttonFont()); list_add_button->setText(tr("&Add")); connect(list_add_button,SIGNAL(clicked()),this,SLOT(addData())); @@ -105,7 +97,7 @@ ListPypads::ListPypads(RDStation *station,QWidget *parent) // Edit Button // list_edit_button=new QPushButton(this); - list_edit_button->setFont(bold_font); + list_edit_button->setFont(buttonFont()); list_edit_button->setText(tr("&Edit")); connect(list_edit_button,SIGNAL(clicked()),this,SLOT(editData())); @@ -113,7 +105,7 @@ ListPypads::ListPypads(RDStation *station,QWidget *parent) // Delete Button // list_delete_button=new QPushButton(this); - list_delete_button->setFont(bold_font); + list_delete_button->setFont(buttonFont()); list_delete_button->setText(tr("&Delete")); connect(list_delete_button,SIGNAL(clicked()),this,SLOT(deleteData())); @@ -121,7 +113,7 @@ ListPypads::ListPypads(RDStation *station,QWidget *parent) // Error Button // list_error_button=new QPushButton(this); - list_error_button->setFont(bold_font); + list_error_button->setFont(buttonFont()); list_error_button->setText(tr("&Error\nLog")); connect(list_error_button,SIGNAL(clicked()),this,SLOT(errorData())); @@ -130,7 +122,7 @@ ListPypads::ListPypads(RDStation *station,QWidget *parent) // list_close_button=new QPushButton(this); list_close_button->setDefault(true); - list_close_button->setFont(bold_font); + list_close_button->setFont(buttonFont()); list_close_button->setText(tr("&Close")); connect(list_close_button,SIGNAL(clicked()),this,SLOT(closeData())); diff --git a/rdadmin/list_pypads.h b/rdadmin/list_pypads.h index f026017d..e0c16f48 100644 --- a/rdadmin/list_pypads.h +++ b/rdadmin/list_pypads.h @@ -2,7 +2,7 @@ // // List PyPAD Instances // -// (C) Copyright 2018 Fred Gleason +// (C) Copyright 2018-2019 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 @@ #ifndef LIST_PYPADS_H #define LIST_PYPADS_H -#include #include #include #include +#include #include #include #include -class ListPypads : public QDialog +class ListPypads : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/list_replicator_carts.cpp b/rdadmin/list_replicator_carts.cpp index 79e5795f..7e112e61 100644 --- a/rdadmin/list_replicator_carts.cpp +++ b/rdadmin/list_replicator_carts.cpp @@ -2,7 +2,7 @@ // // List Rivendell Replicator Carts // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,24 +18,11 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include #include -#include #include #include +#include #include "add_replicator.h" #include "edit_replicator.h" @@ -45,25 +32,14 @@ #include "../icons/rml5.xpm" ListReplicatorCarts::ListReplicatorCarts(QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont list_font=QFont("Helvetica",12,QFont::Normal); - list_font.setPixelSize(12); - QFont small_font=QFont("Helvetica",10,QFont::Normal); - small_font.setPixelSize(10); + setMinimumSize(sizeHint()); // // Create Icons @@ -81,7 +57,7 @@ ListReplicatorCarts::ListReplicatorCarts(QWidget *parent) // Repost Button // list_repost_button=new QPushButton(this); - list_repost_button->setFont(font); + list_repost_button->setFont(buttonFont()); list_repost_button->setText(tr("&Repost")); connect(list_repost_button,SIGNAL(clicked()),this,SLOT(repostData())); @@ -89,7 +65,7 @@ ListReplicatorCarts::ListReplicatorCarts(QWidget *parent) // Repost All Button // list_repost_all_button=new QPushButton(this); - list_repost_all_button->setFont(font); + list_repost_all_button->setFont(buttonFont()); list_repost_all_button->setText(tr("Repost\n&All")); connect(list_repost_all_button,SIGNAL(clicked()),this,SLOT(repostAllData())); @@ -98,7 +74,7 @@ ListReplicatorCarts::ListReplicatorCarts(QWidget *parent) // list_close_button=new QPushButton(this); list_close_button->setDefault(true); - list_close_button->setFont(font); + list_close_button->setFont(buttonFont()); list_close_button->setText(tr("&Close")); connect(list_close_button,SIGNAL(clicked()),this,SLOT(closeData())); @@ -106,7 +82,6 @@ ListReplicatorCarts::ListReplicatorCarts(QWidget *parent) // Replicator List // list_view=new RDListView(this); - list_view->setFont(list_font); list_view->setAllColumnsShowFocus(true); list_view->setItemMargin(5); list_view->addColumn(" "); @@ -115,7 +90,7 @@ ListReplicatorCarts::ListReplicatorCarts(QWidget *parent) list_view->addColumn(tr("LAST POSTED")); list_view->addColumn(tr("POSTED FILENAME")); QLabel *list_box_label=new QLabel(list_view,tr("&Active Carts:"),this); - list_box_label->setFont(font); + list_box_label->setFont(labelFont()); list_box_label->setGeometry(14,11,85,19); } diff --git a/rdadmin/list_replicator_carts.h b/rdadmin/list_replicator_carts.h index dab888e3..0047e013 100644 --- a/rdadmin/list_replicator_carts.h +++ b/rdadmin/list_replicator_carts.h @@ -2,7 +2,7 @@ // // List Rivendell Replicator Carts // -// (C) Copyright 2012-2018 Fred Gleason +// (C) Copyright 2012-2019 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,17 +21,14 @@ #ifndef LIST_REPLICATOR_CARTS_H #define LIST_REPLICATOR_CARTS_H -#include -#include -#include +#include #include -#include -#include -#include #include +#include +#include -class ListReplicatorCarts : public QDialog +class ListReplicatorCarts : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/list_replicators.cpp b/rdadmin/list_replicators.cpp index f19f4f9d..c9957913 100644 --- a/rdadmin/list_replicators.cpp +++ b/rdadmin/list_replicators.cpp @@ -2,7 +2,7 @@ // // List Rivendell Replication Configurations // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ -20,16 +20,7 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include #include #include @@ -43,7 +34,7 @@ #include "list_replicator_carts.h" ListReplicators::ListReplicators(QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -55,21 +46,11 @@ ListReplicators::ListReplicators(QWidget *parent) setWindowTitle("RDAdmin - "+tr("Rivendell Replicators")); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont list_font=QFont("Helvetica",12,QFont::Normal); - list_font.setPixelSize(12); - QFont small_font=QFont("Helvetica",10,QFont::Normal); - small_font.setPixelSize(10); - // // Add Button // list_add_button=new QPushButton(this); - list_add_button->setFont(font); + list_add_button->setFont(buttonFont()); list_add_button->setText(tr("&Add")); connect(list_add_button,SIGNAL(clicked()),this,SLOT(addData())); @@ -77,7 +58,7 @@ ListReplicators::ListReplicators(QWidget *parent) // Edit Button // list_edit_button=new QPushButton(this); - list_edit_button->setFont(font); + list_edit_button->setFont(buttonFont()); list_edit_button->setText(tr("&Edit")); connect(list_edit_button,SIGNAL(clicked()),this,SLOT(editData())); @@ -85,7 +66,7 @@ ListReplicators::ListReplicators(QWidget *parent) // Delete Button // list_delete_button=new QPushButton(this); - list_delete_button->setFont(font); + list_delete_button->setFont(buttonFont()); list_delete_button->setText(tr("&Delete")); connect(list_delete_button,SIGNAL(clicked()),this,SLOT(deleteData())); @@ -93,7 +74,7 @@ ListReplicators::ListReplicators(QWidget *parent) // List Carts Button // list_list_button=new QPushButton(this); - list_list_button->setFont(font); + list_list_button->setFont(buttonFont()); list_list_button->setText(tr("&List\nCarts")); connect(list_list_button,SIGNAL(clicked()),this,SLOT(listData())); @@ -102,7 +83,7 @@ ListReplicators::ListReplicators(QWidget *parent) // list_close_button=new QPushButton(this); list_close_button->setDefault(true); - list_close_button->setFont(font); + list_close_button->setFont(buttonFont()); list_close_button->setText(tr("&Close")); connect(list_close_button,SIGNAL(clicked()),this,SLOT(closeData())); @@ -110,7 +91,6 @@ ListReplicators::ListReplicators(QWidget *parent) // Replicator List // list_replicators_view=new RDListView(this); - list_replicators_view->setFont(list_font); list_replicators_view->setAllColumnsShowFocus(true); list_replicators_view->setItemMargin(5); list_replicators_view->addColumn(tr("NAME")); @@ -119,7 +99,7 @@ ListReplicators::ListReplicators(QWidget *parent) list_replicators_view->addColumn(tr("HOST")); QLabel *list_box_label= new QLabel(list_replicators_view,tr("&Replicators:"),this); - list_box_label->setFont(font); + list_box_label->setFont(labelFont()); list_box_label->setGeometry(14,11,85,19); connect(list_replicators_view, SIGNAL(doubleClicked(Q3ListViewItem *,const QPoint &,int)), diff --git a/rdadmin/list_replicators.h b/rdadmin/list_replicators.h index 9a545062..9f2d1551 100644 --- a/rdadmin/list_replicators.h +++ b/rdadmin/list_replicators.h @@ -2,7 +2,7 @@ // // List Rivendell Replication Configurations // -// (C) Copyright 2010-2018 Fred Gleason +// (C) Copyright 2010-2019 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,13 @@ #ifndef LIST_REPLICATORS_H #define LIST_REPLICATORS_H -#include -#include -#include #include -#include -#include #include +#include +#include -class ListReplicators : public QDialog +class ListReplicators : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/list_reports.cpp b/rdadmin/list_reports.cpp index 3751cde0..cbf1775b 100644 --- a/rdadmin/list_reports.cpp +++ b/rdadmin/list_reports.cpp @@ -2,7 +2,7 @@ // // List Rivendell Reports // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,16 +18,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include -#include -#include -#include -#include -#include -#include -#include #include -#include #include #include @@ -37,72 +28,56 @@ #include "list_reports.h" ListReports::ListReports(QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); + setMinimumSize(sizeHint()); setWindowTitle("RDAdmin - "+tr("Rivendell Report List")); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont small_font=QFont("Helvetica",10,QFont::Normal); - small_font.setPixelSize(10); - // // Add Button // - QPushButton *add_button=new QPushButton(this); - add_button->setGeometry(410,30,80,50); - add_button->setFont(font); - add_button->setText(tr("&Add")); - connect(add_button,SIGNAL(clicked()),this,SLOT(addData())); + list_add_button=new QPushButton(this); + list_add_button->setFont(buttonFont()); + list_add_button->setText(tr("&Add")); + connect(list_add_button,SIGNAL(clicked()),this,SLOT(addData())); // // Edit Button // - QPushButton *edit_button=new QPushButton(this); - edit_button->setGeometry(410,90,80,50); - edit_button->setFont(font); - edit_button->setText(tr("&Edit")); - connect(edit_button,SIGNAL(clicked()),this,SLOT(editData())); + list_edit_button=new QPushButton(this); + list_edit_button->setFont(buttonFont()); + list_edit_button->setText(tr("&Edit")); + connect(list_edit_button,SIGNAL(clicked()),this,SLOT(editData())); // // Delete Button // - QPushButton *delete_button=new QPushButton(this); - delete_button->setGeometry(410,150,80,50); - delete_button->setFont(font); - delete_button->setText(tr("&Delete")); - connect(delete_button,SIGNAL(clicked()),this,SLOT(deleteData())); + list_delete_button=new QPushButton(this); + list_delete_button->setFont(buttonFont()); + list_delete_button->setText(tr("&Delete")); + connect(list_delete_button,SIGNAL(clicked()),this,SLOT(deleteData())); // // Close Button // - QPushButton *close_button=new QPushButton(this); - close_button->setGeometry(410,240,80,50); - close_button->setDefault(true); - close_button->setFont(font); - close_button->setText(tr("&Close")); - connect(close_button,SIGNAL(clicked()),this,SLOT(closeData())); + list_close_button=new QPushButton(this); + list_close_button->setDefault(true); + list_close_button->setFont(buttonFont()); + list_close_button->setText(tr("&Close")); + connect(list_close_button,SIGNAL(clicked()),this,SLOT(closeData())); // // Report List Box // list_box=new Q3ListBox(this); - list_box->setGeometry(10,30,390,260); QLabel *list_box_label=new QLabel(list_box,tr("R&eports:"),this); - list_box_label->setFont(font); + list_box_label->setFont(labelFont()); list_box_label->setGeometry(14,10,85,19); connect(list_box,SIGNAL(doubleClicked(Q3ListBoxItem *)), this,SLOT(doubleClickedData(Q3ListBoxItem *))); @@ -192,6 +167,16 @@ void ListReports::doubleClickedData(Q3ListBoxItem *item) } +void ListReports::resizeEvent(QResizeEvent *e) +{ + list_add_button->setGeometry(size().width()-90,30,80,50); + list_edit_button->setGeometry(size().width()-90,90,80,50); + list_delete_button->setGeometry(size().width()-90,150,80,50); + list_close_button->setGeometry(size().width()-90,size().height()-60,80,50); + list_box->setGeometry(10,30,size().width()-110,size().height()-40); +} + + void ListReports::DeleteReport(QString rptname) { QString sql; diff --git a/rdadmin/list_reports.h b/rdadmin/list_reports.h index ebe0c3b7..977b6bbe 100644 --- a/rdadmin/list_reports.h +++ b/rdadmin/list_reports.h @@ -2,7 +2,7 @@ // // List Rivendell Reports // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,14 +21,14 @@ #ifndef LIST_REPORTS_H #define LIST_REPORTS_H -#include #include -#include -#include -#include -#include -class ListReports : public QDialog +#include +#include + +#include + +class ListReports : public RDDialog { Q_OBJECT public: @@ -44,13 +44,19 @@ class ListReports : public QDialog void doubleClickedData(Q3ListBoxItem *item); void closeData(); - private: - void DeleteReport(QString rptname); - void RefreshList(QString rptname=""); - Q3ListBox *list_box; + protected: + void resizeEvent(QResizeEvent *e); + + private: + void DeleteReport(QString rptname); + void RefreshList(QString rptname=""); + QLabel *list_title_label; + Q3ListBox *list_box; + QPushButton *list_add_button; + QPushButton *list_edit_button; + QPushButton *list_delete_button; + QPushButton *list_close_button; }; -#endif - - +#endif // LIST_REPORTS_H diff --git a/rdadmin/list_sas_resources.cpp b/rdadmin/list_sas_resources.cpp index ef756374..2a168492 100644 --- a/rdadmin/list_sas_resources.cpp +++ b/rdadmin/list_sas_resources.cpp @@ -2,7 +2,7 @@ // // List SAS Resources. // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,21 +18,16 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include -#include -#include -#include -#include - #include -#include #include -#include -#include -#include +#include + +#include "edit_sas_resource.h" +#include "edit_user.h" +#include "list_sas_resources.h" ListSasResources::ListSasResources(RDMatrix *matrix,int size,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -46,38 +41,24 @@ ListSasResources::ListSasResources(RDMatrix *matrix,int size,QWidget *parent) // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); - - // - // Create Fonts - // - QFont bold_font=QFont("Helvetica",12,QFont::Bold); - bold_font.setPixelSize(12); - QFont font=QFont("Helvetica",12,QFont::Normal); - font.setPixelSize(12); + setMinimumSize(sizeHint()); // // Resources List Box // list_list_view=new Q3ListView(this); - list_list_view-> - setGeometry(10,24,sizeHint().width()-20,sizeHint().height()-94); - QLabel *label= - new QLabel(list_list_view,list_table,this); - label->setFont(bold_font); - label->setGeometry(14,5,85,19); + list_title_label= + new QLabel(list_list_view,tr("SAS Switches"),this); + list_title_label->setFont(labelFont()); list_list_view->setAllColumnsShowFocus(true); list_list_view->setItemMargin(5); - list_list_view->addColumn(tr("GPIO LINE")); + list_list_view->addColumn(tr("GPIO Line")); list_list_view->setColumnAlignment(0,Qt::AlignHCenter); - list_list_view->addColumn(tr("CONSOLE")); + list_list_view->addColumn(tr("Console")); list_list_view->setColumnAlignment(1,Qt::AlignHCenter); - list_list_view->addColumn(tr("SOURCE")); + list_list_view->addColumn(tr("Source")); list_list_view->setColumnAlignment(2,Qt::AlignHCenter); - list_list_view->addColumn(tr("OPTO/RELAY")); + list_list_view->addColumn(tr("Opto/Relay")); list_list_view->setColumnAlignment(3,Qt::AlignHCenter); connect(list_list_view, SIGNAL(doubleClicked(Q3ListViewItem *,const QPoint &,int)), @@ -87,31 +68,27 @@ ListSasResources::ListSasResources(RDMatrix *matrix,int size,QWidget *parent) // // Edit Button // - QPushButton *button=new QPushButton(this); - button->setGeometry(10,sizeHint().height()-60,80,50); - button->setFont(bold_font); - button->setText(tr("&Edit")); - connect(button,SIGNAL(clicked()),this,SLOT(editData())); + list_edit_button=new QPushButton(this); + list_edit_button->setFont(buttonFont()); + list_edit_button->setText(tr("&Edit")); + connect(list_edit_button,SIGNAL(clicked()),this,SLOT(editData())); // // Ok Button // - button=new QPushButton(this); - button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); - button->setDefault(true); - button->setFont(bold_font); - button->setText(tr("&OK")); - connect(button,SIGNAL(clicked()),this,SLOT(okData())); + list_ok_button=new QPushButton(this); + list_ok_button->setDefault(true); + list_ok_button->setFont(buttonFont()); + list_ok_button->setText(tr("&OK")); + connect(list_ok_button,SIGNAL(clicked()),this,SLOT(okData())); // // Cancel Button // - button=new QPushButton(this); - button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, - 80,50); - button->setFont(bold_font); - button->setText(tr("&Cancel")); - connect(button,SIGNAL(clicked()),this,SLOT(cancelData())); + list_cancel_button=new QPushButton(this); + list_cancel_button->setFont(buttonFont()); + list_cancel_button->setText(tr("&Cancel")); + connect(list_cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); // // Load Values @@ -247,6 +224,16 @@ void ListSasResources::cancelData() } +void ListSasResources::resizeEvent(QResizeEvent *e) +{ + list_list_view->setGeometry(10,24,size().width()-20,size().height()-94); + list_title_label->setGeometry(14,5,85,19); + list_edit_button->setGeometry(10,size().height()-60,80,50); + list_ok_button->setGeometry(size().width()-180,size().height()-60,80,50); + list_cancel_button->setGeometry(size().width()-90,size().height()-60,80,50); +} + + void ListSasResources::RefreshList() { QString sql; diff --git a/rdadmin/list_sas_resources.h b/rdadmin/list_sas_resources.h index b5c733c7..8eb76303 100644 --- a/rdadmin/list_sas_resources.h +++ b/rdadmin/list_sas_resources.h @@ -2,7 +2,7 @@ // // List SAS Resources // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,15 @@ #ifndef LIST_SAS_RESOURCES_H #define LIST_SAS_RESOURCES_H -#include -#include #include #include #include -#include +#include #include +#include -class ListSasResources : public QDialog +class ListSasResources : public RDDialog { Q_OBJECT public: @@ -44,10 +43,17 @@ class ListSasResources : public QDialog void okData(); void cancelData(); + protected: + void resizeEvent(QResizeEvent *e); + private: void RefreshList(); RDMatrix *list_matrix; + QLabel *list_title_label; Q3ListView *list_list_view; + QPushButton *list_edit_button; + QPushButton *list_ok_button; + QPushButton *list_cancel_button; int list_size; QString list_table; }; diff --git a/rdadmin/list_schedcodes.cpp b/rdadmin/list_schedcodes.cpp index cca77471..775eef2b 100644 --- a/rdadmin/list_schedcodes.cpp +++ b/rdadmin/list_schedcodes.cpp @@ -3,7 +3,7 @@ // The scheduler codes dialog for rdadmin // // Stefan Gabriel -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ -19,51 +19,34 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include -#include -#include -#include -#include -#include -#include #include -#include -#include #include +#include #include #include -#include -#include -#include +#include "add_schedcodes.h" +#include "edit_schedcodes.h" +#include "list_schedcodes.h" ListSchedCodes::ListSchedCodes(QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); + setMinimumSize(sizeHint()); setWindowTitle("RDAdmin - "+tr("Rivendell Scheduler Codes List")); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont small_font=QFont("Helvetica",10,QFont::Normal); - small_font.setPixelSize(10); - // // Add Button // list_add_button=new QPushButton(this); - list_add_button->setFont(font); + list_add_button->setFont(buttonFont()); list_add_button->setText(tr("&Add")); connect(list_add_button,SIGNAL(clicked()),this,SLOT(addData())); @@ -71,7 +54,7 @@ ListSchedCodes::ListSchedCodes(QWidget *parent) // Edit Button // list_edit_button=new QPushButton(this); - list_edit_button->setFont(font); + list_edit_button->setFont(buttonFont()); list_edit_button->setText(tr("&Edit")); connect(list_edit_button,SIGNAL(clicked()),this,SLOT(editData())); @@ -79,7 +62,7 @@ ListSchedCodes::ListSchedCodes(QWidget *parent) // Delete Button // list_delete_button=new QPushButton(this); - list_delete_button->setFont(font); + list_delete_button->setFont(buttonFont()); list_delete_button->setText(tr("&Delete")); connect(list_delete_button,SIGNAL(clicked()),this,SLOT(deleteData())); @@ -88,7 +71,7 @@ ListSchedCodes::ListSchedCodes(QWidget *parent) // list_close_button=new QPushButton(this); list_close_button->setDefault(true); - list_close_button->setFont(font); + list_close_button->setFont(buttonFont()); list_close_button->setText(tr("&Close")); connect(list_close_button,SIGNAL(clicked()),this,SLOT(closeData())); @@ -101,7 +84,7 @@ ListSchedCodes::ListSchedCodes(QWidget *parent) list_schedCodes_view->addColumn(tr("DESCRIPTION")); QLabel *list_box_label= new QLabel(list_schedCodes_view,tr("Scheduler Codes:"),this); - list_box_label->setFont(font); + list_box_label->setFont(buttonFont()); list_box_label->setGeometry(14,11,200,19); connect(list_schedCodes_view, SIGNAL(doubleClicked(Q3ListViewItem *,const QPoint &,int)), diff --git a/rdadmin/list_schedcodes.h b/rdadmin/list_schedcodes.h index aab6620f..416d6e4e 100644 --- a/rdadmin/list_schedcodes.h +++ b/rdadmin/list_schedcodes.h @@ -3,7 +3,7 @@ // The scheduler codes dialog for rdadmin // // Stefan Gabriel -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,14 +22,14 @@ #ifndef LIST_SCHEDCODES_H #define LIST_SCHEDCODES_H -#include #include #include -#include #include +#include +#include -class ListSchedCodes : public QDialog +class ListSchedCodes : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/list_stations.cpp b/rdadmin/list_stations.cpp index 1115f82e..2fa0ff0d 100644 --- a/rdadmin/list_stations.cpp +++ b/rdadmin/list_stations.cpp @@ -2,7 +2,7 @@ // // List Rivendell Workstations // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,19 +18,10 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include #include +#include #include #include "add_station.h" @@ -38,72 +29,56 @@ #include "list_stations.h" ListStations::ListStations(QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); + setMinimumSize(sizeHint()); setWindowTitle("RDAdmin - "+tr("Rivendell Host List")); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont small_font=QFont("Helvetica",10,QFont::Normal); - small_font.setPixelSize(10); - // // Add Button // - QPushButton *add_button=new QPushButton(this); - add_button->setGeometry(410,30,80,50); - add_button->setFont(font); - add_button->setText(tr("&Add")); - connect(add_button,SIGNAL(clicked()),this,SLOT(addData())); + list_add_button=new QPushButton(this); + list_add_button->setFont(buttonFont()); + list_add_button->setText(tr("&Add")); + connect(list_add_button,SIGNAL(clicked()),this,SLOT(addData())); // // Edit Button // - QPushButton *edit_button=new QPushButton(this); - edit_button->setGeometry(410,90,80,50); - edit_button->setFont(font); - edit_button->setText(tr("&Edit")); - connect(edit_button,SIGNAL(clicked()),this,SLOT(editData())); + list_edit_button=new QPushButton(this); + list_edit_button->setFont(buttonFont()); + list_edit_button->setText(tr("&Edit")); + connect(list_edit_button,SIGNAL(clicked()),this,SLOT(editData())); // // Delete Button // - QPushButton *delete_button=new QPushButton(this); - delete_button->setGeometry(410,150,80,50); - delete_button->setFont(font); - delete_button->setText(tr("&Delete")); - connect(delete_button,SIGNAL(clicked()),this,SLOT(deleteData())); + list_delete_button=new QPushButton(this); + list_delete_button->setFont(buttonFont()); + list_delete_button->setText(tr("&Delete")); + connect(list_delete_button,SIGNAL(clicked()),this,SLOT(deleteData())); // // Close Button // - QPushButton *close_button=new QPushButton(this); - close_button->setGeometry(410,240,80,50); - close_button->setDefault(true); - close_button->setFont(font); - close_button->setText(tr("&Close")); - connect(close_button,SIGNAL(clicked()),this,SLOT(closeData())); + list_close_button=new QPushButton(this); + list_close_button->setDefault(true); + list_close_button->setFont(buttonFont()); + list_close_button->setText(tr("&Close")); + connect(list_close_button,SIGNAL(clicked()),this,SLOT(closeData())); // // Station List Box // list_box=new Q3ListBox(this); - list_box->setGeometry(10,30,390,260); QLabel *list_box_label=new QLabel(list_box,tr("Ho&sts:"),this); - list_box_label->setFont(font); + list_box_label->setFont(labelFont()); list_box_label->setGeometry(14,10,85,19); connect(list_box,SIGNAL(doubleClicked(Q3ListBoxItem *)), this,SLOT(doubleClickedData(Q3ListBoxItem *))); @@ -183,6 +158,16 @@ void ListStations::doubleClickedData(Q3ListBoxItem *item) } +void ListStations::resizeEvent(QResizeEvent *e) +{ + list_add_button->setGeometry(size().width()-90,30,80,50); + list_edit_button->setGeometry(size().width()-90,90,80,50); + list_delete_button->setGeometry(size().width()-90,150,80,50); + list_close_button->setGeometry(size().width()-90,size().height()-60,80,50); + list_box->setGeometry(10,30,size().width()-110,size().height()-40); +} + + void ListStations::RefreshList(QString stationname) { QString sql; diff --git a/rdadmin/list_stations.h b/rdadmin/list_stations.h index 90febd07..6ff1bcf0 100644 --- a/rdadmin/list_stations.h +++ b/rdadmin/list_stations.h @@ -2,7 +2,7 @@ // // List Rivendell Workstations // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,13 +21,14 @@ #ifndef LIST_STATIONS_H #define LIST_STATIONS_H -#include #include -#include -#include -#include -class ListStations : public QDialog +#include +#include + +#include + +class ListStations : public RDDialog { Q_OBJECT public: @@ -42,13 +43,19 @@ class ListStations : public QDialog void deleteData(); void doubleClickedData(Q3ListBoxItem *item); void closeData(); + + protected: + void resizeEvent(QResizeEvent *e); private: void RefreshList(QString stationname=""); + QLabel *list_title_label; Q3ListBox *list_box; + QPushButton *list_add_button; + QPushButton *list_edit_button; + QPushButton *list_delete_button; + QPushButton *list_close_button; }; -#endif - - +#endif // LIST_STATIONS_H diff --git a/rdadmin/list_svcs.cpp b/rdadmin/list_svcs.cpp index 495c47cf..ffb99590 100644 --- a/rdadmin/list_svcs.cpp +++ b/rdadmin/list_svcs.cpp @@ -2,7 +2,7 @@ // // List Rivendell Services // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ -39,73 +39,57 @@ #include "list_svcs.h" ListSvcs::ListSvcs(QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); + setMinimumSize(sizeHint()); setWindowTitle("RDAdmin - "+tr("Services")); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont small_font=QFont("Helvetica",10,QFont::Normal); - small_font.setPixelSize(10); - // // Add Button // - QPushButton *add_button=new QPushButton(this); - add_button->setGeometry(100,30,80,50); - add_button->setFont(font); - add_button->setText(tr("&Add")); - connect(add_button,SIGNAL(clicked()),this,SLOT(addData())); + list_add_button=new QPushButton(this); + list_add_button->setFont(buttonFont()); + list_add_button->setText(tr("&Add")); + connect(list_add_button,SIGNAL(clicked()),this,SLOT(addData())); // // Edit Button // - QPushButton *edit_button=new QPushButton(this); - edit_button->setGeometry(100,90,80,50); - edit_button->setFont(font); - edit_button->setText(tr("&Edit")); - connect(edit_button,SIGNAL(clicked()),this,SLOT(editData())); + list_edit_button=new QPushButton(this); + list_edit_button->setFont(buttonFont()); + list_edit_button->setText(tr("&Edit")); + connect(list_edit_button,SIGNAL(clicked()),this,SLOT(editData())); // // Delete Button // - QPushButton *delete_button=new QPushButton(this); - delete_button->setGeometry(100,150,80,50); - delete_button->setFont(font); - delete_button->setText(tr("&Delete")); - connect(delete_button,SIGNAL(clicked()),this,SLOT(deleteData())); + list_delete_button=new QPushButton(this); + list_delete_button->setFont(buttonFont()); + list_delete_button->setText(tr("&Delete")); + connect(list_delete_button,SIGNAL(clicked()),this,SLOT(deleteData())); // // Close Button // - QPushButton *close_button=new QPushButton(this); - close_button->setGeometry(100,240,80,50); - close_button->setDefault(true); - close_button->setFont(font); - close_button->setText(tr("&Close")); - connect(close_button,SIGNAL(clicked()),this,SLOT(closeData())); + list_close_button=new QPushButton(this); + list_close_button->setDefault(true); + list_close_button->setFont(buttonFont()); + list_close_button->setText(tr("&Close")); + connect(list_close_button,SIGNAL(clicked()),this,SLOT(closeData())); // // Services List Box // list_box=new Q3ListBox(this); - list_box->setGeometry(10,30,80,260); - QLabel *list_box_label=new QLabel(list_box,tr("&Services:"),this); - list_box_label->setFont(font); - list_box_label->setGeometry(14,11,85,19); + list_title_label=new QLabel(list_box,tr("&Services:"),this); + list_title_label->setFont(labelFont()); + list_title_label->setGeometry(14,11,85,19); connect(list_box,SIGNAL(doubleClicked(Q3ListBoxItem *)), this,SLOT(doubleClickedData(Q3ListBoxItem *))); @@ -121,7 +105,7 @@ ListSvcs::~ListSvcs() QSize ListSvcs::sizeHint() const { - return QSize(200,300); + return QSize(500,300); } @@ -203,6 +187,16 @@ void ListSvcs::doubleClickedData(Q3ListBoxItem *item) } +void ListSvcs::resizeEvent(QResizeEvent *e) +{ + list_add_button->setGeometry(size().width()-90,30,80,50); + list_edit_button->setGeometry(size().width()-90,90,80,50); + list_delete_button->setGeometry(size().width()-90,150,80,50); + list_close_button->setGeometry(size().width()-90,size().height()-60,80,50); + list_box->setGeometry(10,30,size().width()-110,size().height()-40); +} + + void ListSvcs::RefreshList(QString svcname) { QString sql; diff --git a/rdadmin/list_svcs.h b/rdadmin/list_svcs.h index a8abe3f1..bbc741e0 100644 --- a/rdadmin/list_svcs.h +++ b/rdadmin/list_svcs.h @@ -2,7 +2,7 @@ // // List Rivendell Services // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,13 +21,14 @@ #ifndef LIST_SVCS_H #define LIST_SVCS_H -#include #include -#include -#include -#include -class ListSvcs : public QDialog +#include +#include + +#include + +class ListSvcs : public RDDialog { Q_OBJECT public: @@ -42,13 +43,19 @@ class ListSvcs : public QDialog void deleteData(); void doubleClickedData(Q3ListBoxItem *); void closeData(); - + + protected: + void resizeEvent(QResizeEvent *e); + private: void RefreshList(QString svcname=""); + QLabel *list_title_label; Q3ListBox *list_box; + QPushButton *list_add_button; + QPushButton *list_edit_button; + QPushButton *list_delete_button; + QPushButton *list_close_button; }; -#endif - - +#endif // LIST_SVCS_H diff --git a/rdadmin/list_users.cpp b/rdadmin/list_users.cpp index 8b86f45f..3004712c 100644 --- a/rdadmin/list_users.cpp +++ b/rdadmin/list_users.cpp @@ -2,7 +2,7 @@ // // List Rivendell Users // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ -20,21 +20,11 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include #include -#include -#include #include +#include #include "add_user.h" #include "edit_user.h" @@ -47,7 +37,7 @@ #include "../icons/user.xpm" ListUsers::ListUsers(const QString &admin_name,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); list_admin_name=admin_name; @@ -60,16 +50,6 @@ ListUsers::ListUsers(const QString &admin_name,QWidget *parent) setWindowTitle("RDAdmin - "+tr("Rivendell User List")); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont list_font=QFont("Helvetica",12,QFont::Normal); - list_font.setPixelSize(12); - QFont small_font=QFont("Helvetica",10,QFont::Normal); - small_font.setPixelSize(10); - // // Create Icons // @@ -80,7 +60,7 @@ ListUsers::ListUsers(const QString &admin_name,QWidget *parent) // Add Button // list_add_button=new QPushButton(this); - list_add_button->setFont(font); + list_add_button->setFont(buttonFont()); list_add_button->setText(tr("&Add")); connect(list_add_button,SIGNAL(clicked()),this,SLOT(addData())); @@ -88,7 +68,7 @@ ListUsers::ListUsers(const QString &admin_name,QWidget *parent) // Edit Button // list_edit_button=new QPushButton(this); - list_edit_button->setFont(font); + list_edit_button->setFont(buttonFont()); list_edit_button->setText(tr("&Edit")); connect(list_edit_button,SIGNAL(clicked()),this,SLOT(editData())); @@ -96,7 +76,7 @@ ListUsers::ListUsers(const QString &admin_name,QWidget *parent) // Delete Button // list_delete_button=new QPushButton(this); - list_delete_button->setFont(font); + list_delete_button->setFont(buttonFont()); list_delete_button->setText(tr("&Delete")); connect(list_delete_button,SIGNAL(clicked()),this,SLOT(deleteData())); @@ -105,7 +85,7 @@ ListUsers::ListUsers(const QString &admin_name,QWidget *parent) // list_close_button=new QPushButton(this); list_close_button->setDefault(true); - list_close_button->setFont(font); + list_close_button->setFont(buttonFont()); list_close_button->setText(tr("&Close")); connect(list_close_button,SIGNAL(clicked()),this,SLOT(closeData())); @@ -113,7 +93,6 @@ ListUsers::ListUsers(const QString &admin_name,QWidget *parent) // User List // list_users_view=new RDListView(this); - list_users_view->setFont(list_font); list_users_view->setAllColumnsShowFocus(true); list_users_view->setItemMargin(5); list_users_view->addColumn(""); @@ -121,7 +100,7 @@ ListUsers::ListUsers(const QString &admin_name,QWidget *parent) list_users_view->addColumn(tr("FULL NAME")); list_users_view->addColumn(tr("DESCRIPTION")); QLabel *list_box_label=new QLabel(list_users_view,tr("&Users:"),this); - list_box_label->setFont(font); + list_box_label->setFont(labelFont()); list_box_label->setGeometry(14,11,85,19); connect(list_users_view, SIGNAL(doubleClicked(Q3ListViewItem *,const QPoint &,int)), diff --git a/rdadmin/list_users.h b/rdadmin/list_users.h index 3da0e5bd..4f2c3497 100644 --- a/rdadmin/list_users.h +++ b/rdadmin/list_users.h @@ -2,7 +2,7 @@ // // List Rivendell Users // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,14 @@ #ifndef LIST_USERS_H #define LIST_USERS_H -#include #include -#include #include -#include -#include #include +#include +#include -class ListUsers : public QDialog +class ListUsers : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/list_vguest_resources.cpp b/rdadmin/list_vguest_resources.cpp index 407aeb41..93d41985 100644 --- a/rdadmin/list_vguest_resources.cpp +++ b/rdadmin/list_vguest_resources.cpp @@ -35,7 +35,7 @@ ListVguestResources::ListVguestResources(RDMatrix *matrix, RDMatrix::VguestType type,int size, QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -49,28 +49,14 @@ ListVguestResources::ListVguestResources(RDMatrix *matrix, // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); - - // - // Create Fonts - // - QFont bold_font=QFont("Helvetica",12,QFont::Bold); - bold_font.setPixelSize(12); - QFont font=QFont("Helvetica",12,QFont::Normal); - font.setPixelSize(12); + setMinimumSize(sizeHint()); // // Resources List Box // list_list_view=new Q3ListView(this); - list_list_view-> - setGeometry(10,24,sizeHint().width()-20,sizeHint().height()-94); - QLabel *label=new QLabel(list_list_view,list_table,this); - label->setFont(bold_font); - label->setGeometry(14,5,85,19); + list_title_label=new QLabel(list_list_view,list_table,this); + list_title_label->setFont(labelFont()); list_list_view->setAllColumnsShowFocus(true); list_list_view->setItemMargin(5); switch(list_type) { @@ -110,31 +96,27 @@ ListVguestResources::ListVguestResources(RDMatrix *matrix, // // Edit Button // - QPushButton *button=new QPushButton(this); - button->setGeometry(10,sizeHint().height()-60,80,50); - button->setFont(bold_font); - button->setText(tr("&Edit")); - connect(button,SIGNAL(clicked()),this,SLOT(editData())); + list_edit_button=new QPushButton(this); + list_edit_button->setFont(buttonFont()); + list_edit_button->setText(tr("&Edit")); + connect(list_edit_button,SIGNAL(clicked()),this,SLOT(editData())); // // Ok Button // - button=new QPushButton(this); - button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); - button->setDefault(true); - button->setFont(bold_font); - button->setText(tr("&OK")); - connect(button,SIGNAL(clicked()),this,SLOT(okData())); + list_ok_button=new QPushButton(this); + list_ok_button->setDefault(true); + list_ok_button->setFont(buttonFont()); + list_ok_button->setText(tr("&OK")); + connect(list_ok_button,SIGNAL(clicked()),this,SLOT(okData())); // // Cancel Button // - button=new QPushButton(this); - button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, - 80,50); - button->setFont(bold_font); - button->setText(tr("&Cancel")); - connect(button,SIGNAL(clicked()),this,SLOT(cancelData())); + list_cancel_button=new QPushButton(this); + list_cancel_button->setFont(buttonFont()); + list_cancel_button->setText(tr("&Cancel")); + connect(list_cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); // // Load Values @@ -309,6 +291,16 @@ void ListVguestResources::cancelData() } +void ListVguestResources::resizeEvent(QResizeEvent *e) +{ + list_title_label->setGeometry(14,5,85,19); + list_list_view->setGeometry(10,24,size().width()-20,size().height()-94); + list_edit_button->setGeometry(10,size().height()-60,80,50); + list_ok_button->setGeometry(size().width()-180,size().height()-60,80,50); + list_cancel_button->setGeometry(size().width()-90,size().height()-60,80,50); +} + + void ListVguestResources::RefreshList() { QString sql; diff --git a/rdadmin/list_vguest_resources.h b/rdadmin/list_vguest_resources.h index 9b7b47cc..de40c812 100644 --- a/rdadmin/list_vguest_resources.h +++ b/rdadmin/list_vguest_resources.h @@ -2,7 +2,7 @@ // // List vGuest Resources // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,15 @@ #ifndef LIST_VGUEST_RESOURCES_H #define LIST_VGUEST_RESOURCES_H -#include -#include #include #include #include -#include +#include #include +#include -class ListVguestResources : public QDialog +class ListVguestResources : public RDDialog { Q_OBJECT public: @@ -45,11 +44,18 @@ class ListVguestResources : public QDialog void okData(); void cancelData(); + protected: + void resizeEvent(QResizeEvent *e); + private: void RefreshList(); RDMatrix *list_matrix; RDMatrix::VguestType list_type; + QLabel *list_title_label; Q3ListView *list_list_view; + QPushButton *list_edit_button; + QPushButton *list_ok_button; + QPushButton *list_cancel_button; int list_size; QString list_table; }; diff --git a/rdadmin/login.cpp b/rdadmin/login.cpp index 74217abd..34a9ae17 100644 --- a/rdadmin/login.cpp +++ b/rdadmin/login.cpp @@ -2,7 +2,7 @@ // // Login widget for RDAdmin. // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,7 +37,7 @@ #include Login::Login(QString *username,QString *password,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -53,12 +53,6 @@ Login::Login(QString *username,QString *password,QWidget *parent) login_name=username; login_password=password; - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - // // Text Validator // @@ -69,7 +63,7 @@ Login::Login(QString *username,QString *password,QWidget *parent) // QPushButton *ok_button=new QPushButton(this); ok_button->setGeometry(10,60,100,55); - ok_button->setFont(font); + ok_button->setFont(buttonFont()); ok_button->setText(tr("&OK")); ok_button->setDefault(true); connect(ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -79,7 +73,7 @@ Login::Login(QString *username,QString *password,QWidget *parent) // QPushButton *cancel_button=new QPushButton(this); cancel_button->setGeometry(120,60,100,55); - cancel_button->setFont(font); + cancel_button->setFont(buttonFont()); cancel_button->setText(tr("&Cancel")); connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); @@ -92,8 +86,8 @@ Login::Login(QString *username,QString *password,QWidget *parent) login_name_edit->setFocus(); login_name_edit->setValidator(validator); QLabel *login_name_label=new QLabel(login_name_edit,tr("User &Name:"),this); + login_name_label->setFont(labelFont()); login_name_label->setGeometry(10,10,85,19); - login_name_label->setFont(font); login_name_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -107,9 +101,9 @@ Login::Login(QString *username,QString *password,QWidget *parent) QLabel *login_password_label= new QLabel(login_password_edit,tr("&Password:"),this); login_password_label->setGeometry(10,31,85,19); - login_password_label->setFont(font); - login_password_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); - + login_password_label->setFont(labelFont()); + login_password_label-> + setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); } diff --git a/rdadmin/login.h b/rdadmin/login.h index 8f9c0b7d..745a17ab 100644 --- a/rdadmin/login.h +++ b/rdadmin/login.h @@ -2,7 +2,7 @@ // // Login Widget for RDAdmin. // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,13 +21,14 @@ #ifndef LOGIN_H #define LOGIN_H -#include #include #include #include #include -class Login : public QDialog +#include + +class Login : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/rdadmin.cpp b/rdadmin/rdadmin.cpp index 20a574d0..041f009a 100644 --- a/rdadmin/rdadmin.cpp +++ b/rdadmin/rdadmin.cpp @@ -25,7 +25,6 @@ #include #include -#include #include #include #include @@ -77,8 +76,8 @@ void PrintError(const QString &str,bool interactive) } -MainWidget::MainWidget(QWidget *parent) - : QWidget(parent) +MainWidget::MainWidget(RDConfig *config,RDWidget *parent) + : RDWidget(config,parent) { QString str; QString err_msg; @@ -92,15 +91,6 @@ MainWidget::MainWidget(QWidget *parent) setMinimumHeight(sizeHint().height()); setMaximumHeight(sizeHint().height()); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont default_font("Helvetica",12,QFont::Normal); - default_font.setPixelSize(12); - qApp->setFont(default_font); - // // Create And Set Icon // @@ -154,13 +144,13 @@ MainWidget::MainWidget(QWidget *parent) QLabel *name_label=new QLabel(this); name_label->setGeometry(0,5,sizeHint().width(),20); name_label->setAlignment(Qt::AlignVCenter|Qt::AlignCenter); - name_label->setFont(font); + name_label->setFont(labelFont()); name_label->setText(tr("User")+": "+rda->user()->name()); QLabel *description_label=new QLabel(this); description_label->setGeometry(0,24,sizeHint().width(),14); description_label->setAlignment(Qt::AlignVCenter|Qt::AlignCenter); - name_label->setFont(font); + name_label->setFont(labelFont()); description_label->setText(rda->user()->description()); // @@ -168,7 +158,7 @@ MainWidget::MainWidget(QWidget *parent) // QPushButton *users_button=new QPushButton(this); users_button->setGeometry(10,50,80,60); - users_button->setFont(font); + users_button->setFont(buttonFont()); users_button->setText(tr("Manage\n&Users")); connect(users_button,SIGNAL(clicked()),this,SLOT(manageUsersData())); @@ -177,7 +167,7 @@ MainWidget::MainWidget(QWidget *parent) // QPushButton *groups_button=new QPushButton(this); groups_button->setGeometry(10,120,80,60); - groups_button->setFont(font); + groups_button->setFont(buttonFont()); groups_button->setText(tr("Manage\n&Groups")); connect(groups_button,SIGNAL(clicked()),this,SLOT(manageGroupsData())); @@ -186,7 +176,7 @@ MainWidget::MainWidget(QWidget *parent) // QPushButton *services_button=new QPushButton(this); services_button->setGeometry(100,50,80,60); - services_button->setFont(font); + services_button->setFont(buttonFont()); services_button->setText(tr("Manage\n&Services")); connect(services_button,SIGNAL(clicked()),this,SLOT(manageServicesData())); @@ -195,7 +185,7 @@ MainWidget::MainWidget(QWidget *parent) // QPushButton *stations_button=new QPushButton(this); stations_button->setGeometry(100,120,80,60); - stations_button->setFont(font); + stations_button->setFont(buttonFont()); stations_button->setText(tr("Manage\nHo&sts")); connect(stations_button,SIGNAL(clicked()),this,SLOT(manageStationsData())); @@ -204,7 +194,7 @@ MainWidget::MainWidget(QWidget *parent) // QPushButton *reports_button=new QPushButton(this); reports_button->setGeometry(190,50,80,60); - reports_button->setFont(font); + reports_button->setFont(buttonFont()); reports_button->setText(tr("Manage\nR&eports")); connect(reports_button,SIGNAL(clicked()),this,SLOT(reportsData())); @@ -213,7 +203,7 @@ MainWidget::MainWidget(QWidget *parent) // QPushButton *podcasts_button=new QPushButton(this); podcasts_button->setGeometry(280,50,80,60); - podcasts_button->setFont(font); + podcasts_button->setFont(buttonFont()); podcasts_button->setText(tr("Manage\n&Feeds")); connect(podcasts_button,SIGNAL(clicked()),this,SLOT(podcastsData())); @@ -222,7 +212,7 @@ MainWidget::MainWidget(QWidget *parent) // QPushButton *system_button=new QPushButton(this); system_button->setGeometry(190,120,80,60); - system_button->setFont(font); + system_button->setFont(buttonFont()); system_button->setText(tr("System\nSettings")); connect(system_button,SIGNAL(clicked()),this,SLOT(systemSettingsData())); @@ -231,7 +221,7 @@ MainWidget::MainWidget(QWidget *parent) // QPushButton *schedcodes_button=new QPushButton(this); schedcodes_button->setGeometry(280,120,80,60); - schedcodes_button->setFont(font); + schedcodes_button->setFont(buttonFont()); schedcodes_button->setText(tr("Scheduler\nCodes")); connect(schedcodes_button,SIGNAL(clicked()),this,SLOT(manageSchedCodes())); @@ -240,7 +230,7 @@ MainWidget::MainWidget(QWidget *parent) // QPushButton *repl_button=new QPushButton(this); repl_button->setGeometry(100,190,80,60); - repl_button->setFont(font); + repl_button->setFont(buttonFont()); repl_button->setText(tr("Manage\nReplicators")); connect(repl_button,SIGNAL(clicked()),this,SLOT(manageReplicatorsData())); @@ -249,7 +239,7 @@ MainWidget::MainWidget(QWidget *parent) // QPushButton *info_button=new QPushButton(this); info_button->setGeometry(190,190,80,60); - info_button->setFont(font); + info_button->setFont(buttonFont()); info_button->setText(tr("System\nInfo")); connect(info_button,SIGNAL(clicked()),this,SLOT(systemInfoData())); @@ -258,7 +248,7 @@ MainWidget::MainWidget(QWidget *parent) // QPushButton *quit_button=new QPushButton(this); quit_button->setGeometry(10,sizeHint().height()-70,sizeHint().width()-20,60); - quit_button->setFont(font); + quit_button->setFont(buttonFont()); quit_button->setText(tr("&Quit")); connect(quit_button,SIGNAL(clicked()),this,SLOT(quitMainWidget())); } @@ -397,7 +387,9 @@ int main(int argc,char *argv[]) QTextCodec::locale(),"."); a.installTranslator(&tr); - MainWidget *w=new MainWidget(); + RDConfig *config=new RDConfig(); + config->load(); + MainWidget *w=new MainWidget(config); a.setMainWidget(w); w->setGeometry(QRect(QPoint(0,0),w->sizeHint())); w->show(); diff --git a/rdadmin/rdadmin.h b/rdadmin/rdadmin.h index fd97361d..951bae4a 100644 --- a/rdadmin/rdadmin.h +++ b/rdadmin/rdadmin.h @@ -22,19 +22,20 @@ #ifndef RDADMIN_H #define RDADMIN_H -#include #include #include #include #include +#include + #define RDADMIN_USAGE "\n" -class MainWidget : public QWidget +class MainWidget : public RDWidget { Q_OBJECT public: - MainWidget(QWidget *parent=0); + MainWidget(RDConfig *config,RDWidget *parent=0); QSize sizeHint() const; QSizePolicy sizePolicy() const; diff --git a/rdadmin/rdadmin_cs.ts b/rdadmin/rdadmin_cs.ts index 57110b52..3b646b3a 100644 --- a/rdadmin/rdadmin_cs.ts +++ b/rdadmin/rdadmin_cs.ts @@ -420,7 +420,7 @@ a záloha původní databáze uložena v &New Replicator Name: - Název nového &kopírovacího stroje: + Název nového &kopírovacího stroje: &OK @@ -446,6 +446,10 @@ a záloha původní databáze uložena v A replicator with that name already exists! Kopírovací stroj s tímto názvem již existuje! + + Replicator Name: + + AddReport @@ -1662,6 +1666,14 @@ Pořád ještě chcete povolit přesměrování? Invalid Cart Number! Neplatné číslo vozíku! + + ON Transition + + + + OFF Transition + + EditGroup @@ -2728,11 +2740,11 @@ GPIOs INPUT - VSTUP + VSTUP OUTPUT - VÝSTUP + VÝSTUP Settings @@ -2960,6 +2972,14 @@ nastaveném pro běh služby CAE pro naplnění databáze se zdroji zvuku.Normalization Level: + + Input + Vstup + + + Output + Výstup + EditRDLogedit @@ -2969,11 +2989,11 @@ nastaveném pro běh služby CAE pro naplnění databáze se zdroji zvuku. INPUT - VSTUP + VSTUP OUTPUT - VÝSTUP + VÝSTUP Voice Tracker Settings @@ -3155,6 +3175,14 @@ nastaveném pro běh služby CAE pro naplnění databáze se zdroji zvuku.Configure RDLogedit + + Input + Vstup + + + Output + Výstup + EditRDPanel @@ -3407,11 +3435,11 @@ in order to populate the audio resources database. Linux Export Path: - Cesta pro vyvedení v Linuxu: + Cesta pro vyvedení v Linuxu: Windows Export Path: - Cesta pro vyvedení ve Windows: + Cesta pro vyvedení ve Windows: Export Event Types: @@ -3502,11 +3530,11 @@ in order to populate the audio resources database. - Linux Post Export Cmd: + Export Path: - Windows Post Export Cmd: + Post Export Cmd: @@ -3546,11 +3574,11 @@ in order to populate the audio resources database. CART - VOZÍK + VOZÍK TITLE - NÁZEV + NÁZEV &Save List @@ -3605,7 +3633,15 @@ Přepsat? - Mcast Address for Notifications + Cart + Vozík + + + Title + Název + + + Multicast Address for Notifications @@ -4486,7 +4522,7 @@ Permissions This program is free software, and comes with ABSOLUTELY NO WARRANTY, not even the implied warranties of MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. Touch the "View License" button for details. - Tento program je svobodným softwarem a je šířen v naději, že bude užitečný, ale + Tento program je svobodným softwarem a je šířen v naději, že bude užitečný, ale BEZ JAKÉKOLI ZÁRUKY; také bez předpokládané záruky PRODEJNOSTI nebo POUŽITELNOSTI PRO NĚJAKÝ URČITÝ ÚČEL: Více podrobností naleznete v GNU Library General Public License. Klepněte na tlačítko pro zobrazení povolení. @@ -4526,6 +4562,10 @@ GNU Library General Public License. Klepněte na tlačítko pro zobrazení povol &Credits + + This program is free software, and comes with ABSOLUTELY NO WARRANTY, not even the implied warranties of MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. Touch the "View License" button for details. + + License diff --git a/rdadmin/rdadmin_de.ts b/rdadmin/rdadmin_de.ts index 79855cca..2895c4cf 100644 --- a/rdadmin/rdadmin_de.ts +++ b/rdadmin/rdadmin_de.ts @@ -352,10 +352,6 @@ worden. Aktuelle Version Add Replicator - - &New Replicator Name: - - &OK &OK @@ -380,6 +376,10 @@ worden. Aktuelle Version A replicator with that name already exists! + + Replicator Name: + + AddReport @@ -1565,6 +1565,14 @@ Do you still want to enable redireciton? Invalid Cart Number! Ungültige Cartnummer! + + ON Transition + + + + OFF Transition + + EditGroup @@ -2640,11 +2648,11 @@ GPIOs INPUT - EINGANG + EINGANG OUTPUT - AUSGANG + AUSGANG Settings @@ -2870,16 +2878,24 @@ configured to run the CAE service in order to populate the audio resources datab Normalization Level: + + Input + Eingang + + + Output + Ausgang + EditRDLogedit INPUT - EINGANG + EINGANG OUTPUT - AUSGANG + AUSGANG Voice Tracker Settings @@ -3059,6 +3075,14 @@ configured to run the CAE service in order to populate the audio resources datab Configure RDLogedit + + Input + Eingang + + + Output + Ausgang + EditRDPanel @@ -3297,11 +3321,11 @@ in order to populate the audio resources database. Linux Export Path: - Linux-Exportpfad: + Linux-Exportpfad: Windows Export Path: - Windows-Exportpfad: + Windows-Exportpfad: Export Event Types: @@ -3392,11 +3416,11 @@ in order to populate the audio resources database. - Linux Post Export Cmd: + Export Path: - Windows Post Export Cmd: + Post Export Cmd: @@ -3434,14 +3458,6 @@ in order to populate the audio resources database. The following duplicate titles must be corrected before "Allow Duplicate Values" can be turned off. - - CART - - - - TITLE - - &Save List @@ -3489,11 +3505,19 @@ Overwrite? - Mcast Address for Notifications + Unable to write file " - Unable to write file " + Cart + Cart + + + Title + Titel + + + Multicast Address for Notifications @@ -4371,7 +4395,7 @@ Permissions This program is free software, and comes with ABSOLUTELY NO WARRANTY, not even the implied warranties of MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. Touch the "View License" button for details. - Dieses Programm ist freie Software und kommt mit ABSOLUT KEINER GARANTIE + Dieses Programm ist freie Software und kommt mit ABSOLUT KEINER GARANTIE nicht einmal die implizierte Garantie der ANWENDBARKEIT oder EIGNUNG FÜR EINEN BESTIMMTEN ZWECK. Drücken Sie auf "Lizenz anzeigen" für Details. @@ -4410,6 +4434,10 @@ anzeigen &Credits + + This program is free software, and comes with ABSOLUTELY NO WARRANTY, not even the implied warranties of MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. Touch the "View License" button for details. + + License diff --git a/rdadmin/rdadmin_es.ts b/rdadmin/rdadmin_es.ts index 2a013c75..1fc4c2ef 100644 --- a/rdadmin/rdadmin_es.ts +++ b/rdadmin/rdadmin_es.ts @@ -393,7 +393,7 @@ y un respaldo de la base de datos se guardó en &New Replicator Name: - &Nombre del Replicad.: + &Nombre del Replicad.: &OK @@ -419,6 +419,10 @@ y un respaldo de la base de datos se guardó en A replicator with that name already exists! ¡Un replicador con ese nombre ya existe! + + Replicator Name: + + AddReport @@ -1665,6 +1669,14 @@ al URL especificado. Invalid Cart Number! ¡Número de cartucho inválido! + + ON Transition + + + + OFF Transition + + EditGroup @@ -2730,11 +2742,11 @@ GPIOs INPUT - ENTRADA + ENTRADA OUTPUT - SALIDA + SALIDA Settings @@ -2948,6 +2960,14 @@ equipo configurado para ejecutar CAE para obtener la información de audio.Normalization Level: + + Input + Entrada + + + Output + Salida + EditRDLogedit @@ -2957,11 +2977,11 @@ equipo configurado para ejecutar CAE para obtener la información de audio. INPUT - ENTRADA + ENTRADA OUTPUT - SALIDA + SALIDA Voice Tracker Settings @@ -3143,6 +3163,14 @@ computador para obtener los recursos de audio de dicho equipo. Configure RDLogedit + + Input + Entrada + + + Output + Salida + EditRDPanel @@ -3395,11 +3423,11 @@ in order to populate the audio resources database. Linux Export Path: - Exportar en (Linux): + Exportar en (Linux): Windows Export Path: - Exportar en (Windows): + Exportar en (Windows): Export Event Types: @@ -3490,11 +3518,11 @@ in order to populate the audio resources database. - Linux Post Export Cmd: + Export Path: - Windows Post Export Cmd: + Post Export Cmd: @@ -3557,11 +3585,11 @@ in order to populate the audio resources database. CART - CARTUCHO + CARTUCHO TITLE - TÍTULO + TÍTULO &Save List @@ -3612,11 +3640,19 @@ Overwrite? - Mcast Address for Notifications + Unable to write file " - Unable to write file " + Cart + Cartucho + + + Title + Título + + + Multicast Address for Notifications @@ -4458,7 +4494,7 @@ Permissions This program is free software, and comes with ABSOLUTELY NO WARRANTY, not even the implied warranties of MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. Touch the "View License" button for details. - Este programa es Software Libre, y se proporciona SIN GARANTÍAS DE NINGÚN + Este programa es Software Libre, y se proporciona SIN GARANTÍAS DE NINGÚN TIPO, ni siquiera las garantías MERCANTILES implícitas o LA CONVENIENCIA PARA UN PROPÓSITO PARTICULAR. Oprima el botón "Ver licencia" para detalles. @@ -4493,6 +4529,10 @@ PARA UN PROPÓSITO PARTICULAR. Oprima el botón "Ver licencia" para d &Credits + + This program is free software, and comes with ABSOLUTELY NO WARRANTY, not even the implied warranties of MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. Touch the "View License" button for details. + + License diff --git a/rdadmin/rdadmin_fr.ts b/rdadmin/rdadmin_fr.ts index 223a1d6f..3f435b23 100644 --- a/rdadmin/rdadmin_fr.ts +++ b/rdadmin/rdadmin_fr.ts @@ -151,10 +151,6 @@ Add Replicator - - &New Replicator Name: - - &OK @@ -179,6 +175,10 @@ A replicator with that name already exists! + + Replicator Name: + + AddReport @@ -1237,6 +1237,14 @@ Do you still want to enable redireciton? Invalid Cart Number! + + ON Transition + + + + OFF Transition + + EditGroup @@ -2126,14 +2134,6 @@ GPIOs EditRDLibrary - - INPUT - - - - OUTPUT - - Settings @@ -2324,17 +2324,17 @@ configured to run the CAE service in order to populate the audio resources datab Normalization Level: + + Input + + + + Output + + EditRDLogedit - - INPUT - - - - OUTPUT - - Voice Tracker Settings @@ -2497,6 +2497,14 @@ configured to run the CAE service in order to populate the audio resources datab Configure RDLogedit + + Input + + + + Output + + EditRDPanel @@ -2733,14 +2741,6 @@ in order to populate the audio resources database. Station &Format: - - Linux Export Path: - - - - Windows Export Path: - - Export Event Types: @@ -2830,11 +2830,11 @@ in order to populate the audio resources database. - Linux Post Export Cmd: + Export Path: - Windows Post Export Cmd: + Post Export Cmd: @@ -2872,14 +2872,6 @@ in order to populate the audio resources database. The following duplicate titles must be corrected before "Allow Duplicate Values" can be turned off. - - CART - - - - TITLE - - &Save List @@ -2927,11 +2919,19 @@ Overwrite? - Mcast Address for Notifications + Unable to write file " - Unable to write file " + Cart + + + + Title + + + + Multicast Address for Notifications @@ -3660,12 +3660,6 @@ Permissions Database Schema - - This program is free software, and comes with ABSOLUTELY NO WARRANTY, -not even the implied warranties of MERCHANTIBILITY or FITNESS FOR A -PARTICULAR PURPOSE. Touch the "View License" button for details. - - View &License @@ -3680,6 +3674,10 @@ PARTICULAR PURPOSE. Touch the "View License" button for details. + + This program is free software, and comes with ABSOLUTELY NO WARRANTY, not even the implied warranties of MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. Touch the "View License" button for details. + + License diff --git a/rdadmin/rdadmin_nb.ts b/rdadmin/rdadmin_nb.ts index 60dd71a8..d6004944 100644 --- a/rdadmin/rdadmin_nb.ts +++ b/rdadmin/rdadmin_nb.ts @@ -334,10 +334,6 @@ oppdatert til versjon Add Replicator - - &New Replicator Name: - - &OK &OK @@ -362,6 +358,10 @@ oppdatert til versjon A replicator with that name already exists! + + Replicator Name: + + AddReport @@ -1531,6 +1531,14 @@ Do you still want to enable redireciton? Invalid Cart Number! Ugyldig korgnummer! + + ON Transition + + + + OFF Transition + + EditGroup @@ -2568,11 +2576,11 @@ GPIOs INPUT - INNGANG + INNGANG OUTPUT - UTGANG + UTGANG Settings @@ -2798,16 +2806,24 @@ configured to run the CAE service in order to populate the audio resources datab Normalization Level: + + Input + Inngang + + + Output + Utgang + EditRDLogedit INPUT - INNGANG + INNGANG OUTPUT - UTGANG + UTGANG Voice Tracker Settings @@ -2987,6 +3003,14 @@ configured to run the CAE service in order to populate the audio resources datab Configure RDLogedit + + Input + Inngang + + + Output + Utgang + EditRDPanel @@ -3235,11 +3259,11 @@ in order to populate the audio resources database. Linux Export Path: - Linux-eksportstig: + Linux-eksportstig: Windows Export Path: - Windows-eksportstig: + Windows-eksportstig: Export Event Types: @@ -3330,11 +3354,11 @@ in order to populate the audio resources database. - Linux Post Export Cmd: + Export Path: - Windows Post Export Cmd: + Post Export Cmd: @@ -3372,14 +3396,6 @@ in order to populate the audio resources database. The following duplicate titles must be corrected before "Allow Duplicate Values" can be turned off. - - CART - - - - TITLE - - &Save List @@ -3427,11 +3443,19 @@ Overwrite? - Mcast Address for Notifications + Unable to write file " - Unable to write file " + Cart + Korg + + + Title + Tittel + + + Multicast Address for Notifications @@ -4276,7 +4300,7 @@ Permissions This program is free software, and comes with ABSOLUTELY NO WARRANTY, not even the implied warranties of MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. Touch the "View License" button for details. - Dette programmet er fri programvare, og har INGEN GARANTIAR,ikkje ein gong garantiar + Dette programmet er fri programvare, og har INGEN GARANTIAR,ikkje ein gong garantiar som gjeld MOGLEIK FOR KJØP OG SAL eller om det er TURVANDE TIL NOKO FØREMÅL. Klikk på "Lisens"-knappen for fleire opplysningar. @@ -4315,6 +4339,10 @@ Klikk på "Lisens"-knappen for fleire opplysningar. &Credits + + This program is free software, and comes with ABSOLUTELY NO WARRANTY, not even the implied warranties of MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. Touch the "View License" button for details. + + License diff --git a/rdadmin/rdadmin_nn.ts b/rdadmin/rdadmin_nn.ts index 60dd71a8..d6004944 100644 --- a/rdadmin/rdadmin_nn.ts +++ b/rdadmin/rdadmin_nn.ts @@ -334,10 +334,6 @@ oppdatert til versjon Add Replicator - - &New Replicator Name: - - &OK &OK @@ -362,6 +358,10 @@ oppdatert til versjon A replicator with that name already exists! + + Replicator Name: + + AddReport @@ -1531,6 +1531,14 @@ Do you still want to enable redireciton? Invalid Cart Number! Ugyldig korgnummer! + + ON Transition + + + + OFF Transition + + EditGroup @@ -2568,11 +2576,11 @@ GPIOs INPUT - INNGANG + INNGANG OUTPUT - UTGANG + UTGANG Settings @@ -2798,16 +2806,24 @@ configured to run the CAE service in order to populate the audio resources datab Normalization Level: + + Input + Inngang + + + Output + Utgang + EditRDLogedit INPUT - INNGANG + INNGANG OUTPUT - UTGANG + UTGANG Voice Tracker Settings @@ -2987,6 +3003,14 @@ configured to run the CAE service in order to populate the audio resources datab Configure RDLogedit + + Input + Inngang + + + Output + Utgang + EditRDPanel @@ -3235,11 +3259,11 @@ in order to populate the audio resources database. Linux Export Path: - Linux-eksportstig: + Linux-eksportstig: Windows Export Path: - Windows-eksportstig: + Windows-eksportstig: Export Event Types: @@ -3330,11 +3354,11 @@ in order to populate the audio resources database. - Linux Post Export Cmd: + Export Path: - Windows Post Export Cmd: + Post Export Cmd: @@ -3372,14 +3396,6 @@ in order to populate the audio resources database. The following duplicate titles must be corrected before "Allow Duplicate Values" can be turned off. - - CART - - - - TITLE - - &Save List @@ -3427,11 +3443,19 @@ Overwrite? - Mcast Address for Notifications + Unable to write file " - Unable to write file " + Cart + Korg + + + Title + Tittel + + + Multicast Address for Notifications @@ -4276,7 +4300,7 @@ Permissions This program is free software, and comes with ABSOLUTELY NO WARRANTY, not even the implied warranties of MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. Touch the "View License" button for details. - Dette programmet er fri programvare, og har INGEN GARANTIAR,ikkje ein gong garantiar + Dette programmet er fri programvare, og har INGEN GARANTIAR,ikkje ein gong garantiar som gjeld MOGLEIK FOR KJØP OG SAL eller om det er TURVANDE TIL NOKO FØREMÅL. Klikk på "Lisens"-knappen for fleire opplysningar. @@ -4315,6 +4339,10 @@ Klikk på "Lisens"-knappen for fleire opplysningar. &Credits + + This program is free software, and comes with ABSOLUTELY NO WARRANTY, not even the implied warranties of MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. Touch the "View License" button for details. + + License diff --git a/rdadmin/rdadmin_pt_BR.ts b/rdadmin/rdadmin_pt_BR.ts index c9899026..1dbf552d 100644 --- a/rdadmin/rdadmin_pt_BR.ts +++ b/rdadmin/rdadmin_pt_BR.ts @@ -327,10 +327,6 @@ atualizada para a Versão Add Replicator - - &New Replicator Name: - - &OK @@ -355,6 +351,10 @@ atualizada para a Versão A replicator with that name already exists! + + Replicator Name: + + AddReport @@ -1537,6 +1537,14 @@ Do you still want to enable redireciton? Invalid Cart Number! Númerodo Cartão Inválido! + + ON Transition + + + + OFF Transition + + EditGroup @@ -2616,11 +2624,11 @@ GPIOs INPUT - ENTRADA + ENTRADA OUTPUT - SAÍDA + SAÍDA Settings @@ -2846,16 +2854,24 @@ configured to run the CAE service in order to populate the audio resources datab Normalization Level: + + Input + Entrada + + + Output + Saída + EditRDLogedit INPUT - ENTRADA + ENTRADA OUTPUT - SAÍDA + SAÍDA Voice Tracker Settings @@ -3035,6 +3051,14 @@ configured to run the CAE service in order to populate the audio resources datab Configure RDLogedit + + Input + Entrada + + + Output + Saída + EditRDPanel @@ -3284,11 +3308,11 @@ in order to populate the audio resources database. Linux Export Path: - Pasta de exp. - Linux: + Pasta de exp. - Linux: Windows Export Path: - Pasta de exp. - Windows: + Pasta de exp. - Windows: Export Event Types: @@ -3379,11 +3403,11 @@ in order to populate the audio resources database. - Linux Post Export Cmd: + Export Path: - Windows Post Export Cmd: + Post Export Cmd: @@ -3421,14 +3445,6 @@ in order to populate the audio resources database. The following duplicate titles must be corrected before "Allow Duplicate Values" can be turned off. - - CART - - - - TITLE - - &Save List @@ -3476,11 +3492,19 @@ Overwrite? - Mcast Address for Notifications + Unable to write file " - Unable to write file " + Cart + Cartão + + + Title + Título + + + Multicast Address for Notifications @@ -4355,7 +4379,7 @@ Permissions This program is free software, and comes with ABSOLUTELY NO WARRANTY, not even the implied warranties of MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. Touch the "View License" button for details. - Este Programa e um Software Livre, a não ABSOLUTAMENTE NENHUMA GARANTIA, + Este Programa e um Software Livre, a não ABSOLUTAMENTE NENHUMA GARANTIA, nem mesmo as garantias de COMERCIALIZAÇÃO ou de ADEQUAÇÃO PARA ALGUMA FINALIDADE PARTICULAR. Aperte o botão VER LICENÇA para mais detalhes. @@ -4390,6 +4414,10 @@ FINALIDADE PARTICULAR. Aperte o botão VER LICENÇA para mais detalhes. + + This program is free software, and comes with ABSOLUTELY NO WARRANTY, not even the implied warranties of MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. Touch the "View License" button for details. + + License diff --git a/rdadmin/rename_group.cpp b/rdadmin/rename_group.cpp index b9192197..675f8227 100644 --- a/rdadmin/rename_group.cpp +++ b/rdadmin/rename_group.cpp @@ -2,7 +2,7 @@ // // Rename a Rivendell Group // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ -20,27 +20,19 @@ #include -#include -#include #include -#include -#include -#include -#include -#include #include -#include -#include #include -#include -#include +#include #include #include -#include +#include + +#include "rename_group.h" RenameGroup::RenameGroup(QString group,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -49,19 +41,11 @@ RenameGroup::RenameGroup(QString group,QWidget *parent) // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); + setMinimumSize(sizeHint()); + setMaximumSize(sizeHint()); setWindowTitle("RDAdmin - "+tr("Rename Group")); - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - // // Text Validator // @@ -77,7 +61,7 @@ RenameGroup::RenameGroup(QString group,QWidget *parent) QLabel *group_name_label= new QLabel(group_name_edit,tr("Current Group Name:"),this); group_name_label->setGeometry(10,11,150,19); - group_name_label->setFont(font); + group_name_label->setFont(labelFont()); group_name_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -90,7 +74,7 @@ RenameGroup::RenameGroup(QString group,QWidget *parent) QLabel *group_newname_label= new QLabel(group_newname_edit,tr("New &Group Name:"),this); group_newname_label->setGeometry(10,33,150,19); - group_newname_label->setFont(font); + group_newname_label->setFont(labelFont()); group_newname_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); // @@ -99,7 +83,7 @@ RenameGroup::RenameGroup(QString group,QWidget *parent) QPushButton *ok_button=new QPushButton(this); ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); ok_button->setDefault(true); - ok_button->setFont(font); + ok_button->setFont(buttonFont()); ok_button->setText(tr("&OK")); connect(ok_button,SIGNAL(clicked()),this,SLOT(okData())); @@ -109,7 +93,7 @@ RenameGroup::RenameGroup(QString group,QWidget *parent) QPushButton *cancel_button=new QPushButton(this); cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, 80,50); - cancel_button->setFont(font); + cancel_button->setFont(buttonFont()); cancel_button->setText(tr("&Cancel")); connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); diff --git a/rdadmin/rename_group.h b/rdadmin/rename_group.h index 2ca012f1..ed4edaf3 100644 --- a/rdadmin/rename_group.h +++ b/rdadmin/rename_group.h @@ -2,7 +2,7 @@ // // Rename a Rivendell Group // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,17 +21,12 @@ #ifndef RENAME_GROUP_H #define RENAME_GROUP_H -#include -#include -#include -#include -#include -#include #include +#include #include -class RenameGroup : public QDialog +class RenameGroup : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/test_import.cpp b/rdadmin/test_import.cpp index f0406d97..7fa55977 100644 --- a/rdadmin/test_import.cpp +++ b/rdadmin/test_import.cpp @@ -2,7 +2,7 @@ // // Test a Rivendell Log Import // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,7 +36,7 @@ #include "test_import.h" TestImport::TestImport(RDSvc *svc,RDSvc::ImportSource src,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -49,8 +49,7 @@ TestImport::TestImport(RDSvc *svc,RDSvc::ImportSource src,QWidget *parent) // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); + setMinimumSize(sizeHint()); switch(test_src) { case RDSvc::Traffic: @@ -62,20 +61,12 @@ TestImport::TestImport(RDSvc *svc,RDSvc::ImportSource src,QWidget *parent) break; } - // - // Create Fonts - // - QFont font=QFont("Helvetica",12,QFont::Bold); - font.setPixelSize(12); - QFont section_font=QFont("Helvetica",14,QFont::Bold); - section_font.setPixelSize(14); - // // Date Selector // test_date_edit=new Q3DateEdit(this); test_date_label=new QLabel(test_date_edit,tr("Test Date:"),this); - test_date_label->setFont(font); + test_date_label->setFont(labelFont()); test_date_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); test_date_edit->setDate(current_date); connect(test_date_edit,SIGNAL(valueChanged(const QDate &)), @@ -86,7 +77,7 @@ TestImport::TestImport(RDSvc *svc,RDSvc::ImportSource src,QWidget *parent) // QPushButton *button=new QPushButton(this); button->setGeometry(200,5,60,30); - button->setFont(font); + button->setFont(subButtonFont()); button->setText(tr("&Select")); connect(button,SIGNAL(clicked()),this,SLOT(selectData())); @@ -94,7 +85,7 @@ TestImport::TestImport(RDSvc *svc,RDSvc::ImportSource src,QWidget *parent) // Import Button // test_import_button=new QPushButton(this); - test_import_button->setFont(font); + test_import_button->setFont(buttonFont()); test_import_button->setText(tr("&Import")); connect(test_import_button,SIGNAL(clicked()),this,SLOT(importData())); @@ -106,7 +97,7 @@ TestImport::TestImport(RDSvc *svc,RDSvc::ImportSource src,QWidget *parent) test_filename_label= new QLabel(test_filename_edit,tr("Using source file:"),this); test_filename_label->setGeometry(15,115,sizeHint().width()-30,18); - test_filename_label->setFont(font); + test_filename_label->setFont(labelFont()); // // Events List @@ -130,13 +121,13 @@ TestImport::TestImport(RDSvc *svc,RDSvc::ImportSource src,QWidget *parent) test_events_list->setColumnSortType(0,RDListView::LineSort); test_events_label=new QLabel(test_events_list,tr("Imported Events"),this); test_events_label->setGeometry(15,160,sizeHint().width()-30,18); - test_events_label->setFont(font); + test_events_label->setFont(labelFont()); // // Close Button // test_close_button=new QPushButton(this); - test_close_button->setFont(font); + test_close_button->setFont(buttonFont()); test_close_button->setText(tr("&Close")); connect(test_close_button,SIGNAL(clicked()),this,SLOT(closeData())); diff --git a/rdadmin/test_import.h b/rdadmin/test_import.h index 8a096643..aa62febc 100644 --- a/rdadmin/test_import.h +++ b/rdadmin/test_import.h @@ -2,7 +2,7 @@ // // Test a Rivendell Log Import // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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 @@ #ifndef TEST_IMPORT_H #define TEST_IMPORT_H -#include #include #include #include #include -#include +#include #include +#include -class TestImport : public QDialog +class TestImport : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/view_adapters.cpp b/rdadmin/view_adapters.cpp index fdb06949..15f11e69 100644 --- a/rdadmin/view_adapters.cpp +++ b/rdadmin/view_adapters.cpp @@ -2,7 +2,7 @@ // // Display Audio Adapter Information // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,50 +18,37 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include -#include -#include - #include #include "view_adapters.h" ViewAdapters::ViewAdapters(RDStation *rdstation,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); + setMinimumSize(sizeHint()); setWindowTitle("RDADmin - "+tr("Audio Resource Information")); // // Create Fonts // - QFont font=QFont("Helvetica",16,QFont::Bold); - font.setPixelSize(16); - QFont button_font=QFont("Helvetica",14,QFont::Bold); - button_font.setPixelSize(14); // // Title // - QLabel *label=new QLabel(tr("Audio Resources on")+" "+rdstation->name(),this); - label->setGeometry(15,10,sizeHint().width()-20,16); - label->setFont(font); + view_title_label=new QLabel(tr("Audio Resources on")+" "+rdstation->name(),this); + view_title_label->setFont(labelFont()); // // Resource List // - Q3TextEdit *text_edit=new Q3TextEdit(this,"adapter_edit"); - text_edit->setGeometry(10,28,sizeHint().width()-20,sizeHint().height()-98); - text_edit->setReadOnly(true); + view_text_edit=new Q3TextEdit(this,"adapter_edit"); + view_text_edit->setReadOnly(true); QString text; if(rdstation->scanned()) { text+=tr("SUPPORTED AUDIO DRIVERS\n"); @@ -153,18 +140,16 @@ ViewAdapters::ViewAdapters(RDStation *rdstation,QWidget *parent) text=tr("NO DATA AVAILABLE\n\n"); text+=tr("Please start the Rivendell daemons on this host (by executing, as user 'root', the command \"systemctl start rivendell\") in order to populate the audio resources database."); } - text_edit->setText(text); + view_text_edit->setText(text); // // Close Button // - QPushButton *button=new QPushButton(this,"close_button"); - button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, - 80,50); - button->setFont(button_font); - button->setText(tr("&Close")); - button->setDefault(true); - connect(button,SIGNAL(clicked()),this,SLOT(closeData())); + view_close_button=new QPushButton(this); + view_close_button->setFont(buttonFont()); + view_close_button->setText(tr("&Close")); + view_close_button->setDefault(true); + connect(view_close_button,SIGNAL(clicked()),this,SLOT(closeData())); } @@ -184,3 +169,11 @@ void ViewAdapters::closeData() { done(0); } + + +void ViewAdapters::resizeEvent (QResizeEvent *e) +{ + view_title_label->setGeometry(15,10,size().width()-20,16); + view_text_edit->setGeometry(10,28,size().width()-20,size().height()-98); + view_close_button->setGeometry(size().width()-90,size().height()-60,80,50); +} diff --git a/rdadmin/view_adapters.h b/rdadmin/view_adapters.h index 0306090d..31c1d7a1 100644 --- a/rdadmin/view_adapters.h +++ b/rdadmin/view_adapters.h @@ -21,17 +21,15 @@ #ifndef VIEW_ADAPTER_H #define VIEW_ADAPTER_H -#include -#include -#include -#include #include -#include +#include +#include -#include +#include #include +#include -class ViewAdapters : public QDialog +class ViewAdapters : public RDDialog { Q_OBJECT public: @@ -41,6 +39,14 @@ class ViewAdapters : public QDialog private slots: void closeData(); + + protected: + void resizeEvent (QResizeEvent *e); + + private: + QLabel *view_title_label; + Q3TextEdit *view_text_edit; + QPushButton *view_close_button; }; diff --git a/rdadmin/view_node_info.cpp b/rdadmin/view_node_info.cpp index 70f0009e..b9bbcf79 100644 --- a/rdadmin/view_node_info.cpp +++ b/rdadmin/view_node_info.cpp @@ -2,7 +2,7 @@ // // Edit a Rivendell LiveWire Node // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,7 +18,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include #include #include @@ -29,7 +28,7 @@ #include ViewNodeInfo::ViewNodeInfo(QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setModal(true); @@ -38,18 +37,8 @@ ViewNodeInfo::ViewNodeInfo(QWidget *parent) // // Fix the Window Size // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); - - // - // Create Fonts - // - QFont bold_font=QFont("Helvetica",12,QFont::Bold); - bold_font.setPixelSize(12); - QFont font=QFont("Helvetica",12,QFont::Normal); - font.setPixelSize(12); + setMinimumSize(sizeHint()); + setMaximumSize(sizeHint()); // // LiveWire Driver @@ -72,7 +61,7 @@ ViewNodeInfo::ViewNodeInfo(QWidget *parent) view_hostname_edit->setReadOnly(true); QLabel *label=new QLabel(view_hostname_edit,tr("Hostname:"),this); label->setGeometry(10,10,80,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -83,7 +72,7 @@ ViewNodeInfo::ViewNodeInfo(QWidget *parent) view_tcpport_edit->setReadOnly(true); label=new QLabel(view_tcpport_edit,tr("Port:"),this); label->setGeometry(305,10,30,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -94,7 +83,7 @@ ViewNodeInfo::ViewNodeInfo(QWidget *parent) view_system_edit->setReadOnly(true); label=new QLabel(view_system_edit,tr("System Version:"),this); label->setGeometry(10,32,120,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -105,7 +94,7 @@ ViewNodeInfo::ViewNodeInfo(QWidget *parent) view_protocol_edit->setReadOnly(true); label=new QLabel(view_protocol_edit,tr("Protocol Version:"),this); label->setGeometry(210,32,120,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -116,7 +105,7 @@ ViewNodeInfo::ViewNodeInfo(QWidget *parent) view_sources_edit->setReadOnly(true); label=new QLabel(view_sources_edit,tr("Sources:"),this); label->setGeometry(10,54,60,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -127,7 +116,7 @@ ViewNodeInfo::ViewNodeInfo(QWidget *parent) view_destinations_edit->setReadOnly(true); label=new QLabel(view_destinations_edit,tr("Destinations:"),this); label->setGeometry(120,54,100,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -138,7 +127,7 @@ ViewNodeInfo::ViewNodeInfo(QWidget *parent) view_channels_edit->setReadOnly(true); label=new QLabel(view_channels_edit,tr("Channels:"),this); label->setGeometry(260,54,95,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -149,7 +138,7 @@ ViewNodeInfo::ViewNodeInfo(QWidget *parent) view_gpis_edit->setReadOnly(true); label=new QLabel(view_gpis_edit,tr("GPIs:"),this); label->setGeometry(10,76,120,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -160,7 +149,7 @@ ViewNodeInfo::ViewNodeInfo(QWidget *parent) view_gpos_edit->setReadOnly(true); label=new QLabel(view_gpos_edit,tr("GPOs:"),this); label->setGeometry(210,76,90,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // @@ -168,7 +157,7 @@ ViewNodeInfo::ViewNodeInfo(QWidget *parent) // label=new QLabel(view_gpos_edit,tr("Sources"),this); label->setGeometry(15,98,90,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); view_sources_view=new RDListView(this); view_sources_view->setGeometry(10,118,sizeHint().width()-20,200); @@ -177,17 +166,17 @@ ViewNodeInfo::ViewNodeInfo(QWidget *parent) view_sources_view->addColumn(tr("#")); view_sources_view->setColumnAlignment(0,Qt::AlignCenter); view_sources_view->setColumnSortType(0,RDListView::LineSort); - view_sources_view->addColumn(tr("CHAN")); - view_sources_view->setColumnAlignment(1,Qt::AlignCenter); - view_sources_view->addColumn(tr("NAME")); + view_sources_view->addColumn(tr("Input #")); + view_sources_view->setColumnAlignment(1,Qt::AlignRight); + view_sources_view->addColumn(tr("Name")); view_sources_view->setColumnAlignment(2,Qt::AlignLeft); - view_sources_view->addColumn(tr("ACTIVE")); + view_sources_view->addColumn(tr("Active")); view_sources_view->setColumnAlignment(3,Qt::AlignCenter); - view_sources_view->addColumn(tr("SHAREABLE")); + view_sources_view->addColumn(tr("Shareable")); view_sources_view->setColumnAlignment(4,Qt::AlignCenter); - view_sources_view->addColumn(tr("CHANS")); + view_sources_view->addColumn(tr("Chans")); view_sources_view->setColumnAlignment(5,Qt::AlignCenter); - view_sources_view->addColumn(tr("GAIN")); + view_sources_view->addColumn(tr("Gain")); view_sources_view->setColumnAlignment(6,Qt::AlignCenter); // @@ -195,7 +184,7 @@ ViewNodeInfo::ViewNodeInfo(QWidget *parent) // label=new QLabel(view_gpos_edit,tr("Destinations"),this); label->setGeometry(15,325,90,20); - label->setFont(bold_font); + label->setFont(labelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); view_destinations_view=new RDListView(this); view_destinations_view-> @@ -205,15 +194,15 @@ ViewNodeInfo::ViewNodeInfo(QWidget *parent) view_destinations_view->addColumn(tr("#")); view_destinations_view->setColumnAlignment(0,Qt::AlignCenter); view_destinations_view->setColumnSortType(0,RDListView::LineSort); - view_destinations_view->addColumn(tr("CHAN")); - view_destinations_view->setColumnAlignment(1,Qt::AlignCenter); - view_destinations_view->addColumn(tr("NAME")); + view_destinations_view->addColumn(tr("Output #")); + view_destinations_view->setColumnAlignment(1,Qt::AlignRight); + view_destinations_view->addColumn(tr("Name")); view_destinations_view->setColumnAlignment(2,Qt::AlignLeft); - view_destinations_view->addColumn(tr("CHANS")); + view_destinations_view->addColumn(tr("Chans")); view_destinations_view->setColumnAlignment(3,Qt::AlignCenter); - view_destinations_view->addColumn(tr("LOAD")); + view_destinations_view->addColumn(tr("Load")); view_destinations_view->setColumnAlignment(4,Qt::AlignCenter); - view_destinations_view->addColumn(tr("GAIN")); + view_destinations_view->addColumn(tr("Gain")); view_destinations_view->setColumnAlignment(5,Qt::AlignCenter); // @@ -222,7 +211,7 @@ ViewNodeInfo::ViewNodeInfo(QWidget *parent) QPushButton *button=new QPushButton(this); button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,80,50); button->setDefault(true); - button->setFont(bold_font); + button->setFont(buttonFont()); button->setText(tr("&Close")); connect(button,SIGNAL(clicked()),this,SLOT(closeData())); } @@ -315,7 +304,12 @@ void ViewNodeInfo::closeData() void ViewNodeInfo::WriteSourceItem(RDLiveWireSource *src,RDListViewItem *item) { item->setLine(src->slotNumber()); - item->setText(1,QString().sprintf("%05d",src->channelNumber())); + if(src->channelNumber()<=0) { + item->setText(1,tr("[unassigned]")); + } + else { + item->setText(1,QString().sprintf("%d",src->channelNumber())); + } item->setText(2,src->primaryName()); if(src->rtpEnabled()) { item->setText(3,tr("Yes")); @@ -339,7 +333,7 @@ void ViewNodeInfo::WriteDestinationItem(RDLiveWireDestination *dst, { item->setLine(dst->slotNumber()); item-> - setText(1,QString().sprintf("%05u",view_base_output+dst->slotNumber()-1)); + setText(1,QString().sprintf("%u",view_base_output+dst->slotNumber()-1)); item->setText(2,dst->primaryName()); item->setText(3,QString().sprintf("%d",dst->channels())); item->setText(4,RDLiveWireDestination::loadString(dst->load())); diff --git a/rdadmin/view_node_info.h b/rdadmin/view_node_info.h index 39f2a69b..078fd90e 100644 --- a/rdadmin/view_node_info.h +++ b/rdadmin/view_node_info.h @@ -2,7 +2,7 @@ // // Edit a Rivendell Livewire Node // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2019 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,14 @@ #ifndef VIEW_NODE_INFO_H #define VIEW_NODE_INFO_H -#include #include -#include -#include -#include +#include #include #include +#include -class ViewNodeInfo : public QDialog +class ViewNodeInfo : public RDDialog { Q_OBJECT public: diff --git a/rdadmin/view_pypad_errors.cpp b/rdadmin/view_pypad_errors.cpp index 531aaa58..f655e1da 100644 --- a/rdadmin/view_pypad_errors.cpp +++ b/rdadmin/view_pypad_errors.cpp @@ -2,7 +2,7 @@ // // View the Edit Log for a PyPAD Instance // -// (C) Copyright 2018 Fred Gleason +// (C) Copyright 2018-2019 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,17 +23,12 @@ #include "view_pypad_errors.h" ViewPypadErrors::ViewPypadErrors(int id,QWidget *parent) - : QDialog(parent) + : RDDialog(parent) { setMinimumSize(sizeHint()); setWindowTitle(tr("Script Error Log")+ " ["+tr("ID")+QString().sprintf(": %d]",id)); - // - // Fonts - // - QFont label_font(font().family(),font().pointSize(),QFont::Bold); - // // Viewer // @@ -51,7 +46,7 @@ ViewPypadErrors::ViewPypadErrors(int id,QWidget *parent) // Close Button // view_close_button=new QPushButton(tr("Close"),this); - view_close_button->setFont(label_font); + view_close_button->setFont(buttonFont()); connect(view_close_button,SIGNAL(clicked()),this,SLOT(closeData())); } diff --git a/rdadmin/view_pypad_errors.h b/rdadmin/view_pypad_errors.h index c3ed0ff5..8e5075f0 100644 --- a/rdadmin/view_pypad_errors.h +++ b/rdadmin/view_pypad_errors.h @@ -2,7 +2,7 @@ // // View the Edit Log for a PyPAD Instance // -// (C) Copyright 2018 Fred Gleason +// (C) Copyright 2018-2019 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,12 @@ #ifndef VIEW_PYPAD_ERRORS_H #define VIEW_PYPAD_ERRORS_H -#include #include #include -class ViewPypadErrors : public QDialog +#include + +class ViewPypadErrors : public RDDialog { Q_OBJECT public: