mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-05 15:09:10 +02:00
2021-02-06 Fred Gleason <fredg@paravelsystems.com>
* Removed 'Q3SocketDevice' dependencies from rdsoftkeys(1). Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
6a9fdb1b59
commit
0925d25b64
@ -21028,3 +21028,5 @@
|
|||||||
* Removed 'Q3SocketDevice' dependencies from rmlsend(1).
|
* Removed 'Q3SocketDevice' dependencies from rmlsend(1).
|
||||||
2021-02-05 Fred Gleason <fredg@paravelsystems.com>
|
2021-02-05 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Removed 'Q3TextStream' dependencies from rmlsend(1).
|
* Removed 'Q3TextStream' dependencies from rmlsend(1).
|
||||||
|
2021-02-06 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Removed 'Q3SocketDevice' dependencies from rdsoftkeys(1).
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// A utility for sending RML Commands
|
// A utility for sending RML Commands
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -21,13 +21,12 @@
|
|||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
#include <qapplication.h>
|
#include <QApplication>
|
||||||
#include <qmessagebox.h>
|
#include <QMessageBox>
|
||||||
#include <rdprofile.h>
|
#include <QSignalMapper>
|
||||||
#include <qsignalmapper.h>
|
#include <QTranslator>
|
||||||
#include <qtranslator.h>
|
|
||||||
|
|
||||||
#include <rdfontengine.h>
|
#include <rdprofile.h>
|
||||||
#include <rdpushbutton.h>
|
#include <rdpushbutton.h>
|
||||||
|
|
||||||
#include "rdsoftkeys.h"
|
#include "rdsoftkeys.h"
|
||||||
@ -67,7 +66,7 @@ MainWidget::MainWidget(QWidget *parent)
|
|||||||
//
|
//
|
||||||
// RML Send Socket
|
// RML Send Socket
|
||||||
//
|
//
|
||||||
key_socket=new Q3SocketDevice(Q3SocketDevice::Datagram);
|
key_socket=new QUdpSocket(this);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create Buttons
|
// Create Buttons
|
||||||
@ -89,7 +88,7 @@ MainWidget::MainWidget(QWidget *parent)
|
|||||||
profile->setSource(map_filename);
|
profile->setSource(map_filename);
|
||||||
key_columns=
|
key_columns=
|
||||||
profile->intValue("SoftKeys","Columns",RDSOFTKEYS_DEFAULT_COLUMNS);
|
profile->intValue("SoftKeys","Columns",RDSOFTKEYS_DEFAULT_COLUMNS);
|
||||||
unsigned col=0;
|
int col=0;
|
||||||
unsigned row=0;
|
unsigned row=0;
|
||||||
while(!(rmlcmd=profile->stringValue("SoftKeys",QString().
|
while(!(rmlcmd=profile->stringValue("SoftKeys",QString().
|
||||||
sprintf("Command%d",n+1),"")).isEmpty()) {
|
sprintf("Command%d",n+1),"")).isEmpty()) {
|
||||||
@ -162,7 +161,7 @@ MainWidget::MainWidget(QWidget *parent)
|
|||||||
|
|
||||||
QSize MainWidget::sizeHint() const
|
QSize MainWidget::sizeHint() const
|
||||||
{
|
{
|
||||||
unsigned x=0;
|
int x=0;
|
||||||
|
|
||||||
if(key_macros.size()>=key_columns) {
|
if(key_macros.size()>=key_columns) {
|
||||||
x=10+90*key_columns;
|
x=10+90*key_columns;
|
||||||
@ -196,8 +195,8 @@ void MainWidget::buttonData(int id)
|
|||||||
else {
|
else {
|
||||||
addr.setAddress(key_addrs[id]);
|
addr.setAddress(key_addrs[id]);
|
||||||
}
|
}
|
||||||
key_socket->writeBlock(key_macros[id],key_macros[id].length(),
|
key_socket->
|
||||||
addr,(Q_UINT16)RD_RML_NOECHO_PORT);
|
writeDatagram(key_macros[id].toUtf8(),addr,(Q_UINT16)RD_RML_NOECHO_PORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// A utility for sending RML Commands
|
// A utility for sending RML Commands
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -21,8 +21,9 @@
|
|||||||
#ifndef RDSOFTKEYS_H
|
#ifndef RDSOFTKEYS_H
|
||||||
#define RDSOFTKEYS_H
|
#define RDSOFTKEYS_H
|
||||||
|
|
||||||
#include <q3socketdevice.h>
|
#include <QStringList>
|
||||||
#include <qwidget.h>
|
#include <QUdpSocket>
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
//
|
//
|
||||||
// Settings
|
// Settings
|
||||||
@ -44,11 +45,11 @@ class MainWidget : public QWidget
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QPixmap *key_icon_map;
|
QPixmap *key_icon_map;
|
||||||
Q3SocketDevice *key_socket;
|
QUdpSocket *key_socket;
|
||||||
unsigned key_columns;
|
int key_columns;
|
||||||
unsigned key_ysize;
|
unsigned key_ysize;
|
||||||
std::vector<QString> key_macros;
|
QStringList key_macros;
|
||||||
std::vector<QString> key_addrs;
|
QStringList key_addrs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user