-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs #4328 Functionality for setting the UB Matrix
- Loading branch information
1 parent
0a96987
commit d30a861
Showing
11 changed files
with
187 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,4 +87,4 @@ namespace CustomInterfaces | |
} | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
Code/Mantid/MantidQt/CustomInterfaces/src/WorkspaceMemento.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#include "MantidQtCustomInterfaces/WorkspaceMemento.h" | ||
|
||
namespace MantidQt | ||
{ | ||
namespace CustomInterfaces | ||
{ | ||
/// Constructor | ||
WorkspaceMemento::WorkspaceMemento() | ||
{ | ||
} | ||
|
||
/** | ||
Common implementation of report generation. | ||
@param ws : workspace to report on. | ||
*/ | ||
void WorkspaceMemento::generateReport(Mantid::API::MatrixWorkspace_sptr ws) | ||
{ | ||
Status status; | ||
if(!ws->sample().hasOrientedLattice()) | ||
{ | ||
status = NoOrientedLattice; | ||
} | ||
else | ||
{ | ||
status = Ready; | ||
} | ||
interpretStatus(status); | ||
} | ||
|
||
/* | ||
Setter for the status report. | ||
*/ | ||
void WorkspaceMemento::setReport(const Status status) | ||
{ | ||
interpretStatus(status); | ||
} | ||
|
||
/* | ||
Helper method for extracting friendly messages from status enum. | ||
Single point for providing messages. | ||
*/ | ||
void WorkspaceMemento::interpretStatus(const Status status) | ||
{ | ||
std::string msg; | ||
if(status == NoOrientedLattice) | ||
{ | ||
msg = "Has no Oriented Lattice"; | ||
} | ||
else | ||
{ | ||
msg = "Ready!"; | ||
} | ||
m_statusReport = msg; | ||
} | ||
|
||
} | ||
} |
Oops, something went wrong.