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

* Refactored rdpopup(1) to use the 'RDDialog' and 'RDWidget'
	base classes.
This commit is contained in:
Fred Gleason 2019-10-07 13:56:16 -04:00
parent 2c5c7886e2
commit 93e40d43df
5 changed files with 23 additions and 9 deletions

View File

@ -19172,3 +19172,6 @@
2019-10-07 Fred Gleason <fredg@paravelsystems.com>
* Refactored rdgpimon(1) to use the 'RDDialog' and 'RDWidget'
base classes.
2019-10-07 Fred Gleason <fredg@paravelsystems.com>
* Refactored rdpopup(1) to use the 'RDDialog' and 'RDWidget'
base classes.

View File

@ -34,6 +34,19 @@ RDFontSet::RDFontSet(const QFont &default_font,RDConfig *c)
}
RDFontSet::RDFontSet(RDConfig *c)
{
if(c==NULL) {
font_config=rda->config();
}
else {
font_config=c;
}
MakeFonts(QFont(font_config->fontFamily(),font_config->fontDefaultSize(),
QFont::Normal));
}
QFont RDFontSet::buttonFont() const
{
return font_button_font;

View File

@ -29,6 +29,7 @@ class RDFontSet
{
public:
RDFontSet(const QFont &default_font,RDConfig *c=NULL);
RDFontSet(RDConfig *c=NULL);
QFont buttonFont() const;
QFont bigButtonFont() const;
QFont subButtonFont() const;

View File

@ -18,19 +18,16 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
#include <stdio.h>
#include <stdlib.h>
#include <syslog.h>
#include <qapplication.h>
#include <qwindowsstyle.h>
#include <qmessagebox.h>
#include <qdatetime.h>
#include <qwindowsstyle.h>
#include <rd.h>
#include <rdapplication.h>
#include <rdcmd_switch.h>
#include <rdconfig.h>
#include <rdfontset.h>
#include "rdpopup.h"
@ -123,9 +120,9 @@ int main(int argc,char *argv[])
break;
}
mb->setWindowIcon(QPixmap(rivendell_22x22_xpm));
QFont font("helvetica",16,QFont::Bold);
font.setPixelSize(16);
mb->setFont(font);
RDFontSet *fs=new RDFontSet(config);
mb->setFont(fs->progressFont());
mb->exec();
delete mb;

View File

@ -2,7 +2,7 @@
//
// A utility for displaying messages on the desktop
//
// (C) Copyright 2009-2018 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2009-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