Skip to content

Commit 1a12784

Browse files
committed
Ware dashboard in DevStudio
* added a tab in ware src widget for status information * associated status item with action in DevStudio for ware migration (references #1127)
1 parent d776793 commit 1a12784

17 files changed

+1242
-31
lines changed

CMake.in.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ SET(OFBUILD_CUSTOM_CMAKE_VERSION "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.
2323
SET(OPENFLUID_VERSION_MAJOR 2)
2424
SET(OPENFLUID_VERSION_MINOR 2)
2525
SET(OPENFLUID_VERSION_PATCH 0)
26-
SET(OPENFLUID_VERSION_STATUS "alpha88") # example: SET(OPENFLUID_VERSION_STATUS "rc1")
26+
SET(OPENFLUID_VERSION_STATUS "alpha89") # example: SET(OPENFLUID_VERSION_STATUS "rc1")
2727

2828
SET(OPENFLUID_VERSION_FULL "${OPENFLUID_VERSION_MAJOR}.${OPENFLUID_VERSION_MINOR}.${OPENFLUID_VERSION_PATCH}")
2929

src/openfluid/ui/waresdev/CMakeLists.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ SET(OPENFLUID_UI_WARESDEV_CPP WareSrcUIContainer.cpp
2121
WorkspaceDevDashboardDialog.cpp WorkspaceDevWaresWidget.cpp WorkspaceDevGitWidget.cpp WorkspaceDevActionsWidget.cpp
2222
WorkspaceDevProcessDialog.cpp
2323
CompletionProvider.cpp
24-
MigrationSetupDialog.cpp)
24+
MigrationSetupDialog.cpp
25+
WareDashboardStatusWidget.cpp
26+
GroupStatusMessagesWidget.cpp StatusButtonMessageWidget.cpp)
2527

2628
SET(OPENFLUID_UI_WARESDEV_HPP WareSrcUIContainer.hpp
2729
WareSrcMsgStream.hpp
@@ -47,7 +49,9 @@ SET(OPENFLUID_UI_WARESDEV_HPP WareSrcUIContainer.hpp
4749
WorkspaceDevProcessDialog.hpp
4850
CompletionProvider.hpp
4951
SignalMigrationListener.hpp
50-
MigrationSetupDialog.hpp)
52+
MigrationSetupDialog.hpp
53+
WareDashboardStatusWidget.hpp
54+
GroupStatusMessagesWidget.hpp StatusButtonMessageWidget.hpp)
5155

5256
QT5_WRAP_UI(OPENFLUID_UI_WARESDEV_UI WareSrcWidget.ui WareExplorerDialog.ui WareBuildOptionsWidget.ui WareBuildOptionsDialog.ui
5357
EmptyPage.ui CppPage.ui CMakeConfigPage.ui
@@ -56,7 +60,8 @@ QT5_WRAP_UI(OPENFLUID_UI_WARESDEV_UI WareSrcWidget.ui WareExplorerDialog.ui Ware
5660
WaresImportFilterWidget.ui WareGitDialog.ui WareshubJsonEditor.ui WareshubIssueDialog.ui
5761
WorkspaceDevProcessDialog.ui
5862
WorkspaceDevDashboardDialog.ui WorkspaceDevWaresWidget.ui WorkspaceDevGitWidget.ui
59-
MigrationSetupDialog.ui)
63+
MigrationSetupDialog.ui
64+
WareDashboardStatusWidget.ui GroupStatusMessagesWidget.ui StatusButtonMessageWidget.ui)
6065

6166

6267
#QT5_ADD_RESOURCES(OPENFLUID_UI_WARESDEV_RC resources/openfluiduiwaresdev.qrc)
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
/*
2+
3+
This file is part of OpenFLUID software
4+
Copyright(c) 2007, INRA - Montpellier SupAgro
5+
6+
7+
== GNU General Public License Usage ==
8+
9+
OpenFLUID is free software: you can redistribute it and/or modify
10+
it under the terms of the GNU General Public License as published by
11+
the Free Software Foundation, either version 3 of the License, or
12+
(at your option) any later version.
13+
14+
OpenFLUID is distributed in the hope that it will be useful,
15+
but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
GNU General Public License for more details.
18+
19+
You should have received a copy of the GNU General Public License
20+
along with OpenFLUID. If not, see <http://www.gnu.org/licenses/>.
21+
22+
23+
== Other Usage ==
24+
25+
Other Usage means a use of OpenFLUID that is inconsistent with the GPL
26+
license, and requires a written agreement between You and INRA.
27+
Licensees for Other Usage of OpenFLUID may use this file in accordance
28+
with the terms contained in the written agreement between You and INRA.
29+
30+
*/
31+
32+
33+
/**
34+
@file GroupStatusMessagesWidget.cpp
35+
36+
@author Jean-Christophe FABRE <jean-christophe.fabre@inra.fr>
37+
@author Armel THÖNI <armel.thoni@inrae.fr>
38+
*/
39+
40+
41+
#include <openfluid/ui/waresdev/GroupStatusMessagesWidget.hpp>
42+
#include <openfluid/ui/waresdev/StatusButtonMessageWidget.hpp>
43+
44+
#include "ui_GroupStatusMessagesWidget.h"
45+
46+
47+
namespace openfluid { namespace ui { namespace waresdev {
48+
49+
50+
GroupStatusMessagesWidget::GroupStatusMessagesWidget(const QString& Category, QWidget* Parent):
51+
QWidget(Parent), ui(new Ui::GroupStatusMessagesWidget)
52+
{
53+
ui->setupUi(this);
54+
55+
setVisible(false);
56+
57+
}
58+
59+
60+
// =====================================================================
61+
// =====================================================================
62+
63+
64+
GroupStatusMessagesWidget::~GroupStatusMessagesWidget()
65+
{
66+
delete ui;
67+
}
68+
69+
70+
// =====================================================================
71+
// =====================================================================
72+
73+
74+
void GroupStatusMessagesWidget::clear()
75+
{
76+
setVisible(false);
77+
while (QLayoutItem* item = layout()->takeAt(0))
78+
{
79+
if (item->widget())
80+
{
81+
delete item->widget();
82+
}
83+
delete item;
84+
}
85+
}
86+
87+
88+
// =====================================================================
89+
// =====================================================================
90+
91+
92+
void GroupStatusMessagesWidget::addMessage(openfluid::waresdev::WareSrcChecker::ReportingData::ReportingItem Item)
93+
{
94+
setVisible(true);
95+
StatusButtonMessageWidget* MessageWidget = new StatusButtonMessageWidget(Item);
96+
layout()->addWidget(MessageWidget);
97+
98+
// TOIMPL store widget in list (or in dedicated widget so that clear operation is easier)
99+
// TOIMPL fix message (dyn version?)
100+
101+
connect(MessageWidget, SIGNAL(actionTriggered(QString)), this, SIGNAL(actionTriggered(QString)));
102+
// TOIMPL disconnect at clear step (requires widget storage with info about signal)
103+
}
104+
105+
} } } // namespaces
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
/*
2+
3+
This file is part of OpenFLUID software
4+
Copyright(c) 2007, INRA - Montpellier SupAgro
5+
6+
7+
== GNU General Public License Usage ==
8+
9+
OpenFLUID is free software: you can redistribute it and/or modify
10+
it under the terms of the GNU General Public License as published by
11+
the Free Software Foundation, either version 3 of the License, or
12+
(at your option) any later version.
13+
14+
OpenFLUID is distributed in the hope that it will be useful,
15+
but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
GNU General Public License for more details.
18+
19+
You should have received a copy of the GNU General Public License
20+
along with OpenFLUID. If not, see <http://www.gnu.org/licenses/>.
21+
22+
23+
== Other Usage ==
24+
25+
Other Usage means a use of OpenFLUID that is inconsistent with the GPL
26+
license, and requires a written agreement between You and INRA.
27+
Licensees for Other Usage of OpenFLUID may use this file in accordance
28+
with the terms contained in the written agreement between You and INRA.
29+
30+
*/
31+
32+
33+
/**
34+
@file GroupStatusMessagesWidget.hpp
35+
36+
@author Jean-Christophe FABRE <jean-christophe.fabre@inra.fr>
37+
@author Armel THÖNI <armel.thoni@inrae.fr>
38+
*/
39+
40+
41+
#ifndef __OPENFLUID_UIWARESDEV_GROUPSTATUSMESSAGESWIDGET_HPP__
42+
#define __OPENFLUID_UIWARESDEV_GROUPSTATUSMESSAGESWIDGET_HPP__
43+
44+
45+
#include <QWidget>
46+
47+
#include <openfluid/waresdev/WareSrcChecker.hpp>
48+
49+
50+
namespace Ui
51+
{
52+
class GroupStatusMessagesWidget;
53+
}
54+
55+
56+
namespace openfluid { namespace ui { namespace waresdev {
57+
58+
class GroupStatusMessagesWidget : public QWidget
59+
{
60+
Q_OBJECT;
61+
62+
private:
63+
64+
Ui::GroupStatusMessagesWidget* ui;
65+
66+
67+
signals:
68+
69+
void actionTriggered(const QString& ActionCode);
70+
71+
72+
public:
73+
74+
GroupStatusMessagesWidget(const QString& Category, QWidget* Parent = nullptr);
75+
76+
~GroupStatusMessagesWidget();
77+
78+
void clear();
79+
80+
void addMessage(openfluid::waresdev::WareSrcChecker::ReportingData::ReportingItem Item);
81+
82+
};
83+
84+
85+
} } } // namespaces
86+
87+
88+
#endif /* __OPENFLUID_UIWARESDEV_GROUPSTATUSMESSAGESWIDGET_HPP__ */
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ui version="4.0">
3+
<class>GroupStatusMessagesWidget</class>
4+
<widget class="QWidget" name="GroupStatusMessagesWidget">
5+
<property name="geometry">
6+
<rect>
7+
<x>0</x>
8+
<y>0</y>
9+
<width>114</width>
10+
<height>19</height>
11+
</rect>
12+
</property>
13+
<property name="sizePolicy">
14+
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
15+
<horstretch>0</horstretch>
16+
<verstretch>0</verstretch>
17+
</sizepolicy>
18+
</property>
19+
<property name="windowTitle">
20+
<string notr="true">Form</string>
21+
</property>
22+
<layout class="QVBoxLayout" name="verticalLayout" stretch="">
23+
<property name="spacing">
24+
<number>2</number>
25+
</property>
26+
<property name="leftMargin">
27+
<number>0</number>
28+
</property>
29+
<property name="topMargin">
30+
<number>0</number>
31+
</property>
32+
<property name="rightMargin">
33+
<number>0</number>
34+
</property>
35+
<property name="bottomMargin">
36+
<number>0</number>
37+
</property>
38+
</layout>
39+
</widget>
40+
<resources/>
41+
<connections/>
42+
</ui>

src/openfluid/ui/waresdev/SignalMigrationListener.hpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848
#include <openfluid/tools/Console.hpp>
4949

5050

51+
namespace openfluid { namespace ui { namespace waresdev {
52+
53+
5154
class SignalMigrationListener : public QObject, public openfluid::waresdev::WareSrcMigratorListener
5255
{
5356
Q_OBJECT;
@@ -246,4 +249,7 @@ class SignalMigrationListener : public QObject, public openfluid::waresdev::Ware
246249
};
247250

248251

249-
#endif /* __OPENFLUID_UIWARESDEV_SIGNALMIGRATIONLISTENER_HPP__ */
252+
} } } // namespaces
253+
254+
255+
#endif /* __OPENFLUID_UIWARESDEV_SIGNALMIGRATIONLISTENER_HPP__ */

0 commit comments

Comments
 (0)