mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 05:17:24 +02:00
51 lines
1.1 KiB
C++
51 lines
1.1 KiB
C++
//
|
|
// LoginDialog.h
|
|
//
|
|
// Created by Bradley Austin Davis on 2015/04/14
|
|
// Copyright 2015 High Fidelity, Inc.
|
|
//
|
|
// Distributed under the Apache License, Version 2.0.
|
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
//
|
|
|
|
#ifndef hifi_LoginDialog_h
|
|
#define hifi_LoginDialog_h
|
|
|
|
#pragma once
|
|
#include <QQuickItem>
|
|
|
|
#include "OffscreenUi.h"
|
|
|
|
class LoginDialog : public QQuickItem
|
|
{
|
|
Q_OBJECT
|
|
QML_DIALOG_DECL
|
|
|
|
Q_PROPERTY(QString statusText READ statusText WRITE setStatusText NOTIFY statusTextChanged)
|
|
Q_PROPERTY(QString rootUrl READ rootUrl)
|
|
|
|
public:
|
|
static void toggleAction();
|
|
|
|
LoginDialog(QQuickItem *parent = 0);
|
|
|
|
void setStatusText(const QString & a);
|
|
QString statusText() const;
|
|
|
|
QString rootUrl() const;
|
|
|
|
signals:
|
|
void statusTextChanged();
|
|
|
|
protected:
|
|
void handleLoginCompleted(const QUrl& authURL);
|
|
void handleLoginFailed();
|
|
|
|
Q_INVOKABLE void login(const QString & username, const QString & password);
|
|
Q_INVOKABLE void openUrl(const QString & url);
|
|
private:
|
|
QString _statusText;
|
|
const QString _rootUrl;
|
|
};
|
|
|
|
#endif // hifi_LoginDialog_h
|