ui: Rewrote project setup to wizzard
* QtProjectWizzard handles window managment logic of project setup * QtProjectWizzardWindow is used in every step and displays QtProjectWizzardContent * QtProjectWizzardContent is the base class for all differnt content types * Removed Singleton from ProjectSettings * ProjectSettings are created by wizzard and QtProjectWizzardContent can access and load * added project type selection at start of wizzard * added summary at end of wizzard * show global search paths in setup and summary * fixed layout problems after font switch * fixed scrolling and resizing of QtDirectoryListBox * separated QtLocationPicker to own class
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
#include "qt/window/QtWindowStack.h"
|
||||
|
||||
QtWindowStack::QtWindowStack(QObject* parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
}
|
||||
|
||||
QWidget* QtWindowStack::getTopWindow()
|
||||
{
|
||||
if (m_stack.size())
|
||||
{
|
||||
return m_stack.back();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void QtWindowStack::pushWindow(QWidget* window)
|
||||
{
|
||||
if (m_stack.size())
|
||||
{
|
||||
m_stack.back()->hide();
|
||||
}
|
||||
|
||||
window->show();
|
||||
|
||||
m_stack.push_back(window);
|
||||
|
||||
emit push();
|
||||
}
|
||||
|
||||
void QtWindowStack::popWindow()
|
||||
{
|
||||
if (m_stack.size())
|
||||
{
|
||||
m_stack.back()->hide();
|
||||
delete m_stack.back();
|
||||
m_stack.pop_back();
|
||||
|
||||
emit pop();
|
||||
}
|
||||
|
||||
if (m_stack.size())
|
||||
{
|
||||
m_stack.back()->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
emit empty();
|
||||
}
|
||||
}
|
||||
|
||||
void QtWindowStack::clearWindows()
|
||||
{
|
||||
for (QWidget* window : m_stack)
|
||||
{
|
||||
window->hide();
|
||||
delete window;
|
||||
}
|
||||
|
||||
m_stack.clear();
|
||||
|
||||
emit empty();
|
||||
}
|
||||
Reference in New Issue
Block a user