Commit c61e2490 authored by Roman Tolchenov's avatar Roman Tolchenov
Browse files

Moved QtPropertyBrowser to Qt Common.

parent 78a65077
......@@ -124,13 +124,6 @@ endif()
###########################################################################
find_package ( GSL REQUIRED )
###########################################################################
# Add QtPropertyBrowser to build
###########################################################################
if (ENABLE_MANTIDPLOT)
add_subdirectory ( QtPropertyBrowser )
endif(ENABLE_MANTIDPLOT)
###########################################################################
# Now add in all the components
###########################################################################
......
Nokia Qt LGPL Exception version 1.0
As a special exception to the GNU Lesser General Public License
version 2.1, the object code form of a "work that uses the Library"
may incorporate material from a header file that is part of the
Library. You may distribute such object code under terms of your
choice, provided that the incorporated material (i) does not exceed
more than 5% of the total size of the Library; and (ii) is limited to
numerical parameters, data structure layouts, accessors, macros,
inline functions and templates.
This diff is collapsed.
This diff is collapsed.
Property Browser v2.5
A property browser framework enabling the user to edit a set of
properties.
The framework provides a browser widget that displays the given
properties with labels and corresponding editing widgets (e.g.
line edits or comboboxes). The various types of editing widgets
are provided by the framework's editor factories: For each
property type, the framework provides a property manager (e.g.
QtIntPropertyManager and QtStringPropertyManager) which can be
associated with the preferred editor factory (e.g.
QtSpinBoxFactory and QtLineEditFactory). The framework also
provides a variant based property type with corresponding variant
manager and factory. Finally, the framework provides three
ready-made implementations of the browser widget:
QtTreePropertyBrowser, QtButtonPropertyBrowser and
QtGroupBoxPropertyBrowser.
......@@ -83,12 +83,10 @@
src/DisplayCurveFit.cpp
src/DoubleSpinBox.cpp
src/ErrorCurve.cpp
src/FilenameDialogEditor.cpp
src/FindDialog.cpp
src/FindReplaceDialog.cpp
src/FitOptionsBrowser.cpp
src/FitPropertyBrowser.cpp
src/FormulaDialogEditor.cpp
src/FunctionBrowser.cpp
src/HintingLineEdit.cpp
src/IndirectInstrumentConfig.cpp
......@@ -126,13 +124,29 @@
src/SlitCalculator.cpp
src/TrackedAction.cpp
src/UserFunctionDialog.cpp
src/WorkspaceEditorFactory.cpp
src/WorkspacePresenter/ADSAdapter.cpp
src/WorkspacePresenter/QWorkspaceDockView.cpp
src/WorkspacePresenter/WorkspacePresenter.cpp
src/WorkspaceSelector.cpp
src/pqHelpWindow.cxx
src/pythonCalc.cpp
src/QtPropertyBrowser/qtpropertybrowser.cpp
src/QtPropertyBrowser/qtpropertymanager.cpp
src/QtPropertyBrowser/qteditorfactory.cpp
src/QtPropertyBrowser/qtvariantproperty.cpp
src/QtPropertyBrowser/qttreepropertybrowser.cpp
src/QtPropertyBrowser/qtbuttonpropertybrowser.cpp
src/QtPropertyBrowser/qtgroupboxpropertybrowser.cpp
src/QtPropertyBrowser/qtpropertybrowserutils.cpp
src/QtPropertyBrowser/DoubleDialogEditor.cpp
src/QtPropertyBrowser/DoubleEditorFactory.cpp
src/QtPropertyBrowser/FilenameDialogEditor.cpp
src/QtPropertyBrowser/FormulaDialogEditor.cpp
src/QtPropertyBrowser/ParameterPropertyManager.cpp
src/QtPropertyBrowser/StringDialogEditor.cpp
src/QtPropertyBrowser/StringEditorFactory.cpp
src/QtPropertyBrowser/WorkspaceEditorFactory.cpp
)
set ( MOC_FILES
......@@ -180,8 +194,6 @@ set ( MOC_FILES
inc/MantidQtWidgets/Common/DiagResults.h
inc/MantidQtWidgets/Common/DisplayCurveFit.h
inc/MantidQtWidgets/Common/DoubleSpinBox.h
inc/MantidQtWidgets/Common/FilenameDialogEditor.h
inc/MantidQtWidgets/Common/FormulaDialogEditor.h
inc/MantidQtWidgets/Common/FindReplaceDialog.h
inc/MantidQtWidgets/Common/FindDialog.h
inc/MantidQtWidgets/Common/FitPropertyBrowser.h
......@@ -222,11 +234,19 @@ set ( MOC_FILES
inc/MantidQtWidgets/Common/SlitCalculator.h
inc/MantidQtWidgets/Common/TrackedAction.h
inc/MantidQtWidgets/Common/UserFunctionDialog.h
inc/MantidQtWidgets/Common/WorkspaceEditorFactory.h
inc/MantidQtWidgets/Common/WorkspaceSelector.h
inc/MantidQtWidgets/Common/LineEditWithClear.h
inc/MantidQtWidgets/Common/LogValueSelector.h
inc/MantidQtWidgets/Common/WorkspacePresenter/QWorkspaceDockView.h
inc/MantidQtWidgets/Common/QtPropertyBrowser/ButtonEditorFactory.h
inc/MantidQtWidgets/Common/QtPropertyBrowser/DoubleEditorFactory.h
inc/MantidQtWidgets/Common/QtPropertyBrowser/DoubleDialogEditor.h
inc/MantidQtWidgets/Common/QtPropertyBrowser/FormulaDialogEditor.h
inc/MantidQtWidgets/Common/QtPropertyBrowser/FilenameDialogEditor.h
inc/MantidQtWidgets/Common/QtPropertyBrowser/ParameterPropertyManager.h
inc/MantidQtWidgets/Common/QtPropertyBrowser/StringDialogEditor.h
inc/MantidQtWidgets/Common/QtPropertyBrowser/StringEditorFactory.h
inc/MantidQtWidgets/Common/QtPropertyBrowser/WorkspaceEditorFactory.h
)
# Include files aren't required, but this makes them appear in Visual Studio
......@@ -413,15 +433,110 @@ set( TEST_FILES
WorkspacePresenter/ADSAdapterTest.h
WorkspacePresenter/WorkspacePresenterTest.h
)
# moc'd files will end up in build directory, so add to include path
include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
# Need to use a string of calls to the qt4_generate_moc macro
# instead of qt4_wrap_cpp because the latter produces files with
# a cxx suffix when QtPropertyBrowser requires cpp
qt4_generate_moc (
inc/MantidQtWidgets/Common/QtPropertyBrowser/qtpropertybrowser.h
${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertybrowser.cpp
)
qt4_generate_moc (
inc/MantidQtWidgets/Common/QtPropertyBrowser/qtpropertymanager.h
${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertymanager.cpp
)
qt4_generate_moc (
inc/MantidQtWidgets/Common/QtPropertyBrowser/qteditorfactory.h
${CMAKE_CURRENT_BINARY_DIR}/moc_qteditorfactory.cpp
)
qt4_generate_moc (
inc/MantidQtWidgets/Common/QtPropertyBrowser/qtvariantproperty.h
${CMAKE_CURRENT_BINARY_DIR}/moc_qtvariantproperty.cpp
)
qt4_generate_moc (
inc/MantidQtWidgets/Common/QtPropertyBrowser/qttreepropertybrowser.h
${CMAKE_CURRENT_BINARY_DIR}/moc_qttreepropertybrowser.cpp
)
qt4_generate_moc (
inc/MantidQtWidgets/Common/QtPropertyBrowser/qtbuttonpropertybrowser.h
${CMAKE_CURRENT_BINARY_DIR}/moc_qtbuttonpropertybrowser.cpp
)
qt4_generate_moc (
inc/MantidQtWidgets/Common/QtPropertyBrowser/qtgroupboxpropertybrowser.h
${CMAKE_CURRENT_BINARY_DIR}/moc_qtgroupboxpropertybrowser.cpp
)
qt4_generate_moc (
src/QtPropertyBrowser/qtpropertymanager.cpp
${CMAKE_CURRENT_BINARY_DIR}/qtpropertymanager.moc
)
qt4_generate_moc (
src/QtPropertyBrowser/qteditorfactory.cpp
${CMAKE_CURRENT_BINARY_DIR}/qteditorfactory.moc
)
qt4_generate_moc (
src/QtPropertyBrowser/qttreepropertybrowser.cpp
${CMAKE_CURRENT_BINARY_DIR}/qttreepropertybrowser.moc
)
set (
QTPROPERTYBROWSER_HEADERS_ONLY_MOC
${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertybrowser.cpp
${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertymanager.cpp
${CMAKE_CURRENT_BINARY_DIR}/moc_qteditorfactory.cpp
${CMAKE_CURRENT_BINARY_DIR}/moc_qtvariantproperty.cpp
${CMAKE_CURRENT_BINARY_DIR}/moc_qttreepropertybrowser.cpp
${CMAKE_CURRENT_BINARY_DIR}/moc_qtbuttonpropertybrowser.cpp
${CMAKE_CURRENT_BINARY_DIR}/moc_qtgroupboxpropertybrowser.cpp
${CMAKE_CURRENT_BINARY_DIR}/qtpropertymanager.moc
${CMAKE_CURRENT_BINARY_DIR}/qteditorfactory.moc
${CMAKE_CURRENT_BINARY_DIR}/qttreepropertybrowser.moc
)
set_source_files_properties (
${QTPROPERTYBROWSER_HEADERS_ONLY_MOC}
PROPERTIES
HEADER_FILE_ONLY true
)
qt4_generate_moc (
inc/MantidQtWidgets/Common/QtPropertyBrowser/qtpropertybrowserutils_p.h
${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertybrowserutils_p.cpp
)
set (
QTPROPERTYBROWSER_HEADERS_MOC
${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertybrowserutils_p.cpp
)
set (
QTPROPERTYBROWSER_MOC
${QTPROPERTYBROWSER_HEADERS_MOC}
${QTPROPERTYBROWSER_HEADERS_ONLY_MOC}
${EXTRA_MOCS}
)
find_package (Qt4 REQUIRED QtHelp QtWebKit QtNetwork QUIET)
include(${QT_USE_FILE})
qt4_wrap_cpp ( MOCCED_FILES ${MOC_FILES} )
set ( ALL_SRC ${SRC_FILES} ${MOCCED_FILES} )
set ( ALL_SRC
${SRC_FILES}
${MOCCED_FILES}
${QTPROPERTYBROWSER_MOC}
${QTPROPERTYBROWSER_SRCS}
${QTPROPERTYBROWSER_RESOURCES})
qt4_wrap_ui ( UI_HDRS ${UI_FILES} )
if(MAKE_VATES AND ParaView_FOUND)
include( ${PARAVIEW_USE_FILE} )
endif()
include_directories ( ${QSCINTILLA_INCLUDE_DIR} )
add_definitions ( -DQSCINTILLA_DLL ) # Will only have an effect on Windows (as is desired)
# Python includes
include_directories ( ${PYTHON_INCLUDE_PATH})
if(MAKE_VATES AND ParaView_FOUND)
......@@ -439,7 +554,7 @@ endif ()
target_link_libraries ( qtwidgetscommon LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME}
${CORE_MANTIDLIBS} ${QT_LIBRARIES} ${QWT_LIBRARIES}
${POCO_LIBRARIES} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES}
${POCO_LIBRARIES} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} ${QSCINTILLA_LIBRARIES}
)
if(MAKE_VATES AND ParaView_FOUND)
......
......@@ -3,7 +3,7 @@
#include "MantidKernel/System.h"
#include "MantidAPI/AlgorithmFactory.h"
#include "WidgetDllOption.h"
#include "DllOption.h"
#include <vector>
#include <Poco/NObserver.h>
......@@ -44,7 +44,7 @@ struct SelectedAlgorithm {
@date 2012-03-06
*/
class EXPORT_OPT_MANTIDQT_MANTIDWIDGETS AlgorithmSelectorWidget
class EXPORT_OPT_MANTIDQT_COMMON AlgorithmSelectorWidget
: public QWidget {
Q_OBJECT
Q_PROPERTY(bool showExecuteButton READ showExecuteButton WRITE
......
......@@ -2,11 +2,11 @@
#define MANTIDQTWIDGETS_CATALOGHELPER_H_
#include "MantidAPI/AlgorithmManager.h"
#include "WidgetDllOption.h"
#include "DllOption.h"
namespace MantidQt {
namespace MantidWidgets {
class EXPORT_OPT_MANTIDQT_MANTIDWIDGETS CatalogHelper {
class EXPORT_OPT_MANTIDQT_COMMON CatalogHelper {
public:
/// Obtain the list of instruments that are available for the given session
......
......@@ -2,7 +2,7 @@
#define MANTIDQTWIDGETS_CATALOGSEARCH_H_
#include "ui_CatalogSearch.h"
#include "WidgetDllOption.h"
#include "DllOption.h"
#include "MantidAPI/ITableWorkspace.h"
#include "MantidQtWidgets/Common/CatalogHelper.h"
#include "MantidQtWidgets/Common/CatalogSelector.h"
......@@ -41,7 +41,7 @@ namespace MantidWidgets {
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class EXPORT_OPT_MANTIDQT_MANTIDWIDGETS CatalogSearch : public QWidget {
class EXPORT_OPT_MANTIDQT_COMMON CatalogSearch : public QWidget {
Q_OBJECT
public:
......
......@@ -2,11 +2,11 @@
#define MANTIDQTWIDGETS_CATALOGSELECTOR_H_
#include "ui_CatalogSelector.h"
#include "WidgetDllOption.h"
#include "DllOption.h"
namespace MantidQt {
namespace MantidWidgets {
class EXPORT_OPT_MANTIDQT_MANTIDWIDGETS CatalogSelector : public QWidget {
class EXPORT_OPT_MANTIDQT_COMMON CatalogSelector : public QWidget {
Q_OBJECT
public:
......
#ifndef MANTIDQTWIDGETS_CHECKBOXHEADER_H_
#define MANTIDQTWIDGETS_CHECKBOXHEADER_H_
#include "WidgetDllOption.h"
#include "DllOption.h"
#include <QHeaderView>
#include <QMouseEvent>
......@@ -38,7 +38,7 @@ namespace MantidWidgets {
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class EXPORT_OPT_MANTIDQT_MANTIDWIDGETS CheckboxHeader : public QHeaderView {
class EXPORT_OPT_MANTIDQT_COMMON CheckboxHeader : public QHeaderView {
Q_OBJECT
public:
......
......@@ -2,7 +2,7 @@
#define MANTID_MANTIDWIDGETS_COLORBARWIDGET_H_
#include "MantidQtWidgets/Common/MantidColorMap.h"
#include "MantidQtWidgets/Common/WidgetDllOption.h"
#include "MantidQtWidgets/Common/DllOption.h"
#include "ui_ColorBarWidget.h"
#include <QtGui/QWidget>
#include <QtGui>
......@@ -37,7 +37,7 @@ signals:
* @author Janik Zikovsky
* @date Oct 31, 2011.
*/
class EXPORT_OPT_MANTIDQT_MANTIDWIDGETS ColorBarWidget : public QWidget {
class EXPORT_OPT_MANTIDQT_COMMON ColorBarWidget : public QWidget {
Q_OBJECT
Q_PROPERTY(double minimum READ getMinimum WRITE setMinimum)
Q_PROPERTY(double maximum READ getMaximum WRITE setMaximum)
......
......@@ -3,7 +3,7 @@
#include "MantidAPI/ITableWorkspace_fwd.h"
#include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorWhiteList.h"
#include "MantidQtWidgets/Common/WidgetDllOption.h"
#include "MantidQtWidgets/Common/DllOption.h"
#include <QAbstractItemModel>
#include <QColor>
......@@ -37,7 +37,7 @@ 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 EXPORT_OPT_MANTIDQT_MANTIDWIDGETS AbstractDataProcessorTreeModel
class EXPORT_OPT_MANTIDQT_COMMON AbstractDataProcessorTreeModel
: public QAbstractItemModel {
Q_OBJECT
public:
......
......@@ -3,7 +3,7 @@
#include "MantidKernel/make_unique.h"
#include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorCommand.h"
#include "MantidQtWidgets/Common/WidgetDllOption.h"
#include "MantidQtWidgets/Common/DllOption.h"
#include <QObject>
#include <memory>
#include <qmenu.h>
......@@ -42,7 +42,7 @@ 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 EXPORT_OPT_MANTIDQT_MANTIDWIDGETS DataProcessorCommandAdapter
class EXPORT_OPT_MANTIDQT_COMMON DataProcessorCommandAdapter
: public QObject {
Q_OBJECT
public:
......
......@@ -2,7 +2,7 @@
#define MANTIDQTMANTIDWIDGETS_DATAPROCESSORONELEVELTREEMANAGER_H
#include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorTreeManager.h"
#include "MantidQtWidgets/Common/WidgetDllOption.h"
#include "MantidQtWidgets/Common/DllOption.h"
namespace MantidQt {
namespace MantidWidgets {
......@@ -38,7 +38,7 @@ 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 EXPORT_OPT_MANTIDQT_MANTIDWIDGETS DataProcessorOneLevelTreeManager
class EXPORT_OPT_MANTIDQT_COMMON DataProcessorOneLevelTreeManager
: public DataProcessorTreeManager {
public:
/// Constructor
......
#ifndef MANTIDQTMANTIDWIDGETS_DATAPROCESSORPOSTPROCESSINGALGORITHM_H
#define MANTIDQTMANTIDWIDGETS_DATAPROCESSORPOSTPROCESSINGALGORITHM_H
#include "MantidQtWidgets/Common/WidgetDllOption.h"
#include "MantidQtWidgets/Common/DllOption.h"
#include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorProcessingAlgorithmBase.h"
#include <QString>
......@@ -34,7 +34,7 @@ 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 EXPORT_OPT_MANTIDQT_MANTIDWIDGETS DataProcessorPostprocessingAlgorithm
class EXPORT_OPT_MANTIDQT_COMMON DataProcessorPostprocessingAlgorithm
: public DataProcessorProcessingAlgorithmBase {
public:
// Constructor
......
#ifndef MANTIDQTMANTIDWIDGETS_DATAPROCESSORPREPROCESSMAP_H
#define MANTIDQTMANTIDWIDGETS_DATAPROCESSORPREPROCESSMAP_H
#include "MantidQtWidgets/Common/WidgetDllOption.h"
#include "MantidQtWidgets/Common/DllOption.h"
#include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorPreprocessingAlgorithm.h"
#include <map>
......@@ -36,7 +36,7 @@ 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 EXPORT_OPT_MANTIDQT_MANTIDWIDGETS DataProcessorPreprocessMap {
class EXPORT_OPT_MANTIDQT_COMMON DataProcessorPreprocessMap {
public:
// Default constructor
DataProcessorPreprocessMap();
......
......@@ -2,7 +2,7 @@
#define MANTIDQTMANTIDWIDGETS_DATAPROCESSORPREPROCESSINGALGORITHM_H
#include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorProcessingAlgorithmBase.h"
#include "MantidQtWidgets/Common/WidgetDllOption.h"
#include "MantidQtWidgets/Common/DllOption.h"
namespace MantidQt {
namespace MantidWidgets {
......@@ -33,7 +33,7 @@ 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 EXPORT_OPT_MANTIDQT_MANTIDWIDGETS DataProcessorPreprocessingAlgorithm
class EXPORT_OPT_MANTIDQT_COMMON DataProcessorPreprocessingAlgorithm
: public DataProcessorProcessingAlgorithmBase {
public:
// Constructor
......
#ifndef MANTIDQTMANTIDWIDGETS_DATAPROCESSORPROCESSINGALGORITHM_H
#define MANTIDQTMANTIDWIDGETS_DATAPROCESSORPROCESSINGALGORITHM_H
#include "MantidQtWidgets/Common/WidgetDllOption.h"
#include "MantidQtWidgets/Common/DllOption.h"
#include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorProcessingAlgorithmBase.h"
#include <QString>
......@@ -35,7 +35,7 @@ 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 EXPORT_OPT_MANTIDQT_MANTIDWIDGETS DataProcessorProcessingAlgorithm
class EXPORT_OPT_MANTIDQT_COMMON DataProcessorProcessingAlgorithm
: public DataProcessorProcessingAlgorithmBase {
public:
DataProcessorProcessingAlgorithm() = delete;
......
......@@ -2,7 +2,7 @@
#define MANTIDQTMANTIDWIDGETS_DATAPROCESSORALGORITHMBASE_H
#include "MantidAPI/AlgorithmManager.h"
#include "MantidQtWidgets/Common/WidgetDllOption.h"
#include "MantidQtWidgets/Common/DllOption.h"
#include <set>
#include <string>
......@@ -37,7 +37,7 @@ 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 EXPORT_OPT_MANTIDQT_MANTIDWIDGETS DataProcessorProcessingAlgorithmBase {
class EXPORT_OPT_MANTIDQT_COMMON DataProcessorProcessingAlgorithmBase {
public:
// Default constructor
DataProcessorProcessingAlgorithmBase();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment