doc/CodingStyle \
doc/vlp.cfg.sample
-# bin/loggraph \
# bin/loghelp
bin_PROGRAMS = \
+ bin/loggraph \
bin/lognet \
bin/logker \
bin/logint \
bin/logcomp
BUILT_SOURCES = \
- src/graph/loggraph.moc \
+ src/graph/loggraph.moc.cpp \
src/net/lognet.moc.cpp \
src/kernel/kernel.moc.cpp \
src/edit/editor.moc.cpp \
src/preproc/prep.moc.cpp \
src/help/help.moc
-bin_loggraph_SOURCES = src/graph/loggraph.cpp src/graph/loggraph.moc
+bin_loggraph_SOURCES = src/graph/loggraph.cpp src/graph/loggraph.moc.cpp
bin_loggraph_CPPFLAGS = $(bin_loggraph_CFLAGS)
bin_loggraph_LDADD = $(bin_loggraph_LIBS)
-src/graph/loggraph.moc:
- $(MOC) -i src/graph/loggraph.cpp -o src/graph/loggraph.moc
+bin_lognet_HEADERS = \
+ src/graph/loggraph.h
+src/graph/loggraph.moc.cpp:
+ $(MOC) src/graph/loggraph.h -o src/graph/loggraph.moc.cpp
clean-loggraph-extra:
rm -f src/graph/*.moc.cpp
bin_logker_SOURCES = \
src/kernel/kernel.cpp \
src/kernel/kernel.moc.cpp \
+ src/kernel/ConnectDialog.cpp \
+ src/kernel/KillDialog.cpp \
src/kernel/LockDialog.cpp \
src/kernel/OptionsDialog.cpp \
src/kernel/OptionsDialog.moc.cpp \
- src/kernel/KillDialog.cpp \
- src/kernel/ConnectDialog.cpp \
+ src/kernel/MessageDialog.cpp \
src/global/vlp/config.cpp
bin_logker_CPPFLAGS = $(bin_logker_CFLAGS)
bin_logker_LDADD = $(bin_logker_LIBS) -lconfig++ -lX11
bin_logkerdir = src/kernel
bin_logker_HEADERS = \
src/kernel/kernel.h \
+ src/kernel/ConnectDialog.h \
+ src/kernel/KillDialog.h \
src/kernel/LockDialog.h \
src/kernel/OptionsDialog.h \
- src/kernel/KillDialog.h \
- src/kernel/ConnectDialog.h \
+ src/kernel/MessageDialog.h \
+ src/kernel/ui/KernelWindow.h \
+ src/kernel/ui/dialogs/ConnectDialog.h \
+ src/kernel/ui/dialogs/KillDialog.h \
+ src/kernel/ui/dialogs/LockDialog.h \
+ src/kernel/ui/dialogs/OptionsDialog.h \
+ src/kernel/ui/dialogs/MessageDialog.h \
src/global/vlp/config.h
src/kernel/kernel.moc.cpp: \
src/kernel/kernel.h \
src/kernel/ui/dialogs/LockDialog.h \
src/kernel/ui/dialogs/OptionsDialog.h \
src/kernel/ui/dialogs/KillDialog.h \
- src/kernel/ui/dialogs/ConnectDialog.h
+ src/kernel/ui/dialogs/ConnectDialog.h \
+ src/kernel/ui/dialogs/MessageDialog.h
moc-qt4 src/kernel/kernel.h -o src/kernel/kernel.moc.cpp
moc-qt4 src/kernel/OptionsDialog.h -o src/kernel/OptionsDialog.moc.cpp
# $(MOC) -i src/kernel/kernel.cpp -o src/kernel/kernel.moc
src/kernel/ui/dialogs/ConnectDialog.h:
uic src/kernel/ui/dialogs/ConnectDialog.ui -o src/kernel/ui/dialogs/ConnectDialog.h
+src/kernel/ui/dialogs/MessageDialog.h:
+ uic src/kernel/ui/dialogs/MessageDialog.ui -o src/kernel/ui/dialogs/MessageDialog.h
+
clean-logker-extra:
rm -f src/kernel/*.moc
#include <QtGui/QFileDialog>
#include <QtGui/QColor>
#include <QtGui/QPalette>
-#include <QtGui/QCloseEvent>
#include <QtGui/QTextDocument>
#include <QtGui/QMainWindow>
#include <QtGui/QStatusBar>
if (argc > 1) {
strcpy(HomeDir, argv[1]);
+ fprintf(stderr, "EDIT: HomeDir inited with: %s (%s)\n", HomeDir, argv[1]);
}
find_text = "";
-#ifndef QWERTY_H
-#define QWERTY_H
+#ifndef _VLP_EDITOR_H
+#define _VLP_EDITOR_H
#include <QtGui/QTextEdit>
#include <QtGui/QMainWindow>
}
}
-#endif // QWERTY_H
+#endif // _VLP_EDITOR_H
#include <QtGui/QButtonGroup>
#include <QtGui/QApplication>
#include <QtGui/QMainWindow>
+#include <QtGui/QFrame>
#include <math.h>
#include <QtGui/QPixmap>
#include <QtGui/QScrollBar>
#include <QtCore/QQueue>
#include <QtGui/QMessageBox>
#include <QtGui/QMenuBar>
+#include <QtGui/QMouseEvent>
// #include <qpopmenu.h>
#include <QtCore/qnamespace.h>
#define REQUEST_NAME "gr.req"
#define PERM 0666
-class VGRMap {
-public:
- QPixmap *map;
- int number;
-
- VGRMap(int n, QPixmap *m) {
- number = n;
- map = m;
- };
-};
-
-class VGR : public QMainWindow {
- Q_OBJECT
-public:
- VGR(char*);
- ~VGR();
-
- int resp_sock;
- int fcol;
- int bcol;
- int gfcol;
- int gbcol;
- int curx;
- int cury;
- int tx;
- int ty;
- QQueue<int> CharBuffer;
-
- bool string_wait;
- bool char_wait;
- bool line_wait;
- bool mouse_wait;
- bool inkey_wait;
- bool was_line;
- QColor *lcolors[256];
- QFont *prv_font;
- QFont *italic_font;
- QFont *bold_font;
- QFont *normal_font;
-
- void MakeColors();
-
- void SetForeground(int);
- void SetBackground(int);
- void ClearAll();
- void ClearArea(int, int, int, int);
-
- void Line(int, int, int, int);
- void Ellipse(int x, int y, int a, int b, int alfa, int beta, int fill);
- void Rect(int x1, int y1, int x2, int y2, int col, int fill);
- void Point(int x, int y);
- void TextXY(int x, int y, char *s);
- void CharXY(int x, int y, char a);
- void IntXY(int x, int y, int val);
-
- void WriteText(char *s);
- void WriteChar(char a);
- void WriteLine();
-
- /* Write Char w/o changing position */
- void PutChar(char a);
- void DelChar();
-
- void Outstring(int x, int y, char *s, int b, int f);
- void writeintxy(int x, int y, int val, int c);
- void CurPos();
-
- int Getmap(int w, int h);
- void Putmap(int map);
-
- void MagicGraph(G_MESSAGE*);
- bool GetInput(int);
-
-public slots:
- void vscrolled(int);
- void hscrolled(int);
- void CloseMe();
- void RequestMessage();
-
-protected:
- virtual void resizeEvent(QResizeEvent *);
- virtual void closeEvent(QCloseEvent *);
- virtual void keyPressEvent(QKeyEvent *);
- virtual void mousePressEvent(QMouseEvent *);
- virtual void paintEvent(QPaintEvent *);
- virtual void focusInEvent(QFocusEvent *);
-
-private:
- QPixmap *canvas;
- QScrollBar *hscroll;
- QScrollBar *vscroll;
- QPushButton *close_btn;
- int ox,oy,lstep,pstep,gx,gy;
- QList<VGRMap> maps;
- int firstfreemap;
- bool Closed;
- bool MustRepaint;
- bool GraphRead;
- QSocketNotifier *request;
- char internal_buffer[256];
- int strcnt;
-};
-
-void VGR::MakeColors()
-{
- /* black */
- lcolors[0] = new QColor(0, 0, 0);
- /* blue dark */
- lcolors[1] = new QColor(0, 0, 139);
- /* green dark */
- lcolors[2] = new QColor(0, 100, 0);
- /* turquoise dark */
- lcolors[3] = new QColor(0, 197, 205);
- /* red dark */
- lcolors[4] = new QColor(205, 0, 0);
- /* violet */
- lcolors[5] = new QColor(238, 130, 238);
- /* brown */
- lcolors[6] = new QColor(139,35, 35);
- /* grey light */
- lcolors[7] = new QColor(190, 190, 190);
- /* grey dark */
- lcolors[8] = new QColor(97, 97, 97);
- /* blue */
- lcolors[9] = new QColor(0, 0, 255);
- /* green */
- lcolors[10] = new QColor(0, 255, 0);
- /* turquoise */
- lcolors[11] = new QColor(0, 229, 238);
- /* red light */
- lcolors[12] = new QColor(255, 0, 0);
- /* rose */
- lcolors[13] = new QColor(255, 110, 180);
- /* yellow */
- lcolors[14] = new QColor(255, 255, 0);
- /* white */
- lcolors[15] = new QColor(255, 255, 255);
-}
+#include "loggraph.h"
/*
* Construct the DrawView with buttons.
*/
-VGR::VGR(char *sockname)
+VGR::VGR(int argc, char **argv)
:QMainWindow()
{
+ char *sockname = argv[1];
+
+ fprintf(stderr, "GRAPH: sockname inited with: %s (%s)\n", sockname, argv[1]);
+
QPixmap mp;
struct sockaddr_un svr;
int len, i, optval, on;
tx = ty = 0;
gx = gy = 0;
- maps.setAutoDelete(TRUE);
+// maps.setAutoDelete(TRUE);
firstfreemap = 1;
Closed = FALSE;
GraphRead = FALSE;
lstep = 10;
pstep = 250;
- hscroll = new QScrollBar(0, MAXWIDTH, lstep, pstep, 0, QScrollBar::Horizontal, this);
- vscroll = new QScrollBar(0, MAXHEIGHT, lstep, pstep, 0, QScrollBar::Vertical, this);
+ hscroll = new QScrollBar(0, MAXWIDTH, lstep, pstep, 0, Qt::Orientation::Horizontal, this);
+ vscroll = new QScrollBar(0, MAXHEIGHT, lstep, pstep, 0, Qt::Orientation::Vertical, this);
hscroll->setTracking(TRUE);
vscroll->setTracking(TRUE);
resize(640, 300);
char_wait = line_wait = mouse_wait = FALSE;
was_line = FALSE;
CharBuffer.clear();
- CharBuffer.setAutoDelete(TRUE);
+// CharBuffer.setAutoDelete(TRUE);
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(Qt::StrongFocus);
hscroll->setRange(0, MAXWIDTH - width() + 20);
vscroll->setRange(0, MAXHEIGHT - height() + 20);
hscroll->setSteps((int)(hscroll->width() / hscroll->maxValue()),
void VGR::closeEvent(QCloseEvent *ev)
{
- if (Closed)
- QFrame::closeEvent(ev);
+// @TODO: Check this
+// if (Closed)
+// QFrame::closeEvent(ev);
}
void VGR::mousePressEvent(QMouseEvent *ev)
msg.param.pword[2] = ev->pos().x() - ox;
msg.param.pword[3] = ev->pos().y() - oy;
switch(ev->button()) {
- case LeftButton:
+ case Qt::LeftButton:
msg.param.pword[7] = 1;
break;
- case RightButton:
+ case Qt::RightButton:
msg.param.pword[7] = 3;
break;
- case MidButton:
+ case Qt::MidButton:
msg.param.pword[7] = 2;
break;
default:
mouse_wait = FALSE;
}
- QFrame::mousePressEvent(ev);
+
+// @TODO: check
+// QFrame::mousePressEvent(ev);
}
setUpdatesEnabled(FALSE);
}
+void VGR::MakeColors()
+{
+ lcolors[0] = new QColor(0, 0, 0 ); /* black */
+ lcolors[1] = new QColor(0, 0, 139); /* blue dark */
+ lcolors[2] = new QColor(0, 100, 0 ); /* green dark */
+ lcolors[3] = new QColor(0, 197, 205 ); /* turquoise dark */
+ lcolors[4] = new QColor(205,0 , 0 ); /* red dark */
+ lcolors[5] = new QColor(238, 130,238); /* violet */
+ lcolors[6] = new QColor(139,35,35 ); /* brown */
+ lcolors[7] = new QColor(190,190,190 ); /* grey light */
+ lcolors[8] = new QColor(97, 97, 97 ); /* grey dark */
+ lcolors[9] = new QColor(0, 0, 255 ); /* blue */
+ lcolors[10] = new QColor(0, 255, 0 ); /* green */
+ lcolors[11] = new QColor(0, 229,238 ); /* turquoise */
+ lcolors[12] = new QColor(255, 0, 0 ); /* red light */
+ lcolors[13] = new QColor(255, 110,180 ); /* rose */
+ lcolors[14] = new QColor(255,255, 0 ); /* yellow */
+ lcolors[15] = new QColor(255, 255, 255 ); /* white */
+}
/****************************************/
void VGR::Putmap(int map)
{
VGRMap *m;
- m = maps.first();
- while (m != NULL) {
+ QListIterator<VGRMap *> mapsIterator(maps);
+
+ while (mapsIterator.hasNext()) {
+ m = mapsIterator.next();
if (m->number == map) {
bitBlt(canvas, curx, cury, m->map, 0, 0,
m->map->width(), m->map->height());
m->map->width(), m->map->height());
break;
}
- m = maps.next();
}
}
}
break;
/* Kill map */
- case 309:
- pmap = maps.first();
- while (pmap != NULL) {
+ case 309: {
+ QListIterator<VGRMap *> mapsIterator(maps);
+
+ while (mapsIterator.hasNext()) {
+ pmap = mapsIterator.next();
if (msg->param.pword[2] == pmap->number) {
maps.remove(pmap);
break;
}
- pmap = maps.next();
}
break;
+ }
/* Line (x1,y1,x2,y2,col) */
case 310:
f = fcol;
}//switch
}
-#include "loggraph.moc"
-
int main(int argc, char **argv)
{
QApplication app(argc, argv);
- VGR gs(argv[1]);
+ VGR gs(argc, argv);
gs.show();
return app.exec();
}
--- /dev/null
+#ifndef _VLP_GRAPH_H
+#define _VLP_GRAPH_H
+
+#include <QtGui/QPainter>
+#include <QtGui/QPrinter>
+#include <QtGui/QPushButton>
+#include <QtGui/QRadioButton>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QApplication>
+#include <QtGui/QMainWindow>
+#include <QtGui/QFrame>
+#include <math.h>
+#include <QtGui/QPixmap>
+#include <QtGui/QScrollBar>
+#include <QtGui/QColor>
+#include <stdio.h>
+#include <QtGui/QFont>
+#include <QtGui/QFontMetrics>
+#include <QtCore/QList>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <netinet/in.h>
+#include "genint1.h"
+#include "comm.h"
+#include "socu.h"
+#include <unistd.h>
+#include <QtCore/QSocketNotifier>
+#include <QtCore/QObject>
+#include <errno.h>
+#include <QtCore/QQueue>
+#include <QtGui/QMessageBox>
+#include <QtGui/QMenuBar>
+#include <QtGui/QMouseEvent>
+// #include <qpopmenu.h>
+#include <QtCore/qnamespace.h>
+
+#define MAXWIDTH 640
+#define MAXHEIGHT 480
+#define TEXT_LINES 50
+#define TEXT_COLS 100
+#define REQUEST_NAME "gr.req"
+#define PERM 0666
+
+class VGRMap {
+public:
+ QPixmap *map;
+ int number;
+
+ VGRMap(int n, QPixmap *m) {
+ number = n;
+ map = m;
+ };
+};
+
+class VGR : public QMainWindow {
+ Q_OBJECT
+public:
+ VGR(int argc, char ** argv);
+ ~VGR();
+
+ int resp_sock;
+ int fcol;
+ int bcol;
+ int gfcol;
+ int gbcol;
+ int curx;
+ int cury;
+ int tx;
+ int ty;
+ QQueue<int *> CharBuffer;
+
+ bool string_wait;
+ bool char_wait;
+ bool line_wait;
+ bool mouse_wait;
+ bool inkey_wait;
+ bool was_line;
+ QColor *lcolors[256];
+ QFont *prv_font;
+ QFont *italic_font;
+ QFont *bold_font;
+ QFont *normal_font;
+
+ void MakeColors();
+
+ void SetForeground(int);
+ void SetBackground(int);
+ void ClearAll();
+ void ClearArea(int, int, int, int);
+
+ void Line(int, int, int, int);
+ void Ellipse(int x, int y, int a, int b, int alfa, int beta, int fill);
+ void Rect(int x1, int y1, int x2, int y2, int col, int fill);
+ void Point(int x, int y);
+ void TextXY(int x, int y, char *s);
+ void CharXY(int x, int y, char a);
+ void IntXY(int x, int y, int val);
+
+ void WriteText(char *s);
+ void WriteChar(char a);
+ void WriteLine();
+
+ /* Write Char w/o changing position */
+ void PutChar(char a);
+ void DelChar();
+
+ void Outstring(int x, int y, char *s, int b, int f);
+ void writeintxy(int x, int y, int val, int c);
+ void CurPos();
+
+ int Getmap(int w, int h);
+ void Putmap(int map);
+
+ void MagicGraph(G_MESSAGE*);
+ bool GetInput(int);
+
+public slots:
+ void vscrolled(int);
+ void hscrolled(int);
+ void CloseMe();
+ void RequestMessage();
+
+protected:
+ virtual void resizeEvent(QResizeEvent *);
+ virtual void closeEvent(QCloseEvent *);
+ virtual void keyPressEvent(QKeyEvent *);
+ virtual void mousePressEvent(QMouseEvent *);
+ virtual void paintEvent(QPaintEvent *);
+ virtual void focusInEvent(QFocusEvent *);
+
+private:
+ QPixmap *canvas;
+ QScrollBar *hscroll;
+ QScrollBar *vscroll;
+ QPushButton *close_btn;
+ int ox,oy,lstep,pstep,gx,gy;
+ QList<VGRMap *> maps;
+ int firstfreemap;
+ bool Closed;
+ bool MustRepaint;
+ bool GraphRead;
+ QSocketNotifier *request;
+ char internal_buffer[256];
+ int strcnt;
+};
+
+#endif /* _VLP_GRAPH_H */
--- /dev/null
+#include <QtGui/QDialog>
+
+#include "MessageDialog.h"
+
+namespace loglan {
+namespace vlp {
+namespace dialog {
+
+MessageDialog::MessageDialog(QWidget * parent)
+ : QDialog(parent, Qt::Dialog)
+{
+ setupUi(this);
+}
+
+MessageDialog::~MessageDialog()
+{
+}
+
+int MessageDialog::getNodeNumber()
+{
+ return spinBox->value();
+}
+
+QString MessageDialog::getMessage()
+{
+ return lineEdit->text();
+}
+
+}
+}
+}
--- /dev/null
+#ifndef _VLP_KERNEL_MESSAGEDIALOG_H
+#define _VLP_KERNEL_MESSAGEDIALOG_H
+
+#include <QtGui/QDialog>
+
+#include "ui/dialogs/MessageDialog.h"
+
+namespace loglan {
+namespace vlp {
+namespace dialog {
+
+/**
+ * Message Dialog class
+ */
+class MessageDialog : public QDialog, private Ui::MessageDialog {
+public:
+ MessageDialog(QWidget * parent = 0);
+ ~MessageDialog();
+
+ int getNodeNumber();
+ QString getMessage();
+};
+
+}
+}
+}
+
+#endif /* _VLP_KERNEL_MESSAGEDIALOG_H */
#include "kernel.h"
#include "ui/KernelWindow.h"
+#include "ConnectDialog.h"
+#include "KillDialog.h"
#include "LockDialog.h"
#include "OptionsDialog.h"
-#include "KillDialog.h"
-#include "ConnectDialog.h"
+#include "MessageDialog.h"
#include "vlp/config.h"
+#include <sys/prctl.h>
/* File resides in top directory (where are Makefiles)*/
#include "../../config.h"
QString program = getHomeDir();
program += "/modules/logedit";
+ fprintf(stderr, "Run EDIT Module: %s, %s\n", program.toStdString().c_str(), getHomeDir());
pid_t pid = fork();
if (pid == 0) {
if (execl(program.toStdString().c_str(),
QString docDir = getHomeDir();
docDir += "/doc";
+ fprintf(stderr, "Run HELP Module: %s, %s\n", program.toStdString().c_str(), docDir.toStdString().c_str());
+
pid_t pid = fork();
if (pid == 0) {
if (execl(program.toStdString().c_str(),
QString program = getHomeDir();
program += "/modules/loggraph";
+ fprintf(stderr, "Run GRAPH Module: %s, %s\n", program.toStdString().c_str(), sk);
+
pid_t pid = fork();
if (pid == 0) {
if (execl(program.toStdString().c_str(),
*/
void QKernel::RunNetModule()
{
+
struct sockaddr_un svr;
int len;
int on;
QString program = getHomeDir();
program += "/modules/lognet";
+ fprintf(stderr, "Run NET Module: %s, %s %s\n", program.toStdString().c_str(), getNetModuleSocket(), getConfigFilePath().toStdString().c_str());
pid_t pid = fork();
if (pid == 0) {
if (execl(program.toStdString().c_str(),
*/
void QKernel::on_actionMessage_triggered()
{
- QDialog *dlg;
- QLineEdit *nodenr;
+ dialog::MessageDialog dialog(this);
MESSAGE m;
- dlg = new QDialog(this, Qt::Dialog);
- dlg->setWindowTitle("Send message to node");
-
- nodenr = new QLineEdit("number", dlg);
- nodenr->setGeometry(90, 10, 50, 30);
- nodenr->setText("");
-
- QLabel *tmpQLabel;
- tmpQLabel = new QLabel("Node number:", dlg);
- tmpQLabel->setGeometry(10, 10, 77, 30);
-
- tmpQLabel = new QLabel("Message:", dlg);
- tmpQLabel->setGeometry(10, 50, 70, 30);
-
- QLineEdit *msg;
- msg = new QLineEdit("", dlg);
- msg->setGeometry(80, 60, 330, 30);
-
- QPushButton *ob;
- ob = new QPushButton("Send", dlg);
- ob->setGeometry(230, 10, 80, 30);
- ob->setDefault(TRUE);
-
- QPushButton *cb;
- cb = new QPushButton("Cancel", dlg);
- cb->setGeometry(330, 10, 80, 30);
- dlg->resize(430, 110);
- connect(ob, SIGNAL(clicked()), dlg, SLOT(accept()));
- connect(cb, SIGNAL(clicked()), dlg, SLOT(reject()));
-
- if (dlg->exec()) {
+ if (dialog.exec()) {
m.msg_type = MSG_NET;
m.param.pword[0] = NET_PROPAGATE;
m.param.pword[1] = MSG_VLP;
m.param.pword[2] = NodeNumber;
- m.param.pword[4] = atoi(nodenr->text().toAscii().data());
+ m.param.pword[4] = dialog.getNodeNumber();
m.param.pword[6] = VLP_WRITE;
- strcpy(m.param.pstr, msg->text().toAscii().data());
+ strcpy(m.param.pstr, dialog.getMessage().toStdString().c_str());
write(net_sock, &m, sizeof(MESSAGE));
}
}
case VLP_WRITE:
QApplication::beep();
WriteMessage(CharLine);
- WriteMessage(
- "### Incoming Messsage ###");
- sprintf(ss, "Mesg from Node %d: %s",
- msg.param.pword[2],
- msg.param.pstr);
+ WriteMessage("### Incoming Messsage ###");
+ sprintf(ss,
+ "Mesg from Node %d: %s",
+ msg.param.pword[2],
+ msg.param.pstr
+ );
WriteMessage(ss);
WriteMessage(CharLine);
break;
case VLP_REMOTE_INSTANCE:
- sprintf(ss, "%s/%s", getRemoteDir(),
- msg.param.pstr);
+ sprintf(ss, "%s/%s", getRemoteDir(), msg.param.pstr);
if (info_messages) {
WriteMessage("Running program:");
switch (msg.msg_type) {
case MSG_GRAPH:
if (msg.param.pword[0] == GRAPH_ALLOCATE) {
+ fprintf(stderr, "Running graph module with arg: %s\n", msg.param.pstr);
RunGraphModule(msg.param.pstr);
}
break;
*/
InterpEntry *QKernel::RunIntModule(char *ss, int r)
{
+ fprintf(stderr, "Run INT Module: %s, %d\n", ss, r);
char a[256], b[255];
struct sockaddr_un svr;
int len, sock, on;
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MessageDialog</class>
+ <widget class="QDialog" name="MessageDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>308</width>
+ <height>160</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Send message to node</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Node number</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="spinBox"/>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QLabel" name="label_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Message</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="lineEdit"/>
+ </item>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>MessageDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>248</x>
+ <y>254</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>157</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>MessageDialog</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>316</x>
+ <y>260</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>286</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>