Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve UI signature #1307

Merged
merged 2 commits into from
Mar 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMake.in.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SET(OFBUILD_CUSTOM_CMAKE_VERSION "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.
SET(OPENFLUID_VERSION_MAJOR 2)
SET(OPENFLUID_VERSION_MINOR 2)
SET(OPENFLUID_VERSION_PATCH 0)
SET(OPENFLUID_VERSION_STATUS "beta9") # example: SET(OPENFLUID_VERSION_STATUS "rc1")
SET(OPENFLUID_VERSION_STATUS "beta10") # example: SET(OPENFLUID_VERSION_STATUS "rc1")

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

Expand Down
2 changes: 1 addition & 1 deletion doc/contents/dev_signature.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[TOC]

Since OpenFLUID 2.2.0, the signature is defined in a dedicated file called "openfluid-ware.json". It is located at the root of the simulator directory.
**It is advised to use DevStudio dialog "Edit signature" to edit its information instead of working directly with json content.**
**It is advised to use DevStudio dialog via "Signature" button to edit its information instead of working directly with json content.**
This file contains the same information than before but in a tree structure:
```json
{
Expand Down
263 changes: 127 additions & 136 deletions resources/translations/openfluid-fr_FR.ts

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/openfluid/ui/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SET(OPENFLUID_UI_COMMON_CPP AppMainWindow.cpp OpenFLUIDDialog.cpp
RunCLISimulationDialog.cpp
SignatureDataEditorWidget.cpp
SignatureEditorWidget.cpp EditSignatureDialog.cpp
ClickableLabel.cpp ActionLabel.cpp ElidedLabel.cpp
ClickableLabel.cpp ActionLabel.cpp ElidedLabel.cpp FocusWheelComboBox.cpp
TagLabel.cpp StatusIconLabel.cpp ExecutionStatusLabel.cpp
FocusableLineEdit.cpp
ShortcutCompleter.cpp
Expand All @@ -28,7 +28,7 @@ SET(OPENFLUID_UI_COMMON_HPP AppMainWindow.hpp OpenFLUIDDialog.hpp
SignatureDataEditorWidget.hpp
SignatureEditorWidget.hpp EditSignatureDialog.hpp
DefaultAction.hpp
ClickableLabel.hpp ActionLabel.hpp ElidedLabel.hpp
ClickableLabel.hpp ActionLabel.hpp ElidedLabel.hpp FocusWheelComboBox.hpp
TagLabel.hpp StatusIconLabel.hpp ExecutionStatusLabel.hpp
FocusableLineEdit.hpp
ShortcutCompleter.hpp
Expand Down
73 changes: 73 additions & 0 deletions src/openfluid/ui/common/FocusWheelComboBox.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/*

This file is part of OpenFLUID software
Copyright(c) 2007, INRA - Montpellier SupAgro


== GNU General Public License Usage ==

OpenFLUID is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

OpenFLUID is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with OpenFLUID. If not, see <http://www.gnu.org/licenses/>.


== Other Usage ==

Other Usage means a use of OpenFLUID that is inconsistent with the GPL
license, and requires a written agreement between You and INRA.
Licensees for Other Usage of OpenFLUID may use this file in accordance
with the terms contained in the written agreement between You and INRA.

*/


/**
@file FocusWheelComboBox.cpp

@author Armel THÖNI <armel.thoni@inrae.fr>
*/


#include <QMouseEvent>

#include <openfluid/ui/common/FocusWheelComboBox.hpp>


namespace openfluid { namespace ui { namespace common {


FocusWheelComboBox::FocusWheelComboBox(QWidget* Parent) :
QComboBox(Parent)
{
this->setFocusPolicy(Qt::StrongFocus);
}


// =====================================================================
// =====================================================================


void FocusWheelComboBox::wheelEvent(QWheelEvent* Event)
{
if (hasFocus())
{
QComboBox::wheelEvent(Event);
}
else
{
Event->ignore(); // transmit wheel event to parent instead of applying it at combobox level
}
}


} } } // namespaces

74 changes: 74 additions & 0 deletions src/openfluid/ui/common/FocusWheelComboBox.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/*

This file is part of OpenFLUID software
Copyright(c) 2007, INRA - Montpellier SupAgro


== GNU General Public License Usage ==

OpenFLUID is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

OpenFLUID is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with OpenFLUID. If not, see <http://www.gnu.org/licenses/>.


== Other Usage ==

Other Usage means a use of OpenFLUID that is inconsistent with the GPL
license, and requires a written agreement between You and INRA.
Licensees for Other Usage of OpenFLUID may use this file in accordance
with the terms contained in the written agreement between You and INRA.

*/


/**
@file FocusWheelComboBox.hpp

@author Armel THÖNI <armel.thoni@inrae.fr>
*/


#ifndef __OPENFLUID_UICOMMON_FOCUSWHEELCOMBOBOX_HPP__
#define __OPENFLUID_UICOMMON_FOCUSWHEELCOMBOBOX_HPP__


#include <QComboBox>

#include <openfluid/dllexport.hpp>


namespace openfluid { namespace ui { namespace common {


class OPENFLUID_API FocusWheelComboBox : public QComboBox
{
// For combobox in scroll areas, to avoid changing combobox content during wheel event when not intended
Q_OBJECT;

protected:

void wheelEvent(QWheelEvent* Event);


public:

explicit FocusWheelComboBox(QWidget* Parent = nullptr);

virtual ~FocusWheelComboBox()
{ }

};

} } } // namespaces


#endif /* __OPENFLUID_UICOMMON_FOCUSWHEELCOMBOBOX_HPP__ */
Loading
Loading