ui: clearing data in ProjectSetupScreen after creating new project
This commit is contained in:
@@ -133,6 +133,11 @@ QtDirectoryListBox::QtDirectoryListBox(QWidget *parent)
|
||||
resize();
|
||||
}
|
||||
|
||||
void QtDirectoryListBox::clear()
|
||||
{
|
||||
m_list->clear();
|
||||
}
|
||||
|
||||
void QtDirectoryListBox::dropEvent(QDropEvent *event)
|
||||
{
|
||||
QFileInfo fileInfo;
|
||||
|
||||
@@ -48,6 +48,8 @@ class QtDirectoryListBox
|
||||
public:
|
||||
QtDirectoryListBox(QWidget *parent);
|
||||
|
||||
void clear();
|
||||
|
||||
std::vector<FilePath> getList();
|
||||
void setList(const std::vector<FilePath>& list);
|
||||
|
||||
|
||||
@@ -66,6 +66,20 @@ QSize QtProjectSetupScreen::sizeHint() const
|
||||
return QSize(600,600);
|
||||
}
|
||||
|
||||
void QtProjectSetupScreen::clear()
|
||||
{
|
||||
m_projectName->setText("");
|
||||
m_projectFileLocation->setText("");
|
||||
|
||||
m_sourcePaths->clear();
|
||||
m_includePaths->clear();
|
||||
|
||||
if (m_frameworkPaths)
|
||||
{
|
||||
m_frameworkPaths->clear();
|
||||
}
|
||||
}
|
||||
|
||||
void QtProjectSetupScreen::setup()
|
||||
{
|
||||
setupForm();
|
||||
@@ -184,5 +198,7 @@ void QtProjectSetupScreen::handleUpdateButtonPress()
|
||||
projSettings->save(projectFile);
|
||||
|
||||
MessageLoadProject(projectFile).dispatch();
|
||||
clear();
|
||||
|
||||
emit finished();
|
||||
}
|
||||
|
||||
@@ -38,11 +38,15 @@ public:
|
||||
QtProjectSetupScreen(QWidget* parent = 0);
|
||||
QSize sizeHint() const Q_DECL_OVERRIDE;
|
||||
|
||||
void clear();
|
||||
|
||||
virtual void setup() override;
|
||||
|
||||
void loadEmpty();
|
||||
void loadProjectSettings();
|
||||
|
||||
void projectSetupScreen();
|
||||
|
||||
protected:
|
||||
virtual void populateForm(QFormLayout* layout) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user