Auto status change to "Under Review"
@@ -1,102 +1,112 | |||
|
1 | 1 | /*------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the SciQLop Software |
|
3 | 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 |
|
7 | 7 | -- the Free Software Foundation; either version 2 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | -------------------------------------------------------------------------------*/ |
|
19 | 19 | /*-- Author : Alexis Jeandet |
|
20 | 20 | -- Mail : alexis.jeandet@member.fsf.org |
|
21 | 21 | ----------------------------------------------------------------------------*/ |
|
22 | 22 | #include "MainWindow.h" |
|
23 | 23 | #include "ui_MainWindow.h" |
|
24 | 24 | #include <QAction> |
|
25 | 25 | #include <QDate> |
|
26 | 26 | #include <QDateTime> |
|
27 | 27 | #include <QDir> |
|
28 | 28 | #include <QFileDialog> |
|
29 | 29 | //#include <omp.h> |
|
30 | 30 | //#include <network/filedownloader.h> |
|
31 | 31 | //#include <qlopdatabase.h> |
|
32 | 32 | //#include <qlopsettings.h> |
|
33 | 33 | //#include <qlopgui.h> |
|
34 | 34 | //#include <spacedata.h> |
|
35 | 35 | //#include "qlopcore.h" |
|
36 | 36 | //#include "qlopcodecmanager.h" |
|
37 | 37 | //#include "cdfcodec.h" |
|
38 | 38 | //#include "amdatxtcodec.h" |
|
39 | 39 | //#include <qlopplotmanager.h> |
|
40 | ||
|
40 | #include <QAction> | |
|
41 | #include <QToolBar> | |
|
42 | #include <memory.h> | |
|
41 | 43 | MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), m_Ui(new Ui::MainWindow) |
|
42 | 44 | { |
|
43 | 45 | m_Ui->setupUi(this); |
|
46 | ||
|
47 | QToolBar *actionToolbar = new QToolBar(this); | |
|
48 | actionToolbar->setOrientation(Qt::Vertical); | |
|
49 | actionToolbar->addAction("ACTION"); | |
|
50 | actionToolbar->addAction("ACTION 2"); | |
|
51 | actionToolbar->addAction("ACTION 3"); | |
|
52 | m_Ui->leftInspectorSidePane->layout()->addWidget(actionToolbar); | |
|
53 | ||
|
44 | 54 | /* QLopGUI::registerMenuBar(menuBar()); |
|
45 | 55 | this->setWindowIcon(QIcon(":/sciqlopLOGO.svg")); |
|
46 | 56 | this->m_progressWidget = new QWidget(); |
|
47 | 57 | this->m_progressLayout = new QVBoxLayout(this->m_progressWidget); |
|
48 | 58 | this->m_progressWidget->setLayout(this->m_progressLayout); |
|
49 | 59 | this->m_progressWidget->setWindowModality(Qt::WindowModal); |
|
50 | 60 | m_progressThreadIds = (int*) malloc(OMP_THREADS*sizeof(int)); |
|
51 | 61 | for(int i=0;i<OMP_THREADS;i++) |
|
52 | 62 | { |
|
53 | 63 | this->m_progress.append(new QProgressBar(this->m_progressWidget)); |
|
54 | 64 | this->m_progress.last()->setMinimum(0); |
|
55 | 65 | this->m_progress.last()->setMaximum(100); |
|
56 | 66 | this->m_progressLayout->addWidget(this->m_progress.last()); |
|
57 | 67 | this->m_progressWidget->hide(); |
|
58 | 68 | this->m_progressThreadIds[i] = -1; |
|
59 | 69 | } |
|
60 | 70 | this->m_progressWidget->setWindowTitle("Loading File"); |
|
61 | 71 | const QList<QLopService*>ServicesToLoad=QList<QLopService*>() |
|
62 | 72 | << QLopCore::self() |
|
63 | 73 | << QLopPlotManager::self() |
|
64 | 74 | << QLopCodecManager::self() |
|
65 | 75 | << FileDownloader::self() |
|
66 | 76 | << QLopDataBase::self() |
|
67 | 77 | << SpaceData::self(); |
|
68 | 78 | |
|
69 | 79 | CDFCodec::registerToManager(); |
|
70 | 80 | AMDATXTCodec::registerToManager(); |
|
71 | 81 | |
|
72 | 82 | |
|
73 | 83 | for(int i=0;i<ServicesToLoad.count();i++) |
|
74 | 84 | { |
|
75 | 85 | qDebug()<<ServicesToLoad.at(i)->serviceName(); |
|
76 | 86 | ServicesToLoad.at(i)->initialize(); //must be called before getGUI |
|
77 | 87 | QDockWidget* wdgt=ServicesToLoad.at(i)->getGUI(); |
|
78 | 88 | if(wdgt) |
|
79 | 89 | { |
|
80 | 90 | wdgt->setAllowedAreas(Qt::AllDockWidgetAreas); |
|
81 | 91 | this->addDockWidget(Qt::TopDockWidgetArea,wdgt); |
|
82 | 92 | } |
|
83 | 93 | PythonQt::self()->getMainModule().addObject(ServicesToLoad.at(i)->serviceName(),(QObject*)ServicesToLoad.at(i)); |
|
84 | 94 | }*/ |
|
85 | 95 | } |
|
86 | 96 | |
|
87 | 97 | MainWindow::~MainWindow() |
|
88 | 98 | { |
|
89 | 99 | } |
|
90 | 100 | |
|
91 | 101 | |
|
92 | 102 | void MainWindow::changeEvent(QEvent *e) |
|
93 | 103 | { |
|
94 | 104 | QMainWindow::changeEvent(e); |
|
95 | 105 | switch (e->type()) { |
|
96 | 106 | case QEvent::LanguageChange: |
|
97 | 107 | m_Ui->retranslateUi(this); |
|
98 | 108 | break; |
|
99 | 109 | default: |
|
100 | 110 | break; |
|
101 | 111 | } |
|
102 | 112 | } |
@@ -1,56 +1,90 | |||
|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
|
2 | 2 | <ui version="4.0"> |
|
3 | 3 | <class>MainWindow</class> |
|
4 | 4 | <widget class="QMainWindow" name="MainWindow"> |
|
5 | 5 | <property name="geometry"> |
|
6 | 6 | <rect> |
|
7 | 7 | <x>0</x> |
|
8 | 8 | <y>0</y> |
|
9 | 9 | <width>800</width> |
|
10 | 10 | <height>600</height> |
|
11 | 11 | </rect> |
|
12 | 12 | </property> |
|
13 | 13 | <property name="windowTitle"> |
|
14 | 14 | <string>QLop</string> |
|
15 | 15 | </property> |
|
16 | 16 | <property name="dockNestingEnabled"> |
|
17 | 17 | <bool>true</bool> |
|
18 | 18 | </property> |
|
19 | 19 | <widget class="QWidget" name="centralWidget"> |
|
20 | 20 | <property name="enabled"> |
|
21 | 21 | <bool>true</bool> |
|
22 | 22 | </property> |
|
23 | 23 | <property name="sizePolicy"> |
|
24 | 24 | <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> |
|
25 | 25 | <horstretch>0</horstretch> |
|
26 | 26 | <verstretch>0</verstretch> |
|
27 | 27 | </sizepolicy> |
|
28 | 28 | </property> |
|
29 | 29 | <property name="maximumSize"> |
|
30 | 30 | <size> |
|
31 | 31 | <width>16777215</width> |
|
32 | 32 | <height>16777215</height> |
|
33 | 33 | </size> |
|
34 | 34 | </property> |
|
35 | <layout class="QHBoxLayout" name="horizontalLayout"> | |
|
36 | <item> | |
|
37 | <widget class="QWidget" name="leftInspectorWidget" native="true"> | |
|
38 | <layout class="QHBoxLayout" name="horizontalLayout_2"> | |
|
39 | <item> | |
|
40 | <widget class="QWidget" name="widget" native="true"> | |
|
41 | <layout class="QVBoxLayout" name="verticalLayout"> | |
|
42 | <item> | |
|
43 | <widget class="QWidget" name="dateSourceWidget" native="true"/> | |
|
44 | </item> | |
|
45 | <item> | |
|
46 | <widget class="QWidget" name="dateTimeWidget" native="true"/> | |
|
47 | </item> | |
|
48 | <item> | |
|
49 | <widget class="QWidget" name="variableInspectorWidget" native="true"/> | |
|
50 | </item> | |
|
51 | </layout> | |
|
52 | </widget> | |
|
53 | </item> | |
|
54 | <item> | |
|
55 | <widget class="QWidget" name="leftInspectorSidePane" native="true"> | |
|
56 | <layout class="QVBoxLayout" name="verticalLayout_2"/> | |
|
57 | </widget> | |
|
58 | </item> | |
|
59 | </layout> | |
|
60 | </widget> | |
|
61 | </item> | |
|
62 | <item> | |
|
63 | <widget class="QWidget" name="viewWidget" native="true"/> | |
|
64 | </item> | |
|
65 | <item> | |
|
66 | <widget class="QWidget" name="rightInspectorWidget" native="true"/> | |
|
67 | </item> | |
|
68 | </layout> | |
|
35 | 69 | </widget> |
|
36 | 70 | <widget class="QMenuBar" name="menuBar"> |
|
37 | 71 | <property name="geometry"> |
|
38 | 72 | <rect> |
|
39 | 73 | <x>0</x> |
|
40 | 74 | <y>0</y> |
|
41 | 75 | <width>800</width> |
|
42 |
<height> |
|
|
76 | <height>26</height> | |
|
43 | 77 | </rect> |
|
44 | 78 | </property> |
|
45 | 79 | </widget> |
|
46 | 80 | <widget class="QStatusBar" name="statusBar"/> |
|
47 | 81 | <action name="actionIndex_Viewer"> |
|
48 | 82 | <property name="text"> |
|
49 | 83 | <string>Index Viewer</string> |
|
50 | 84 | </property> |
|
51 | 85 | </action> |
|
52 | 86 | </widget> |
|
53 | 87 | <layoutdefault spacing="6" margin="11"/> |
|
54 | 88 | <resources/> |
|
55 | 89 | <connections/> |
|
56 | 90 | </ui> |
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