aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main_qmladaptor.cpp4
-rw-r--r--src/main_qmladaptor.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/main_qmladaptor.cpp b/src/main_qmladaptor.cpp
index 9aafbce..620bb69 100644
--- a/src/main_qmladaptor.cpp
+++ b/src/main_qmladaptor.cpp
@@ -131,6 +131,10 @@ void MainQMLAdaptor::onCloseHandler() {
emit onCloseSignal();
}
+void MainQMLAdaptor::showToast(QString text, uint durationMs) {
+ emit showToastSignal(text, QString::number(durationMs));
+}
+
//void MainQMLAdaptor::onCloseHandler() {
// qDebug() << "Inside MainQMLAdaptor::onCloseHandler()";
diff --git a/src/main_qmladaptor.h b/src/main_qmladaptor.h
index 5cf2c9a..9ce6aa2 100644
--- a/src/main_qmladaptor.h
+++ b/src/main_qmladaptor.h
@@ -50,6 +50,8 @@ signals:
void onCloseSignal();
+ void showToastSignal(QString text, QString durationMs);
+
protected:
QString _url;
QString _pin;
@@ -71,4 +73,6 @@ public slots:
QString getPin();
void onCloseHandler();
+
+ void showToast(QString text, uint durationMs = 3000);
};