COS3711
ASSIGNMENT 2
Due 2025
, auto selectedItem = model->item(i, 1)->text();
auto selectedType = model->item(i, 2)->text();
auto selectedQuantity = model->item(i, 3)->text();
auto selectedDateTime = model->item(i, 4)->text();
xml.append("<Transaction>");
xml.append("<Customer>" + customer.toUtf8() + "</Customer>");
xml.append("<Item>" + selectedItem.toUtf8() + "</Item>");
xml.append("<Type>" + selectedType.toUtf8() + "</Type>");
xml.append("<Quantity>" + selectedQuantity.toUtf8() + "</Quantity>");
xml.append("<DateTime>" + selectedDateTime.toUtf8() + "</DateTime>");
xml.append("</Transaction>");
}
xml.append("</Transactions>");
return xml;
}
};
Part 2: UDP Receiver Application
#include <QLabel>
class ReceiverWindow : public QMainWindow {
Q_OBJECT
public:
ASSIGNMENT 2
Due 2025
, auto selectedItem = model->item(i, 1)->text();
auto selectedType = model->item(i, 2)->text();
auto selectedQuantity = model->item(i, 3)->text();
auto selectedDateTime = model->item(i, 4)->text();
xml.append("<Transaction>");
xml.append("<Customer>" + customer.toUtf8() + "</Customer>");
xml.append("<Item>" + selectedItem.toUtf8() + "</Item>");
xml.append("<Type>" + selectedType.toUtf8() + "</Type>");
xml.append("<Quantity>" + selectedQuantity.toUtf8() + "</Quantity>");
xml.append("<DateTime>" + selectedDateTime.toUtf8() + "</DateTime>");
xml.append("</Transaction>");
}
xml.append("</Transactions>");
return xml;
}
};
Part 2: UDP Receiver Application
#include <QLabel>
class ReceiverWindow : public QMainWindow {
Q_OBJECT
public: