BALL
1.5.0
include
BALL
VIEW
DIALOGS
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
13
# include <
BALL/VIEW/KERNEL/modularWidget.h
>
14
#endif
15
16
#ifndef BALL_VIEW_KERNEL_COMMON_H
17
# include <
BALL/VIEW/KERNEL/common.h
>
18
#endif
19
20
class
QMenu;
21
22
namespace
BALL
23
{
24
class
System;
25
26
namespace
VIEW
27
{
28
45
class
BALL_VIEW_EXPORT
MolecularFileDialog
46
:
public
QWidget
,
47
public
ModularWidget
48
{
49
Q_OBJECT
50
public
:
51
BALL_EMBEDDABLE
(
MolecularFileDialog
,
ModularWidget
)
52
53
56
MolecularFileDialog
(
QWidget
* parent = 0,
const
char
* name =
"MolecularFileDialog"
);
57
59
virtual
~
MolecularFileDialog
();
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
99
System
* openPDBFile();
100
102
System
* openHINFile();
103
105
System
* openMOLFile();
106
108
System
* openMOL2File();
109
111
System
* openSDFile();
112
114
System
* openACFile();
115
117
System
* openXYZFile();
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
179
virtual
String
getSupportedFileFormats()
const
;
180
182
virtual
String
getSupportedFileFormatsList()
const
;
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
208
MolecularFileDialog
(
const
MolecularFileDialog
& mfd);
209
210
211
virtual
bool
finish_(
const
String
& filename,
const
String
& system_name,
System
* system);
212
213
System
* openFile_(
String
type);
214
215
enum
FileFormats
216
{
217
PDB_FILE = 0,
218
HIN_FILE
,
219
MOL_FILE
,
220
MOL2_FILE
,
221
SD_FILE
,
222
XYZ_FILE
223
};
224
225
QAction*
save_id_
, *open_id_;
226
String
file_format_
;
227
bool
read_all_pdb_models_
;
228
};
229
230
}
// namespace VIEW
231
}
// namespace BALL
232
233
#endif // BALL_VIEW_DIALOGS_MOLECULARFILEDIALOG_H
BALL::VIEW::MolecularFileDialog::MOL_FILE
Definition:
molecularFileDialog.h:219
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition:
COMMON/global.h:52
BALL::VIEW::MolecularFileDialog::read_all_pdb_models_
bool read_all_pdb_models_
Definition:
molecularFileDialog.h:227
QWidget
BALL::VIEW::MolecularFileDialog::file_format_
String file_format_
Definition:
molecularFileDialog.h:226
BALL::System
Definition:
KERNEL/system.h:38
BALL_EMBEDDABLE
#define BALL_EMBEDDABLE(TYPE, BASE)
Definition:
embeddable.h:31
BALL
Definition:
constants.h:12
BALL::String
Definition:
string.h:56
modularWidget.h
BALL::VIEW::MainControl
Definition:
mainControl.h:114
BALL::VIEW::MolecularFileDialog
Definition:
molecularFileDialog.h:45
BALL::VIEW::MolecularFileDialog::SD_FILE
Definition:
molecularFileDialog.h:221
BALL::VIEW::MolecularFileDialog::FileFormats
FileFormats
Definition:
molecularFileDialog.h:215
global.h
BALL::VIEW::MolecularFileDialog::MOL2_FILE
Definition:
molecularFileDialog.h:220
BALL::VIEW::ModularWidget
Definition:
modularWidget.h:60
BALL::VIEW::MolecularFileDialog::setReadPDBModels
void setReadPDBModels(bool read)
Definition:
molecularFileDialog.h:184
BALL::VIEW::MolecularFileDialog::save_id_
QAction * save_id_
Definition:
molecularFileDialog.h:225
BALL::VIEW::MolecularFileDialog::HIN_FILE
Definition:
molecularFileDialog.h:218
BALL::VIEW::Message
Definition:
message.h:52
common.h
Generated by
1.8.16