COPASI API
4.16.103
|
#include <CQGLLayoutPainter.h>
Public Types | |
enum | STATE { STATE_SELECTION, STATE_DRAG, STATE_NORMAL } |
Signals | |
void | documentChanged () |
void | singleCurveSelected (bool) |
void | status_message (const QString &message, int timeout) |
Public Member Functions | |
void | calculateAndAssignBounds (CLayout *pLayout) |
void | change_style (const CLRenderInformationBase *pRenderInfo, bool defaultStyle=false) |
CQGLLayoutPainter (const QGLFormat &format, QWidget *parent=0) | |
GLubyte * | export_bitmap (double x, double y, double width, double height, unsigned int imageWidth, unsigned int imageHeight, bool drawSelection) |
double | fitToScreen () |
double | getAspect () const |
double | getCurrentHeight () const |
double | getCurrentPositionX () const |
double | getCurrentPositionY () const |
double | getCurrentWidth () const |
const GLfloat * | getFogColor () const |
GLfloat | getFogDensity () const |
const GLfloat * | getHighlightColor () const |
const std::set< const CLGraphicalObject * > & | getHighlightedObjects () const |
std::set< const CLGraphicalObject * > & | getHighlightedObjects () |
bool | getHighlightFlag () const |
std::set< CLGraphicalObject * > | getSelection () |
unsigned int | getViewportHeight () const |
unsigned int | getViewportWidth () const |
double | getZoomFactor () const |
double | maxX () const |
double | maxY () const |
double | minX () const |
double | minY () const |
void | resetView () |
void | revertCurve () |
void | setAspect (double aspect) |
void | setBounds (double minX, double minY, double maxX, double maxY) |
void | setBounds (const QRectF &rect) |
void | setCurrentPosition (double x, double y) |
void | setCurrentPositionX (double x) |
void | setCurrentPositionY (double y) |
void | setFogColor (const GLfloat c[4]) |
void | setFogDensity (GLfloat dens) |
void | setHighlightColor (const GLfloat c[4]) |
void | setHighlightedObjects (const std::set< const CLGraphicalObject * > &highlightedObjects) |
void | setHighlightFlag (bool flag) |
void | setMaxX (double x) |
void | setMaxY (double y) |
void | setMinX (double x) |
void | setMinY (double y) |
void | setSelection (const std::set< CLGraphicalObject * > &selection) |
void | setZoomFactor (double) |
void | toggleHighlightFlag () |
void | update () |
void | update (const CCopasiDataModel *pDocument, CLayout *pLayout, const CLRenderInformationBase *pRenderInfo, const QString &baseDir) |
~CQGLLayoutPainter () | |
Protected Types | |
typedef void(* | PFNGLBINDFRAMEBUFFEREXT )(GLenum target, GLuint framebuffer) |
typedef void(* | PFNGLBINDRENDERBUFFEREXT )(GLenum target, GLuint renderbuffer) |
typedef void(* | PFNGLBLITFRAMEBUFFEREXT )(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) |
typedef GLenum(* | PFNGLCHECKFRAMEBUFFERSTATUSEXT )(GLenum target) |
typedef void(* | PFNGLDELETEFRAMEBUFFERSEXT )(GLsizei n, GLuint *framebuffers) |
typedef void(* | PFNGLDELETERENDERBUFFERSEXT )(GLsizei n, GLuint *renderbuffers) |
typedef void(* | PFNGLFRAMEBUFFERRENDERBUFFEREXT )(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) |
typedef void(* | PFNGLGENFRAMEBUFFERSEXT )(GLsizei n, GLuint *framebuffers) |
typedef void(* | PFNGLGENRENDERBUFFERSEXT )(GLsizei n, GLuint *renderbuffers) |
typedef void(* | PFNGLRENDERBUFFERSTORAGEEXT )(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height) |
typedef void(* | PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXT )(GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height) |
Protected Slots | |
void | timeout () |
Protected Member Functions | |
bool | check_fbo_status (QString &messageHeader, QString &message) |
void | clear_extension_functions () |
void | destroy_buffers (GLuint &fbo, GLuint *rbuffers, GLuint &multiFBO, GLuint *multiRBuffers) |
void | draw () |
bool | draw_bitmap (double x, double y, double width, double height, unsigned int imageWidth, unsigned int imageHeight, GLuint &fbo, GLuint &multiFBO, GLuint **rbuffers, GLuint **multiRBuffers, GLubyte **pImageData, GLuint samples=0) |
void | initialize_extension_functions () |
virtual void | initializeGL () |
virtual void | mouseMoveEvent (QMouseEvent *pMouseEvent) |
virtual void | mousePressEvent (QMouseEvent *pMouseEvent) |
virtual void | mouseReleaseEvent (QMouseEvent *pMouseEvent) |
virtual void | paintGL () |
virtual void | resizeGL (int w, int h) |
void | update_status_and_cursor () |
Static Protected Attributes | |
static const int | MARGIN = 10 |
Definition at line 24 of file CQGLLayoutPainter.h.
|
protected |
Definition at line 304 of file CQGLLayoutPainter.h.
|
protected |
Definition at line 305 of file CQGLLayoutPainter.h.
|
protected |
Definition at line 310 of file CQGLLayoutPainter.h.
|
protected |
Definition at line 299 of file CQGLLayoutPainter.h.
|
protected |
Definition at line 302 of file CQGLLayoutPainter.h.
|
protected |
Definition at line 303 of file CQGLLayoutPainter.h.
|
protected |
Definition at line 307 of file CQGLLayoutPainter.h.
|
protected |
Definition at line 300 of file CQGLLayoutPainter.h.
|
protected |
Definition at line 301 of file CQGLLayoutPainter.h.
|
protected |
Definition at line 306 of file CQGLLayoutPainter.h.
|
protected |
Definition at line 309 of file CQGLLayoutPainter.h.
Enumerator | |
---|---|
STATE_SELECTION | |
STATE_DRAG | |
STATE_NORMAL |
Definition at line 30 of file CQGLLayoutPainter.h.
CQGLLayoutPainter::CQGLLayoutPainter | ( | const QGLFormat & | format, |
QWidget * | parent = 0 |
||
) |
Definition at line 84 of file CQGLLayoutPainter.cpp.
CQGLLayoutPainter::~CQGLLayoutPainter | ( | ) |
Definition at line 381 of file CQGLLayoutPainter.cpp.
References CLayout::calculateBoundingBox(), CLayout::getDimensions(), CLBoundingBox::getDimensions(), CLDimensions::getHeight(), CLBoundingBox::getPosition(), CLDimensions::getWidth(), CLPoint::getX(), CLPoint::getY(), CLPoint::getZ(), MARGIN, mMaxX, mMaxY, mMinX, mMinY, CLayout::moveBy(), resizeGL(), setCurrentPosition(), CLDimensions::setHeight(), and CLDimensions::setWidth().
Referenced by CQNewMainWindow::slotCalculateDimensions(), and update().
void CQGLLayoutPainter::change_style | ( | const CLRenderInformationBase * | pRenderInfo, |
bool | defaultStyle = false |
||
) |
Definition at line 466 of file CQGLLayoutPainter.cpp.
References CLLayoutRenderer::change_style(), and mpRenderer.
Referenced by CQGLLayoutViewer::change_style().
|
protected |
Checks the state of the currently bound framebuffer. If the framebuffer is valid, true is returned, if it is invalid, the return value is false and messageHeader and message contain a message header and a message to display to the user.
Checks the state of the currently bound framebuffer. If the framebuffer is valid, true is returned, if it is invalid, the return value is false and messageHeader and message contain a mesage header and a message to display to the user.
Definition at line 1908 of file CQGLLayoutPainter.cpp.
References GL_FRAMEBUFFER_COMPLETE_EXT, GL_FRAMEBUFFER_EXT, GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT, GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT, GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT, GL_FRAMEBUFFER_UNSUPPORTED_EXT, and glCheckFramebufferStatusEXTPtr.
Referenced by draw_bitmap().
|
protected |
Set all pointer to extension function to NULL.
Definition at line 1997 of file CQGLLayoutPainter.cpp.
References glBindFramebufferEXTPtr, glBindRenderbufferEXTPtr, glBlitFramebufferEXTPtr, glCheckFramebufferStatusEXTPtr, glDeleteFramebuffersEXTPtr, glDeleteRenderbuffersEXTPtr, glFramebufferRenderbufferEXTPtr, glGenFramebuffersEXTPtr, glGenRenderbuffersEXTPtr, glRenderbufferStorageEXTPtr, and glRenderbufferStorageMultisampleEXTPtr.
Referenced by export_bitmap().
|
protected |
Destroys the passed in render and framebuffers.
Definition at line 1886 of file CQGLLayoutPainter.cpp.
References glDeleteFramebuffersEXTPtr, and glDeleteRenderbuffersEXTPtr.
Referenced by export_bitmap().
|
signal |
This signal is emitted when the painter changes the document / layout.
Referenced by mouseReleaseEvent().
|
protected |
Definition at line 180 of file CQGLLayoutPainter.cpp.
References CCopasiMessage::clearDeque(), CQMessageBox::critical(), CLLayoutRenderer::draw_layout(), CCopasiMessage::getAllMessageText(), MCCopasiMessage, mpRenderer, and CCopasiMessage::peekLastMessage().
Referenced by paintGL().
|
protected |
Renders the specified part of the model into a bitmap. The bitmap is returned as RGBA data in pImageData. If pImageData is pointing to a null pointer, memory is alocated and the caller has to release it. If drawing the bitmap is successfull, true is returned, else false is returned.
Definition at line 1684 of file CQGLLayoutPainter.cpp.
References check_fbo_status(), CQMessageBox::critical(), CLLayoutRenderer::draw_layout(), getAspect(), getCurrentPositionX(), getCurrentPositionY(), getZoomFactor(), GL_COLOR_ATTACHMENT0_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_DRAW_FRAMEBUFFER_EXT, GL_FRAMEBUFFER_EXT, GL_READ_FRAMEBUFFER_EXT, GL_RENDERBUFFER_EXT, glBindFramebufferEXTPtr, glBindRenderbufferEXTPtr, glBlitFramebufferEXTPtr, glFramebufferRenderbufferEXTPtr, glGenFramebuffersEXTPtr, glGenRenderbuffersEXTPtr, glRenderbufferStorageEXTPtr, glRenderbufferStorageMultisampleEXTPtr, mpRenderer, mViewportHeight, mViewportWidth, resizeGL(), setAspect(), setCurrentPosition(), and setZoomFactor().
Referenced by export_bitmap().
GLubyte * CQGLLayoutPainter::export_bitmap | ( | double | x, |
double | y, | ||
double | width, | ||
double | height, | ||
unsigned int | imageWidth, | ||
unsigned int | imageHeight, | ||
bool | drawSelection | ||
) |
Exports a bitmap of the given size to the file with the given name.
Definition at line 1339 of file CQGLLayoutPainter.cpp.
References clear_extension_functions(), CQMessageBox::critical(), destroy_buffers(), draw_bitmap(), getSelection(), GL_MAX_RENDERBUFFER_SIZE_EXT, GL_MAX_SAMPLES_EXT, initialize_extension_functions(), setSelection(), and CQMessageBox::warning().
Referenced by CQNewMainWindow::export_bitmap().
double CQGLLayoutPainter::fitToScreen | ( | ) |
Calculates the ratio that is needed to fit the diagram on the current viewport and sets this as the zoom factor. The method returns the new zoom factor.
Definition at line 307 of file CQGLLayoutPainter.cpp.
References mMaxX, mMaxY, mMinX, mMinY, mViewportHeight, mViewportWidth, setCurrentPosition(), and setZoomFactor().
Referenced by CQGLLayoutViewer::fitToScreen().
double CQGLLayoutPainter::getAspect | ( | ) | const |
Returns the aspect from the renderer.
Definition at line 1323 of file CQGLLayoutPainter.cpp.
References CLLayoutRenderer::getAspect(), and mpRenderer.
Referenced by draw_bitmap().
double CQGLLayoutPainter::getCurrentHeight | ( | ) | const |
Returns the width of the layout part that is currently displayed.
Definition at line 1279 of file CQGLLayoutPainter.cpp.
References mCurrentZoom, and mViewportHeight.
Referenced by CQNewMainWindow::slotScreenshot().
double CQGLLayoutPainter::getCurrentPositionX | ( | ) | const |
Returns the current x offset of the viewport.
Definition at line 286 of file CQGLLayoutPainter.cpp.
References mCurrentPositionX.
Referenced by draw_bitmap(), and CQNewMainWindow::slotScreenshot().
double CQGLLayoutPainter::getCurrentPositionY | ( | ) | const |
Returns the current y offset of the viewport.
Definition at line 291 of file CQGLLayoutPainter.cpp.
References mCurrentPositionY.
Referenced by draw_bitmap(), and CQNewMainWindow::slotScreenshot().
double CQGLLayoutPainter::getCurrentWidth | ( | ) | const |
Returns the width of the layout part that is currently displayed.
Definition at line 1271 of file CQGLLayoutPainter.cpp.
References mCurrentZoom, and mViewportWidth.
Referenced by CQNewMainWindow::slotScreenshot().
const GLfloat * CQGLLayoutPainter::getFogColor | ( | ) | const |
Returns a const pointer to the fog color. The array has a size of 4 elements.
Definition at line 2115 of file CQGLLayoutPainter.cpp.
References CLLayoutRenderer::getFogColor(), and mpRenderer.
Referenced by CQNewMainWindow::changeColorSlot(), and CQNewMainWindow::CQNewMainWindow().
GLfloat CQGLLayoutPainter::getFogDensity | ( | ) | const |
Returns the currently set fog density.
Sets the fog density value.
Definition at line 2089 of file CQGLLayoutPainter.cpp.
References CLLayoutRenderer::getFogDensity(), and mpRenderer.
Referenced by CQNewMainWindow::fogDensitySlot().
const GLfloat * CQGLLayoutPainter::getHighlightColor | ( | ) | const |
Returns a const pointer to the highlight color. The array has a size of 4 elements.
Definition at line 2098 of file CQGLLayoutPainter.cpp.
References CLLayoutRenderer::getHighlightColor(), and mpRenderer.
Referenced by CQNewMainWindow::changeColorSlot(), and CQNewMainWindow::CQNewMainWindow().
const std::set< const CLGraphicalObject * > & CQGLLayoutPainter::getHighlightedObjects | ( | ) | const |
Returns a const reference to the set of highlighted model objects.
Definition at line 2057 of file CQGLLayoutPainter.cpp.
References CLLayoutRenderer::getHighlightedObjects(), and mpRenderer.
Referenced by CQNewMainWindow::elementaryModeTriggeredSlot().
std::set< const CLGraphicalObject * > & CQGLLayoutPainter::getHighlightedObjects | ( | ) |
Returns a reference to the set of highlighted model objects.
Definition at line 2065 of file CQGLLayoutPainter.cpp.
References CLLayoutRenderer::getHighlightedObjects(), and mpRenderer.
bool CQGLLayoutPainter::getHighlightFlag | ( | ) | const |
Returns the highlight flag.
Definition at line 2141 of file CQGLLayoutPainter.cpp.
References CLLayoutRenderer::getHighlightFlag(), and mpRenderer.
std::set< CLGraphicalObject * > CQGLLayoutPainter::getSelection | ( | ) |
Returns the currently selected items.
Definition at line 1287 of file CQGLLayoutPainter.cpp.
References CLLayoutRenderer::getSelection(), and mpRenderer.
Referenced by export_bitmap().
unsigned int CQGLLayoutPainter::getViewportHeight | ( | ) | const |
Returns the height of the current viewport area.
Definition at line 1263 of file CQGLLayoutPainter.cpp.
References mViewportHeight.
unsigned int CQGLLayoutPainter::getViewportWidth | ( | ) | const |
Returns the width of the current drawing area.
Definition at line 1255 of file CQGLLayoutPainter.cpp.
References mViewportWidth.
double CQGLLayoutPainter::getZoomFactor | ( | ) | const |
Returns the zoom factor.
Definition at line 216 of file CQGLLayoutPainter.cpp.
References CLLayoutRenderer::getZoomFactor(), and mpRenderer.
Referenced by draw_bitmap(), CQGLLayoutViewer::slotHValueChanged(), CQGLLayoutViewer::slotVValueChanged(), and CQGLLayoutViewer::updateScrollbars().
|
protected |
On non apple systems, we need to get the pointers to extension functions.
Definition at line 1950 of file CQGLLayoutPainter.cpp.
References glBindFramebufferEXTPtr, glBindRenderbufferEXTPtr, glBlitFramebufferEXTPtr, glCheckFramebufferStatusEXTPtr, glDeleteFramebuffersEXTPtr, glDeleteRenderbuffersEXTPtr, glFramebufferRenderbufferEXTPtr, glGenFramebuffersEXTPtr, glGenRenderbuffersEXTPtr, glRenderbufferStorageEXTPtr, and glRenderbufferStorageMultisampleEXTPtr.
Referenced by export_bitmap().
|
protectedvirtual |
double CQGLLayoutPainter::maxX | ( | ) | const |
Definition at line 371 of file CQGLLayoutPainter.cpp.
References mMaxX.
Referenced by CQNewMainWindow::export_bitmap(), mouseMoveEvent(), mouseReleaseEvent(), setBounds(), CQNewMainWindow::slotScreenshot(), and CQGLLayoutViewer::updateScrollbars().
double CQGLLayoutPainter::maxY | ( | ) | const |
Definition at line 376 of file CQGLLayoutPainter.cpp.
References mMaxY.
Referenced by CQNewMainWindow::export_bitmap(), mouseMoveEvent(), mouseReleaseEvent(), setBounds(), CQNewMainWindow::slotScreenshot(), and CQGLLayoutViewer::updateScrollbars().
double CQGLLayoutPainter::minX | ( | ) | const |
Definition at line 361 of file CQGLLayoutPainter.cpp.
References mMinX.
Referenced by CQNewMainWindow::export_bitmap(), mouseMoveEvent(), mouseReleaseEvent(), resetView(), setBounds(), CQGLLayoutViewer::slotHValueChanged(), CQNewMainWindow::slotScreenshot(), and CQGLLayoutViewer::updateScrollbars().
double CQGLLayoutPainter::minY | ( | ) | const |
Definition at line 366 of file CQGLLayoutPainter.cpp.
References mMinY.
Referenced by CQNewMainWindow::export_bitmap(), mouseMoveEvent(), mouseReleaseEvent(), resetView(), setBounds(), CQNewMainWindow::slotScreenshot(), CQGLLayoutViewer::slotVValueChanged(), and CQGLLayoutViewer::updateScrollbars().
|
protectedvirtual |
Gets called when the mouse is moved on the scene.
Definition at line 863 of file CQGLLayoutPainter.cpp.
References CLLayoutRenderer::convert_to_model_space(), CLLayoutRenderer::distance(), CLLineSegment::getBase1(), CLLineSegment::getBase2(), CLGlyphWithCurve::getCurve(), CLLineSegment::getEnd(), CLCurve::getNumCurveSegments(), CLLayoutRenderer::getObjectsAtViewportPosition(), CLCurve::getSegmentAt(), CLLayoutRenderer::getSelection(), CLLineSegment::getStart(), CLPoint::getX(), CLPoint::getY(), maxX(), maxY(), mCurrentZoom, mDragTimeout, minX(), minY(), mMouseCurrentPosition, mMouseLastPosition, mMousePressPosition, CLLayoutRenderer::move_selection(), mpDragPoint, mpRenderer, mState, CLLayoutRenderer::setSelectionBox(), CLPoint::setX(), CLPoint::setY(), STATE_DRAG, STATE_NORMAL, STATE_SELECTION, and update_status_and_cursor().
|
protectedvirtual |
Definition at line 485 of file CQGLLayoutPainter.cpp.
References CLLayoutRenderer::addToSelection(), CLLayoutRenderer::clearSelection(), CLLayoutRenderer::getObjectsAtViewportPosition(), mDragTimeout, mMouseButton, mMouseCurrentPosition, mMouseLastPosition, mMousePressPosition, mpRenderer, timeout(), and update_status_and_cursor().
|
protectedvirtual |
Gets called when the mouse is released on the scene.
Definition at line 571 of file CQGLLayoutPainter.cpp.
References CLLayoutRenderer::addToSelection(), CLLayoutRenderer::clearSelection(), CLLayoutRenderer::convert_to_model_space(), documentChanged(), CLLayoutRenderer::getObjectsAtViewportPosition(), CLLayoutRenderer::getObjectsInBoundingBox(), CLLayoutRenderer::getSelection(), CLPoint::getX(), CLPoint::getY(), CLLayoutRenderer::isSelected(), maxX(), maxY(), mDragTimeout, minX(), minY(), mMouseButton, mMouseCurrentPosition, mMouseLastPosition, mMousePressPosition, CLLayoutRenderer::move_selection(), mpDragPoint, mpRenderer, mState, CLLayoutRenderer::removeFromSelection(), removeTextGlyphs(), CLLayoutRenderer::setSelectionBox(), CLPoint::setX(), CLPoint::setY(), singleCurveSelected(), STATE_DRAG, STATE_NORMAL, STATE_SELECTION, and update_status_and_cursor().
|
protectedvirtual |
Definition at line 166 of file CQGLLayoutPainter.cpp.
References draw(), mpRenderer, and resizeGL().
void CQGLLayoutPainter::resetView | ( | ) |
Definition at line 296 of file CQGLLayoutPainter.cpp.
References minX(), minY(), setCurrentPosition(), and setZoomFactor().
Referenced by CQGLLayoutViewer::resetView().
|
protectedvirtual |
Definition at line 143 of file CQGLLayoutPainter.cpp.
References mCurrentPositionX, mCurrentPositionY, mInitialized, mpRenderer, mViewportHeight, mViewportWidth, and CLLayoutRenderer::resize().
Referenced by calculateAndAssignBounds(), draw_bitmap(), paintGL(), setZoomFactor(), and update().
void CQGLLayoutPainter::revertCurve | ( | ) |
Reverts the currently selected curve if there is one. If nothing is selected or the single selected item is not a curve, nothing is done.
Definition at line 1221 of file CQGLLayoutPainter.cpp.
References CLLayoutRenderer::getSelection(), mpRenderer, and CLLayoutRenderer::revert_curve().
Referenced by CQGLLayoutViewer::slotRevertCurve().
void CQGLLayoutPainter::setAspect | ( | double | aspect | ) |
Sets the aspect for the renderer.
Definition at line 1312 of file CQGLLayoutPainter.cpp.
References mpRenderer, and CLLayoutRenderer::setAspect().
Referenced by draw_bitmap().
void CQGLLayoutPainter::setBounds | ( | double | minX, |
double | minY, | ||
double | maxX, | ||
double | maxY | ||
) |
void CQGLLayoutPainter::setBounds | ( | const QRectF & | rect | ) |
Definition at line 348 of file CQGLLayoutPainter.cpp.
References setBounds().
void CQGLLayoutPainter::setCurrentPosition | ( | double | x, |
double | y | ||
) |
sets the the x and y offset of the viewport.
Definition at line 228 of file CQGLLayoutPainter.cpp.
References mCurrentPositionX, mCurrentPositionY, mpRenderer, CLLayoutRenderer::setX(), CLLayoutRenderer::setY(), and update().
Referenced by calculateAndAssignBounds(), draw_bitmap(), fitToScreen(), and resetView().
void CQGLLayoutPainter::setCurrentPositionX | ( | double | x | ) |
sets the the x offset of the viewport.
Definition at line 256 of file CQGLLayoutPainter.cpp.
References mCurrentPositionX, mpRenderer, CLLayoutRenderer::setX(), and update().
Referenced by CQGLLayoutViewer::slotHValueChanged(), and CQGLLayoutViewer::updateScrollbars().
void CQGLLayoutPainter::setCurrentPositionY | ( | double | y | ) |
sets the the y offset of the viewport.
Definition at line 271 of file CQGLLayoutPainter.cpp.
References mCurrentPositionY, mpRenderer, CLLayoutRenderer::setY(), and update().
Referenced by CQGLLayoutViewer::slotVValueChanged(), and CQGLLayoutViewer::updateScrollbars().
void CQGLLayoutPainter::setFogColor | ( | const GLfloat | c[4] | ) |
Sets the fog color.
Definition at line 2106 of file CQGLLayoutPainter.cpp.
References mpRenderer, and CLLayoutRenderer::setFogColor().
Referenced by CQNewMainWindow::changeColorSlot().
void CQGLLayoutPainter::setFogDensity | ( | GLfloat | dens | ) |
Sets the new fog density value.
Sets the fog density value.
Definition at line 2081 of file CQGLLayoutPainter.cpp.
References mpRenderer, and CLLayoutRenderer::setFogDensity().
Referenced by CQNewMainWindow::fogDensitySlot().
void CQGLLayoutPainter::setHighlightColor | ( | const GLfloat | c[4] | ) |
Sets the highlight color.
Definition at line 2073 of file CQGLLayoutPainter.cpp.
References mpRenderer, and CLLayoutRenderer::setHighlightColor().
Referenced by CQNewMainWindow::changeColorSlot().
void CQGLLayoutPainter::setHighlightedObjects | ( | const std::set< const CLGraphicalObject * > & | highlightedObjects | ) |
Sets the list of model objects that are to be highlighted in the diagram.
Definition at line 2049 of file CQGLLayoutPainter.cpp.
References mpRenderer, and CLLayoutRenderer::setHighlightedObjects().
void CQGLLayoutPainter::setHighlightFlag | ( | bool | flag | ) |
Toggles the flag that determines if highlighted objects are actually highlighted or if the rest is fogged out.
Definition at line 2133 of file CQGLLayoutPainter.cpp.
References mpRenderer, and CLLayoutRenderer::setHighlightFlag().
Referenced by CQNewMainWindow::toggleHighlightSlot().
void CQGLLayoutPainter::setMaxX | ( | double | x | ) |
Definition at line 338 of file CQGLLayoutPainter.cpp.
References mMaxX.
void CQGLLayoutPainter::setMaxY | ( | double | y | ) |
Definition at line 343 of file CQGLLayoutPainter.cpp.
References mMaxY.
void CQGLLayoutPainter::setMinX | ( | double | x | ) |
Definition at line 329 of file CQGLLayoutPainter.cpp.
References mMinX.
void CQGLLayoutPainter::setMinY | ( | double | y | ) |
Definition at line 334 of file CQGLLayoutPainter.cpp.
References mMinY.
void CQGLLayoutPainter::setSelection | ( | const std::set< CLGraphicalObject * > & | selection | ) |
Sets the selection to the items in the given set.
Definition at line 1302 of file CQGLLayoutPainter.cpp.
References CLLayoutRenderer::getSelection(), and mpRenderer.
Referenced by export_bitmap().
void CQGLLayoutPainter::setZoomFactor | ( | double | zoom | ) |
Sets the zoom factor.
Definition at line 201 of file CQGLLayoutPainter.cpp.
References CLLayoutRenderer::getZoomFactor(), mCurrentZoom, mpRenderer, resizeGL(), and CLLayoutRenderer::setZoomFactor().
Referenced by draw_bitmap(), fitToScreen(), resetView(), and CQGLLayoutViewer::setZoomFactor().
|
signal |
This signal is emitted whenever the selection changes. If after the change exactly one curve object is selected, the argument to the signal is true, otherwise it is false
Referenced by mouseReleaseEvent().
|
signal |
signal is emitted when the status bar is supposed to show a certain message. The message text and the timeout in milliseconds are the arguments to the signal.
Referenced by update_status_and_cursor().
|
protectedslot |
This slot is called if a timer runs down that is started on a left mouse press
Definition at line 538 of file CQGLLayoutPainter.cpp.
References mDragTimeout, and mMouseButton.
Referenced by mousePressEvent().
void CQGLLayoutPainter::toggleHighlightFlag | ( | ) |
Toggles the flag that determines if highlighted objects are actually highlighted or if the rest is fogged out.
Definition at line 2124 of file CQGLLayoutPainter.cpp.
References mpRenderer, and CLLayoutRenderer::toggleHighlightFlag().
void CQGLLayoutPainter::update | ( | ) |
Updates the viewport.
Definition at line 245 of file CQGLLayoutPainter.cpp.
References mpRenderer, and resizeGL().
Referenced by CQNewMainWindow::changeColorSlot(), CQNewMainWindow::elementaryModeTriggeredSlot(), CQNewMainWindow::fogDensitySlot(), CQNewMainWindow::redrawNow(), setCurrentPosition(), setCurrentPositionX(), setCurrentPositionY(), CQGLLayoutViewer::setZoomFactor(), CQNewMainWindow::toggleHighlightSlot(), CQGLLayoutViewer::update(), and CQGLLayoutViewer::updateWidget().
void CQGLLayoutPainter::update | ( | const CCopasiDataModel * | pDocument, |
CLayout * | pLayout, | ||
const CLRenderInformationBase * | pRenderInfo, | ||
const QString & | baseDir | ||
) |
Definition at line 438 of file CQGLLayoutPainter.cpp.
References calculateAndAssignBounds(), CListOfLayouts::getListOfGlobalRenderInformationObjects(), CCopasiDataModel::getListOfLayouts(), CCopasiDataModel::getModel(), mpRenderer, CLLayoutRenderer::set_font_renderer(), and CLLayoutRenderer::setImageTexturizer().
|
protected |
This method sets the correct cursor and updates the status message for the status bar.
This method sets the correct cursor and updates status messages.
Definition at line 1076 of file CQGLLayoutPainter.cpp.
References CLLayoutRenderer::convert_to_model_space(), CLLayoutRenderer::distance(), CLLineSegment::getBase1(), CLLineSegment::getBase2(), CLGlyphWithCurve::getCurve(), CLCurve::getNumCurveSegments(), CLLayoutRenderer::getObjectsAtViewportPosition(), CLCurve::getSegmentAt(), CLLayoutRenderer::getSelection(), CLLineSegment::isBezier(), mCurrentZoom, mMouseButton, mMouseCurrentPosition, mpRenderer, mState, STATE_DRAG, STATE_NORMAL, STATE_SELECTION, and status_message().
Referenced by mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().
|
protected |
Definition at line 321 of file CQGLLayoutPainter.h.
Referenced by clear_extension_functions(), draw_bitmap(), and initialize_extension_functions().
|
protected |
Definition at line 322 of file CQGLLayoutPainter.h.
Referenced by clear_extension_functions(), draw_bitmap(), and initialize_extension_functions().
|
protected |
Definition at line 326 of file CQGLLayoutPainter.h.
Referenced by clear_extension_functions(), draw_bitmap(), and initialize_extension_functions().
|
protected |
Definition at line 316 of file CQGLLayoutPainter.h.
Referenced by check_fbo_status(), clear_extension_functions(), and initialize_extension_functions().
|
protected |
Definition at line 319 of file CQGLLayoutPainter.h.
Referenced by clear_extension_functions(), destroy_buffers(), and initialize_extension_functions().
|
protected |
Definition at line 320 of file CQGLLayoutPainter.h.
Referenced by clear_extension_functions(), destroy_buffers(), and initialize_extension_functions().
|
protected |
Definition at line 324 of file CQGLLayoutPainter.h.
Referenced by clear_extension_functions(), draw_bitmap(), and initialize_extension_functions().
|
protected |
Definition at line 317 of file CQGLLayoutPainter.h.
Referenced by clear_extension_functions(), draw_bitmap(), and initialize_extension_functions().
|
protected |
Definition at line 318 of file CQGLLayoutPainter.h.
Referenced by clear_extension_functions(), draw_bitmap(), and initialize_extension_functions().
|
protected |
Definition at line 323 of file CQGLLayoutPainter.h.
Referenced by clear_extension_functions(), draw_bitmap(), and initialize_extension_functions().
|
protected |
Definition at line 325 of file CQGLLayoutPainter.h.
Referenced by clear_extension_functions(), draw_bitmap(), and initialize_extension_functions().
|
staticprotected |
Definition at line 277 of file CQGLLayoutPainter.h.
Referenced by calculateAndAssignBounds().
|
protected |
Definition at line 239 of file CQGLLayoutPainter.h.
Referenced by getCurrentPositionX(), resizeGL(), setCurrentPosition(), and setCurrentPositionX().
|
protected |
Definition at line 240 of file CQGLLayoutPainter.h.
Referenced by getCurrentPositionY(), resizeGL(), setCurrentPosition(), and setCurrentPositionY().
|
protected |
Definition at line 238 of file CQGLLayoutPainter.h.
Referenced by getCurrentHeight(), getCurrentWidth(), mouseMoveEvent(), setZoomFactor(), and update_status_and_cursor().
|
protected |
flag that determines if a drag timeout has occured.
Definition at line 264 of file CQGLLayoutPainter.h.
Referenced by mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), and timeout().
|
protected |
Definition at line 233 of file CQGLLayoutPainter.h.
Referenced by initializeGL(), and resizeGL().
|
protected |
Definition at line 236 of file CQGLLayoutPainter.h.
Referenced by calculateAndAssignBounds(), fitToScreen(), maxX(), setBounds(), and setMaxX().
|
protected |
Definition at line 237 of file CQGLLayoutPainter.h.
Referenced by calculateAndAssignBounds(), fitToScreen(), maxY(), setBounds(), and setMaxY().
|
protected |
Definition at line 234 of file CQGLLayoutPainter.h.
Referenced by calculateAndAssignBounds(), fitToScreen(), minX(), setBounds(), and setMinX().
|
protected |
Definition at line 235 of file CQGLLayoutPainter.h.
Referenced by calculateAndAssignBounds(), fitToScreen(), minY(), setBounds(), and setMinY().
|
protected |
is set to the button(s) that is (are) pressed and to Qt::NoButton once it is released.
Definition at line 259 of file CQGLLayoutPainter.h.
Referenced by mousePressEvent(), mouseReleaseEvent(), timeout(), and update_status_and_cursor().
|
protected |
Definition at line 249 of file CQGLLayoutPainter.h.
Referenced by mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), and update_status_and_cursor().
|
protected |
Definition at line 253 of file CQGLLayoutPainter.h.
Referenced by mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().
|
protected |
Definition at line 246 of file CQGLLayoutPainter.h.
Referenced by mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().
|
protected |
Stores a pointer to the basepoint if we are currently dragging one.
Definition at line 275 of file CQGLLayoutPainter.h.
Referenced by mouseMoveEvent(), and mouseReleaseEvent().
|
protected |
Definition at line 243 of file CQGLLayoutPainter.h.
Referenced by change_style(), draw(), draw_bitmap(), getAspect(), getFogColor(), getFogDensity(), getHighlightColor(), getHighlightedObjects(), getHighlightFlag(), getSelection(), getZoomFactor(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), paintGL(), resizeGL(), revertCurve(), setAspect(), setCurrentPosition(), setCurrentPositionX(), setCurrentPositionY(), setFogColor(), setFogDensity(), setHighlightColor(), setHighlightedObjects(), setHighlightFlag(), setSelection(), setZoomFactor(), toggleHighlightFlag(), update(), update_status_and_cursor(), and ~CQGLLayoutPainter().
|
protected |
stores the current state of the scene.
Definition at line 269 of file CQGLLayoutPainter.h.
Referenced by mouseMoveEvent(), mouseReleaseEvent(), and update_status_and_cursor().
|
protected |
Definition at line 242 of file CQGLLayoutPainter.h.
Referenced by draw_bitmap(), fitToScreen(), getCurrentHeight(), getViewportHeight(), and resizeGL().
|
protected |
Definition at line 241 of file CQGLLayoutPainter.h.
Referenced by draw_bitmap(), fitToScreen(), getCurrentWidth(), getViewportWidth(), and resizeGL().