2019-10-01 Fred Gleason <fredg@paravelsystems.com>

* Added an 'RDDialog' class.
	* Added an 'RDWidget' class.
	* Refactored rdadmin(1) to use 'RDDialog' and 'RDWidget' base
	classes.
This commit is contained in:
Fred Gleason
2019-10-01 11:17:23 -04:00
parent bfee1c8440
commit f18dacf408
170 changed files with 2949 additions and 3121 deletions

View File

@@ -2,7 +2,7 @@
//
// Add a Rivendell Matrix
//
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
@@ -18,7 +18,6 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
#include <qdialog.h>
#include <qcombobox.h>
#include <qspinbox.h>
#include <qmessagebox.h>
@@ -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()));