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,116 @@
|
||||
#ifndef QT_PROJECT_WIZZARD_CONTENT_PATHS_H
|
||||
#define QT_PROJECT_WIZZARD_CONTENT_PATHS_H
|
||||
|
||||
#include <QPushButton>
|
||||
|
||||
#include "qt/window/project_wizzard/QtProjectWizzardContent.h"
|
||||
|
||||
class QtDirectoryListBox;
|
||||
|
||||
class QtHelpButton
|
||||
: public QPushButton
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QtHelpButton(const QString& helpText, QWidget* parent = nullptr);
|
||||
|
||||
private slots:
|
||||
void handleHelpPress();
|
||||
|
||||
private:
|
||||
QString m_helpText;
|
||||
};
|
||||
|
||||
|
||||
class QtProjectWizzardContentPaths
|
||||
: public QtProjectWizzardContent
|
||||
{
|
||||
public:
|
||||
QtProjectWizzardContentPaths(ProjectSettings* settings, QtProjectWizzardWindow* window);
|
||||
|
||||
// QtSettingsWindow implementation
|
||||
virtual void populateWindow(QWidget* widget) override;
|
||||
void populateLayout(QVBoxLayout* layout);
|
||||
virtual void populateForm(QFormLayout* layout) override;
|
||||
|
||||
virtual void load() override;
|
||||
virtual void save() override;
|
||||
virtual bool check() override;
|
||||
|
||||
virtual void loadPaths();
|
||||
virtual void savePaths();
|
||||
virtual bool checkPaths();
|
||||
|
||||
protected:
|
||||
void setInfo(const QString& title, const QString& description, const QString& help);
|
||||
|
||||
QtDirectoryListBox* m_list;
|
||||
QtProjectWizzardContentPaths* m_subPaths;
|
||||
|
||||
private:
|
||||
QString m_titleString;
|
||||
QString m_descriptionString;
|
||||
QString m_helpString;
|
||||
};
|
||||
|
||||
|
||||
class QtProjectWizzardContentPathsSource
|
||||
: public QtProjectWizzardContentPaths
|
||||
{
|
||||
public:
|
||||
QtProjectWizzardContentPathsSource(ProjectSettings* settings, QtProjectWizzardWindow* window);
|
||||
|
||||
// QtProjectWizzardContent implementation
|
||||
virtual void loadPaths() override;
|
||||
virtual void savePaths() override;
|
||||
virtual bool checkPaths() override;
|
||||
};
|
||||
|
||||
|
||||
class QtProjectWizzardContentPathsHeaderSearch
|
||||
: public QtProjectWizzardContentPaths
|
||||
{
|
||||
public:
|
||||
QtProjectWizzardContentPathsHeaderSearch(ProjectSettings* settings, QtProjectWizzardWindow* window);
|
||||
|
||||
// QtProjectWizzardContent implementation
|
||||
virtual void loadPaths() override;
|
||||
virtual void savePaths() override;
|
||||
};
|
||||
|
||||
class QtProjectWizzardContentPathsHeaderSearchGlobal
|
||||
: public QtProjectWizzardContentPaths
|
||||
{
|
||||
public:
|
||||
QtProjectWizzardContentPathsHeaderSearchGlobal(ProjectSettings* settings, QtProjectWizzardWindow* window);
|
||||
|
||||
// QtProjectWizzardContent implementation
|
||||
virtual void loadPaths() override;
|
||||
virtual void savePaths() override;
|
||||
};
|
||||
|
||||
|
||||
class QtProjectWizzardContentPathsFrameworkSearch
|
||||
: public QtProjectWizzardContentPaths
|
||||
{
|
||||
public:
|
||||
QtProjectWizzardContentPathsFrameworkSearch(ProjectSettings* settings, QtProjectWizzardWindow* window);
|
||||
|
||||
// QtProjectWizzardContent implementation
|
||||
virtual void loadPaths() override;
|
||||
virtual void savePaths() override;
|
||||
};
|
||||
|
||||
class QtProjectWizzardContentPathsFrameworkSearchGlobal
|
||||
: public QtProjectWizzardContentPaths
|
||||
{
|
||||
public:
|
||||
QtProjectWizzardContentPathsFrameworkSearchGlobal(ProjectSettings* settings, QtProjectWizzardWindow* window);
|
||||
|
||||
// QtProjectWizzardContent implementation
|
||||
virtual void loadPaths() override;
|
||||
virtual void savePaths() override;
|
||||
};
|
||||
|
||||
#endif // QT_PROJECT_WIZZARD_CONTENT_PATHS_H
|
||||
Reference in New Issue
Block a user