@@ -28,6 +28,10 | |||||
28 | #include <Plugin/PluginManager.h> |
|
28 | #include <Plugin/PluginManager.h> | |
29 | #include <QDir> |
|
29 | #include <QDir> | |
30 |
|
30 | |||
|
31 | #include <QLoggingCategory> | |||
|
32 | ||||
|
33 | Q_LOGGING_CATEGORY(LOG_Main, "Main") | |||
|
34 | ||||
31 | namespace { |
|
35 | namespace { | |
32 |
|
36 | |||
33 | /// Name of the directory containing the plugins |
|
37 | /// Name of the directory containing the plugins | |
@@ -66,8 +70,7 int main(int argc, char *argv[]) | |||||
66 | } |
|
70 | } | |
67 | #endif |
|
71 | #endif | |
68 | #endif |
|
72 | #endif | |
69 | qCDebug(LOG_PluginManager()) |
|
73 | qCDebug(LOG_Main()) << QObject::tr("Plugin directory: %1").arg(pluginDir.absolutePath()); | |
70 | << QObject::tr("Plugin directory: %1").arg(pluginDir.absolutePath()); |
|
|||
71 |
|
74 | |||
72 | PluginManager pluginManager{}; |
|
75 | PluginManager pluginManager{}; | |
73 | pluginManager.loadPlugins(pluginDir); |
|
76 | pluginManager.loadPlugins(pluginDir); |
@@ -41,18 +41,6 | |||||
41 | #include <QToolButton> |
|
41 | #include <QToolButton> | |
42 | #include <memory.h> |
|
42 | #include <memory.h> | |
43 |
|
43 | |||
44 | //#include <omp.h> |
|
|||
45 | //#include <network/filedownloader.h> |
|
|||
46 | //#include <qlopdatabase.h> |
|
|||
47 | //#include <qlopsettings.h> |
|
|||
48 | //#include <qlopgui.h> |
|
|||
49 | //#include <spacedata.h> |
|
|||
50 | //#include "qlopcore.h" |
|
|||
51 | //#include "qlopcodecmanager.h" |
|
|||
52 | //#include "cdfcodec.h" |
|
|||
53 | //#include "amdatxtcodec.h" |
|
|||
54 | //#include <qlopplotmanager.h> |
|
|||
55 |
|
||||
56 | #include "iostream" |
|
44 | #include "iostream" | |
57 |
|
45 | |||
58 | Q_LOGGING_CATEGORY(LOG_MainWindow, "MainWindow") |
|
46 | Q_LOGGING_CATEGORY(LOG_MainWindow, "MainWindow") | |
@@ -207,55 +195,12 MainWindow::MainWindow(QWidget *parent) | |||||
207 | SIGNAL(tableMenuAboutToBeDisplayed(QMenu *, const QVector<std::shared_ptr<Variable> > &)), |
|
195 | SIGNAL(tableMenuAboutToBeDisplayed(QMenu *, const QVector<std::shared_ptr<Variable> > &)), | |
208 | m_Ui->view, SLOT(attachVariableMenu(QMenu *, const QVector<std::shared_ptr<Variable> > &)), |
|
196 | m_Ui->view, SLOT(attachVariableMenu(QMenu *, const QVector<std::shared_ptr<Variable> > &)), | |
209 | Qt::DirectConnection); |
|
197 | Qt::DirectConnection); | |
210 |
|
||||
211 | /* QLopGUI::registerMenuBar(menuBar()); |
|
|||
212 | this->setWindowIcon(QIcon(":/sciqlopLOGO.svg")); |
|
|||
213 | this->m_progressWidget = new QWidget(); |
|
|||
214 | this->m_progressLayout = new QVBoxLayout(this->m_progressWidget); |
|
|||
215 | this->m_progressWidget->setLayout(this->m_progressLayout); |
|
|||
216 | this->m_progressWidget->setWindowModality(Qt::WindowModal); |
|
|||
217 | m_progressThreadIds = (int*) malloc(OMP_THREADS*sizeof(int)); |
|
|||
218 | for(int i=0;i<OMP_THREADS;i++) |
|
|||
219 | { |
|
|||
220 | this->m_progress.append(new QProgressBar(this->m_progressWidget)); |
|
|||
221 | this->m_progress.last()->setMinimum(0); |
|
|||
222 | this->m_progress.last()->setMaximum(100); |
|
|||
223 | this->m_progressLayout->addWidget(this->m_progress.last()); |
|
|||
224 | this->m_progressWidget->hide(); |
|
|||
225 | this->m_progressThreadIds[i] = -1; |
|
|||
226 | } |
|
|||
227 | this->m_progressWidget->setWindowTitle("Loading File"); |
|
|||
228 | const QList<QLopService*>ServicesToLoad=QList<QLopService*>() |
|
|||
229 | << QLopCore::self() |
|
|||
230 | << QLopPlotManager::self() |
|
|||
231 | << QLopCodecManager::self() |
|
|||
232 | << FileDownloader::self() |
|
|||
233 | << QLopDataBase::self() |
|
|||
234 | << SpaceData::self(); |
|
|||
235 |
|
||||
236 | CDFCodec::registerToManager(); |
|
|||
237 | AMDATXTCodec::registerToManager(); |
|
|||
238 |
|
||||
239 |
|
||||
240 | for(int i=0;i<ServicesToLoad.count();i++) |
|
|||
241 | { |
|
|||
242 | qDebug()<<ServicesToLoad.at(i)->serviceName(); |
|
|||
243 | ServicesToLoad.at(i)->initialize(); //must be called before getGUI |
|
|||
244 | QDockWidget* wdgt=ServicesToLoad.at(i)->getGUI(); |
|
|||
245 | if(wdgt) |
|
|||
246 | { |
|
|||
247 | wdgt->setAllowedAreas(Qt::AllDockWidgetAreas); |
|
|||
248 | this->addDockWidget(Qt::TopDockWidgetArea,wdgt); |
|
|||
249 | } |
|
|||
250 | PythonQt::self()->getMainModule().addObject(ServicesToLoad.at(i)->serviceName(),(QObject*)ServicesToLoad.at(i)); |
|
|||
251 | }*/ |
|
|||
252 | } |
|
198 | } | |
253 |
|
199 | |||
254 | MainWindow::~MainWindow() |
|
200 | MainWindow::~MainWindow() | |
255 | { |
|
201 | { | |
256 | } |
|
202 | } | |
257 |
|
203 | |||
258 |
|
||||
259 | void MainWindow::changeEvent(QEvent *e) |
|
204 | void MainWindow::changeEvent(QEvent *e) | |
260 | { |
|
205 | { | |
261 | QMainWindow::changeEvent(e); |
|
206 | QMainWindow::changeEvent(e); |
@@ -14,9 +14,6 Q_DECLARE_LOGGING_CATEGORY(LOG_VariableCacheController) | |||||
14 |
|
14 | |||
15 | class Variable; |
|
15 | class Variable; | |
16 |
|
16 | |||
17 | Q_DECLARE_LOGGING_CATEGORY(LOG_VariableCacheController) |
|
|||
18 |
|
||||
19 |
|
||||
20 | /// This class aims to store in the cache all of the dateTime already requested to the variable. |
|
17 | /// This class aims to store in the cache all of the dateTime already requested to the variable. | |
21 | class VariableCacheController : public QObject { |
|
18 | class VariableCacheController : public QObject { | |
22 | Q_OBJECT |
|
19 | Q_OBJECT |
@@ -251,7 +251,7 void VisualizationGraphWidget::onRangeChanged(const QCPRange &t1, const QCPRange | |||||
251 | if (variable->contains(variableDateTimeWithTolerance)) { |
|
251 | if (variable->contains(variableDateTimeWithTolerance)) { | |
252 | qCDebug(LOG_VisualizationGraphWidget()) |
|
252 | qCDebug(LOG_VisualizationGraphWidget()) | |
253 | << tr("TORM: Detection zoom in that need request:"); |
|
253 | << tr("TORM: Detection zoom in that need request:"); | |
254 |
// add |
|
254 | // add tolerance for each side | |
255 | tolerance |
|
255 | tolerance | |
256 | = toleranceFactor * (currentDateTime.m_TEnd - currentDateTime.m_TStart); |
|
256 | = toleranceFactor * (currentDateTime.m_TEnd - currentDateTime.m_TStart); | |
257 | variableDateTimeWithTolerance.m_TStart -= tolerance; |
|
257 | variableDateTimeWithTolerance.m_TStart -= tolerance; | |
@@ -286,7 +286,7 void VisualizationGraphWidget::onRangeChanged(const QCPRange &t1, const QCPRange | |||||
286 | } |
|
286 | } | |
287 | else { |
|
287 | else { | |
288 | qCDebug(LOG_VisualizationGraphWidget()) << tr("TORM: Detection zoom out: "); |
|
288 | qCDebug(LOG_VisualizationGraphWidget()) << tr("TORM: Detection zoom out: "); | |
289 |
// add |
|
289 | // add tolerance for each side | |
290 | tolerance = toleranceFactor * (currentDateTime.m_TEnd - currentDateTime.m_TStart); |
|
290 | tolerance = toleranceFactor * (currentDateTime.m_TEnd - currentDateTime.m_TStart); | |
291 | variableDateTimeWithTolerance.m_TStart -= tolerance; |
|
291 | variableDateTimeWithTolerance.m_TStart -= tolerance; | |
292 | variableDateTimeWithTolerance.m_TEnd += tolerance; |
|
292 | variableDateTimeWithTolerance.m_TEnd += tolerance; |
@@ -39,8 +39,7 QString dateFormat(double sqpDateTime) noexcept | |||||
39 |
|
39 | |||
40 | AmdaProvider::AmdaProvider() |
|
40 | AmdaProvider::AmdaProvider() | |
41 | { |
|
41 | { | |
42 |
qCDebug(LOG_ |
|
42 | qCDebug(LOG_AmdaProvider()) << tr("AmdaProvider::AmdaProvider") << QThread::currentThread(); | |
43 | << QThread::currentThread(); |
|
|||
44 | if (auto app = sqpApp) { |
|
43 | if (auto app = sqpApp) { | |
45 | auto &networkController = app->networkController(); |
|
44 | auto &networkController = app->networkController(); | |
46 | connect(this, SIGNAL(requestConstructed(QNetworkRequest, QUuid, |
|
45 | connect(this, SIGNAL(requestConstructed(QNetworkRequest, QUuid, |
General Comments 0
You need to be logged in to leave comments.
Login now