Skip to content

Commit

Permalink
Merge branch 'master' of github.com:nextgis/lib_ngstd
Browse files Browse the repository at this point in the history
  • Loading branch information
BishopGIS committed Dec 24, 2018
2 parents 2d7fe7a + c9730d7 commit 2bd8f2a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/framework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ set(PROJECT_SOURCES
set(ACCESS_HHEADERS
${PROJECT_SOURCE_DIR}/access/access.h
${PROJECT_SOURCE_DIR}/access/signbutton.h
${PROJECT_SOURCE_DIR}/access/signdialog.h
)

set(PRIVATE_HEADERS ${PRIVATE_HEADERS}
${PROJECT_SOURCE_DIR}/access/signdialog.h
${PROJECT_SOURCE_DIR}/access/signserver.h
)

Expand Down
3 changes: 2 additions & 1 deletion src/framework/access/signbutton.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class NGFRAMEWORK_EXPORT NGSignInButton : public QToolButton
public:
NGSignInButton(const QString &clientId, const QString &scope = "user_info.read",
QWidget * parent = nullptr);
virtual ~NGSignInButton() = default;
virtual ~NGSignInButton() = default;
inline QDialog *getDialog () const { return m_signDialog; }

signals:
void userInfoUpdated();
Expand Down
5 changes: 5 additions & 0 deletions src/framework/access/signdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ void NGSignDialog::updateContent()
}
}

QPushButton *NGSignDialog::getSignButton () const
{
return ui->signButton;
}

void NGSignDialog::onSignClicked()
{
if(NGAccess::instance().isUserAuthorized()) {
Expand Down
6 changes: 5 additions & 1 deletion src/framework/access/signdialog.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#ifndef SIGNDIALOG_H
#define SIGNDIALOG_H

#include "framework/framework.h"

#include <QDialog>

namespace Ui {
class NGSignDialog;
}

class Q_DECL_HIDDEN NGSignDialog : public QDialog
class NGFRAMEWORK_EXPORT NGSignDialog : public QDialog
{
Q_OBJECT

Expand All @@ -16,6 +18,8 @@ class Q_DECL_HIDDEN NGSignDialog : public QDialog
virtual ~NGSignDialog();
void updateContent();

QPushButton *getSignButton () const;

private slots:
void onSignClicked();

Expand Down

0 comments on commit 2bd8f2a

Please sign in to comment.