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

* Refactored dialogs in the convenience library to use the
	'RDDialog' and 'RDWidget' base classes.
This commit is contained in:
Fred Gleason
2019-10-01 15:10:29 -04:00
parent b910af1bda
commit 8ca15c773d
75 changed files with 734 additions and 1052 deletions

View File

@@ -2,7 +2,7 @@
//
// Get an Aggreggate Tuning Hours (ATH) Figure.
//
// (C) Copyright 2006,2016 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2006-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
@@ -23,28 +23,20 @@
#include <qmessagebox.h>
#include <qvalidator.h>
#include <rdget_ath.h>
#include "rdget_ath.h"
RDGetAth::RDGetAth(double *ath,QWidget *parent)
: QDialog(parent,"",true)
: RDDialog(parent)
{
ath_ath=ath;
//
// Fix the Window Size
//
setMinimumWidth(sizeHint().width());
setMaximumWidth(sizeHint().width());
setMinimumHeight(sizeHint().height());
setMaximumHeight(sizeHint().height());
setMinimumSize(sizeHint());
setMaximumSize(sizeHint());
setCaption(tr("Enter ATH"));
//
// Create Fonts
//
QFont font=QFont("Helvetica",12,QFont::Bold);
font.setPixelSize(12);
setWindowTitle(tr("Enter ATH"));
//
// Validator
@@ -67,7 +59,7 @@ RDGetAth::RDGetAth(double *ath,QWidget *parent)
QLabel *ath_ath_label=new QLabel(ath_ath_edit,tr("ATH:"),this,
"ath_ath_label");
ath_ath_label->setGeometry(10,70,40,19);
ath_ath_label->setFont(font);
ath_ath_label->setFont(labelFont());
ath_ath_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic);
//
@@ -76,7 +68,7 @@ RDGetAth::RDGetAth(double *ath,QWidget *parent)
QPushButton *ok_button=new QPushButton(this,"ok_button");
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()));
@@ -86,17 +78,12 @@ RDGetAth::RDGetAth(double *ath,QWidget *parent)
QPushButton *cancel_button=new QPushButton(this,"cancel_button");
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()));
}
RDGetAth::~RDGetAth()
{
}
QSize RDGetAth::sizeHint() const
{
return QSize(250,160);