New Element Wizard : tree view only display directory

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4484 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2016-05-15 14:46:01 +00:00
parent 3261809227
commit 8dd3e7394a
7 changed files with 168 additions and 38 deletions

View File

@@ -24,6 +24,7 @@
class NamesListWidget;
class QFileNameEdit;
class QTreeView;
class ElementsCollectionModel;
/**
This class provides a wizard dialog enabling users to to specify the basic
@@ -34,34 +35,38 @@ class QTreeView;
- the filename the element should be saved to
- localized names
*/
class NewElementWizard : public QWizard {
class NewElementWizard : public QWizard
{
Q_OBJECT
// constructors, destructor
// constructors, destructor
public:
NewElementWizard(QWidget * = 0, Qt::WindowFlags = 0);
virtual ~NewElementWizard();
NewElementWizard(QWidget * = 0, Qt::WindowFlags = 0);
virtual ~NewElementWizard();
void preselectedLocation(const ElementsLocation &location);
private:
NewElementWizard(const NewElementWizard &);
NewElementWizard(const NewElementWizard &);
// attributes
// attributes
private:
enum WizardState { Category, Filename, Names };
QFileNameEdit *m_qle_filename;
NamesListWidget *m_names_list;
QString m_chosen_file;
QTreeView *m_tree_view = nullptr;
ElementsLocation m_chosen_location;
enum WizardState { Category, Filename, Names };
QFileNameEdit *m_qle_filename;
NamesListWidget *m_names_list;
QString m_chosen_file;
QTreeView *m_tree_view = nullptr;
ElementsLocation m_chosen_location;
ElementsCollectionModel *m_model = nullptr;
// methods
// methods
private:
QWizardPage *buildStep1();
QWizardPage *buildStep2();
QWizardPage *buildStep3();
bool validStep1();
bool validStep2();
bool validateCurrentPage();
void createNewElement();
QWizardPage *buildStep1();
QWizardPage *buildStep2();
QWizardPage *buildStep3();
bool validStep1();
bool validStep2();
bool validateCurrentPage();
void createNewElement();
};
#endif