Ticket #4340 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

Implement a factory for SliceViewer widget creation

Reported by: Janik Zikovsky Owned by: Janik Zikovsky
Priority: major Milestone: Release 2.0
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Michael Reuter

Description

Instead of directly creating objects from Python, have a factory create them in C++ and return them to python.

This will allow python to request a C++-created window. Most importantly, it may fix a segfault I get on release builds.

Change History

comment:1 Changed 9 years ago by Janik Zikovsky

  • Status changed from new to accepted

comment:2 Changed 9 years ago by Janik Zikovsky

Refs #4340: Added a factory for creating SliceViewer widgets

and attempting to debug a failure of Python creating SliceViewer windows.

Changeset: 23dc50235bce92a2e63413f1cb7bc206a0408d10

comment:3 Changed 9 years ago by Janik Zikovsky

Refs #4340 using a factory for creating the python object

solves the segfault problem on my machine at least. Thanks Russell!!! Also Refs #4277 exposing some methods of SliceViewerWindow and of the factory. Still need to handle the singleton.

Changeset: cda977591fb8e767ebb9e357a931855fe143b0d9

comment:4 Changed 9 years ago by Janik Zikovsky

Refs #4340 attempt to fix sip build?

Changeset: 274e7047fecd67c9b54a5069c740fcc094d953b2

comment:5 Changed 9 years ago by Janik Zikovsky

Refs #4340: Fix linking error

Changeset: b73a892f93f6052fa9ddd7063d0c07cba3d1a2ef

comment:6 Changed 9 years ago by Janik Zikovsky

refs #4340 implemented singleton in python

and I hope this fixes the ubuntu 10.04 and mac builds

Changeset: d850887f5be1f6447b2385b340a21bb79ba201fa

comment:7 Changed 9 years ago by Janik Zikovsky

Refs #4340 will this fix the 10.04 test?

Changeset: 1732a0d75eacf5790267371c2fe770c6b3e50c00

comment:8 Changed 9 years ago by Janik Zikovsky

Refs #4340 nope that's no good

Changeset: 3e0d7119b48b068f9bb65aa4e0849ca56b7ba1e8

comment:9 Changed 9 years ago by Martyn Gigg

Refs #4340. Add the new factory library to the windows installer.

Changeset: 6c06e01a758e9073a4f816eadffdfc1147b5d654

comment:10 Changed 9 years ago by Janik Zikovsky

Refs #4340: WidgetFactory keeps track of open SliceViewers.

Using QPointer<> to automatically catch dangling pointers. Added method to getSliceViewer() to return open slice viewer windows

Changeset: 4ce575ee28f0d0b86c2fa69acb31fabc45e3ba6e

comment:11 Changed 9 years ago by Janik Zikovsky

  • Status changed from accepted to verify
  • Resolution set to fixed

Factory is working and used by Python and C++ for widget creation. Will expand as needed for new widget types...

comment:12 Changed 9 years ago by Michael Reuter

  • Status changed from verify to verifying
  • Tester set to Michael Reuter

comment:13 Changed 9 years ago by Michael Reuter

  • Status changed from verifying to closed

This feature is what makes the unit tests and the launching of the SliceViewer from the simple interface's multislice mode. I think it works pretty well.

comment:14 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 5187

Note: See TracTickets for help on using tickets.