ui: Revised project setup

* changed help texts
* use help buttons instead of descriptions in dialogs
* fixed show files button not up-to-date with directory list box
* fixed source file extensions shown in cdb setup
* refactored size and content setting for project content classes
This commit is contained in:
Eberhard Graether
2016-08-30 11:20:32 +02:00
parent d4131ce92c
commit ebdc2d3382
31 changed files with 202 additions and 320 deletions
@@ -12,6 +12,7 @@ QtHelpButton::QtHelpButton(const QString& helpText, QWidget* parent)
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
setAttribute(Qt::WA_LayoutUsesWidgetRect); // fixes layouting on Mac
setObjectName("helpButton");
setToolTip("help");
connect(this, SIGNAL(clicked()), this, SLOT(handleHelpPress()));
}
@@ -31,14 +32,11 @@ QtProjectWizzardContent::QtProjectWizzardContent(std::shared_ptr<ProjectSettings
: QWidget(window)
, m_settings(settings)
, m_window(window)
, m_isInForm(false)
{
}
void QtProjectWizzardContent::populateWindow(QGridLayout* layout, int& row)
{
}
void QtProjectWizzardContent::populateForm(QGridLayout* layout, int& row)
void QtProjectWizzardContent::populate(QGridLayout* layout, int& row)
{
}
@@ -64,11 +62,6 @@ bool QtProjectWizzardContent::isScrollAble() const
return false;
}
QSize QtProjectWizzardContent::preferredWindowSize() const
{
return QSize(750, 620);
}
std::vector<std::string> QtProjectWizzardContent::getFileNames() const
{
return std::vector<std::string>();
@@ -84,6 +77,16 @@ QString QtProjectWizzardContent::getFileNamesDescription() const
return "files";
}
bool QtProjectWizzardContent::isInForm() const
{
return m_isInForm;
}
void QtProjectWizzardContent::setIsInForm(bool isInForm)
{
m_isInForm = isInForm;
}
QLabel* QtProjectWizzardContent::createFormLabel(QString name) const
{
QLabel* label = new QLabel(name);
@@ -132,6 +135,8 @@ QPushButton* QtProjectWizzardContent::addFilesButton(QString name, QGridLayout*
void QtProjectWizzardContent::filesButtonClicked()
{
save();
if (!m_filesDialog)
{
std::vector<std::string> fileNames = getFileNames();