|
@@ -25,6 +25,8 @@ QUrl sendFileUrl = QUrl("");
|
|
|
|
|
|
bool programActive = true;
|
|
|
|
|
|
+QMLHandler::QMLHandler(QObject *parent) : QObject(parent) {}
|
|
|
+
|
|
|
void QMLHandler::onExit() {
|
|
|
write(outpipefd[1], "disconnect\n", strlen("disconnect\n"));
|
|
|
}
|
|
@@ -89,7 +91,10 @@ void QMLHandler::readPipeLoop() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-QMLHandler::QMLHandler(QObject *parent) : QObject(parent) {}
|
|
|
+
|
|
|
+
|
|
|
+// ### QML Handlers ###
|
|
|
+
|
|
|
|
|
|
// Sending
|
|
|
void QMLHandler::onSendingSelectFileButton(QUrl url) {
|
|
@@ -105,6 +110,13 @@ void QMLHandler::onSendingSendFileButton() {
|
|
|
strlen(command.toUtf8().constData()));
|
|
|
}
|
|
|
|
|
|
+void QMLHandler::onSendingClearSelectionButton() {
|
|
|
+ sendFileUrl = QUrl("");
|
|
|
+ emit log("Cleared Selection");
|
|
|
+ emit sendingSetFileUrlText("Selected File: None");
|
|
|
+ emit sendingDisableSendButton();
|
|
|
+}
|
|
|
+
|
|
|
// Receiving
|
|
|
void QMLHandler::onReceivingGetFileButton(QString fileName) {
|
|
|
QString command = "get " + fileName + "\n";
|