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

Grid editor #178

Open
wants to merge 63 commits into
base: master
Choose a base branch
from
Open

Grid editor #178

wants to merge 63 commits into from

Conversation

samo38
Copy link
Collaborator

@samo38 samo38 commented Feb 18, 2025

No description provided.

samo38 added 30 commits January 23, 2025 20:19
…ept for (ATTR_S, ATTR_K, ATTR_M) that needs pecial care to calculate the vbar.
…et. rearrange header files between cpp and h files.
…rom s,k,m. no garanty that mw remains constant
@samo38 samo38 requested a review from demeler February 18, 2025 21:06
@@ -348,7 +348,7 @@ class US_GUI_EXTERN US_BufferGui : public US_WidgetsDialog
//! Return the main values
//! \param density of the buffer
//! \param viscosity of the buffer
void valueChanged( double density, double viscosity );
void BufferDataChanged( double density, double viscosity );
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old signal is used in us_predict2

connect( buffer_dialog, SIGNAL( valueChanged ( double, double ) ),

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! it is updated with the new signal.

setWindowTitle( tr( "UltraScan 2DSA Grid Initialization Editor" ) );
setPalette( US_GuiSettings::frameColor() );

// validators
dValid = new QDoubleValidator(this);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
dValid = new QDoubleValidator(this);
dValid = new QDoubleValidator( this );
dValid->setLocale( QLocale::C );

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I applied this and only use it for buffer and viscosity values. I made a different way to check the minimum and maximum values.

{
QString value;
int pos = 0;
if ( label == "x_min" ) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the return dValid->validate(value, pos) == QValidator::Acceptable; is quite often repeated. Probably cleaner to move it out of the if-else if -else

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solved and replaced with a different approach.


} else if ( le_x_max->text().toDouble() <= le_x_min->text().toDouble() )
{
error_msg = tr("%1 \n\nMaximum value is less than or equal to the Minimum value!").
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in some other programs we automatically switch the values in such cases.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solved and replaced with a different approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants