blob: 0db13209654cdbeb6a844256a354eaaebdc0f64b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
// Copyright 2008 Nanorex, Inc. See LICENSE file for details.
#ifndef STRUCTUREGRAPHICSWINDOW_H
#define STRUCTUREGRAPHICSWINDOW_H
#include "Nanorex/Interface/NXEntityManager.h"
#include "Nanorex/Interface/NXGraphicsManager.h"
#include "Nanorex/Interface/NXRenderingEngine.h"
#include "Nanorex/Interface/NXNamedView.h"
using namespace Nanorex;
#include "DataWindow.h"
/* CLASS: StructureGraphicsWindow */
class StructureGraphicsWindow : public DataWindow
{
Q_OBJECT;
public:
StructureGraphicsWindow(QWidget *parent,
NXGraphicsManager *gm,
int width = 640, int height = 400);
~StructureGraphicsWindow();
NXCommandResult const *const setMoleculeSet(NXMoleculeSet *theMolSetPtr);
void setNamedView(Nanorex::NXNamedView const& view) {
renderingEngine->setNamedView(view);
}
void resetView(void) { renderingEngine->resetView(); }
// Mouse-event handlers
void mousePressEvent(QMouseEvent *mouseEvent);
void mouseReleaseEvent(QMouseEvent *mouseEvent);
void mouseMoveEvent(QMouseEvent *mouseEvent);
private:
NXGraphicsManager *graphicsManager;
NXMoleculeSet *molSetPtr;
NXRenderingEngine *renderingEngine;
};
inline void StructureGraphicsWindow::mousePressEvent(QMouseEvent *mouseEvent) {
renderingEngine->mousePressEvent(mouseEvent);
}
inline void StructureGraphicsWindow::mouseMoveEvent(QMouseEvent *mouseEvent) {
renderingEngine->mouseMoveEvent(mouseEvent);
}
inline void StructureGraphicsWindow::mouseReleaseEvent(QMouseEvent *mouseEvent) {
renderingEngine->mouseReleaseEvent(mouseEvent);
}
#endif // STRUCTUREGRAPHICSWINDOW_H
|