2022-09-28 Fred Gleason <fredg@paravelsystems.com>

* Added an 'RDTranslator' class.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2022-09-28 11:36:06 -04:00
parent b18e1dbca8
commit fef674a2ad
22 changed files with 128 additions and 313 deletions

View File

@@ -2,7 +2,7 @@
//
// A Qt-based application for testing General Purpose Input (GPI) devices.
//
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2002-2022 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
@@ -678,28 +678,6 @@ int main(int argc,char *argv[])
QApplication::setStyle(RD_GUI_STYLE);
QApplication a(argc,argv);
//
// Load Translations
//
QString loc=RDApplication::locale();
if(!loc.isEmpty()) {
QTranslator qt(0);
qt.load(QString("/usr/share/qt4/translations/qt_")+loc,".");
a.installTranslator(&qt);
QTranslator rd(0);
rd.load(QString(PREFIX)+QString("/share/rivendell/librd_")+loc,".");
a.installTranslator(&rd);
QTranslator rdhpi(0);
rdhpi.load(QString(PREFIX)+QString("/share/rivendell/librdhpi_")+loc,".");
a.installTranslator(&rdhpi);
QTranslator tr(0);
tr.load(QString(PREFIX)+QString("/share/rivendell/rdgpimon_")+loc,".");
a.installTranslator(&tr);
}
//
// Start Event Loop
//

View File

@@ -2,7 +2,7 @@
//
// A utility for sending RML Commands
//
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2002-2022 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
@@ -24,7 +24,9 @@
#include <QApplication>
#include <QLineEdit>
#include <QMessageBox>
#include <QTranslator>
//#include <QTranslator>
#include <rdtranslator.h>
#include "rmlsend.h"
@@ -41,6 +43,8 @@ RDCmdSwitch *rdcmdswitch=NULL;
MainWidget::MainWidget(RDConfig *c,QWidget *parent)
: RDMainWindow("rmlsend",c)
{
rdt=new RDTranslator("rmlsend",parent);
//
// Set Window Size
//