BALL 1.5.0
Loading...
Searching...
No Matches
molecularFileDialog.h
Go to the documentation of this file.
1// -*- Mode: C++; tab-width: 2; -*-
2// vi: set ts=2:
3//
4
5#ifndef BALL_VIEW_DIALOGS_MOLECULARFILEDIALOG_H
6#define BALL_VIEW_DIALOGS_MOLECULARFILEDIALOG_H
7
8#ifndef BALL_COMMON_GLOBAL_H
9# include <BALL/COMMON/global.h>
10#endif
11
12#ifndef BALL_VIEW_KERNEL_MODULARWIDGET_H
14#endif
15
16#ifndef BALL_VIEW_KERNEL_COMMON_H
18#endif
19
20class QMenu;
21
22namespace BALL
23{
24 class System;
25
26 namespace VIEW
27 {
28
46 : public QWidget,
47 public ModularWidget
48 {
49 Q_OBJECT
50 public:
52
53
56 MolecularFileDialog(QWidget* parent = 0, const char* name = "MolecularFileDialog");
57
60
67 virtual void initializeWidget(MainControl& main_control);
68
74 virtual bool canHandle(const String& fileformat) const;
75
80 virtual bool openFile(const String& filename);
81
87 virtual System* openMolecularFile(const String& file);
88
93 virtual System* openMolecularFile(const String& filename,
94 const String& filetype,
95 const String& system_name);
96
97
100
103
106
109
112
115
118
121 System* readPDBFile(String filename, String system_name);
122
125 System* readHINFile(String filename, String system_name);
126
129 System* readMOLFile(String filename, String system_name);
130
133 System* readMOL2File(String filename, String system_name);
134
137 System* readSDFile(String filename, String system_name);
138
141 System* readACFile(String filename, String system_name);
142
145 System* readXYZFile(String filename, String system_name);
146
149 bool writePDBFile(String filename, const System& system);
150
153 bool writeHINFile(String filename, const System& system);
154
157 bool writeMOLFile(String filename, const System& system);
158
161 bool writeMOL2File(String filename, const System& system);
162
165 bool writeSDFile(String filename, const System& system);
166
169 bool writeACFile(String filename, const System& system);
170
173 bool writeXYZFile(String filename, const System& system);
174
176 virtual void checkMenu(MainControl& main_control);
177
180
183
184 void setReadPDBModels(bool read) { read_all_pdb_models_ = read; }
185
186 public Q_SLOTS:
187
195 virtual void readFiles();
196
200 virtual bool writeFile();
201
202
203 protected:
204
205 virtual void onNotify(Message *message);
206
207 // Only for Python interface
209
210
211 virtual bool finish_(const String& filename, const String& system_name, System* system);
212
214
224
225 QAction* save_id_, *open_id_;
228 };
229
230 } // namespace VIEW
231} // namespace BALL
232
233#endif // BALL_VIEW_DIALOGS_MOLECULARFILEDIALOG_H
#define BALL_VIEW_EXPORT
ModularWidget(const char *name="<ModularWidget>")
virtual bool openFile(const String &filename)
bool writeSDFile(String filename, const System &system)
System * readSDFile(String filename, String system_name)
bool writeMOL2File(String filename, const System &system)
virtual void checkMenu(MainControl &main_control)
Overloaded from ModularWidget.
virtual bool finish_(const String &filename, const String &system_name, System *system)
System * readPDBFile(String filename, String system_name)
System * readMOL2File(String filename, String system_name)
MolecularFileDialog(const MolecularFileDialog &mfd)
virtual void onNotify(Message *message)
virtual String getSupportedFileFormats() const
bool writeACFile(String filename, const System &system)
virtual void initializeWidget(MainControl &main_control)
virtual bool canHandle(const String &fileformat) const
virtual System * openMolecularFile(const String &file)
System * readHINFile(String filename, String system_name)
bool writeHINFile(String filename, const System &system)
virtual String getSupportedFileFormatsList() const
System * readMOLFile(String filename, String system_name)
System * readACFile(String filename, String system_name)
System * openFile_(String type)
MolecularFileDialog(QWidget *parent=0, const char *name="MolecularFileDialog")
bool writeXYZFile(String filename, const System &system)
System * readXYZFile(String filename, String system_name)
bool writeMOLFile(String filename, const System &system)
bool writePDBFile(String filename, const System &system)
#define BALL_EMBEDDABLE(TYPE, BASE)
Definition embeddable.h:31