CycloBranch
cGraphWidget.h
Go to the documentation of this file.
1
7#ifndef _CGRAPHWIDGET_H
8#define _CGRAPHWIDGET_H
9
10#include <string>
11#include <fstream>
12#include <QWidget>
13#include <QDesktopServices>
14#include <QUrl>
15#include <QFileInfo>
16#include "core/utilities.h"
17
18
19using namespace std;
20
21
22// forward declaration
23class QTextBrowser;
24class QVBoxLayout;
25
26
30class cGraphWidget : public QWidget
31{
32 Q_OBJECT
33
34public:
35
36
41
42
47
48
54 void setHTML(string html, bool reportisomers);
55
56
61 string getHTML();
62
63
68 void updateView(bool reportisomers);
69
70
75 void closeEvent(QCloseEvent *event);
76
77
82 void store(ofstream& os);
83
84
89 void load(ifstream& is);
90
91
92private:
93
94 QVBoxLayout* layout;
95 QTextBrowser* textbrowser;
96 string htmlstring;
97
98
99protected:
100
101
106 void keyPressEvent(QKeyEvent *event);
107
108
109};
110
111#endif
The widget representing the dialog 'View->Graph'.
Definition: cGraphWidget.h:31
void keyPressEvent(QKeyEvent *event)
Handle a key press event.
Definition: cGraphWidget.cpp:76
string getHTML()
Get the HTML text from the widget.
Definition: cGraphWidget.cpp:45
void setHTML(string html, bool reportisomers)
Set the HTML text into the widget.
Definition: cGraphWidget.cpp:39
~cGraphWidget()
The destructor.
Definition: cGraphWidget.cpp:32
void closeEvent(QCloseEvent *event)
Handle the window close event.
Definition: cGraphWidget.cpp:59
void load(ifstream &is)
Load the content from an input stream.
Definition: cGraphWidget.cpp:70
void store(ofstream &os)
Store the content into an output stream.
Definition: cGraphWidget.cpp:65
void updateView(bool reportisomers)
Update HTML string if report isomers state is changed.
Definition: cGraphWidget.cpp:50
cGraphWidget()
The constructor.
Definition: cGraphWidget.cpp:9
Auxiliary funtions and structures.