#include <fileObserver.h>
Inheritance diagram for VIEW::FileObserver:
Public Slots | |
void | updateFile () |
Look for updates in the file. | |
void | start () |
Start the observation. | |
void | stop () |
Stop the observation. | |
void | chooseFile () |
Choose a file and start the observer. | |
Public Member Functions | |
FileObserver (QWidget *parent=0, const char *name=0) throw () | |
virtual void | initializeWidget (MainControl &main_control) throw () |
Initialize the widget. | |
virtual void | checkMenu (MainControl &main_control) throw () |
Menu checking method. | |
void | setFileName (String filename) |
Set the name of the molecular file to be observed. | |
String | getFileName () const |
void | setUpdateInterval (Size msec) |
Set the update interval in milli seconds. | |
Protected Attributes | |
QAction * | start_action_ |
QAction * | stop_action_ |
QTimer | timer_ |
String | file_name_ |
QDateTime | last_vis_time_ |
When the file changes, all current Systems are deleted and the new content of the observed molecular file is shown. Supported are all files from the MolecularFileDialog. A MolecularFileDialog must have been inserted into the MainControl.
Usage: (in from MainControl derived class)
FileObserver* fo = new FileObserver(this, "FileObserver"); fo->setFileName("foo.pdb"); fo->start();
|
Menu checking method. This method is called MainControl::checkMenus before a popup menu is shown. It should be used to update the state of menu entries (e.g. disable or enable entries).
Reimplemented from VIEW::ModularWidget. |
|
Initialize the widget.
Reimplemented from VIEW::DockWidget. |