-
Notifications
You must be signed in to change notification settings - Fork 6
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
base: master
Are you sure you want to change the base?
Grid editor #178
Conversation
…n the header file.
…ept for (ATTR_S, ATTR_K, ATTR_M) that needs pecial care to calculate the vbar.
…tting when make new grid is pressed
…et. rearrange header files between cpp and h files.
…rom s,k,m. no garanty that mw remains constant
…(double, double). Renamed it to a different name from valueChanged(US_Buffer)
… in the grid_editor program
… at different temperature
@@ -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 ); |
There was a problem hiding this comment.
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 ) ), |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dValid = new QDoubleValidator(this); | |
dValid = new QDoubleValidator( this ); | |
dValid->setLocale( QLocale::C ); |
There was a problem hiding this comment.
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" ) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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!"). |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
… type checking. refine temp plot function
… new way is to sort all points by their x values, then sort them by their local row index inside the their partial grids. This way produces a better dirtributed subgrid points over partial grids.
No description provided.