Pārlūkot izejas kodu

Merge branch 'us20-3-gui-signup' into 'develop'

US20.3: GUI Signup

See merge request tobias.wach/ccats!29
Sander, Paul 5 gadi atpakaļ
vecāks
revīzija
a9fb056e47

+ 13 - 42
gui/src/IpPopupForm.ui.qml → gui/src/IpPopup.ui.qml

@@ -4,7 +4,7 @@ import QtQuick.Layouts 1.3
 
 Popup {
     id: popup
-    height: 400
+    height: 200
     dim: true
     clip: false
     width: 400
@@ -14,12 +14,15 @@ Popup {
 
     Connections {
         target: _qmlHandler
-        onIpPopupSetStatus: {
-            ipPopupStatusText.text = status
-        }
         onIpPopupClose: {
             popup.close()
         }
+        onIpPopupOpen: {
+          popup.open();
+        }
+        onIpPopupSetStatus: {
+            ipPopupStatusText.text = status
+        }
     }
 
     ColumnLayout {
@@ -27,7 +30,7 @@ Popup {
 
         Text {
             Layout.alignment: Qt.AlignCenter
-            id: ipPopupTitle
+            id: ipPopupText
             color: "#ffffff"
             text: qsTr("Enter the IP to connect:")
             horizontalAlignment: Text.AlignHCenter
@@ -52,35 +55,6 @@ Popup {
             Keys.onEnterPressed: ipPopupConnectButton.activate()
         }
 
-        TextField {
-            Layout.alignment: Qt.AlignCenter
-            id: ipPopupUsernameInput
-            selectByMouse: true
-            focus: true
-            text: qsTr("")
-            placeholderText: "Username"
-            horizontalAlignment: Text.AlignHCenter
-            // @disable-check M222
-            Keys.onReturnPressed: ipPopupConnectButton.activate()
-            // @disable-check M222
-            Keys.onEnterPressed: ipPopupConnectButton.activate()
-        }
-
-        TextField {
-            Layout.alignment: Qt.AlignCenter
-            id: ipPopupPasswordInput
-            selectByMouse: true
-            focus: true
-            text: qsTr("")
-            placeholderText: "Password"
-            horizontalAlignment: Text.AlignHCenter
-            // @disable-check M222
-            Keys.onReturnPressed: ipPopupConnectButton.activate()
-            // @disable-check M222
-            Keys.onEnterPressed: ipPopupConnectButton.activate()
-            echoMode: TextInput.Password
-        }
-
         Text {
             id: ipPopupStatusText
             color: "#df3f3f"
@@ -95,7 +69,9 @@ Popup {
             Layout.alignment: Qt.AlignCenter
             id: ipPopupConnectButton
             text: qsTr("Connect")
-            enabled: (ipPopupIpInput.acceptableInput && ipPopupUsernameInput.text != "" && ipPopupPasswordInput.text != "")
+            rightPadding: 8
+            padding: 12
+            enabled: ipPopupIpInput.acceptableInput
             font.pointSize: 16
             // @disable-check M223
             onClicked: {
@@ -106,16 +82,11 @@ Popup {
             // @disable-check M222
             function activate() {
                 // @disable-check M223
-                if (ipPopupConnectButton.enabled) {
+                if (ipPopupIpInput.acceptableInput) {
                     // @disable-check M222
-                    _qmlHandler.onIpPopupConnectButton(ipPopupIpInput.text, ipPopupUsernameInput.text, ipPopupPasswordInput.text)
+                    _qmlHandler.onIpPopupConnectButton(ipPopupIpInput.text)
                 }
             }
         }
     }
 }
-
-/*##^## Designer {
-    D{i:0;autoSize:true;height:480;width:640}
-}
- ##^##*/

+ 91 - 0
gui/src/LoginForm.ui.qml

@@ -0,0 +1,91 @@
+import QtQuick 2.12
+import QtQuick.Controls 2.5
+import QtQuick.Layouts 1.3
+
+Page {
+    width: 400
+    height: 400
+
+    Connections {
+        target: _qmlHandler
+        onLoginSetStatus: {
+            loginStatusText.text = status
+        }
+    }
+
+    ColumnLayout {
+        anchors.fill: parent
+
+        Text {
+            Layout.alignment: Qt.AlignCenter
+            id: loginTitle
+            color: "#ffffff"
+            text: qsTr("Login")
+            horizontalAlignment: Text.AlignHCenter
+            verticalAlignment: Text.AlignVCenter
+            font.pixelSize: 20
+        }
+
+        TextField {
+            Layout.alignment: Qt.AlignCenter
+            id: loginUsernameInput
+            selectByMouse: true
+            focus: true
+            text: qsTr("")
+            placeholderText: "Username"
+            horizontalAlignment: Text.AlignHCenter
+            // @disable-check M222
+            Keys.onReturnPressed: loginLoginButton.activate()
+            // @disable-check M222
+            Keys.onEnterPressed: loginLoginButton.activate()
+        }
+
+        TextField {
+            Layout.alignment: Qt.AlignCenter
+            id: loginPasswordInput
+            selectByMouse: true
+            focus: true
+            text: qsTr("")
+            placeholderText: "Password"
+            horizontalAlignment: Text.AlignHCenter
+            // @disable-check M222
+            Keys.onReturnPressed: loginLoginButton.activate()
+            // @disable-check M222
+            Keys.onEnterPressed: loginLoginButton.activate()
+            echoMode: TextInput.Password
+        }
+
+        Text {
+            id: loginStatusText
+            color: "#df3f3f"
+            text: qsTr("")
+            horizontalAlignment: Text.AlignHCenter
+            verticalAlignment: Text.AlignVCenter
+            Layout.alignment: Qt.AlignCenter
+            font.pixelSize: 20
+        }
+
+        Button {
+            Layout.alignment: Qt.AlignCenter
+            id: loginLoginButton
+            text: qsTr("Login")
+            enabled: (loginUsernameInput.text != ""
+                      && loginPasswordInput.text != "")
+            font.pointSize: 16
+            // @disable-check M223
+            onClicked: {
+                // @disable-check M222
+                loginLoginButton.activate()
+            }
+
+            // @disable-check M222
+            function activate() {
+                // @disable-check M223
+                if (loginLoginButton.enabled) {
+                    // @disable-check M222
+                    _qmlHandler.onLoginLoginButton(loginUsernameInput.text, loginPasswordInput.text)
+                }
+            }
+        }
+    }
+}

+ 61 - 0
gui/src/LoginSignupPopup.ui.qml

@@ -0,0 +1,61 @@
+import QtQuick 2.4
+import QtQuick.Controls 2.3
+import QtQuick.Layouts 1.3
+
+Popup {
+    id: popup
+    height: 450
+    dim: true
+    clip: false
+    width: 400
+    modal: true
+    focus: true
+    closePolicy: Popup.NoAutoClose
+
+    Connections {
+        target: _qmlHandler
+        onLoginSignupPopupClose: {
+            popup.close()
+        }
+        onLoginSignupPopupOpen: {
+          popup.open()
+        }
+    }
+
+    Page {
+        anchors.fill: parent
+
+        header: TabBar {
+            id: header
+            currentIndex: swipeView.currentIndex
+            contentHeight: 50
+
+            TabButton {
+                text: qsTr("Login")
+            }
+
+            TabButton {
+                text: qsTr("Signup")
+            }
+        }
+
+        SwipeView {
+            id: swipeView
+            anchors.fill: parent
+            currentIndex: header.currentIndex
+            clip: true
+
+            LoginForm {
+
+            }
+
+            SignupForm {
+
+            }
+        }
+    }
+
+    Component.onCompleted: {
+      swipeView.interactive = false
+    }
+}

+ 111 - 0
gui/src/SignupForm.ui.qml

@@ -0,0 +1,111 @@
+import QtQuick 2.12
+import QtQuick.Controls 2.5
+import QtQuick.Layouts 1.3
+
+Page {
+  width: 400
+  height: 400
+
+  Connections {
+      target: _qmlHandler
+      onSignupSetStatus: {
+          signupStatusText.text = status
+      }
+  }
+
+  ColumnLayout {
+      anchors.fill: parent
+
+      Text {
+          Layout.alignment: Qt.AlignCenter
+          id: signupTitle
+          color: "#ffffff"
+          text: qsTr("Signup")
+          horizontalAlignment: Text.AlignHCenter
+          verticalAlignment: Text.AlignVCenter
+          font.pixelSize: 20
+      }
+
+      TextField {
+          Layout.alignment: Qt.AlignCenter
+          id: signupUsernameInput
+          selectByMouse: true
+          focus: true
+          text: qsTr("")
+          placeholderText: "Username"
+          horizontalAlignment: Text.AlignHCenter
+          // @disable-check M222
+          Keys.onReturnPressed: signupRegisterButton.activate()
+          // @disable-check M222
+          Keys.onEnterPressed: signupRegisterButton.activate()
+      }
+
+      TextField {
+          Layout.alignment: Qt.AlignCenter
+          id: signupPasswordOneInput
+          selectByMouse: true
+          focus: true
+          text: qsTr("")
+          placeholderText: "Password"
+          horizontalAlignment: Text.AlignHCenter
+          // @disable-check M222
+          Keys.onReturnPressed: signupRegisterButton.activate()
+          // @disable-check M222
+          Keys.onEnterPressed: signupRegisterButton.activate()
+          echoMode: TextInput.Password
+
+          onTextEdited: signupStatusText.text = ""
+      }
+
+      TextField {
+          Layout.alignment: Qt.AlignCenter
+          id: signupPasswordTwoInput
+          selectByMouse: true
+          focus: true
+          text: qsTr("")
+          placeholderText: "Repeat Passw."
+          horizontalAlignment: Text.AlignHCenter
+          // @disable-check M222
+          Keys.onReturnPressed: signupRegisterButton.activate()
+          // @disable-check M222
+          Keys.onEnterPressed: signupRegisterButton.activate()
+          echoMode: TextInput.Password
+
+          onTextEdited: signupStatusText.text = ""
+      }
+
+      Text {
+          id: signupStatusText
+          color: "#df3f3f"
+          text: qsTr("")
+          horizontalAlignment: Text.AlignHCenter
+          verticalAlignment: Text.AlignVCenter
+          Layout.alignment: Qt.AlignCenter
+          font.pixelSize: 20
+      }
+
+      Button {
+          Layout.alignment: Qt.AlignCenter
+          id: signupRegisterButton
+          text: qsTr("Register")
+          enabled: (signupUsernameInput.text != ""
+                    && signupPasswordOneInput.text != ""
+                    && signupPasswordTwoInput.text != "")
+          font.pointSize: 16
+          // @disable-check M223
+          onClicked: {
+              // @disable-check M222
+              signupRegisterButton.activate()
+          }
+
+          // @disable-check M222
+          function activate() {
+              // @disable-check M223
+              if (signupRegisterButton.enabled) {
+                  // @disable-check M222
+                  _qmlHandler.onSignupRegisterButton(signupUsernameInput.text, signupPasswordOneInput.text, signupPasswordTwoInput.text);
+              }
+          }
+      }
+   }
+}

+ 0 - 97
gui/src/SwitchIpPopupForm.ui.qml

@@ -1,97 +0,0 @@
-import QtQuick 2.4
-import QtQuick.Controls 2.3
-import QtQuick.Layouts 1.3
-
-Popup {
-    id: popup
-    height: 200
-    dim: true
-    clip: false
-    width: 400
-    modal: true
-    focus: true
-    closePolicy: Popup.NoAutoClose
-
-    ColumnLayout {
-        anchors.fill: parent
-
-        Text {
-            Layout.alignment: Qt.AlignCenter
-            id: switchText
-            color: "#ffffff"
-            text: qsTr("Enter the IP to connect:")
-            horizontalAlignment: Text.AlignHCenter
-            verticalAlignment: Text.AlignVCenter
-            font.pixelSize: 20
-        }
-
-        TextField {
-            Layout.alignment: Qt.AlignCenter
-            id: switchIpInput
-            selectByMouse: true
-            text: qsTr("")
-            placeholderText: "Enter IP"
-            horizontalAlignment: Text.AlignHCenter
-            validator: RegExpValidator {
-                regExp: /^(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))$/
-            }
-
-            // @disable-check M222
-            Keys.onReturnPressed: switchConnectButton.activate()
-            // @disable-check M222
-            Keys.onEnterPressed: switchConnectButton.activate()
-        }
-
-        Text {
-            id: switchStatusText
-            color: "#df3f3f"
-            text: qsTr("")
-            horizontalAlignment: Text.AlignHCenter
-            verticalAlignment: Text.AlignVCenter
-            Layout.alignment: Qt.AlignCenter
-            font.pixelSize: 20
-        }
-
-        RowLayout {
-            Layout.alignment: Qt.AlignCenter
-
-            Button {
-                Layout.alignment: Qt.AlignLeft
-                id: switchConnectButton
-                text: qsTr("Connect")
-                rightPadding: 8
-                padding: 12
-                enabled: switchIpInput.acceptableInput
-                font.pointSize: 16
-                // @disable-check M223
-                onClicked: {
-                    // @disable-check M222
-                    switchConnectButton.activate()
-                }
-
-                // @disable-check M222
-                function activate() {
-                    // @disable-check M223
-                    if (switchIpInput.acceptableInput) {
-                        // @disable-check M222
-                        _qmlHandler.onSwitchPopupEnterIp(switchIpInput.text)
-                        // @disable-check M222
-                        popup.close()
-                    }
-                }
-            }
-
-            Button {
-                Layout.alignment: Qt.AlignRight
-                id: switchCancelButton
-                text: qsTr("Cancel")
-                font.pointSize: 16
-                // @disable-check M223
-                onClicked: {
-                    // @disable-check M222
-                    popup.close()
-                }
-            }
-        }
-    }
-}

+ 6 - 5
gui/src/main.qml

@@ -71,20 +71,21 @@ ApplicationWindow {
 
     }
 
-    IpPopupForm {
-        id: ipDialog
+    LoginSignupPopup {
+        id: loginSignupPopup
         x: Math.round((parent.width - width) / 2)
         y: Math.round((parent.height - height) / 2)
     }
 
-    SwitchIpPopupForm {
-        id: switchDialog
+    IpPopup {
+        id: ipPopup
         x: Math.round((parent.width - width) / 2)
         y: Math.round((parent.height - height) / 2)
+        onClosed: loginSignupPopup.open()
     }
 
     Component.onCompleted: {
       swipeView.interactive = false
-      ipDialog.open()
+      ipPopup.open()
     }
 }

+ 4 - 2
gui/src/qml.qrc

@@ -6,9 +6,11 @@
         <file>SettingsForm.ui.qml</file>
         <file>MessagesForm.ui.qml</file>
         <file>qtquickcontrols2.conf</file>
-        <file>IpPopupForm.ui.qml</file>
+        <file>LoginSignupPopup.ui.qml</file>
         <file>HelpForm.ui.qml</file>
         <file>FooterForm.ui.qml</file>
-        <file>SwitchIpPopupForm.ui.qml</file>
+        <file>IpPopup.ui.qml</file>
+        <file>LoginForm.ui.qml</file>
+        <file>SignupForm.ui.qml</file>
     </qresource>
 </RCC>

+ 87 - 70
gui/src/qmlhandler.cpp

@@ -22,13 +22,54 @@ int inpipefd[2];
 int outpipefd[2];
 char buf[1025];
 QUrl sendFileUrl = QUrl("");
-QString _USERNAME;
-QString _PASSWORD;
+QString _IP = "";
+bool _CLI_RUNNING = false;
 
 bool programActive = true;
 
 QMLHandler::QMLHandler(QObject *parent) : QObject(parent) {}
 
+void QMLHandler::closeCLI() {
+  close(outpipefd[1]);
+  close(inpipefd[0]);
+}
+
+void QMLHandler::reopenCLI(QString ip) {
+  if (_CLI_RUNNING) {
+    closeCLI();
+  }
+
+  _IP = ip;
+  pid_t pid = 0;
+
+  pipe(inpipefd);
+  pipe(outpipefd);
+  pid = fork();
+  if (pid == 0) {
+    // Child
+    dup2(outpipefd[0], STDIN_FILENO);
+    dup2(inpipefd[1], STDOUT_FILENO);
+    // dup2(inpipefd[1], STDERR_FILENO);
+
+    // ask kernel to deliver SIGTERM in case the parent dies
+    prctl(PR_SET_PDEATHSIG, SIGTERM);
+
+    // Set the path to the CLI - pass argument h (help) for now
+    // TODO: Change hardcoded path
+    execl("../../cli/build/ccats-cli", "ccats-cli", ip.toUtf8().constData(),
+          "--machine", (char *)NULL);
+
+    _CLI_RUNNING = true;
+
+    exit(1);
+  }
+
+  close(outpipefd[0]);
+  close(inpipefd[1]);
+
+  std::thread(&QMLHandler::readPipeLoop, this).detach();
+}
+
 std::vector<std::string> tokenizeByNewlines(std::string in) {
   vector<string> res;
   size_t index;
@@ -69,15 +110,15 @@ void QMLHandler::handleJSON(string buffer) {
   string cmd = command.asString();
   qInfo() << QString::fromStdString("Received command " + cmd);
 
-  if (cmd.compare("status")) {
+  if (!cmd.compare("status")) {
     emit footerSetStatus(root["response"].asString().c_str());
   }
 
-  else if (cmd.compare("close")) {
+  else if (!cmd.compare("close")) {
     programActive = false;
   }
 
-  else if (cmd.compare("list")) {
+  else if (!cmd.compare("list")) {
     if (root["accept"] == true) {
       emit receivingClearFileList();
 
@@ -92,43 +133,46 @@ void QMLHandler::handleJSON(string buffer) {
     }
   }
 
-  else if (cmd == "connect") {
+  else if (!cmd.compare("connect")) {
     if (root["accept"].asBool()) {
     } else {
       emit ipPopupSetStatus(root["error"].asString().c_str());
-      close(outpipefd[1]);
-      close(inpipefd[0]);
+      reopenCLI(_IP);
     }
   }
 
-  else if (cmd == "version") {
-    if (root["accept"].asBool() == false) {
+  else if (!cmd.compare("version")) {
+    if (root["accept"] == true) {
+      emit ipPopupClose();
+      emit loginSignupPopupOpen();
+    } else {
       QString errorMessage = QString::fromStdString(string(
           "Version mismatch: \nClient: " + root["clientversion"].asString() +
           "\nServer: " + root["serverversion"].asString()));
       emit ipPopupSetStatus(errorMessage);
-      close(outpipefd[1]);
-      close(inpipefd[0]);
-    } else {
+      reopenCLI(_IP);
+    }
+  }
 
-      write(outpipefd[1], (_USERNAME + "\n").toUtf8().constData(),
-            strlen((_USERNAME + "\n").toUtf8().constData()));
-      write(outpipefd[1], (_PASSWORD + "\n").toUtf8().constData(),
-            strlen((_PASSWORD + "\n").toUtf8().constData()));
+  else if (!cmd.compare("login")) {
+    if (root["accept"] == true) {
+      emit loginSignupPopupClose();
+    } else {
+      emit loginSetStatus(root["error"].asString().c_str());
+      reopenCLI(_IP);
     }
   }
 
-  else if (cmd == "login") {
-    if (root["accept"].asBool() == true) {
-      emit ipPopupClose();
+  else if (!cmd.compare("signup")) {
+    if (root["accept"] == true) {
+      emit loginSignupPopupClose();
     } else {
-      emit ipPopupSetStatus(root["error"].asString().c_str());
-      close(outpipefd[1]);
-      close(inpipefd[0]);
+      emit loginSetStatus(root["error"].asString().c_str());
+      reopenCLI(_IP);
     }
   }
 
-  else if (cmd.compare("put")) {
+  else if (!cmd.compare("put")) {
     if (root["accept"] == false) {
       QString errorMessage = QString::fromStdString(
           string("Error when uploading file " + root["file"].asString() +
@@ -137,11 +181,11 @@ void QMLHandler::handleJSON(string buffer) {
     }
   }
 
-  else if (cmd.compare("putdata")) {
+  else if (!cmd.compare("putdata")) {
     // TODO: Show speed and handle Error
   }
 
-  else if (cmd.compare("get")) {
+  else if (!cmd.compare("get")) {
     if (root["accept"] == false) {
       QString errorMessage = QString::fromStdString(
           string("Error when downloading file " + root["file"].asString() +
@@ -150,7 +194,7 @@ void QMLHandler::handleJSON(string buffer) {
     }
   }
 
-  else if (cmd.compare("getdata")) {
+  else if (!cmd.compare("getdata")) {
     // TODO: Show speed and handle Error
   }
 }
@@ -173,13 +217,6 @@ void QMLHandler::readPipeLoop() {
 
     if (inPipeStatus.revents & POLLIN) {
       readOffset += read(inpipefd[0], buf + readOffset, 1);
-
-      if (buf[readOffset - 1] == '\n') {
-        pollCount = 10;
-      } else {
-        pollCount = 0;
-      }
-
       pollCount = 0;
 
     } else {
@@ -256,45 +293,25 @@ void QMLHandler::onSettingsSwitchServerButton() {
 }
 
 // Ip Popup
-void QMLHandler::onIpPopupConnectButton(QString ip, QString username,
-                                        QString password) {
-  pid_t pid = 0;
-
-  pipe(inpipefd);
-  pipe(outpipefd);
-  pid = fork();
-  if (pid == 0) {
-    // Child
-    dup2(outpipefd[0], STDIN_FILENO);
-    dup2(inpipefd[1], STDOUT_FILENO);
-    // dup2(inpipefd[1], STDERR_FILENO);
-
-    // ask kernel to deliver SIGTERM in case the parent dies
-    prctl(PR_SET_PDEATHSIG, SIGTERM);
+void QMLHandler::onIpPopupConnectButton(QString ip) { reopenCLI(ip); }
 
-    // Set the path to the CLI - pass argument h (help) for now
-    // TODO: Change hardcoded path
-    execl("../../cli/build/ccats-cli", "ccats-cli", ip.toUtf8().constData(),
-          "--machine", (char *)NULL);
-
-    exit(1);
-  }
-
-  // TODO: Not hardcoded
-  emit footerSetStatus("Connected to " + ip);
-
-  _USERNAME = username;
-  _PASSWORD = password;
-
-  close(outpipefd[0]);
-  close(inpipefd[1]);
-
-  std::thread(&QMLHandler::readPipeLoop, this).detach();
+// Login
+void QMLHandler::onLoginLoginButton(QString username, QString password) {
+  QString command = "login " + username + " " + password + "\n";
+  write(outpipefd[1], command.toUtf8().constData(),
+        strlen(command.toUtf8().constData()));
 }
 
-// Switch Popup
-void QMLHandler::onSwitchPopupEnterIp(QString ip) {
-  qInfo() << "Switching to " << ip;
+// Signup
+void QMLHandler::onSignupRegisterButton(QString username, QString passwordOne,
+                                        QString passwordTwo) {
+  if (QString::compare(passwordOne, passwordTwo, Qt::CaseSensitive)) {
+    emit signupSetStatus("Passwords don't match");
+    return;
+  }
+  QString command = "signup " + username + " " + passwordOne + "\n";
+  write(outpipefd[1], command.toUtf8().constData(),
+        strlen(command.toUtf8().constData()));
 }
 
 // Footer

+ 18 - 4
gui/src/qmlhandler.h

@@ -13,6 +13,8 @@ class QMLHandler : public QObject {
 private:
   void handleJSON(std::string buffer);
   void readPipeLoop();
+  void reopenCLI(QString ip);
+  void closeCLI();
 
 public:
   explicit QMLHandler(QObject *parent = 0);
@@ -39,8 +41,17 @@ signals:
   // Ip Popup
   void ipPopupSetStatus(QString status);
   void ipPopupClose();
+  void ipPopupOpen();
 
-  // Switch Popup
+  // Login Signup Popup
+  void loginSignupPopupClose();
+  void loginSignupPopupOpen();
+
+  // Login
+  void loginSetStatus(QString status);
+
+  // Signup
+  void signupSetStatus(QString status);
 
   // Footer
   void log(QString logText);
@@ -65,10 +76,13 @@ public slots:
   void onSettingsSwitchServerButton();
 
   // Ip Popup
-  void onIpPopupConnectButton(QString ip, QString username, QString password);
+  void onIpPopupConnectButton(QString ip);
+
+  // Login
+  void onLoginLoginButton(QString username, QString password);
 
-  // Switch Popup
-  void onSwitchPopupEnterIp(QString ip);
+  // Signup
+  void onSignupRegisterButton(QString username, QString passwordOne, QString passwordTwo);
 
   // Footer
   void onFooterGetStatusButton();