#ifndef QMLHANDLER_H #define QMLHANDLER_H #include #include #include #include class QMLHandler : public QObject { Q_OBJECT private: void handleJSON(std::string buffer); void readPipeLoop(); public: explicit QMLHandler(QObject *parent = 0); void onExit(); // C++ -> QML signals: // Sending void sendingSetFileUrlText(QString signalText); void sendingEnableSendButton(); void sendingDisableSendButton(); // Receiving void receivingClearFileList(); void receivingListFile(QString fileName); // Messages void message(QString msg); // Settings void settingsOpenSwitchServerPopup(); // Ip Popup // Switch Popup // Footer void log(QString logText); void footerSetStatus(QString status); // QML -> C++ public slots: // Sending void onSendingSelectFileButton(QUrl url); void onSendingSendFileButton(); void onSendingClearSelectionButton(); // Receiving void onReceivingListFilesButton(); void onReceivingGetFileButton(QString fileName); // Messages void onMessagesSendButton(QString msg); // Settings void onSettingsSwitchServerButton(); // Ip Popup void onIpPopupEnterIp(QString ip); // Switch Popup void onSwitchPopupEnterIp(QString ip); // Footer void onFooterGetStatusButton(); }; #endif // QMLHANDLER_H