ui, logic: design for license ui and forcing the user to enter a key on first open
This change integrates the license key ui into the application and makes it necessary for the user to enter a correct key. The check for a correct key is done on startup and whenever a project is loaded. The check for the key also includes a check whether the location of the application has changed.
This commit is contained in:
@@ -8,6 +8,7 @@ QtMainView::QtMainView()
|
||||
: m_setTitleFunctor(std::bind(&QtMainView::doSetTitle, this, std::placeholders::_1))
|
||||
, m_activateWindowFunctor(std::bind(&QtMainView::doActivateWindow, this))
|
||||
, m_updateRecentProjectMenuFunctor(std::bind(&QtMainView::doUpdateRecentProjectMenu, this))
|
||||
, m_showLicenseScreenFunctor(std::bind(&QtMainView::doShowLicenseScreen, this))
|
||||
{
|
||||
m_window = std::make_shared<QtMainWindow>();
|
||||
m_window->show();
|
||||
@@ -86,6 +87,11 @@ void QtMainView::updateRecentProjectMenu()
|
||||
m_updateRecentProjectMenuFunctor();
|
||||
}
|
||||
|
||||
void QtMainView::showLicenseScreen()
|
||||
{
|
||||
m_showLicenseScreenFunctor();
|
||||
}
|
||||
|
||||
void QtMainView::doUpdateRecentProjectMenu()
|
||||
{
|
||||
m_window->updateRecentProjectMenu();
|
||||
@@ -103,3 +109,8 @@ void QtMainView::doActivateWindow()
|
||||
m_window->raise();
|
||||
m_window->setFocus(Qt::ActiveWindowFocusReason);
|
||||
}
|
||||
|
||||
void QtMainView::doShowLicenseScreen()
|
||||
{
|
||||
m_window->forceEnterLicense();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user