diff --git a/dialogs/MainScreen.cpp b/dialogs/MainScreen.cpp index 98c389610c99b2738aebd98eed7936e411225f94..aec9bdac6bd3570c06564f473a4749c7249cdf86 100644 --- a/dialogs/MainScreen.cpp +++ b/dialogs/MainScreen.cpp @@ -1,11 +1,5 @@ #include "MainScreen.h" -#include "StyledDropShadowEffect.h" -#include <QTimer> -#include "ComboBoxPopup.h" -#include "CustomButtonDelegateFactory.h" -#include "defines.h" -#include "DapDataLocal.h" const QString MainScreen::SCREEN_NAME = "Main"; @@ -23,22 +17,68 @@ QString MainScreen::screenName() void MainScreen::setState(ConnectionStates a_state) { - this->setChildProperties(LBL_STATUS_MESSAGE_NAME, Properties::TEXT , statusText(a_state)); - this->setChildProperties(LBL_STATUS_MESSAGE_NAME, Properties::STATE, a_state); - this->updateChildStyle (LBL_STATUS_MESSAGE_NAME); + #ifdef Q_OS_ANDROID + Q_UNUSED(a_state) +#else + this->setChildProperties(LBL_STATUS_MESSAGE, Properties::TEXT , statusText(a_state)); + this->setChildProperties(LBL_STATUS_MESSAGE, Properties::STATE, a_state); this->setChildProperties(BTN_SWITCH_NAME, Properties::STATE, a_state); this->updateChildStyle (BTN_SWITCH_NAME); - this->setChildProperties(CBB_SERVER_NAME, Properties::ENABLED, a_state == ConnectionStates::Disconnected); - this->setChildProperties(BTN_SWITCH_NAME, Properties::ENABLED, (a_state == ConnectionStates::Disconnected || a_state == ConnectionStates::Connected)); + this->updateChildStyle (LBL_STATUS_MESSAGE); + + this->setChildProperties(BTN_SWITCH, Properties::STATE, a_state); + this->updateChildStyle (BTN_SWITCH); + + this->setChildProperties(CBB_SERVER, Properties::ENABLED, a_state == ConnectionStates::Disconnected); + this->setChildProperties(BTN_SWITCH, Properties::ENABLED, (a_state == ConnectionStates::Disconnected || a_state == ConnectionStates::Connected)); +#endif } void MainScreen::initVariantUi(QWidget *a_widget) { - ComboBox *cbbServer = a_widget->findChild<ComboBox *>(CBB_SERVER_NAME) ; Q_ASSERT(cbbServer ); - QLabel *lblStatusMessage = a_widget->findChild<QLabel *>(LBL_STATUS_MESSAGE_NAME); Q_ASSERT(lblStatusMessage); - QPushButton *btnSwitch = a_widget->findChild<QPushButton*>(BTN_SWITCH_NAME) ; Q_ASSERT(btnSwitch ); + +#ifdef Q_OS_ANDROID + + QFrame *frmConnect = a_widget->findChild<QFrame *>(FRM_CONNECT); Q_ASSERT(frmConnect); + QFrame *frmInfo = a_widget->findChild<QFrame *>(FRM_INFO); Q_ASSERT(frmInfo); + QFrame *frmStatus = a_widget->findChild<QFrame *>(FRM_STATUS); Q_ASSERT(frmStatus); + QPushButton *btnChangeServer = a_widget->findChild<QPushButton *>(BTN_CHANGE_SERVER); Q_ASSERT(btnChangeServer); + QLabel *lblActualServer = a_widget->findChild<QLabel *>(LBL_ACTUAL_SERVER); Q_ASSERT(lblActualServer); + QPushButton *btnConnect = a_widget->findChild<QPushButton *>(BTN_CONNECT); Q_ASSERT(btnConnect); + + QLabel *lblLoginTime = a_widget->findChild<QLabel *>(LBL_LOGIN_TIME); Q_ASSERT(lblLoginTime); + QLabel *lblTimeConnect = a_widget->findChild<QLabel *>(LBL_TIME_CONNECT); Q_ASSERT(lblTimeConnect); + QLabel *lblPacketsRec = a_widget->findChild<QLabel *>(LBL_PACKETS_REC); Q_ASSERT(lblPacketsRec); + QLabel *lblPacetsSent = a_widget->findChild<QLabel *>(LBL_PACKETS_SENT); Q_ASSERT(lblPacetsSent); + + QCheckBox *cbbAuth = a_widget->findChild<QCheckBox *>(CBB_AUTH); Q_ASSERT(cbbAuth); + QCheckBox *cbbStream = a_widget->findChild<QCheckBox *>(CBB_STREAM); Q_ASSERT(cbbStream); + QCheckBox *cbbNetwork = a_widget->findChild<QCheckBox *>(CBB_NETWORK); Q_ASSERT(cbbNetwork); + + + //To test appearance + cbbAuth->setChecked(true); + //This is done in order to remove the reaction to a click on the checkbox + connect(cbbAuth,&QCheckBox::clicked,[=]{ + cbbAuth->setChecked(!cbbAuth->isChecked()); + }); + connect(cbbStream,&QCheckBox::clicked,[=]{ + cbbStream->setChecked(!cbbStream->isChecked()); + }); + connect(cbbNetwork,&QCheckBox::clicked,[=]{ + cbbNetwork->setChecked(!cbbNetwork->isChecked()); + }); + //======================================================================== + btnChangeServer->setGraphicsEffect(new StyledDropShadowEffect(btnChangeServer)); + frmConnect->setGraphicsEffect(new StyledDropShadowEffect(frmConnect)); + frmInfo->setGraphicsEffect(new StyledDropShadowEffect(frmInfo)); + frmStatus->setGraphicsEffect(new StyledDropShadowEffect(frmStatus)); +#else + CustomComboBox *cbbServer = a_widget->findChild<CustomComboBox*>(CBB_SERVER) ; Q_ASSERT(cbbServer ); + QLabel *lblStatusMessage = a_widget->findChild<QLabel *>(LBL_STATUS_MESSAGE); Q_ASSERT(lblStatusMessage); + QPushButton *btnSwitch = a_widget->findChild<QPushButton *>(BTN_SWITCH) ; Q_ASSERT(btnSwitch ); connect(btnSwitch, &QPushButton::clicked, [this]{ emit connectionSwitched(); @@ -63,10 +103,40 @@ void MainScreen::initVariantUi(QWidget *a_widget) cbbServer->QComboBox::setCurrentText(DapDataLocal::me()->serverName()); - ComboBoxPopup* cbPopup = new ComboBoxPopup(a_widget); - cbPopup->setDelegateFactory<CustomButtonDelegateFactory>(); - cbPopup->setCaption("Choose server"); - cbbServer->setPopup(cbPopup); +// QIcon icon(":/pics/flag.svg"); +// cbbServer->setItemIcon(0,icon); + +// cbbServer->addItem("Natherlans"); +// QIcon icon(":/pics/flag.svg"); +// cbbServer->setItemIcon(0,icon); + + connect(cbbServer,&CustomComboBox::showCustomWindow,[=] + { + qDebug() << "server clicked"; + +// QList<DataModel> *dataList = new QList<DataModel>; +// DataModel tmpModel; +// for(int i = 0; i < 5;i++) +// { +// tmpModel.text = "kelvin-testnet.Cellframe"; +// tmpModel.iconPath =":/pics/flag.svg"; +// dataList->append(tmpModel); +// } + + CustomComboBoxPopup *s_comboBoxPopup = new CustomComboBoxPopup(a_widget); + s_comboBoxPopup->setModel(cbbServer->model()); + s_comboBoxPopup->setCaption("Choose server"); + s_comboBoxPopup->show(); + + connect(s_comboBoxPopup, &CustomComboBoxPopup::itemSelected, [this, cbbServer](int a_index){ + QString serverName = cbbServer->itemText(a_index); + cbbServer->setCurrentText(serverName); + emit this->serverChanged(serverName); + }); + + }); +#endif + } QString MainScreen::statusText(ConnectionStates a_state) diff --git a/dialogs/MainScreen.h b/dialogs/MainScreen.h index 9fc9aa2a84a4a8416ab80726dc4ea522ce80c101..176af5479879b9978f438e4f23b415a2c275bf82 100644 --- a/dialogs/MainScreen.h +++ b/dialogs/MainScreen.h @@ -1,15 +1,31 @@ #ifndef MAINSCREEN_H #define MAINSCREEN_H -#include <QComboBox> + #include <QStateMachine> #include "AdaptiveScreen.h" -#include "CustomComboBox.h" + #include "vpnDefine.h" + +#include "defines.h" +#include "DapDataLocal.h" +#include "StyledDropShadowEffect.h" + +#ifdef Q_OS_ANDROID +#include "ui_MainScreenMobile.h" +#include <QFrame> + +#else #include "ui_MainScreen.h" +#include <QTimer> +#include "CustomComboBoxPopup.h" +#include "CustomComboBox.h" + +#include <QComboBox> +#endif class MainScreen : public AdaptiveScreen { @@ -35,12 +51,26 @@ protected: /// @param a_rotation Device display orientation. virtual void initVariantUi(QWidget *a_widget) override; +#ifdef Q_OS_ANDROID + const QString FRM_CONNECT = "frmConnect"; + const QString FRM_INFO = "frmInfo"; + const QString FRM_STATUS = "frmStatus"; + const QString BTN_CHANGE_SERVER = "btnChangeServer"; + const QString LBL_ACTUAL_SERVER = "lblActualServer"; + const QString BTN_CONNECT = "btnConnect"; + const QString LBL_LOGIN_TIME = "lblLoginTime"; + const QString LBL_TIME_CONNECT = "lblTimeConnect"; + const QString LBL_PACKETS_REC = "lblPacketsRec"; + const QString LBL_PACKETS_SENT = "lblPacetsSent"; + const QString CBB_AUTH = "cbbAuth"; + const QString CBB_STREAM = "cbbStream"; + const QString CBB_NETWORK = "cbbNetwork"; +#else + const QString LBL_STATUS_MESSAGE = "lblStatusMessage"; + const QString BTN_SWITCH = "btnSwitch"; + const QString CBB_SERVER = "cbbServer"; +#endif - const QString LBL_STATUS_MESSAGE_NAME = "lblStatusMessage"; - const QString BTN_SWITCH_NAME = "btnSwitch"; - const QString CBB_SERVER_NAME = "cbbServer"; - - const QString CHOOSE_SERVER_CAPTION = "Choose server"; signals: void connectionSwitched(); @@ -48,8 +78,11 @@ signals: private: static QString statusText(ConnectionStates a_state); +#ifdef Q_OS_ANDROID +#else QAbstractItemModel *m_serversModel = nullptr; +#endif }; #endif // MAINSCREEN_H diff --git a/dialogs/SignInScreen.cpp b/dialogs/SignInScreen.cpp index 7dd52e8c08935f2ea138e2745594510609cbe929..b39f1e347e722779abdb38e50a16b40f09127672 100644 --- a/dialogs/SignInScreen.cpp +++ b/dialogs/SignInScreen.cpp @@ -1,8 +1,5 @@ #include "SignInScreen.h" -#include "defines.h" -#include "ui_SignInScreen.h" -#include "StyledDropShadowEffect.h" const QString SignInScreen::SCREEN_NAME = "SignIn"; @@ -73,6 +70,9 @@ void SignInScreen::setPassword(const QString &a_password) void SignInScreen::setErrorMessage(const QString &a_errorMsg) { +#ifdef Q_OS_ANDROID + Q_UNUSED(a_errorMsg) +#else if (a_errorMsg == "Incorrect password") { setChildProperties(LBL_PASSWORD_ERROR, Properties::TEXT, a_errorMsg); @@ -87,7 +87,11 @@ void SignInScreen::setErrorMessage(const QString &a_errorMsg) emit wrongEmail(); } -}; +#endif + + + +} void SignInScreen::checkFieldsAndSignIn() { @@ -102,17 +106,92 @@ void SignInScreen::checkFieldsAndSignIn() void SignInScreen::initVariantUi(QWidget *a_widget) { + QPushButton *btnSignIn = a_widget->findChild<QPushButton*>(BTN_SIGN_IN_NAME ); Q_ASSERT(btnSignIn); QLineEdit *edtEmail = a_widget->findChild<QLineEdit *>(EDT_EMAIL_NAME ); Q_ASSERT(edtEmail); QLineEdit *edtPassword = a_widget->findChild<QLineEdit *>(EDT_PASSWORD_NAME ); Q_ASSERT(edtPassword); QLabel *lblEmailError = a_widget->findChild<QLabel *>(LBL_EMAIL_ERROR ); Q_ASSERT(lblEmailError); - QLabel *lblPasswordError = a_widget->findChild<QLabel *>(LBL_PASSWORD_ERROR); Q_ASSERT(lblPasswordError); - btnSignIn->setGraphicsEffect(new StyledDropShadowEffect(btnSignIn)); +#ifdef Q_OS_ANDROID + edtEmail->setPlaceholderText("e-mail"); + edtPassword->setPlaceholderText("password"); + edtPassword->setEchoMode(QLineEdit::Password); + + QPushButton *btnShowPassword = a_widget->findChild<QPushButton *>(BTN_SHOW_PASSWORD ); Q_ASSERT(btnShowPassword); + QPushButton *btnClearEmail = a_widget->findChild<QPushButton *>(BTN_CLEAR_EMAIL ); Q_ASSERT(btnClearEmail); + QWidget *wgtLoginBottomSpacer = a_widget->findChild<QWidget *>(WGT_LOGIN_BOTTOM_SPACER ); Q_ASSERT(wgtLoginBottomSpacer); + QComboBox *cbbServer = a_widget->findChild<QComboBox *>(CBB_SERVER ); Q_ASSERT(cbbServer); + + btnClearEmail->setVisible(false); + + connect(edtEmail,&QLineEdit::textChanged,[=]{ + if(!edtEmail->text().isEmpty()) + { + btnClearEmail->setVisible(true); + } + else + { + btnClearEmail->setVisible(false); + } + }); + + connect(btnClearEmail,&QPushButton::clicked,[=]{ + edtEmail->clear(); + btnClearEmail->setVisible(false); + }); + + cbbServer->addItem("Auto select"); + btnShowPassword->setCheckable(true); + connect(btnSignIn,&QPushButton::clicked,[=]{ + lblEmailError->setVisible(true); + + wgtLoginBottomSpacer->setProperty("error",true); + wgtLoginBottomSpacer->style()->unpolish(wgtLoginBottomSpacer); + wgtLoginBottomSpacer->style()->polish(wgtLoginBottomSpacer); + wgtLoginBottomSpacer->update(); + + //If the mail input error + edtEmail->setProperty("error",true); + edtEmail->style()->unpolish(edtEmail); + edtEmail->style()->polish(edtEmail); + edtEmail->update(); + + //If the password input error + edtPassword->setProperty("error",true); + edtPassword->style()->unpolish(edtPassword); + edtPassword->style()->polish(edtPassword); + edtPassword->update(); + + btnClearEmail->setProperty("error",true); + btnClearEmail->style()->unpolish(btnClearEmail); + btnClearEmail->style()->polish(btnClearEmail); + btnClearEmail->update(); + }); + connect(btnShowPassword,&QPushButton::clicked,[=]{ + if(btnShowPassword->isChecked()) + { + btnShowPassword->setChecked(true); + edtPassword->setEchoMode(QLineEdit::Normal); + } + else + { + btnShowPassword->setChecked(false); + edtPassword->setEchoMode(QLineEdit::Password); + } + }); + +#else edtEmail->setPlaceholderText("Email"); edtPassword->setPlaceholderText("Password"); edtPassword->setEchoMode(QLineEdit::Password); + + QLabel *lblPasswordError = a_widget->findChild<QLabel *>(LBL_PASSWORD_ERROR); Q_ASSERT(lblPasswordError); + btnSignIn->setGraphicsEffect(new StyledDropShadowEffect(btnSignIn)); + +#endif + + // lblEmailError->setVisible(false); // lblPasswordError->setVisible(false); @@ -123,7 +202,7 @@ void SignInScreen::initVariantUi(QWidget *a_widget) connect(edtEmail , SIGNAL(textEdited(const QString&)), this, SIGNAL(emailEdited (const QString&))); connect(edtPassword, SIGNAL(textEdited(const QString&)), this, SIGNAL(passwordEdited(const QString&))); - connect(btnSignIn , SIGNAL(clicked()) , this, SLOT(checkFieldsAndSignIn())); + //connect(btnSignIn , SIGNAL(clicked()) , this, SLOT(checkFieldsAndSignIn())); // edtEmail->setProperty(qPrintable(Properties::VALID), true); diff --git a/dialogs/SignInScreen.h b/dialogs/SignInScreen.h index 051caab8f2366bd45e98e26e4a144ea337a92b61..fa5c5fef96d3e64ef92df8d13d35626ca8310ef4 100644 --- a/dialogs/SignInScreen.h +++ b/dialogs/SignInScreen.h @@ -8,6 +8,15 @@ #include "AdaptiveScreen.h" #include "ScreenInfo.h" #include "vpnDefine.h" +#include "defines.h" + +#ifdef Q_OS_ANDROID +#include "ui_SignInScreenMobile.h" +#else +#include "ui_SignInScreen.h" +#include "StyledDropShadowEffect.h" +#endif + class SignInScreen : public AdaptiveScreen @@ -57,7 +66,10 @@ private: const QString BTN_SIGN_IN_NAME = "btnSignIn"; const QString LBL_EMAIL_ERROR = "lblEmailError"; const QString LBL_PASSWORD_ERROR = "lblPasswordError"; - + const QString BTN_SHOW_PASSWORD = "btnShowPassword"; + const QString BTN_CLEAR_EMAIL = "btnClearEmail"; + const QString WGT_LOGIN_BOTTOM_SPACER = "wgtLoginBottomSpacer"; + const QString CBB_SERVER = "cbbServer"; QStateMachine *m_inputStates; QState *m_stt_email; diff --git a/libdap-qt-vpn-ui.pri b/libdap-qt-vpn-ui.pri index 51f94b895facd1c79d00ad774e3140b332c0bef4..e447cc23bf024a5c62bf50dfeac9d67f833efefc 100644 --- a/libdap-qt-vpn-ui.pri +++ b/libdap-qt-vpn-ui.pri @@ -53,7 +53,9 @@ FORMS += \ $$PWD/ui/settings_more_menu.ui \ $$PWD/ui/sidebar_desktop.ui \ $$PWD/ui/dlg_edit_server.ui \ - $$PWD/ui/mobile/StartScreenMobile.ui + $$PWD/ui/mobile/StartScreenMobile.ui \ + $$PWD/ui/mobile/SignInScreenMobile.ui \ + $$PWD/ui/mobile/MainScreenMobile.ui INCLUDEPATH += $$PWD diff --git a/ui/mobile/MainScreenMobile.ui b/ui/mobile/MainScreenMobile.ui new file mode 100644 index 0000000000000000000000000000000000000000..5ed6f8fef8c53e07609e040eab2724ca19353dda --- /dev/null +++ b/ui/mobile/MainScreenMobile.ui @@ -0,0 +1,506 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>MainScreen</class> + <widget class="QWidget" name="MainScreen"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>339</width> + <height>532</height> + </rect> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QWidget" name="wgtNavigationPanel" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>21</height> + </size> + </property> + </widget> + </item> + <item> + <widget class="QFrame" name="frmConnect"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>124</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item alignment="Qt::AlignHCenter"> + <widget class="QLabel" name="lblActualServer"> + <property name="text"> + <string>Connected to AP-1</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="btnConnect"> + <property name="text"> + <string>DISCONNECT</string> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer_2"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QFrame" name="frmInfo"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>330</width> + <height>113</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> + </property> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QWidget" name="wgtTopInfoFrame" native="true"/> + </item> + <item> + <widget class="QWidget" name="wgtLiginTime" native="true"> + <layout class="QHBoxLayout" name="horizontalLayout"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="lblTitleLoginTime"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Login time:</string> + </property> + <property name="alignment"> + <set>Qt::AlignJustify|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item alignment="Qt::AlignRight"> + <widget class="QLabel" name="lblLoginTime"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>...</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QWidget" name="widget" native="true"/> + </item> + <item> + <widget class="QWidget" name="wgtTimeConnect" native="true"> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item alignment="Qt::AlignLeft"> + <widget class="QLabel" name="lblTitleTimeConnect"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Time connected:</string> + </property> + <property name="alignment"> + <set>Qt::AlignJustify|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item alignment="Qt::AlignRight"> + <widget class="QLabel" name="lblTimeConnect"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>0d 10:24:50</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QWidget" name="widget_2" native="true"/> + </item> + <item> + <widget class="QWidget" name="wgtPacketsRec" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item alignment="Qt::AlignLeft"> + <widget class="QLabel" name="lblTitlePacketsRec"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Packets received:</string> + </property> + <property name="alignment"> + <set>Qt::AlignJustify|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item alignment="Qt::AlignRight"> + <widget class="QLabel" name="lblPacketsRec"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>7098612</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QWidget" name="widget_3" native="true"/> + </item> + <item> + <widget class="QWidget" name="wgtPacetsSent" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item alignment="Qt::AlignLeft"> + <widget class="QLabel" name="lblTitlePacetsSent"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Packets sent:</string> + </property> + <property name="alignment"> + <set>Qt::AlignJustify|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item alignment="Qt::AlignRight"> + <widget class="QLabel" name="lblPacetsSent"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>127468515</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QWidget" name="wgtBottomInfoFrame" native="true"/> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QFrame" name="frmStatus"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>285</width> + <height>101</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> + </property> + <layout class="QVBoxLayout" name="verticalLayout_4"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QCheckBox" name="cbbAuth"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="mouseTracking"> + <bool>false</bool> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="text"> + <string>Authorized</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="cbbStream"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="mouseTracking"> + <bool>false</bool> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="text"> + <string>Stream Opened</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="cbbNetwork"> + <property name="mouseTracking"> + <bool>false</bool> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="text"> + <string>Network Settings Present</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QPushButton" name="btnChangeServer"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>CHANGE SERVER</string> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>17</width> + <height>137</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/ui/mobile/SignInScreenMobile.ui b/ui/mobile/SignInScreenMobile.ui new file mode 100644 index 0000000000000000000000000000000000000000..cee2008fe36a7e19c7005bf9477619399c1cd34e --- /dev/null +++ b/ui/mobile/SignInScreenMobile.ui @@ -0,0 +1,366 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>SignInScreen</class> + <widget class="QWidget" name="SignInScreen"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>346</width> + <height>522</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QWidget" name="wgtNavigationPanel" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="lblLogo"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item alignment="Qt::AlignLeft"> + <widget class="QLabel" name="lblCapture"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>38</width> + <height>0</height> + </size> + </property> + <property name="font"> + <font> + <kerning>false</kerning> + </font> + </property> + <property name="layoutDirection"> + <enum>Qt::LeftToRight</enum> + </property> + <property name="text"> + <string>Login</string> + </property> + <property name="alignment"> + <set>Qt::AlignJustify|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QWidget" name="wgtLoginBottomSpacer" native="true"/> + </item> + <item> + <widget class="QLabel" name="lblEmailError"> + <property name="text"> + <string>Input a valid email</string> + </property> + </widget> + </item> + <item> + <widget class="QWidget" name="wgtComboBoxFrame" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>52</height> + </size> + </property> + <layout class="QHBoxLayout" name="horizontalLayout"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item alignment="Qt::AlignVCenter"> + <widget class="QLabel" name="lblCaptureComboBox"> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item alignment="Qt::AlignVCenter"> + <widget class="QComboBox" name="cbbServer"> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="insertPolicy"> + <enum>QComboBox::NoInsert</enum> + </property> + <property name="sizeAdjustPolicy"> + <enum>QComboBox::AdjustToContents</enum> + </property> + <property name="frame"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QWidget" name="wgtRightSpacerCombobox" native="true"/> + </item> + </layout> + </widget> + </item> + <item> + <widget class="Line" name="line_1"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item> + <widget class="QWidget" name="wgtUnderComboBox" native="true"/> + </item> + <item> + <widget class="QWidget" name="wgtEmailFrame" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>51</height> + </size> + </property> + <property name="inputMethodHints"> + <set>Qt::ImhLatinOnly</set> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item alignment="Qt::AlignVCenter"> + <widget class="QLabel" name="lblCaptureEmail"> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item alignment="Qt::AlignVCenter"> + <widget class="QLineEdit" name="edtEmail"> + <property name="inputMethodHints"> + <set>Qt::ImhEmailCharactersOnly|Qt::ImhLatinOnly</set> + </property> + </widget> + </item> + <item> + <widget class="QWidget" name="wgtSpacerButtonEmail" native="true"/> + </item> + <item> + <widget class="QPushButton" name="btnClearEmail"> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item> + <widget class="QWidget" name="wgtRightSpacerEmail" native="true"/> + </item> + </layout> + </widget> + </item> + <item> + <widget class="Line" name="line_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item> + <widget class="QWidget" name="wgtUnderEmail" native="true"/> + </item> + <item> + <widget class="QWidget" name="wgtPasswordFrame" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>52</height> + </size> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item alignment="Qt::AlignVCenter"> + <widget class="QLabel" name="lblCapturePassword"> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item alignment="Qt::AlignVCenter"> + <widget class="QLineEdit" name="edtPassword"> + <property name="inputMethodHints"> + <set>Qt::ImhNone</set> + </property> + </widget> + </item> + <item> + <widget class="QWidget" name="wgtSpacerButtonPassword" native="true"/> + </item> + <item> + <widget class="QPushButton" name="btnShowPassword"> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item> + <widget class="QWidget" name="wgtRightSpacerPassword" native="true"/> + </item> + </layout> + </widget> + </item> + <item> + <widget class="Line" name="line_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item> + <widget class="QWidget" name="wgtUnderPassword" native="true"/> + </item> + <item> + <widget class="QPushButton" name="btnSignIn"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>CONTINUE</string> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="lblForgetPass"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Forget password?</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item alignment="Qt::AlignHCenter"> + <widget class="QPushButton" name="btnSignUp"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Tap here to sign up</string> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui>