Skip to content
Snippets Groups Projects
  • Edward Brown's avatar
    3573e478
    Added python bindings and polished JobTreeView API. · 3573e478
    Edward Brown authored
    - Added BuildSubtreeTest - a replacement for the messy version in JobTreeView.
    - Added additional methods for dealing with Subtree objects.
    - Modified interface of the copy and paste signals presenters must now
      get selection explicitly.
    - Exposed Row class to python.
    
    Re #22263
    3573e478
    History
    Added python bindings and polished JobTreeView API.
    Edward Brown authored
    - Added BuildSubtreeTest - a replacement for the messy version in JobTreeView.
    - Added additional methods for dealing with Subtree objects.
    - Modified interface of the copy and paste signals presenters must now
      get selection explicitly.
    - Exposed Row class to python.
    
    Re #22263
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
JobTreeViewSignalAdapter.h 1.35 KiB
#ifndef MANTIDQTMANTIDWIDGETS_JOBTREEVIEWSIGNALADAPTER_H_
#define MANTIDQTMANTIDWIDGETS_JOBTREEVIEWSIGNALADAPTER_H_
#include "MantidQtWidgets/Common/DllOption.h"
#include "MantidQtWidgets/Common/Batch/JobTreeView.h"
namespace MantidQt {
namespace MantidWidgets {
namespace Batch {
class EXPORT_OPT_MANTIDQT_COMMON JobTreeViewSignalAdapter
    : public QObject,
      public JobTreeViewSubscriber {
  Q_OBJECT
public:
  JobTreeViewSignalAdapter(JobTreeView &view, QObject *parent = nullptr);

  void notifyCellChanged(RowLocation const &itemIndex, int column,
                         std::string const &newValue) override;
  void notifyRowInserted(RowLocation const &newRowLocation) override;
  void notifyRemoveRowsRequested(
      std::vector<RowLocation> const &locationsOfRowsToRemove) override;
  void notifyCopyRowsRequested() override;
  void notifyPasteRowsRequested() override;
signals:
  void cellChanged(MantidQt::MantidWidgets::Batch::RowLocation const &itemIndex,
                   int column, std::string newValue);
  void rowInserted(
      MantidQt::MantidWidgets::Batch::RowLocation const &newRowLocation);
  void removeRowsRequested(
      std::vector<MantidQt::MantidWidgets::Batch::RowLocation> const &
          locationsOfRowsToRemove);
  void copyRowsRequested();
  void pasteRowsRequested();
};
}
}
}
#endif // MANTIDQTMANTIDWIDGETS_JOBTREEVIEWSIGNALADAPTER_H_