2020-04-12 20:53:01 +03:00
2020-04-12 20:53:01 +03:00
2020-04-12 20:53:01 +03:00
2020-04-12 20:53:01 +03:00
2020-04-12 20:53:01 +03:00
2020-04-12 20:53:01 +03:00
2020-04-12 20:53:01 +03:00
2020-04-05 22:32:45 +03:00
2020-04-12 20:53:01 +03:00

QMLLoginView

test work for Logic Way Solutions

Introdaction

This is a simple login window library for qml projects. The project is built with the help of the сmake build system and is very easily includet to existing projects.

Main features

  1. cmake support
  2. support all qt qml styles
  3. support login users
  4. support register new users
  5. support custom country list
  6. support cqtdeployer deploy system

Screenshots

Login View

scrinshot Login

Register View

Screenshot register

Incuding into exits project

  • cd yourRepo
  • git submodule add https://github.com/EndrII/QMLLoginView # add the repository of QMLLoginView into your repo like submodule
  • git submodule update --init --recursive
  • Include in your CMakeLists.txt file the main CMakeLists.txt file of QMLLoginView library
  include(QMLLoginView)
  • Rebuild yuor project

Using

#include <lvmainmodel.h>

    LoginView::LVMainModel loginModel("exampleLogin"); // create nodel for login dialog
    loginModel.init(&QMLEngine) // init login dialog. QMLEngine - this is object of QQmlApplicationEngine.
    loginModel.setCounrySource("path/to/countries.xml") // set country list/ Example of counrys xml see example/example.xml

    LoginView {
        lognViewModel: exampleLogin // exampleLogin - this is inited model in main.cpp
        anchors.fill: parent
    }
<?xml version="1.0" encoding="UTF-8"?>
<countries>
    <country>
        <code>375</code>
        <name>Belarus</name>
    </country>
    <country>
        <code>33</code>
        <name>France</name>
    </country>
</countries>

LoginView::LVMainModel Methods

    /**
     * @brief setCounrySource - sets path to xml source file and extract list of countrys
     * @param path
     * @return true if the function finished successful
     */
    Q_INVOKABLE bool setCounrySource(const QString &path);

    /**
     * @brief init - prepare all items for use on qml.
     * @param engine - current qml engine of application
     * @return true if the function finished successful
     */
    bool init(QQmlApplicationEngine *engine);


LoginView::LVMainModel Signals


    /**
     * @brief sigLoginRequest
     * emited when user try login
     */
    void sigLoginRequest(UserData);

    /**
     * @brief sigRegisterRequest
     * emited when user try create new accaunt
     */
    void sigRegisterRequest(UserData);

    /**
     * @brief sigForgotPasswordRequest
     * emited when user forgot own password
     */
    void sigForgotPasswordRequest(UserData);

    /**
     * @brief sigShowTermOfUseRequest
     * emited when user click on "Show term of use" button
     */
    void sigShowTermOfUseRequest();

UserData properties

    Q_PROPERTY(int country READ country WRITE setCountry)
    Q_PROPERTY(QString firstName READ firstName WRITE setFirstName)
    Q_PROPERTY(QString lastName READ lastName WRITE setLastName)
    Q_PROPERTY(QString rawPassword READ rawPassword WRITE setRawPassword)
    Q_PROPERTY(QString email READ email WRITE setEmail)
Description
No description provided
Readme GPL-3.0 3.1 MiB
Languages
C++ 58.9%
QML 34.2%
CMake 6%
Objective-C 0.8%