Skip to content

Commit

Permalink
Provide access to our Pendulum window from our Simulation Experiment …
Browse files Browse the repository at this point in the history
…view.
  • Loading branch information
agarny committed Jun 26, 2017
1 parent cf5e9b2 commit 822f723
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
Expand Up @@ -26,11 +26,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "combinefilemanager.h"
#include "combinesupportplugin.h"
#include "coreguiutils.h"
#include "pendulumwindowwindow.h"
#include "sedmlfilemanager.h"
#include "sedmlsupportplugin.h"
#include "simulationexperimentviewplugin.h"
#include "simulationexperimentviewsimulationwidget.h"
#include "simulationexperimentviewwidget.h"
#include "windowinterface.h"

//==============================================================================

Expand Down Expand Up @@ -251,6 +253,13 @@ void SimulationExperimentViewPlugin::pluginsInitialized(const Plugins &pLoadedPl
else if (!plugin->name().compare("COMBINESupport"))
mCombineFileTypeInterface = fileTypeInterface;
}

// Look for our pendulum window

WindowInterface *windowInterface = qobject_cast<WindowInterface *>(plugin->instance());

if (windowInterface && !plugin->name().compare("PendulumWindow"))
mPendulumWindowWindow = static_cast<PendulumWindow::PendulumWindowWindow *>(windowInterface->windowWidget());
}
}

Expand Down Expand Up @@ -435,6 +444,15 @@ FileTypeInterface * SimulationExperimentViewPlugin::combineFileTypeInterface() c

//==============================================================================

PendulumWindow::PendulumWindowWindow * SimulationExperimentViewPlugin::pendulumWindowWindow() const
{
// Return our pendulum window

return mPendulumWindowWindow;
}

//==============================================================================

} // namespace SimulationExperimentView
} // namespace OpenCOR

Expand Down
Expand Up @@ -37,6 +37,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//==============================================================================

namespace OpenCOR {

//==============================================================================

namespace PendulumWindow {
class PendulumWindowWindow;
} // namespace PendulumWindow

//==============================================================================

namespace SimulationExperimentView {

//==============================================================================
Expand Down Expand Up @@ -83,6 +92,8 @@ class SimulationExperimentViewPlugin : public QObject,
FileTypeInterface * sedmlFileTypeInterface() const;
FileTypeInterface * combineFileTypeInterface() const;

PendulumWindow::PendulumWindowWindow * pendulumWindowWindow() const;

private:
SimulationExperimentViewWidget *mViewWidget;

Expand All @@ -93,6 +104,8 @@ class SimulationExperimentViewPlugin : public QObject,

FileTypeInterface *mSedmlFileTypeInterface;
FileTypeInterface *mCombineFileTypeInterface;

PendulumWindow::PendulumWindowWindow *mPendulumWindowWindow;
};

//==============================================================================
Expand Down

0 comments on commit 822f723

Please sign in to comment.