COPASI API  4.16.103
Functions
CQNewMainWindow.cpp File Reference
#include <QtCore/QAbstractEventDispatcher>
#include <QtGui/QAction>
#include <QtGui/QActionGroup>
#include <QtGui/QCloseEvent>
#include <QtGui/QColor>
#include <QtGui/QColorDialog>
#include <QtGui/QComboBox>
#include <QtCore/QFileInfo>
#include <QtGui/QHBoxLayout>
#include <QtGui/QIcon>
#include <QtGui/QImage>
#include <QtGui/QLabel>
#include <QtGui/QPixmap>
#include <QtGui/QMenuBar>
#include <QtGui/QStackedWidget>
#include <QtGui/QStatusBar>
#include <QtGui/QToolBar>
#include <QtGui/QVBoxLayout>
#include <QtCore/QTimer>
#include "CQGLLayoutPainter.h"
#include "CQGLLayoutViewer.h"
#include "CQNewMainWindow.h"
#include "CQPlayerControlWidget.h"
#include "CQScreenshotOptionsDialog.h"
#include "CQLayoutMainWindow.h"
#include "UI/CQMessageBox.h"
#include "UI/CopasiFileDialog.h"
#include <string.h>
#include "copasi/report/CCopasiRootContainer.h"
#include "copasi/CopasiDataModel/CCopasiDataModel.h"
#include "copasi/model/CModel.h"
#include "copasi/layout/CLayout.h"
#include "copasi/layout/CListOfLayouts.h"
#include "copasi/layout/CLDefaultStyles.h"
#include "copasi/elementaryFluxModes/CEFMTask.h"
#include "copasi/elementaryFluxModes/CEFMProblem.h"
#include "copasi/elementaryFluxModes/CFluxMode.h"
#include "copasi/model/CReaction.h"
#include "copasi/model/CChemEq.h"
#include "copasi/model/CChemEqElement.h"
#include "copasi/model/CMetab.h"
#include "copasi/layout/CLayoutEngine.h"
#include "copasi/layout/CLGlyphs.h"
#include "copasi/layout/CLBase.h"
#include "copasi/layout/CLCurve.h"
#include "copasi/report/CKeyFactory.h"
#include "layoutUI/CQLayoutThread.h"
#include "../UI/icons/photo.xpm"
#include "resourcesUI/CQIconResource.h"
#include "revert_curve.xpm"
#include "film_strip.xpm"
#include "graph.xpm"
#include "load_data.xpm"
#include <QtGui/QDockWidget>
#include "layout_start.xpm"
#include "layout_stop.xpm"

Go to the source code of this file.

Functions

QRectF getBounds (const std::vector< CCopasiSpringLayout::UpdateAction > &updates)
 

Function Documentation

QRectF getBounds ( const std::vector< CCopasiSpringLayout::UpdateAction > &  updates)

Definition at line 1778 of file CQNewMainWindow.cpp.

References CCopasiSpringLayout::UpdateAction::COMPARTMENT_4V, CLGraphicalObject::getHeight(), CLGraphicalObject::getWidth(), CLGraphicalObject::getX(), CLGraphicalObject::getY(), CCopasiSpringLayout::UpdateAction::POSITION_2V, and CCopasiSpringLayout::UpdateAction::REACTION_2V.

1779 {
1780  QRectF result(1000, 1000, -1000, -1000);
1781  std::vector<CCopasiSpringLayout::UpdateAction>::const_iterator it, itEnd = updates.end();
1782 
1783  for (it = updates.begin(); it != itEnd; ++it)
1784  {
1785  switch (it->mAction)
1786  {
1788  {
1789  CLCompartmentGlyph* current = ((CLCompartmentGlyph*)(it->mpTarget));
1790  result.setLeft(qMin(result.left(), current->getX()));
1791  result.setTop(qMin(result.top(), current->getY()));
1792  result.setRight(qMax(result.right(), current->getX() + current->getWidth()));
1793  result.setBottom(qMax(result.bottom(), current->getY() + current->getHeight()));
1794  }
1795  break;
1796 
1798  {
1799  CLGraphicalObject* current = ((CLGraphicalObject*)(it->mpTarget));
1800  result.setLeft(qMin(result.left(), current->getX()));
1801  result.setTop(qMin(result.top(), current->getY()));
1802  result.setRight(qMax(result.right(), current->getX() + current->getWidth()));
1803  result.setBottom(qMax(result.bottom(), current->getY() + current->getHeight()));
1804  }
1805  break;
1806 
1808  {
1809  CLReactionGlyph* current = ((CLReactionGlyph*)(it->mpTarget));
1810  result.setLeft(qMin(result.left(), current->getX()));
1811  result.setTop(qMin(result.top(), current->getY()));
1812  result.setRight(qMax(result.right(), current->getX() + current->getWidth()));
1813  result.setBottom(qMax(result.bottom(), current->getY() + current->getHeight()));
1814  }
1815  break;
1816 
1817  default:
1818  break;
1819  };
1820  }
1821 
1822  return result;
1823 }
const C_FLOAT64 & getX() const
const C_FLOAT64 & getWidth() const
const C_FLOAT64 & getY() const
const C_FLOAT64 & getHeight() const