Auto status change to "Under Review"
@@ -1,149 +1,147 | |||||
1 |
|
1 | |||
2 | ## sciqlop - CMakeLists.txt |
|
2 | ## sciqlop - CMakeLists.txt | |
3 | SET(EXECUTABLE_NAME "sciqlop") |
|
3 | SET(EXECUTABLE_NAME "sciqlop") | |
4 | SCIQLOP_SET_TO_PARENT_SCOPE(EXECUTABLE_NAME) |
|
4 | SCIQLOP_SET_TO_PARENT_SCOPE(EXECUTABLE_NAME) | |
5 | SET(SOURCES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/) |
|
5 | SET(SOURCES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/) | |
6 |
SET(INCLUDE |
|
6 | SET(INCLUDES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include") | |
7 |
SET(UI_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/ |
|
7 | SET(UI_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/ui) | |
8 | SET(RES_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/resources) |
|
8 | SET(RES_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/resources) | |
9 |
|
9 | |||
|
10 | # Include gui directory | |||
|
11 | include_directories("${INCLUDES_DIR}") | |||
|
12 | ||||
10 | # |
|
13 | # | |
11 | # Find Qt modules |
|
14 | # Find Qt modules | |
12 | # |
|
15 | # | |
13 | SCIQLOP_FIND_QT(Core Widgets) |
|
16 | SCIQLOP_FIND_QT(Core Widgets) | |
14 |
|
17 | |||
15 | # |
|
18 | # | |
16 | # Find dependent libraries |
|
19 | # Find dependent libraries | |
17 | # ======================== |
|
20 | # ======================== | |
18 | find_package(sciqlop-gui) |
|
21 | find_package(sciqlop-gui) | |
19 |
|
22 | |||
20 | SET(LIBRARIES ${SCIQLOP-GUI_LIBRARIES}) |
|
23 | SET(LIBRARIES ${SCIQLOP-GUI_LIBRARIES}) | |
21 | SET(EXTERN_SHARED_LIBRARIES) |
|
24 | SET(EXTERN_SHARED_LIBRARIES) | |
22 |
|
25 | |||
23 | INCLUDE_DIRECTORIES(${SCIQLOP-GUI_INCLUDE_DIR}) |
|
26 | INCLUDE_DIRECTORIES(${SCIQLOP-GUI_INCLUDE_DIR}) | |
24 |
|
27 | |||
25 | # Add sqpcore to the list of libraries to use |
|
28 | # Add sqpcore to the list of libraries to use | |
26 | list(APPEND LIBRARIES ${SQPCORE_LIBRARY_NAME}) |
|
29 | list(APPEND LIBRARIES ${SQPCORE_LIBRARY_NAME}) | |
27 |
|
30 | |||
28 | # Include core directory |
|
31 | # Include core directory | |
29 | include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../core/include") |
|
32 | include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../core/include") | |
30 |
|
33 | |||
31 | # Add dependent shared libraries |
|
34 | # Add dependent shared libraries | |
32 | list(APPEND SHARED_LIBRARIES ${SQPCORE_SHARED_LIBRARIES}) |
|
35 | list(APPEND SHARED_LIBRARIES ${SQPCORE_SHARED_LIBRARIES}) | |
33 |
|
36 | |||
34 | # Retrieve the location of the dynamic library to copy it to the output path |
|
37 | # Retrieve the location of the dynamic library to copy it to the output path | |
35 | #get_property(sqpcoreLocation TARGET ${SQPCORE_LIBRARY_NAME} PROPERTY LOCATION) |
|
38 | #get_property(sqpcoreLocation TARGET ${SQPCORE_LIBRARY_NAME} PROPERTY LOCATION) | |
36 | list(APPEND SHARED_LIBRARIES_FROM_TARGETS ${sqpcoreLocation}) |
|
39 | list(APPEND SHARED_LIBRARIES_FROM_TARGETS ${sqpcoreLocation}) | |
37 |
|
40 | |||
|
41 | # Ui files | |||
|
42 | FILE (GLOB_RECURSE PROJECT_FORMS ${UI_FOLDER}/*.ui) | |||
|
43 | ||||
38 | # |
|
44 | # | |
39 | # Compile the application |
|
45 | # Compile the application | |
40 | # |
|
46 | # | |
41 | FILE (GLOB_RECURSE APPLICATION_SOURCES |
|
47 | FILE (GLOB_RECURSE APPLICATION_SOURCES | |
42 |
|
|
48 | ${INCLUDES_DIR}/*.h | |
43 |
|
|
49 | ${SOURCES_DIR}/*.c | |
44 |
|
|
50 | ${SOURCES_DIR}/*.cpp | |
45 |
|
51 | ${SOURCES_DIR}/*.h | ||
46 | # Headers files (.h) |
|
52 | ${PROJECT_FORMS}) | |
47 | FILE (GLOB_RECURSE PROJECT_HEADERS ${INCLUDE_FOLDER}/*.h) |
|
|||
48 |
|
53 | |||
49 | # Ui files |
|
|||
50 | FILE (GLOB_RECURSE PROJECT_FORMS ${UI_FOLDER}/*.ui) |
|
|||
51 |
|
||||
52 | # Resources files |
|
|||
53 | FILE (GLOB_RECURSE PROJECT_RESOURCES ${RES_FOLDER}/*.qrc) |
|
|||
54 |
|
||||
55 | # Retrieve resources files |
|
|||
56 | FILE (GLOB_RECURSE APPLICATION_RESOURCES ${RES_FOLDER}/*.qrc) |
|
54 | FILE (GLOB_RECURSE APPLICATION_RESOURCES ${RES_FOLDER}/*.qrc) | |
57 |
|
55 | |||
58 | QT5_ADD_RESOURCES(RCC_HDRS ${APPLICATION_RESOURCES} ) |
|
56 | QT5_ADD_RESOURCES(RCC_HDRS ${APPLICATION_RESOURCES} ) | |
59 |
|
57 | |||
60 | QT5_WRAP_UI(UIS_HDRS |
|
58 | QT5_WRAP_UI(UIS_HDRS | |
61 | ${PROJECT_FORMS} |
|
59 | ${PROJECT_FORMS} | |
62 | ) |
|
60 | ) | |
63 |
|
61 | |||
64 |
|
62 | |||
65 | ADD_EXECUTABLE(${EXECUTABLE_NAME} ${APPLICATION_SOURCES} ${RCC_HDRS} ${UIS_HDRS}) |
|
63 | ADD_EXECUTABLE(${EXECUTABLE_NAME} ${APPLICATION_SOURCES} ${RCC_HDRS} ${UIS_HDRS}) | |
66 | set_property(TARGET ${EXECUTABLE_NAME} PROPERTY CXX_STANDARD 14) |
|
64 | set_property(TARGET ${EXECUTABLE_NAME} PROPERTY CXX_STANDARD 14) | |
67 | set_property(TARGET ${EXECUTABLE_NAME} PROPERTY CXX_STANDARD_REQUIRED ON) |
|
65 | set_property(TARGET ${EXECUTABLE_NAME} PROPERTY CXX_STANDARD_REQUIRED ON) | |
68 | target_link_libraries(${EXECUTABLE_NAME} |
|
66 | target_link_libraries(${EXECUTABLE_NAME} | |
69 | ${LIBRARIES}) |
|
67 | ${LIBRARIES}) | |
70 |
|
68 | |||
71 | # Link with Qt5 modules |
|
69 | # Link with Qt5 modules | |
72 | qt5_use_modules(${EXECUTABLE_NAME} Core Widgets) |
|
70 | qt5_use_modules(${EXECUTABLE_NAME} Core Widgets) | |
73 |
|
71 | |||
74 |
|
72 | |||
75 | # Add the files to the list of files to be analyzed |
|
73 | # Add the files to the list of files to be analyzed | |
76 | LIST(APPEND CHECKSTYLE_INPUT_FILES ${APPLICATION_SOURCES}) |
|
74 | LIST(APPEND CHECKSTYLE_INPUT_FILES ${APPLICATION_SOURCES}) | |
77 | SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_INPUT_FILES) |
|
75 | SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_INPUT_FILES) | |
78 | # Vera++ exclusion files |
|
76 | # Vera++ exclusion files | |
79 | LIST(APPEND CHECKSTYLE_EXCLUSION_FILES ${CMAKE_CURRENT_SOURCE_DIR}/vera-exclusions/exclusions.txt) |
|
77 | LIST(APPEND CHECKSTYLE_EXCLUSION_FILES ${CMAKE_CURRENT_SOURCE_DIR}/vera-exclusions/exclusions.txt) | |
80 | SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_EXCLUSION_FILES) |
|
78 | SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_EXCLUSION_FILES) | |
81 |
|
79 | |||
82 | # |
|
80 | # | |
83 | # Compile the tests |
|
81 | # Compile the tests | |
84 | # |
|
82 | # | |
85 | IF(BUILD_TESTS) |
|
83 | IF(BUILD_TESTS) | |
86 |
|
84 | |||
87 | INCLUDE_DIRECTORIES(${SOURCES_DIR}) |
|
85 | INCLUDE_DIRECTORIES(${SOURCES_DIR}) | |
88 | FILE (GLOB_RECURSE TESTS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Test*.cpp) |
|
86 | FILE (GLOB_RECURSE TESTS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Test*.cpp) | |
89 | FILE (GLOB_RECURSE TESTS_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Test*.h) |
|
87 | FILE (GLOB_RECURSE TESTS_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Test*.h) | |
90 | SET( TEST_LIBRARIES ${LIBRARIES}) |
|
88 | SET( TEST_LIBRARIES ${LIBRARIES}) | |
91 |
|
89 | |||
92 | FOREACH( testFile ${TESTS_SOURCES} ) |
|
90 | FOREACH( testFile ${TESTS_SOURCES} ) | |
93 | GET_FILENAME_COMPONENT( testDirectory ${testFile} DIRECTORY ) |
|
91 | GET_FILENAME_COMPONENT( testDirectory ${testFile} DIRECTORY ) | |
94 | GET_FILENAME_COMPONENT( testName ${testFile} NAME_WE ) |
|
92 | GET_FILENAME_COMPONENT( testName ${testFile} NAME_WE ) | |
95 |
|
93 | |||
96 | # Add to the list of sources files all the sources in the same |
|
94 | # Add to the list of sources files all the sources in the same | |
97 | # directory that aren't another test |
|
95 | # directory that aren't another test | |
98 | FILE (GLOB currentTestSources |
|
96 | FILE (GLOB currentTestSources | |
99 | ${testDirectory}/*.c |
|
97 | ${testDirectory}/*.c | |
100 | ${testDirectory}/*.cpp |
|
98 | ${testDirectory}/*.cpp | |
101 | ${testDirectory}/*.h) |
|
99 | ${testDirectory}/*.h) | |
102 | LIST (REMOVE_ITEM currentTestSources ${TESTS_SOURCES}) |
|
100 | LIST (REMOVE_ITEM currentTestSources ${TESTS_SOURCES}) | |
103 | LIST (REMOVE_ITEM currentTestSources ${TESTS_HEADERS}) |
|
101 | LIST (REMOVE_ITEM currentTestSources ${TESTS_HEADERS}) | |
104 |
|
102 | |||
105 | ADD_EXECUTABLE(${testName} ${testFile} ${currentTestSources}) |
|
103 | ADD_EXECUTABLE(${testName} ${testFile} ${currentTestSources}) | |
106 | TARGET_LINK_LIBRARIES( ${testName} ${TEST_LIBRARIES}) |
|
104 | TARGET_LINK_LIBRARIES( ${testName} ${TEST_LIBRARIES}) | |
107 | qt5_use_modules(${testName} Test) |
|
105 | qt5_use_modules(${testName} Test) | |
108 |
|
106 | |||
109 | ADD_TEST( NAME ${testName} COMMAND ${testName} ) |
|
107 | ADD_TEST( NAME ${testName} COMMAND ${testName} ) | |
110 |
|
108 | |||
111 | SCIQLOP_COPY_TO_TARGET(RUNTIME ${testName}) |
|
109 | SCIQLOP_COPY_TO_TARGET(RUNTIME ${testName}) | |
112 | ENDFOREACH( testFile ) |
|
110 | ENDFOREACH( testFile ) | |
113 |
|
111 | |||
114 | LIST(APPEND testFilesToFormat ${TESTS_SOURCES}) |
|
112 | LIST(APPEND testFilesToFormat ${TESTS_SOURCES}) | |
115 | LIST(APPEND testFilesToFormat ${TESTS_HEADERS}) |
|
113 | LIST(APPEND testFilesToFormat ${TESTS_HEADERS}) | |
116 | LIST(APPEND FORMATTING_INPUT_FILES ${testFilesToFormat}) |
|
114 | LIST(APPEND FORMATTING_INPUT_FILES ${testFilesToFormat}) | |
117 |
|
115 | |||
118 | SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES) |
|
116 | SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES) | |
119 | ENDIF(BUILD_TESTS) |
|
117 | ENDIF(BUILD_TESTS) | |
120 |
|
118 | |||
121 | # |
|
119 | # | |
122 | # Set the files that must be formatted by clang-format. |
|
120 | # Set the files that must be formatted by clang-format. | |
123 | # |
|
121 | # | |
124 | LIST (APPEND FORMATTING_INPUT_FILES ${APPLICATION_SOURCES}) |
|
122 | LIST (APPEND FORMATTING_INPUT_FILES ${APPLICATION_SOURCES}) | |
125 | SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES) |
|
123 | SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES) | |
126 |
|
124 | |||
127 | # |
|
125 | # | |
128 | # Set the directories that doxygen must browse to generate the |
|
126 | # Set the directories that doxygen must browse to generate the | |
129 | # documentation. |
|
127 | # documentation. | |
130 | # |
|
128 | # | |
131 | # Source directories: |
|
129 | # Source directories: | |
132 | LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/docs") |
|
130 | LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/docs") | |
133 | LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src") |
|
131 | LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src") | |
134 | SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_INPUT_DIRS) |
|
132 | SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_INPUT_DIRS) | |
135 | # Source directories to exclude from the documentation generation |
|
133 | # Source directories to exclude from the documentation generation | |
136 | #LIST (APPEND DOXYGEN_EXCLUDE_PATTERNS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir/*") |
|
134 | #LIST (APPEND DOXYGEN_EXCLUDE_PATTERNS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir/*") | |
137 | SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_EXCLUDE_PATTERNS) |
|
135 | SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_EXCLUDE_PATTERNS) | |
138 |
|
136 | |||
139 | # |
|
137 | # | |
140 | # Set the directories with the sources to analyze and propagate the |
|
138 | # Set the directories with the sources to analyze and propagate the | |
141 | # modification to the parent scope |
|
139 | # modification to the parent scope | |
142 | # |
|
140 | # | |
143 | # Source directories to analyze: |
|
141 | # Source directories to analyze: | |
144 | LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src") |
|
142 | LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src") | |
145 | LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/tests") |
|
143 | LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/tests") | |
146 | SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_INPUT_DIRS) |
|
144 | SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_INPUT_DIRS) | |
147 | # Source directories to exclude from the analysis |
|
145 | # Source directories to exclude from the analysis | |
148 | #LIST (APPEND ANALYSIS_EXCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir") |
|
146 | #LIST (APPEND ANALYSIS_EXCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir") | |
149 | SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_EXCLUDE_DIRS) |
|
147 | SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_EXCLUDE_DIRS) |
@@ -1,60 +1,60 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the QLop Software |
|
2 | -- This file is a part of the SciQLop Software | |
3 |
-- Copyright (C) 201 |
|
3 | -- Copyright (C) 2017, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by | |
7 | -- the Free Software Foundation; either version 2 of the License, or |
|
7 | -- the Free Software Foundation; either version 2 of the License, or | |
8 | -- (at your option) any later version. |
|
8 | -- (at your option) any later version. | |
9 | -- |
|
9 | -- | |
10 | -- This program is distributed in the hope that it will be useful, |
|
10 | -- This program is distributed in the hope that it will be useful, | |
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | -- GNU General Public License for more details. |
|
13 | -- GNU General Public License for more details. | |
14 | -- |
|
14 | -- | |
15 | -- You should have received a copy of the GNU General Public License |
|
15 | -- You should have received a copy of the GNU General Public License | |
16 | -- along with this program; if not, write to the Free Software |
|
16 | -- along with this program; if not, write to the Free Software | |
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | -------------------------------------------------------------------------------*/ |
|
18 | -------------------------------------------------------------------------------*/ | |
19 | /*-- Author : Alexis Jeandet |
|
19 | /*-- Author : Alexis Jeandet | |
20 | -- Mail : alexis.jeandet@member.fsf.org |
|
20 | -- Mail : alexis.jeandet@member.fsf.org | |
21 | ----------------------------------------------------------------------------*/ |
|
21 | ----------------------------------------------------------------------------*/ | |
22 | #ifndef MAINWINDOW_H |
|
22 | #ifndef SCIQLOP_MAINWINDOW_H | |
23 | #define MAINWINDOW_H |
|
23 | #define SCIQLOP_MAINWINDOW_H | |
24 |
|
24 | |||
25 | #include <QListWidgetItem> |
|
25 | #include <QListWidgetItem> | |
26 | #include <QMainWindow> |
|
26 | #include <QMainWindow> | |
27 | #include <QProgressBar> |
|
27 | #include <QProgressBar> | |
28 | #include <QProgressDialog> |
|
28 | #include <QProgressDialog> | |
29 | #include <QThread> |
|
29 | #include <QThread> | |
30 | #include <QVBoxLayout> |
|
30 | #include <QVBoxLayout> | |
31 | #include <QWidget> |
|
31 | #include <QWidget> | |
32 | //#include "../Core/qlopservice.h" |
|
32 | //#include "../Core/qlopservice.h" | |
33 | //#include "../Core/qlopgui.h" |
|
33 | //#include "../Core/qlopgui.h" | |
34 |
|
34 | |||
|
35 | #include <memory> | |||
35 |
|
36 | |||
36 | namespace Ui { |
|
37 | namespace Ui { | |
37 | class MainWindow; |
|
38 | class MainWindow; | |
38 | } |
|
39 | } // namespace Ui | |
|
40 | ||||
39 |
|
41 | |||
40 | class MainWindow : public QMainWindow { |
|
42 | class MainWindow : public QMainWindow { | |
41 | Q_OBJECT |
|
43 | Q_OBJECT | |
42 |
|
44 | |||
43 | public: |
|
45 | public: | |
44 | explicit MainWindow(QWidget *parent = 0); |
|
46 | explicit MainWindow(QWidget *parent = 0); | |
45 | ~MainWindow(); |
|
47 | virtual ~MainWindow(); | |
46 | public slots: |
|
48 | public slots: | |
47 |
|
49 | |||
48 | protected: |
|
50 | protected: | |
49 | void changeEvent(QEvent *e); |
|
51 | void changeEvent(QEvent *e); | |
50 |
|
52 | |||
51 | private: |
|
53 | private: | |
52 |
Ui::MainWindow |
|
54 | std::unique_ptr<Ui::MainWindow> m_Ui; | |
53 | QList<QProgressBar *> m_progress; |
|
55 | // QWidget *m_progressWidget; | |
54 | int *m_progressThreadIds; |
|
56 | // QVBoxLayout *m_progressLayout; | |
55 | QWidget *m_progressWidget; |
|
|||
56 | QVBoxLayout *m_progressLayout; |
|
|||
57 | // QList<QLopService*> m_qlopServices; |
|
57 | // QList<QLopService*> m_qlopServices; | |
58 | }; |
|
58 | }; | |
59 |
|
59 | |||
60 | #endif // MAINWINDOW_H |
|
60 | #endif // SCIQLOP_MAINWINDOW_H |
@@ -1,103 +1,102 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the QLop Software |
|
2 | -- This file is a part of the SciQLop Software | |
3 |
-- Copyright (C) 201 |
|
3 | -- Copyright (C) 2017, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by | |
7 | -- the Free Software Foundation; either version 2 of the License, or |
|
7 | -- the Free Software Foundation; either version 2 of the License, or | |
8 | -- (at your option) any later version. |
|
8 | -- (at your option) any later version. | |
9 | -- |
|
9 | -- | |
10 | -- This program is distributed in the hope that it will be useful, |
|
10 | -- This program is distributed in the hope that it will be useful, | |
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | -- GNU General Public License for more details. |
|
13 | -- GNU General Public License for more details. | |
14 | -- |
|
14 | -- | |
15 | -- You should have received a copy of the GNU General Public License |
|
15 | -- You should have received a copy of the GNU General Public License | |
16 | -- along with this program; if not, write to the Free Software |
|
16 | -- along with this program; if not, write to the Free Software | |
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | -------------------------------------------------------------------------------*/ |
|
18 | -------------------------------------------------------------------------------*/ | |
19 | /*-- Author : Alexis Jeandet |
|
19 | /*-- Author : Alexis Jeandet | |
20 | -- Mail : alexis.jeandet@member.fsf.org |
|
20 | -- Mail : alexis.jeandet@member.fsf.org | |
21 | ----------------------------------------------------------------------------*/ |
|
21 | ----------------------------------------------------------------------------*/ | |
22 |
#include " |
|
22 | #include "MainWindow.h" | |
23 |
#include "ui_ |
|
23 | #include "ui_MainWindow.h" | |
24 | #include <QAction> |
|
24 | #include <QAction> | |
25 | #include <QDate> |
|
25 | #include <QDate> | |
26 | #include <QDateTime> |
|
26 | #include <QDateTime> | |
27 | #include <QDir> |
|
27 | #include <QDir> | |
28 | #include <QFileDialog> |
|
28 | #include <QFileDialog> | |
29 | //#include <omp.h> |
|
29 | //#include <omp.h> | |
30 | //#include <network/filedownloader.h> |
|
30 | //#include <network/filedownloader.h> | |
31 | //#include <qlopdatabase.h> |
|
31 | //#include <qlopdatabase.h> | |
32 | //#include <qlopsettings.h> |
|
32 | //#include <qlopsettings.h> | |
33 | //#include <qlopgui.h> |
|
33 | //#include <qlopgui.h> | |
34 | //#include <spacedata.h> |
|
34 | //#include <spacedata.h> | |
35 | //#include "qlopcore.h" |
|
35 | //#include "qlopcore.h" | |
36 | //#include "qlopcodecmanager.h" |
|
36 | //#include "qlopcodecmanager.h" | |
37 | //#include "cdfcodec.h" |
|
37 | //#include "cdfcodec.h" | |
38 | //#include "amdatxtcodec.h" |
|
38 | //#include "amdatxtcodec.h" | |
39 | //#include <qlopplotmanager.h> |
|
39 | //#include <qlopplotmanager.h> | |
40 |
|
40 | |||
41 |
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), |
|
41 | MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), m_Ui(new Ui::MainWindow) | |
42 | { |
|
42 | { | |
43 |
|
|
43 | m_Ui->setupUi(this); | |
44 | /* QLopGUI::registerMenuBar(menuBar()); |
|
44 | /* QLopGUI::registerMenuBar(menuBar()); | |
45 | this->setWindowIcon(QIcon(":/sciqlopLOGO.svg")); |
|
45 | this->setWindowIcon(QIcon(":/sciqlopLOGO.svg")); | |
46 | this->m_progressWidget = new QWidget(); |
|
46 | this->m_progressWidget = new QWidget(); | |
47 | this->m_progressLayout = new QVBoxLayout(this->m_progressWidget); |
|
47 | this->m_progressLayout = new QVBoxLayout(this->m_progressWidget); | |
48 | this->m_progressWidget->setLayout(this->m_progressLayout); |
|
48 | this->m_progressWidget->setLayout(this->m_progressLayout); | |
49 | this->m_progressWidget->setWindowModality(Qt::WindowModal); |
|
49 | this->m_progressWidget->setWindowModality(Qt::WindowModal); | |
50 | m_progressThreadIds = (int*) malloc(OMP_THREADS*sizeof(int)); |
|
50 | m_progressThreadIds = (int*) malloc(OMP_THREADS*sizeof(int)); | |
51 | for(int i=0;i<OMP_THREADS;i++) |
|
51 | for(int i=0;i<OMP_THREADS;i++) | |
52 | { |
|
52 | { | |
53 | this->m_progress.append(new QProgressBar(this->m_progressWidget)); |
|
53 | this->m_progress.append(new QProgressBar(this->m_progressWidget)); | |
54 | this->m_progress.last()->setMinimum(0); |
|
54 | this->m_progress.last()->setMinimum(0); | |
55 | this->m_progress.last()->setMaximum(100); |
|
55 | this->m_progress.last()->setMaximum(100); | |
56 | this->m_progressLayout->addWidget(this->m_progress.last()); |
|
56 | this->m_progressLayout->addWidget(this->m_progress.last()); | |
57 | this->m_progressWidget->hide(); |
|
57 | this->m_progressWidget->hide(); | |
58 | this->m_progressThreadIds[i] = -1; |
|
58 | this->m_progressThreadIds[i] = -1; | |
59 | } |
|
59 | } | |
60 | this->m_progressWidget->setWindowTitle("Loading File"); |
|
60 | this->m_progressWidget->setWindowTitle("Loading File"); | |
61 | const QList<QLopService*>ServicesToLoad=QList<QLopService*>() |
|
61 | const QList<QLopService*>ServicesToLoad=QList<QLopService*>() | |
62 | << QLopCore::self() |
|
62 | << QLopCore::self() | |
63 | << QLopPlotManager::self() |
|
63 | << QLopPlotManager::self() | |
64 | << QLopCodecManager::self() |
|
64 | << QLopCodecManager::self() | |
65 | << FileDownloader::self() |
|
65 | << FileDownloader::self() | |
66 | << QLopDataBase::self() |
|
66 | << QLopDataBase::self() | |
67 | << SpaceData::self(); |
|
67 | << SpaceData::self(); | |
68 |
|
68 | |||
69 | CDFCodec::registerToManager(); |
|
69 | CDFCodec::registerToManager(); | |
70 | AMDATXTCodec::registerToManager(); |
|
70 | AMDATXTCodec::registerToManager(); | |
71 |
|
71 | |||
72 |
|
72 | |||
73 | for(int i=0;i<ServicesToLoad.count();i++) |
|
73 | for(int i=0;i<ServicesToLoad.count();i++) | |
74 | { |
|
74 | { | |
75 | qDebug()<<ServicesToLoad.at(i)->serviceName(); |
|
75 | qDebug()<<ServicesToLoad.at(i)->serviceName(); | |
76 | ServicesToLoad.at(i)->initialize(); //must be called before getGUI |
|
76 | ServicesToLoad.at(i)->initialize(); //must be called before getGUI | |
77 | QDockWidget* wdgt=ServicesToLoad.at(i)->getGUI(); |
|
77 | QDockWidget* wdgt=ServicesToLoad.at(i)->getGUI(); | |
78 | if(wdgt) |
|
78 | if(wdgt) | |
79 | { |
|
79 | { | |
80 | wdgt->setAllowedAreas(Qt::AllDockWidgetAreas); |
|
80 | wdgt->setAllowedAreas(Qt::AllDockWidgetAreas); | |
81 | this->addDockWidget(Qt::TopDockWidgetArea,wdgt); |
|
81 | this->addDockWidget(Qt::TopDockWidgetArea,wdgt); | |
82 | } |
|
82 | } | |
83 | PythonQt::self()->getMainModule().addObject(ServicesToLoad.at(i)->serviceName(),(QObject*)ServicesToLoad.at(i)); |
|
83 | PythonQt::self()->getMainModule().addObject(ServicesToLoad.at(i)->serviceName(),(QObject*)ServicesToLoad.at(i)); | |
84 | }*/ |
|
84 | }*/ | |
85 | } |
|
85 | } | |
86 |
|
86 | |||
87 | MainWindow::~MainWindow() |
|
87 | MainWindow::~MainWindow() | |
88 | { |
|
88 | { | |
89 | delete ui; |
|
|||
90 | } |
|
89 | } | |
91 |
|
90 | |||
92 |
|
91 | |||
93 | void MainWindow::changeEvent(QEvent *e) |
|
92 | void MainWindow::changeEvent(QEvent *e) | |
94 | { |
|
93 | { | |
95 | QMainWindow::changeEvent(e); |
|
94 | QMainWindow::changeEvent(e); | |
96 | switch (e->type()) { |
|
95 | switch (e->type()) { | |
97 | case QEvent::LanguageChange: |
|
96 | case QEvent::LanguageChange: | |
98 |
|
|
97 | m_Ui->retranslateUi(this); | |
99 | break; |
|
98 | break; | |
100 | default: |
|
99 | default: | |
101 | break; |
|
100 | break; | |
102 | } |
|
101 | } | |
103 | } |
|
102 | } |
1 | NO CONTENT: file renamed from app/src/mainwindow.ui to app/ui/MainWindow.ui |
|
NO CONTENT: file renamed from app/src/mainwindow.ui to app/ui/MainWindow.ui |
@@ -1,3 +1,4 | |||||
1 |
# Ignore false positive relative to |
|
1 | # Ignore false positive relative to App macro | |
|
2 | \.h:\d+:.IPSIS_S04.*found: Ui | |||
2 | SqpApplication\.h:\d+:.IPSIS_S03.*found: sqpApp |
|
3 | SqpApplication\.h:\d+:.IPSIS_S03.*found: sqpApp | |
3 | SqpApplication\.h:\d+:.IPSIS_S04_VARIABLE.*found: sqpApp |
|
4 | SqpApplication\.h:\d+:.IPSIS_S04_VARIABLE.*found: sqpApp |
General Comments 8
Status change > Approved
Pull request updated. Auto status change to "Under Review"
Changed commits: * 1 added * 0 removed Changed files: * M core/CMakeLists.txt
Status change > Approved
You need to be logged in to leave comments.
Login now