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:
@@ -243,6 +243,16 @@ void QtMainWindow::saveLayout()
|
||||
settings.setValue("DOCK_LOCATIONS", this->saveState());
|
||||
}
|
||||
|
||||
void QtMainWindow::forceEnterLicense()
|
||||
{
|
||||
enterLicense();
|
||||
m_enterLicenseWindow->clear();
|
||||
m_enterLicenseWindow->setCancelAble(false);
|
||||
|
||||
this->setEnabled(false);
|
||||
m_enterLicenseWindow->setEnabled(true);
|
||||
}
|
||||
|
||||
bool QtMainWindow::event(QEvent* event)
|
||||
{
|
||||
if (event->type() == QEvent::WindowActivate)
|
||||
@@ -297,6 +307,12 @@ void QtMainWindow::clearWindows()
|
||||
m_windowStack.clear();
|
||||
}
|
||||
|
||||
void QtMainWindow::activateWindow()
|
||||
{
|
||||
this->setEnabled(true);
|
||||
popWindow();
|
||||
}
|
||||
|
||||
void QtMainWindow::about()
|
||||
{
|
||||
if (!m_aboutWindow)
|
||||
@@ -345,11 +361,11 @@ void QtMainWindow::enterLicense()
|
||||
m_enterLicenseWindow = std::make_shared<QtLicense>(this);
|
||||
m_enterLicenseWindow->setup();
|
||||
|
||||
connect(m_enterLicenseWindow.get(), SIGNAL(finished()), this, SLOT(popWindow()));
|
||||
connect(m_enterLicenseWindow.get(), SIGNAL(finished()), this, SLOT(activateWindow()));
|
||||
connect(m_enterLicenseWindow.get(), SIGNAL(canceled()), this, SLOT(popWindow()));
|
||||
}
|
||||
|
||||
pushWindow(m_enterLicenseWindow)
|
||||
pushWindow(m_enterLicenseWindow.get());
|
||||
}
|
||||
|
||||
void QtMainWindow::showStartScreen()
|
||||
|
||||
Reference in New Issue
Block a user