Debian Codegraph @

dsrglwindow.h

raw symbols SCIP
1 #ifndef DSRGLWINDOW_H
2 #define DSRGLWINDOW_H
3
4 #include "molecule.h"
5 #include "dsrgui.h"
6 #include <QOpenGLWidget>
7 class DSRGlWindow : public QOpenGLWidget
8 {
9 Q_OBJECT
10
11 public:
12 DSRGlWindow(QWidget *parent, Molecule *m, DSRMol header, QString fragment);
13 virtual ~DSRGlWindow() override;
14 CEnvironment xd; //!< MyAtom list of the molecule
15 CEnvironment selFragAt; //! MyAtom list of selected fragment atoms
16 CEnvironment fita; //! MyAtom list of atoms where the fragment is fitted to plus the surrounding
17 Connection bonds; //!< MyBond list of the fragment molecule bonds
18 Connection fitabonds; //!< MyBond list of the target molecule bonds
19 Molecule *m_molecule;
20 QString source_atoms;
21 QCheckBox *showFit;
22 QCheckBox *showFitLabel;
23 bool selchanged = true;
24 void qglColor(const QColor color);
25 void renderText(double x, double y, double z, const QString &str);
26 public slots:
27 void display_fragment(DSRMol frag, bool clear_sel=true);
28 void makeInfo();
29 void clear_molecule();
30 void set_label_color();
31 void mousePressEvent(QMouseEvent *event) override;
32 signals:
33 void sourceStringChanged();
34 void updateInfo(QString);
35 protected:
36 void initializeGL() override;
37 void resizeGL(int width, int height) override;
38 void paintGL() override;
39 void mouseMoveEvent(QMouseEvent *event) override;
40 void wheelEvent(QWheelEvent *event) override;
41 private:
42 inline void __RotateCS( double c, double s, double& X, double& Y ) ;
43 void glTranslateL( const double dx, const double dy, const double dz );
44 void glRotateL( const double dang, const double x, const double y, const double z );
45 QFont myFont; //!< a font for the atom labels
46 //Molecule mole;
47 QColor dsrLabelColor;
48 GLint vp[4];
49 double labScal;
50 void draw();
51 double retinafktr = 1;
52 void project(double x, double y, double z, GLdouble &tx, GLdouble &ty);
53 double L, moux, mouy;
54 int wh,ww;
55 void tryfit();
56 virtual QSize sizeHint() const override;
57 virtual QSize minimumSizeHint() const override;
58 };
59
60 #endif // DSRGLWINDOW_H