Commit 0a7a24b0 authored by Maxime Calka's avatar Maxime Calka

Correct movement between interface

parent cf2fee56
......@@ -81,12 +81,12 @@ void ViewerCreationState::onExit(QEvent* event) {
void ViewerCreationState::viewerFinished() {
cancelled = false;
emit nextACS();
emit nextVCS();
}
void ViewerCreationState::viewerCancelled() {
cancelled = true;
emit nextACS();
emit nextVCS();
}
void ViewerCreationState::createSubStates(WizardMainWindow* mainWindow) {
......@@ -100,6 +100,8 @@ void ViewerCreationState::createSubStates(WizardMainWindow* mainWindow) {
viewerDescriptionState->addTransition(viewerDescriptionWidget, SIGNAL(next()), viewerSummaryState);
viewerSummaryState->addTransition(viewerSummaryWidget, SIGNAL(previous()), viewerDescriptionState);
QObject::connect(viewerDescriptionWidget, SIGNAL(cancel()), this, SLOT(viewerCancelled()));
QObject::connect(viewerSummaryWidget, SIGNAL(cancel()), this, SLOT(viewerCancelled()));
......
......@@ -68,7 +68,7 @@ public:
void resetDomViewerExtension(cepcoreschema::ViewerExtension* domViewerExtension);
signals:
void nextACS();
void nextVCS();
public slots:
virtual void viewerFinished();
......
......@@ -105,6 +105,4 @@ void ViewerDescriptionState::onExit(QEvent* event) {
}
domViewerExtension->viewer(*domViewer);
std::cout << domViewer->name() << std::endl;
std::cout << domViewer->description() << std::endl;
}
......@@ -501,6 +501,24 @@
<property name="spacing">
<number>1</number>
</property>
<item row="6" column="5">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QRadioButton" name="radioButton">
<property name="text">
<string>Embedded</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_2">
<property name="text">
<string>Docked</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="4">
<widget class="QLabel" name="viewerNameLabel">
<property name="font">
......@@ -572,6 +590,28 @@
</property>
</widget>
</item>
<item row="5" column="6">
<widget class="QLabel" name="viewerGoalStar">
<property name="minimumSize">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>20</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>*</string>
</property>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
</widget>
</item>
<item row="5" column="5">
<widget class="QPlainTextEdit" name="viewerGoalItself">
<property name="cursor" stdset="0">
......@@ -588,30 +628,24 @@
</property>
</widget>
</item>
<item row="4" column="6">
<widget class="QLabel" name="viewerNameStar">
<property name="minimumSize">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>20</width>
<height>16777215</height>
</size>
<item row="5" column="4">
<widget class="QLabel" name="viewerGoalLabel">
<property name="font">
<font>
<family>Sans Serif</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string>*</string>
<string> Goal(s) of your viewer: </string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
</widget>
</item>
<item row="5" column="6">
<widget class="QLabel" name="viewerGoalStar">
<item row="4" column="6">
<widget class="QLabel" name="viewerNameStar">
<property name="minimumSize">
<size>
<width>20</width>
......@@ -628,23 +662,7 @@
<string>*</string>
</property>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
</widget>
</item>
<item row="5" column="4">
<widget class="QLabel" name="viewerGoalLabel">
<property name="font">
<font>
<family>Sans Serif</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string> Goal(s) of your viewer: </string>
</property>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
......@@ -682,6 +700,26 @@
</property>
</widget>
</item>
<item row="6" column="4">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Type of your viewer:</string>
</property>
</widget>
</item>
<item row="7" column="4">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
......@@ -829,22 +867,6 @@
</hint>
</hints>
</connection>
<connection>
<sender>componentComboBox</sender>
<signal>currentIndexChanged(QString)</signal>
<receiver>ViewerDescriptionWidget</receiver>
<slot>componentChanged(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>491</x>
<y>381</y>
</hint>
<hint type="destinationlabel">
<x>494</x>
<y>417</y>
</hint>
</hints>
</connection>
<connection>
<sender>cancelPushButton</sender>
<signal>clicked()</signal>
......
......@@ -114,11 +114,10 @@ void ViewerExtensionCreationState::createSubStates(WizardMainWindow* mainWindow)
viewerExtensionSummaryState = new ExtensionSummaryState("Viewer Extension Summary", viewerExtensionSummaryWidget, "Viewer", mainWindow, this);
viewerExtensionDescriptionState->addTransition(viewerExtensionDescriptionWidget, SIGNAL(next()), viewerCreationState);
viewersCreationState->addTransition(viewersCreationWidget, SIGNAL(newViewer()), viewerCreationState);
viewersCreationState->addTransition(viewersCreationWidget, SIGNAL(next()), viewerExtensionDependenciesState);
viewersCreationState->addTransition(viewersCreationWidget, SIGNAL(previous()), viewerExtensionDescriptionState);
viewerCreationState->addTransition(viewerCreationState, SIGNAL(nextACS()), viewersCreationState);
viewerCreationState->addTransition(viewerCreationState, SIGNAL(nextVCS()), this);
viewerExtensionDependenciesState->addTransition(viewerExtensionDependenciesWidget, SIGNAL(previous()), viewersCreationState);
viewerExtensionDependenciesState->addTransition(viewerExtensionDependenciesWidget, SIGNAL(next()), viewerExtensionSummaryState);
......
......@@ -48,12 +48,10 @@ void ViewerSummaryState::resetViewer(cepcoreschema::Viewer* domViewer) {
void ViewerSummaryState::onEntry(QEvent* event) {
WizardState::onEntry(event);
std::cout << "Viewer Summary State on Entry" << std::endl;
auto* viewerSummaryWidget = dynamic_cast<ViewerSummaryWidget*>(widget);
if (viewerSummaryWidget != nullptr) {
if (domViewer != nullptr) {
std::cout << "domViewer non NULL" << std::endl;
QString name = domViewer->name().c_str();
QString description = domViewer->description().c_str();
......
......@@ -52,11 +52,6 @@ void ViewersCreationState::resetDomViewerExtension(cepcoreschema::ViewerExtensio
void ViewersCreationState::onEntry(QEvent* event) {
WizardState::onEntry(event);
std::cout << domViewerExtension->name() << std::endl;
std::cout << domViewerExtension->description() << std::endl;
std::cout << domViewerExtension->viewer().name() << std::endl;
std::cout << domViewerExtension->viewer().description() << std::endl;
}
void ViewersCreationState::onExit(QEvent* event) {
......
......@@ -57,7 +57,7 @@ void ViewersCreationWidget::nextButtonClicked() {
ui.label_Star->setStyleSheet(enhancedStyle);
// CCC Exception: Use a QMessageBox::warning instead of CAMITK_WARNING in the wizard
QMessageBox::warning(NULL, "Actions Creation Widget", "Please create at least one action in this ActionExtension\n");
QMessageBox::warning(NULL, "Viewers Creation Widget", "Please create at least default viewer in this ViewerExtension\n");
}
else {
ui.requiredLabel->setStyleSheet(normalStyle);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment