File: dsrglwindow.h

package info (click to toggle)
shelxle 1.0.952-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 13,584 kB
  • sloc: cpp: 33,439; ansic: 560; makefile: 3
file content (50 lines) | stat: -rw-r--r-- 1,427 bytes parent folder | download | duplicates (2)
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
#ifndef DSRGLWINDOW_H
#define DSRGLWINDOW_H

#include "molecule.h"
#include "dsrgui.h"

class DSRGlWindow : public QGLWidget
{
  Q_OBJECT

public:
  DSRGlWindow(QWidget *parent, Molecule *m, DSRMol header, QString fragment);
  virtual ~DSRGlWindow();
  CEnvironment xd;        //!< MyAtom list of the molecule
  CEnvironment selFragAt; //! MyAtom list of selected fragment atoms
  CEnvironment fita;      //! MyAtom list of atoms where the fragment is fitted to plus the surrounding
  Connection bonds;       //!< MyBond list of the fragment molecule bonds
  Connection fitabonds;   //!< MyBond list of the target molecule bonds
  Molecule *m_molecule;
  QString source_atoms;
  QCheckBox *showFit;
  QCheckBox *showFitLabel;
public slots:
  void display_fragment(DSRMol frag, bool clear_sel=true);
  void makeInfo();
  void clear_molecule();
  void set_label_color();
  void mousePressEvent(QMouseEvent *event);
signals:
  void sourceStringChanged();
  void updateInfo(QString);
protected:
  void initializeGL();
  void resizeGL(int width, int height);
  void paintGL();
  void mouseMoveEvent(QMouseEvent *event); 
  void wheelEvent(QWheelEvent *event);
private:
  QFont myFont; //!< a font for the atom labels
  Molecule mole;
  QColor dsrLabelColor;
  GLint vp[4];
  void draw();
  double L, moux, mouy;
  void tryfit();
  virtual QSize sizeHint() const;
  virtual QSize minimumSizeHint() const;
};

#endif // DSRGLWINDOW_H