ui: revised project setup wizard

* adjusted some help texts
* moved exclude paths and source file extensions contents to indexed paths selection in project setup wizard
* removed compiler flags from CDB project setup wizard
* added wizard content that shows some info text regarding the purpose of source groups
* renamed ContentSummary to ContentGroup
* fixed issue with CompilationDatabase include path extraction
This commit is contained in:
mlangkabel
2017-10-23 16:10:54 +02:00
parent d57dd6dd9c
commit d1536031c9
15 changed files with 236 additions and 137 deletions
@@ -0,0 +1,115 @@
#include "qt/window/project_wizzard/QtProjectWizzardContentGroup.h"
QtProjectWizzardContentGroup::QtProjectWizzardContentGroup(
QtProjectWizzardWindow* window
)
: QtProjectWizzardContent(window)
, m_isForm(false)
{
}
void QtProjectWizzardContentGroup::addContent(QtProjectWizzardContent* content)
{
m_contents.push_back(content);
if (content)
{
content->setIsInForm(m_isForm);
}
}
void QtProjectWizzardContentGroup::addSpace()
{
m_contents.push_back(nullptr);
}
void QtProjectWizzardContentGroup::setIsForm(bool isForm)
{
m_isForm = isForm;
}
void QtProjectWizzardContentGroup::populate(QGridLayout* layout, int& row)
{
if (m_isForm)
{
populateForm(layout, row);
return;
}
layout->setRowMinimumHeight(row++, 10);
for (QtProjectWizzardContent* content : m_contents)
{
if (content)
{
content->populate(layout, row);
}
else
{
layout->setRowMinimumHeight(row++, 20);
}
}
layout->setRowMinimumHeight(row, 10);
layout->setRowStretch(row, 1);
}
void QtProjectWizzardContentGroup::populateForm(QGridLayout* layout, int& row)
{
layout->setRowMinimumHeight(row++, 10);
for (QtProjectWizzardContent* content : m_contents)
{
if (content)
{
content->populate(layout, row);
}
else
{
layout->setRowMinimumHeight(row++, 15);
}
}
layout->setRowMinimumHeight(row, 10);
layout->setRowStretch(row, 1);
}
void QtProjectWizzardContentGroup::load()
{
for (QtProjectWizzardContent* content : m_contents)
{
if (content)
{
content->load();
}
}
}
void QtProjectWizzardContentGroup::save()
{
for (QtProjectWizzardContent* content : m_contents)
{
if (content)
{
content->save();
}
}
}
bool QtProjectWizzardContentGroup::check()
{
for (QtProjectWizzardContent* content : m_contents)
{
if (content && !content->check())
{
return false;
}
}
return true;
}
bool QtProjectWizzardContentGroup::isScrollAble() const
{
return true;
}