Skip to content

Commit

Permalink
Refs #8677. Set appropriate cursor while waiting.
Browse files Browse the repository at this point in the history
So that user is aware that something is happening.
  • Loading branch information
arturbekasov committed Jan 14, 2014
1 parent 208eed3 commit f1fd53a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Expand Up @@ -119,6 +119,9 @@ namespace MantidWidgets
/// Update control button enabled status depending on the new state.
void updateControlEnabled(DialogState newState);

/// Update cursor depending on the new state of the dialog.
void updateCursor(DialogState newState);

/// Start fitting process
void startFit();

Expand Down
23 changes: 23 additions & 0 deletions Code/Mantid/MantidQt/MantidWidgets/src/MuonSequentialFitDialog.cpp
Expand Up @@ -51,6 +51,8 @@ namespace MantidWidgets
this, SLOT( updateInputEnabled(DialogState) ) );
connect( this, SIGNAL( stateChanged(DialogState) ),
this, SLOT( updateControlEnabled(DialogState) ) );
connect( this, SIGNAL( stateChanged(DialogState) ),
this, SLOT( updateCursor(DialogState) ) );
}

/**
Expand Down Expand Up @@ -251,6 +253,27 @@ namespace MantidWidgets

}

/**
* Update cursor depending on the new state of the dialog.
* Waiting cursor is displayed while preparing so that user does now that something is happening.
* @param newState :: New state of the dialog
*/
void MuonSequentialFitDialog::updateCursor(DialogState newState)
{
switch(newState)
{
case Preparing:
setCursor(Qt::WaitCursor);
break;
case Running:
setCursor(Qt::BusyCursor);
break;
default:
unsetCursor();
break;
}
}

/**
* Start fitting process.
*/
Expand Down

0 comments on commit f1fd53a

Please sign in to comment.