##// END OF EJS Templates
Converted catalogue gui tests to manual tests...
jeandet -
r1407:fb115035b41a
parent child
Show More
@@ -0,0 +1,41
1 /*
2 This file is part of SciQLop.
3
4 SciQLop is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 SciQLop is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with SciQLop. If not, see <https://www.gnu.org/licenses/>.
16 */
17 #ifndef REPOSITORIESTREEVIEW_H
18 #define REPOSITORIESTREEVIEW_H
19
20 #include <QObject>
21 #include <QTreeView>
22 #include <Catalogue2/repositoriesmodel.h>
23
24 class RepositoriesTreeView : public QTreeView
25 {
26 Q_OBJECT
27 public:
28 RepositoriesTreeView(QWidget* parent = nullptr);
29
30 public slots:
31 void refresh()
32 {
33 static_cast<RepositoriesModel*>(model())->refresh();
34 }
35
36 signals:
37 void repositorySelected(const QString& repository);
38
39 };
40
41 #endif // REPOSITORIESTREEVIEW_H
@@ -0,0 +1,27
1 /*
2 This file is part of SciQLop.
3
4 SciQLop is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 SciQLop is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with SciQLop. If not, see <https://www.gnu.org/licenses/>.
16 */
17 #include <Catalogue2/repositoriesmodel.h>
18 #include <Catalogue2/repositoriestreeview.h>
19
20 RepositoriesTreeView::RepositoriesTreeView(QWidget* parent) : QTreeView(parent)
21 {
22 auto m = model();
23 this->setModel(new RepositoriesModel(this));
24 delete m;
25 }
26
27
@@ -3,3 +3,9 macro(declare_test testname testexe sources libraries)
3 target_link_libraries(${testexe} ${libraries})
3 target_link_libraries(${testexe} ${libraries})
4 add_test(NAME ${testname} COMMAND ${testexe})
4 add_test(NAME ${testname} COMMAND ${testexe})
5 endmacro(declare_test)
5 endmacro(declare_test)
6
7
8 macro(declare_manual_test testname testexe sources libraries)
9 add_executable(${testexe} ${sources})
10 target_link_libraries(${testexe} ${libraries})
11 endmacro(declare_manual_test)
@@ -10,6 +10,7
10 include/SidePane/SqpSidePane.h
10 include/SidePane/SqpSidePane.h
11 include/Catalogue2/eventsmodel.h
11 include/Catalogue2/eventsmodel.h
12 include/Catalogue2/eventstreeview.h
12 include/Catalogue2/eventstreeview.h
13 include/Catalogue2/repositoriestreeview.h
13 include/Catalogue2/repositoriesmodel.h
14 include/Catalogue2/repositoriesmodel.h
14 # include/Catalogue/CatalogueActionManager.h
15 # include/Catalogue/CatalogueActionManager.h
15 # include/Catalogue/CatalogueTreeModel.h
16 # include/Catalogue/CatalogueTreeModel.h
@@ -79,6 +80,7
79 src/SidePane/SqpSidePane.cpp
80 src/SidePane/SqpSidePane.cpp
80 src/Catalogue2/eventsmodel.cpp
81 src/Catalogue2/eventsmodel.cpp
81 src/Catalogue2/eventstreeview.cpp
82 src/Catalogue2/eventstreeview.cpp
83 src/Catalogue2/repositoriestreeview.cpp
82 src/Catalogue2/repositoriesmodel.cpp
84 src/Catalogue2/repositoriesmodel.cpp
83 #src/Catalogue/CatalogueEventsWidget.cpp
85 #src/Catalogue/CatalogueEventsWidget.cpp
84 #src/Catalogue/CatalogueSideBarWidget.cpp
86 #src/Catalogue/CatalogueSideBarWidget.cpp
@@ -1,3 +1,19
1 /*
2 This file is part of SciQLop.
3
4 SciQLop is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 SciQLop is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with SciQLop. If not, see <https://www.gnu.org/licenses/>.
16 */
1 #ifndef EVENTSMODEL_H
17 #ifndef EVENTSMODEL_H
2 #define EVENTSMODEL_H
18 #define EVENTSMODEL_H
3 #include <Catalogue/CatalogueController.h>
19 #include <Catalogue/CatalogueController.h>
@@ -1,3 +1,19
1 /*
2 This file is part of SciQLop.
3
4 SciQLop is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 SciQLop is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with SciQLop. If not, see <https://www.gnu.org/licenses/>.
16 */
1 #ifndef EVENTSTREEVIEW_H
17 #ifndef EVENTSTREEVIEW_H
2 #define EVENTSTREEVIEW_H
18 #define EVENTSTREEVIEW_H
3
19
@@ -1,3 +1,19
1 /*
2 This file is part of SciQLop.
3
4 SciQLop is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 SciQLop is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with SciQLop. If not, see <https://www.gnu.org/licenses/>.
16 */
1 #ifndef REPOSITORIESMODEL_H
17 #ifndef REPOSITORIESMODEL_H
2 #define REPOSITORIESMODEL_H
18 #define REPOSITORIESMODEL_H
3 #include <Catalogue/CatalogueController.h>
19 #include <Catalogue/CatalogueController.h>
@@ -1,3 +1,19
1 /*
2 This file is part of SciQLop.
3
4 SciQLop is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 SciQLop is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with SciQLop. If not, see <https://www.gnu.org/licenses/>.
16 */
1 #include "Catalogue2/eventsmodel.h"
17 #include "Catalogue2/eventsmodel.h"
2 #include <SqpApplication.h>
18 #include <SqpApplication.h>
3
19
@@ -1,3 +1,19
1 /*
2 This file is part of SciQLop.
3
4 SciQLop is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 SciQLop is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with SciQLop. If not, see <https://www.gnu.org/licenses/>.
16 */
1 #include <Catalogue2/eventsmodel.h>
17 #include <Catalogue2/eventsmodel.h>
2 #include <Catalogue2/eventstreeview.h>
18 #include <Catalogue2/eventstreeview.h>
3
19
@@ -1,3 +1,19
1 /*
2 This file is part of SciQLop.
3
4 SciQLop is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 SciQLop is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with SciQLop. If not, see <https://www.gnu.org/licenses/>.
16 */
1 #include <Catalogue2/repositoriesmodel.h>
17 #include <Catalogue2/repositoriesmodel.h>
2 #include <Common/containers.h>
18 #include <Common/containers.h>
3 #include <SqpApplication.h>
19 #include <SqpApplication.h>
@@ -1,6 +1,7
1 include(sciqlop_tests)
1 subdirs(GUITestUtils)
2 subdirs(GUITestUtils)
2 declare_test(simple_graph simple_graph simple_graph/main.cpp "sciqlopgui;TestUtils;GUITestUtils;Qt5::Test")
3 declare_test(simple_graph simple_graph simple_graph/main.cpp "sciqlopgui;TestUtils;GUITestUtils;Qt5::Test")
3 declare_test(multiple_sync_graph multiple_sync_graph multiple_sync_graph/main.cpp "sciqlopgui;TestUtils;GUITestUtils;Qt5::Test")
4 declare_test(multiple_sync_graph multiple_sync_graph multiple_sync_graph/main.cpp "sciqlopgui;TestUtils;GUITestUtils;Qt5::Test")
4
5
5 declare_test(event_list event_list catalogue/event_list/main.cpp "sciqlopgui;TestUtils;GUITestUtils;Qt5::Test")
6 declare_manual_test(event_list event_list catalogue/event_list/main.cpp "sciqlopgui;TestUtils;GUITestUtils;Qt5::Test")
6 declare_test(repository_list repository_list catalogue/repository_list/main.cpp "sciqlopgui;TestUtils;GUITestUtils;Qt5::Test")
7 declare_manual_test(repository_list repository_list catalogue/repository_list/main.cpp "sciqlopgui;TestUtils;GUITestUtils;Qt5::Test")
@@ -14,10 +14,7
14 #include <GUITestUtils.h>
14 #include <GUITestUtils.h>
15 #include <TestProviders.h>
15 #include <TestProviders.h>
16
16
17 //#include <Catalogue/CatalogueEventsWidget.h>
17 #include <Catalogue2/repositoriestreeview.h>
18
19 #include <Catalogue2/eventstreeview.h>
20 #include <Catalogue2/repositoriesmodel.h>
21
18
22
19
23 class An_EventList : public QObject
20 class An_EventList : public QObject
@@ -52,14 +49,13 int main(int argc, char* argv[])
52 QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
49 QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
53
50
54 SqpApplication a { argc, argv };
51 SqpApplication a { argc, argv };
55 QTreeView w;
52 RepositoriesTreeView w;
56 sqpApp->catalogueController().add("test");
53 sqpApp->catalogueController().add("test");
57 sqpApp->catalogueController().add("stuff");
54 sqpApp->catalogueController().add("stuff");
58 sqpApp->catalogueController().add("default");
55 sqpApp->catalogueController().add("default");
59 sqpApp->catalogueController().add("new catalogue", "default");
56 sqpApp->catalogueController().add("new catalogue", "default");
60 sqpApp->catalogueController().add("new catalogue2", "default");
57 sqpApp->catalogueController().add("new catalogue2", "default");
61 RepositoriesModel* model = new RepositoriesModel();
62 w.setModel(model);
63 w.show();
58 w.show();
59 w.refresh();
64 return a.exec();
60 return a.exec();
65 }
61 }
General Comments 0
You need to be logged in to leave comments. Login now