Skip to content
Snippets Groups Projects
Commit 104c09bd authored by Edward Brown's avatar Edward Brown
Browse files

Re #20302: Added DataProcessor namespace for headers.

- Added DataProcessor as namespace for most headers in the
DataProcessorUI folder.
- Renamed some usages of AbstractDataProcessorTreeModel.
parent dd785262
No related branches found
No related tags found
No related merge requests found
Showing
with 118 additions and 13 deletions
......@@ -63,7 +63,7 @@
src/CatalogSelector.cpp
src/CheckboxHeader.cpp
src/ColorBarWidget.cpp
src/DataProcessorUI/AbstractDataProcessorTreeModel.cpp
src/DataProcessorUI/AbstractTreeModel.cpp
src/DataProcessorUI/DataProcessorGenerateNotebook.cpp
src/DataProcessorUI/DataProcessorOneLevelTreeManager.cpp
src/DataProcessorUI/DataProcessorPostprocessingAlgorithm.cpp
......@@ -183,7 +183,7 @@ set ( MOC_FILES
inc/MantidQtWidgets/Common/AlgorithmSelectorWidget.h
inc/MantidQtWidgets/Common/CheckboxHeader.h
inc/MantidQtWidgets/Common/ColorBarWidget.h
inc/MantidQtWidgets/Common/DataProcessorUI/AbstractDataProcessorTreeModel.h
inc/MantidQtWidgets/Common/DataProcessorUI/AbstractTreeModel.h
inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorCommandAdapter.h
inc/MantidQtWidgets/Common/DataProcessorUI/GenericDataProcessorPresenter.h
inc/MantidQtWidgets/Common/DataProcessorUI/GenericDataProcessorPresenterThread.h
......
......@@ -10,7 +10,7 @@
namespace MantidQt {
namespace MantidWidgets {
/** AbstractDataProcessorTreeModel is a base class for several tree model
/** AbstractTreeModel is a base class for several tree model
implementations for processing table data. Full function implementation is
provided for functions common to all data processing tree models, while
these subclasses are expected to provide implementation for the remaining
......@@ -37,14 +37,14 @@ 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_COMMON AbstractDataProcessorTreeModel
class EXPORT_OPT_MANTIDQT_COMMON AbstractTreeModel
: public QAbstractItemModel {
Q_OBJECT
public:
AbstractDataProcessorTreeModel(
AbstractTreeModel(
Mantid::API::ITableWorkspace_sptr tableWorkspace,
const DataProcessorWhiteList &whitelist);
~AbstractDataProcessorTreeModel() override;
~AbstractTreeModel() override;
// Functions to read data from the model
......
#ifndef MANTIDQTMANTIDWIDGETS_ABSTRACTDATAPROCESSORTREEMODEL_H_
#define MANTIDQTMANTIDWIDGETS_ABSTRACTDATAPROCESSORTREEMODEL_H_
#include "MantidAPI/ITableWorkspace_fwd.h"
#include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorWhiteList.h"
#include "MantidQtWidgets/Common/DllOption.h"
#include <QAbstractItemModel>
#include <QColor>
namespace MantidQt {
namespace MantidWidgets {
namespace DataProcessor {
/** AbstractTreeModel is a base class for several tree model
implementations for processing table data. Full function implementation is
provided for functions common to all data processing tree models, while
these subclasses are expected to provide implementation for the remaining
virtual functions defined here and in QAbstractItemModel.
Copyright &copy; 2014 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge
National Laboratory & European Spallation Source
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 EXPORT_OPT_MANTIDQT_COMMON AbstractTreeModel
: public QAbstractItemModel {
Q_OBJECT
public:
AbstractTreeModel(
Mantid::API::ITableWorkspace_sptr tableWorkspace,
const DataProcessorWhiteList &whitelist);
~AbstractTreeModel() override;
// Functions to read data from the model
// Column count
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
// Get flags for a cell
Qt::ItemFlags flags(const QModelIndex &index) const override;
// Get the 'processed' status of a data item
virtual bool isProcessed(int position,
const QModelIndex &parent = QModelIndex()) const = 0;
// Set the 'processed' status of a data item
virtual bool setProcessed(bool processed, int position,
const QModelIndex &parent = QModelIndex()) = 0;
protected:
/// Collection of data for viewing.
Mantid::API::ITableWorkspace_sptr m_tWS;
/// Map of column indexes to names and viceversa
DataProcessorWhiteList m_whitelist;
};
} // namespace DataProcessor
} // namespace MantidWidgets
} // namespace Mantid
#endif /* MANTIDQTMANTIDWIDGETS_ABSTRACTDATAPROCESSORTREEMODEL_H_ */
......@@ -6,6 +6,7 @@
namespace MantidQt {
namespace MantidWidgets {
namespace DataProcessor {
/** @class DataProcessorAppendGroupCommand
DataProcessorAppendGroupCommand defines the action "Insert Group"
......@@ -54,4 +55,5 @@ public:
};
}
}
}
#endif /*MANTIDQTMANTIDWIDGETS_DATAPROCESSORAPPENDGROUPCOMMAND_H*/
......@@ -6,6 +6,7 @@
namespace MantidQt {
namespace MantidWidgets {
namespace DataProcessor {
/** @class DataProcessorAppendRowCommand
DataProcessorAppendRowCommand defines the action "Insert Row After"
......@@ -55,4 +56,5 @@ public:
};
}
}
}
#endif /*MANTIDQTMANTIDWIDGETS_DATAPROCESSORAPPENDROWCOMMAND_H*/
......@@ -5,6 +5,7 @@
namespace MantidQt {
namespace MantidWidgets {
namespace DataProcessor {
/** @class DataProcessorClearSelectedCommand
DataProcessorClearSelectedCommand defines the action "Clear Selected"
......@@ -51,4 +52,5 @@ public:
};
}
}
}
#endif /*MANTIDQTMANTIDWIDGETS_DATAPROCESSORCLEARSELECTEDCOMMAND_H*/
......@@ -5,6 +5,7 @@
namespace MantidQt {
namespace MantidWidgets {
namespace DataProcessor {
/** @class DataProcessorCollapseGroupsCommand
DataProcessorCollapseGroupsCommand defines the action "Collapse All Groups"
......@@ -51,4 +52,5 @@ public:
};
}
}
}
#endif /*MANTIDQTMANTIDWIDGETS_DATAPROCESSORCOLLAPSEGROUPSCOMMAND_H*/
......@@ -8,6 +8,7 @@
namespace MantidQt {
namespace MantidWidgets {
namespace DataProcessor {
/** @class DataProcessorCommand
DataProcessorCommand is an interface which defines the functions any data
......@@ -62,7 +63,8 @@ protected:
};
/// Typedef for a shared pointer to \c ReflSearchModel
typedef std::unique_ptr<DataProcessorCommand> DataProcessorCommand_uptr;
using DataProcessorCommand_uptr = std::unique_ptr<DataProcessorCommand>;
}
}
}
#endif /*MANTIDQTMANTIDWIDGETS_DATAPROCESSORCOMMAND_H*/
......@@ -12,6 +12,7 @@
namespace MantidQt {
namespace MantidWidgets {
namespace DataProcessor {
using DataProcessorCommand_uptr = std::unique_ptr<DataProcessorCommand>;
......@@ -42,8 +43,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_COMMON DataProcessorCommandAdapter
: public QObject {
class EXPORT_OPT_MANTIDQT_COMMON DataProcessorCommandAdapter : public QObject {
Q_OBJECT
public:
/** Constructor: Adds actions to a menu
......@@ -115,8 +115,9 @@ private:
std::vector<std::unique_ptr<DataProcessorCommandAdapter>> m_adapter;
};
typedef std::unique_ptr<DataProcessorCommandAdapter>
DataProcessorCommandAdapter_uptr;
using DataProcessorCommandAdapter_uptr =
std::unique_ptr<DataProcessorCommandAdapter>;
}
}
#endif /*MANTIDQTMANTIDWIDGETS_DATAPROCESSORCOMMANDADAPTER_H*/
\ No newline at end of file
}
#endif /*MANTIDQTMANTIDWIDGETS_DATAPROCESSORCOMMANDADAPTER_H*/
......@@ -7,6 +7,7 @@
namespace MantidQt {
namespace MantidWidgets {
namespace DataProcessor {
/** @class ReflCommandBase
......@@ -50,4 +51,5 @@ protected:
};
}
}
}
#endif /*MANTIDQTMANTIDWIDGETS_DATAPROCESSORCOMMANDBASE_H*/
......@@ -5,6 +5,7 @@
namespace MantidQt {
namespace MantidWidgets {
namespace DataProcessor {
/** @class DataProcessorCopySelectedCommand
DataProcessorCopySelectedCommand defines the action "Copy Selected"
......@@ -53,4 +54,5 @@ public:
};
}
}
}
#endif /*MANTIDQTMANTIDWIDGETS_DATAPROCESSORCOPYSELECTEDCOMMAND_H*/
......@@ -5,6 +5,7 @@
namespace MantidQt {
namespace MantidWidgets {
namespace DataProcessor {
/** @class DataProcessorCutSelectedCommand
DataProcessorCutSelectedCommand defines the action "Cut Selected"
......@@ -53,4 +54,5 @@ public:
};
}
}
}
#endif /*MANTIDQTMANTIDWIDGETS_DATAPROCESSORCUTSELECTEDCOMMAND_H*/
......@@ -5,6 +5,7 @@
namespace MantidQt {
namespace MantidWidgets {
namespace DataProcessor {
/** @class DataProcessorDeleteGroupCommand
......@@ -52,4 +53,5 @@ public:
};
}
}
}
#endif /*MANTIDQTMANTIDWIDGETS_DATAPROCESSORDELETEGROUPCOMMAND_H*/
......@@ -5,6 +5,7 @@
namespace MantidQt {
namespace MantidWidgets {
namespace DataProcessor {
/** @class DataProcessorDeleteRowCommand
......@@ -50,4 +51,5 @@ public:
};
}
}
}
#endif /*MANTIDQTMANTIDWIDGETS_DATAPROCESSORDELETEROWCOMMAND_H*/
......@@ -5,6 +5,7 @@
namespace MantidQt {
namespace MantidWidgets {
namespace DataProcessor {
/** @class DataProcessorExpandCommand
DataProcessorExpandCommand defines the action "Expand Selection"
......@@ -54,4 +55,5 @@ public:
};
}
}
}
#endif /*MANTIDQTMANTIDWIDGETS_DATAPROCESSOREXPANDCOMMAND_H*/
......@@ -5,6 +5,7 @@
namespace MantidQt {
namespace MantidWidgets {
namespace DataProcessor {
/** @class DataProcessorExpandGroupsCommand
DataProcessorExpandGroupsCommand defines the action "Expand All Groups"
......@@ -51,4 +52,5 @@ public:
};
}
}
}
#endif /*MANTIDQTMANTIDWIDGETS_DATAPROCESSOREXPANDGROUPSCOMMAND_H*/
......@@ -5,6 +5,7 @@
namespace MantidQt {
namespace MantidWidgets {
namespace DataProcessor {
/** @class DataProcessorExportTableCommand
DataProcessorExportTableCommand defines the action "Export .TBL"
......@@ -53,4 +54,5 @@ public:
};
}
}
}
#endif /*MANTIDQTMANTIDWIDGETS_DATAPROCESSOREXPORTTABLECOMMAND_H*/
......@@ -44,6 +44,7 @@
namespace MantidQt {
namespace MantidWidgets {
namespace DataProcessor {
QStringList DLLExport splitByCommas(const QString &namesString);
......@@ -137,5 +138,5 @@ private:
};
}
}
}
#endif // MANTIDQTMANTIDWIDGETS_DATAPROCESSORGENERATENOTEBOOK_H
......@@ -5,6 +5,7 @@
namespace MantidQt {
namespace MantidWidgets {
namespace DataProcessor {
/** @class DataProcessorGroupRowsCommand
DataProcessorGroupRowsCommand defines the action "Group Selected"
......@@ -51,4 +52,5 @@ public:
};
}
}
}
#endif /*MANTIDQTMANTIDWIDGETS_DATAPROCESSORGROUPROWSCOMMAND_H*/
......@@ -5,6 +5,7 @@
namespace MantidQt {
namespace MantidWidgets {
namespace DataProcessor {
/** @class DataProcessorImportTableCommand
DataProcessorImportTableCommand defines the action "Import .TBL"
......@@ -51,4 +52,5 @@ public:
};
}
}
}
#endif /*MANTIDQTMANTIDWIDGETS_DATAPROCESSORIMPORTTABLECOMMAND_H*/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment