Skip to content

Commit

Permalink
Refs #9451. Getting inheritance correct.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Reuter committed May 14, 2014
1 parent 2d258e0 commit 7c3433f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 43 deletions.
19 changes: 19 additions & 0 deletions Code/Mantid/MantidQt/Python/mantidqt.sip
Expand Up @@ -104,8 +104,27 @@ public:
MantidQt::API::AlgorithmDialog * createDialogFromName(const QString& algorithmName, bool forScript, QWidget* parent=0);
};


class VatesViewerInterface : QWidget
{
%TypeHeaderCode
#include "MantidQtAPI/VatesViewerInterface.h"
%End
public:
VatesViewerInterface();
void renderWorkspace(QString wsname, int wstype);
void setupPluginMode();

enum WorkspaceType
{
MDEW,
PEAKS,
MDHW
};
};

}; // namespace API

namespace MantidWidgets
{

Expand Down
3 changes: 3 additions & 0 deletions Code/Mantid/Vates/VatesSimpleGui/Python/CMakeLists.txt
Expand Up @@ -6,6 +6,8 @@ set( PY_MODULE_NAME mantidvsipython )

include_directories ( ${PYTHON_INCLUDE_PATH} )

set ( MANTIDQT_SIP_DIR ${CMAKE_SOURCE_DIR}/MantidQt/Python )

set ( SIP_SPEC ${CMAKE_CURRENT_SOURCE_DIR}/mantidvsi.sip )
set ( SIP_SRC_IN ${CMAKE_CURRENT_SOURCE_DIR}/sip_mantidvsi.cpp.in )
set ( SIP_SRC ${CMAKE_CURRENT_BINARY_DIR}/sip_mantidvsi.cpp )
Expand Down Expand Up @@ -38,6 +40,7 @@ set( SRC_UNITY_IGNORE_FILES )
add_custom_command ( OUTPUT ${SIP_SRC_AUTO}
COMMAND ${SIP_EXECUTABLE}
-I ${PYQT4_SIP_DIR} ${PYQT4_SIP_FLAGS}
-I ${MANTIDQT_SIP_DIR}
-c ${CMAKE_CURRENT_BINARY_DIR} -j1 -w
-e
${SIP_SPEC}
Expand Down
47 changes: 4 additions & 43 deletions Code/Mantid/Vates/VatesSimpleGui/Python/mantidvsi.sip
Expand Up @@ -11,48 +11,9 @@
%Import QtCore/QtCoremod.sip
%Import QtGui/QtGuimod.sip

/******************************************************************/
/*
namespace MantidQt
{
namespace API
{

class VatesViewerInterface : public QWidget {
%TypeHeaderCode
#include "MantidQtAPI/VatesViewerInterface.h"
%End

public:
VatesViewerInterface();
};

}; // namespace API
}; // namespace MantidQt

namespace Mantid
{
namespace Vates
{
namespace SimpleGui
{
namespace MantidQt.API;

class MdViewerWidget : public MantidQt.API.VatesViewerInterface {
%TypeHeaderCode
#include "MantidVatesSimpleGuiViewWidgets/MdViewerWidget.h"
%End

public:
MdViewerWidget();
void setupPluginMode();
};

}; // namespace SimpleGui
}; // namespace Vates
}; // namespace Mantid
*/
%Import mantidqt.sip

/******************************************************************/

namespace Mantid
{
Expand All @@ -61,14 +22,14 @@ namespace Vates
namespace SimpleGui
{

class MdViewerWidget : public QWidget {
class MdViewerWidget : public MantidQt::API::VatesViewerInterface {
%TypeHeaderCode
#include "MantidVatesSimpleGuiViewWidgets/MdViewerWidget.h"
%End

public:
MdViewerWidget();
void setupPluginMode();
//void setupPluginMode();
};

}; // namespace SimpleGui
Expand Down

0 comments on commit 7c3433f

Please sign in to comment.