Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/10266_idr_instrument_common_to_all…
…_tabs Conflicts: Code/Mantid/MantidQt/CustomInterfaces/src/IndirectDataReduction.cpp Refs #10266
- Loading branch information
Showing
160 changed files
with
13,592 additions
and
2,706 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,48 @@ | ||
# Copyright (c) 2007, Simon Edwards <simon@simonzone.com> | ||
# Copyright (c) 2014, Raphael Kubo da Costa <rakuco@FreeBSD.org> | ||
# Redistribution and use is allowed according to the terms of the BSD license. | ||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file. | ||
|
||
import PyQt4.pyqtconfig | ||
import PyQt4.QtCore | ||
import os | ||
import sys | ||
|
||
pyqtcfg = PyQt4.pyqtconfig.Configuration() | ||
print("pyqt_version:%06.0x" % pyqtcfg.pyqt_version) | ||
print("pyqt_version_str:%s" % pyqtcfg.pyqt_version_str) | ||
|
||
pyqt_version_tag = "" | ||
in_t = False | ||
for item in pyqtcfg.pyqt_sip_flags.split(' '): | ||
if item=="-t": | ||
in_t = True | ||
elif in_t: | ||
if item.startswith("Qt_4"): | ||
pyqt_version_tag = item | ||
def get_default_sip_dir(): | ||
# This is based on QScintilla's configure.py, and only works for the | ||
# default case where installation paths have not been changed in PyQt's | ||
# configuration process. | ||
if sys.platform == 'win32': | ||
pyqt_sip_dir = os.path.join(sys.platform, 'sip', 'PyQt4') | ||
else: | ||
in_t = False | ||
print("pyqt_version_tag:%s" % pyqt_version_tag) | ||
pyqt_sip_dir = os.path.join(sys.platform, 'share', 'sip', 'PyQt4') | ||
return pyqt_sip_dir | ||
|
||
def get_qt4_tag(sip_flags): | ||
in_t = False | ||
for item in sip_flags.split(' '): | ||
if item == '-t': | ||
in_t = True | ||
elif in_t: | ||
if item.startswith('Qt_4'): | ||
return item | ||
else: | ||
in_t = False | ||
raise ValueError('Cannot find Qt\'s tag in PyQt4\'s SIP flags.') | ||
|
||
print("pyqt_sip_dir:%s" % pyqtcfg.pyqt_sip_dir) | ||
print("pyqt_sip_flags:%s" % pyqtcfg.pyqt_sip_flags) | ||
if __name__ == '__main__': | ||
try: | ||
import PyQt4.pyqtconfig | ||
pyqtcfg = PyQt4.pyqtconfig.Configuration() | ||
sip_dir = pyqtcfg.pyqt_sip_dir | ||
sip_flags = pyqtcfg.pyqt_sip_flags | ||
except ImportError: | ||
# PyQt4 >= 4.10.0 was built with configure-ng.py instead of | ||
# configure.py, so pyqtconfig.py is not installed. | ||
sip_dir = get_default_sip_dir() | ||
sip_flags = PyQt4.QtCore.PYQT_CONFIGURATION['sip_flags'] | ||
|
||
print('pyqt_version:%06.x' % PyQt4.QtCore.PYQT_VERSION) | ||
print('pyqt_version_str:%s' % PyQt4.QtCore.PYQT_VERSION_STR) | ||
print('pyqt_version_tag:%s' % get_qt4_tag(sip_flags)) | ||
print('pyqt_sip_dir:%s' % sip_dir) | ||
print('pyqt_sip_flags:%s' % sip_flags) |
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
52 changes: 52 additions & 0 deletions
52
Code/Mantid/Framework/API/inc/MantidAPI/SampleShapeValidator.h
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,52 @@ | ||
#ifndef MANTID_API_SAMPLESHAPEVALIDATOR_H_ | ||
#define MANTID_API_SAMPLESHAPEVALIDATOR_H_ | ||
|
||
#include "MantidAPI/DllConfig.h" | ||
#include "MantidAPI/ExperimentInfo.h" | ||
|
||
#include "MantidKernel/TypedValidator.h" | ||
|
||
namespace Mantid | ||
{ | ||
namespace API | ||
{ | ||
|
||
/** | ||
Verify that a workspace has valid sample shape. | ||
Copyright © 2014 ISIS Rutherford Appleton Laboratory | ||
& NScD Oak Ridge National Laboratory | ||
This file is part of Mantid. | ||
Mantid 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. | ||
Mantid 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 this program. If not, see <http://www.gnu.org/licenses/>. | ||
File change history is stored at: <https://github.com/mantidproject/mantid> | ||
Code Documentation is available at: <http://doxygen.mantidproject.org> | ||
*/ | ||
class MANTID_API_DLL SampleShapeValidator : | ||
public Kernel::TypedValidator<boost::shared_ptr<ExperimentInfo> > | ||
{ | ||
public: | ||
std::string getType() const; | ||
Kernel::IValidator_sptr clone() const; | ||
|
||
private: | ||
std::string checkValidity(const boost::shared_ptr<ExperimentInfo>& value) const; | ||
}; | ||
|
||
} // namespace API | ||
} // namespace Mantid | ||
|
||
#endif /* MANTID_API_SAMPLESHAPEVALIDATOR_H_ */ |
Oops, something went wrong.