##// END OF EJS Templates
Refactoring of app module to avoir vera++ warning and to dispatch sources files in the corrects paths
perrinel -
r54:7bf435c144fc
parent child
Show More
@@ -3,10 +3,13
3 3 SET(EXECUTABLE_NAME "sciqlop")
4 4 SCIQLOP_SET_TO_PARENT_SCOPE(EXECUTABLE_NAME)
5 5 SET(SOURCES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/)
6 SET(INCLUDE_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/include)
7 SET(UI_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/src)
6 SET(INCLUDES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include")
7 SET(UI_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/ui)
8 8 SET(RES_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/resources)
9 9
10 # Include gui directory
11 include_directories("${INCLUDES_DIR}")
12
10 13 #
11 14 # Find Qt modules
12 15 #
@@ -35,24 +38,19 list(APPEND SHARED_LIBRARIES ${SQPCORE_SHARED_LIBRARIES})
35 38 #get_property(sqpcoreLocation TARGET ${SQPCORE_LIBRARY_NAME} PROPERTY LOCATION)
36 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 45 # Compile the application
40 46 #
41 47 FILE (GLOB_RECURSE APPLICATION_SOURCES
42 ${SOURCES_DIR}/*.c
43 ${SOURCES_DIR}/*.cpp
44 ${SOURCES_DIR}/*.h)
45
46 # Headers files (.h)
47 FILE (GLOB_RECURSE PROJECT_HEADERS ${INCLUDE_FOLDER}/*.h)
48 ${INCLUDES_DIR}/*.h
49 ${SOURCES_DIR}/*.c
50 ${SOURCES_DIR}/*.cpp
51 ${SOURCES_DIR}/*.h
52 ${PROJECT_FORMS})
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 54 FILE (GLOB_RECURSE APPLICATION_RESOURCES ${RES_FOLDER}/*.qrc)
57 55
58 56 QT5_ADD_RESOURCES(RCC_HDRS ${APPLICATION_RESOURCES} )
@@ -1,6 +1,6
1 1 /*------------------------------------------------------------------------------
2 -- This file is a part of the QLop Software
3 -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS
2 -- This file is a part of the SciQLop Software
3 -- Copyright (C) 2017, Plasma Physics Laboratory - CNRS
4 4 --
5 5 -- This program is free software; you can redistribute it and/or modify
6 6 -- it under the terms of the GNU General Public License as published by
@@ -19,8 +19,8
19 19 /*-- Author : Alexis Jeandet
20 20 -- Mail : alexis.jeandet@member.fsf.org
21 21 ----------------------------------------------------------------------------*/
22 #ifndef MAINWINDOW_H
23 #define MAINWINDOW_H
22 #ifndef SCIQLOP_MAINWINDOW_H
23 #define SCIQLOP_MAINWINDOW_H
24 24
25 25 #include <QListWidgetItem>
26 26 #include <QMainWindow>
@@ -32,29 +32,29
32 32 //#include "../Core/qlopservice.h"
33 33 //#include "../Core/qlopgui.h"
34 34
35 #include <memory>
35 36
36 37 namespace Ui {
37 38 class MainWindow;
38 }
39 } // namespace Ui
40
39 41
40 42 class MainWindow : public QMainWindow {
41 43 Q_OBJECT
42 44
43 45 public:
44 46 explicit MainWindow(QWidget *parent = 0);
45 ~MainWindow();
47 virtual ~MainWindow();
46 48 public slots:
47 49
48 50 protected:
49 51 void changeEvent(QEvent *e);
50 52
51 53 private:
52 Ui::MainWindow *ui;
53 QList<QProgressBar *> m_progress;
54 int *m_progressThreadIds;
55 QWidget *m_progressWidget;
56 QVBoxLayout *m_progressLayout;
54 std::unique_ptr<Ui::MainWindow> m_Ui;
55 // QWidget *m_progressWidget;
56 // QVBoxLayout *m_progressLayout;
57 57 // QList<QLopService*> m_qlopServices;
58 58 };
59 59
60 #endif // MAINWINDOW_H
60 #endif // SCIQLOP_MAINWINDOW_H
@@ -1,6 +1,6
1 1 /*------------------------------------------------------------------------------
2 -- This file is a part of the QLop Software
3 -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS
2 -- This file is a part of the SciQLop Software
3 -- Copyright (C) 2017, Plasma Physics Laboratory - CNRS
4 4 --
5 5 -- This program is free software; you can redistribute it and/or modify
6 6 -- it under the terms of the GNU General Public License as published by
@@ -19,8 +19,8
19 19 /*-- Author : Alexis Jeandet
20 20 -- Mail : alexis.jeandet@member.fsf.org
21 21 ----------------------------------------------------------------------------*/
22 #include "mainwindow.h"
23 #include "ui_mainwindow.h"
22 #include "MainWindow.h"
23 #include "ui_MainWindow.h"
24 24 #include <QAction>
25 25 #include <QDate>
26 26 #include <QDateTime>
@@ -38,9 +38,9
38 38 //#include "amdatxtcodec.h"
39 39 //#include <qlopplotmanager.h>
40 40
41 MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)
41 MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), m_Ui(new Ui::MainWindow)
42 42 {
43 ui->setupUi(this);
43 m_Ui->setupUi(this);
44 44 /* QLopGUI::registerMenuBar(menuBar());
45 45 this->setWindowIcon(QIcon(":/sciqlopLOGO.svg"));
46 46 this->m_progressWidget = new QWidget();
@@ -86,7 +86,6 MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
86 86
87 87 MainWindow::~MainWindow()
88 88 {
89 delete ui;
90 89 }
91 90
92 91
@@ -95,7 +94,7 void MainWindow::changeEvent(QEvent *e)
95 94 QMainWindow::changeEvent(e);
96 95 switch (e->type()) {
97 96 case QEvent::LanguageChange:
98 ui->retranslateUi(this);
97 m_Ui->retranslateUi(this);
99 98 break;
100 99 default:
101 100 break;
1 NO CONTENT: file renamed from app/src/mainwindow.ui to app/ui/MainWindow.ui
@@ -1,3 +1,4
1 # Ignore false positive relative to sqpApp macro
1 # Ignore false positive relative to App macro
2 \.h:\d+:.IPSIS_S04.*found: Ui
2 3 SqpApplication\.h:\d+:.IPSIS_S03.*found: sqpApp
3 4 SqpApplication\.h:\d+:.IPSIS_S04_VARIABLE.*found: sqpApp
General Comments 0
You need to be logged in to leave comments. Login now