BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Slots | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BALL::Mainframe Class Reference

#include </Users/hudson/workspace/Build_BALL_Stable_on_MacOS_10_7/source/APPLICATIONS/BALLVIEW/mainframe.h>

Inheritance diagram for BALL::Mainframe:
BALL::VIEW::MainControl QMainWindow BALL::VIEW::ConnectionObject BALL::Embeddable

Public Slots

void show ()
 
bool eventFilter (QObject *, QEvent *e)
 Catch key events. More...
 
void reset ()
 remove all loaded Molecules and Representations, reset Coloring options More...
 
void about ()
 
void howToCite ()
 
- Public Slots inherited from BALL::VIEW::MainControl
virtual void show ()
 
virtual void checkMenus ()
 
void stopSimulation ()
 Stop a currently running calculation. More...
 
void complementSelection ()
 
void clearSelection ()
 
virtual void aboutToExit ()
 
void menuItemHighlighted (QAction *action)
 
virtual bool event (QEvent *e)
 Interface to QT events, e.g. to communicate with other threads. More...
 
virtual void quit (int return_value=0)
 Make the program exit. More...
 
virtual void resize (int w, int h)
 overloaded from QT for Python Interface More...
 
void setContentSize (int w, int h)
 
void toggleFullScreen ()
 
void quickSave ()
 Create a BALLView project file with the name quick.bvp in the users home dir. More...
 
void quickLoad ()
 Quickload quick.bvp in the users home die (see above) More...
 
void saveBALLViewProjectFile ()
 
void loadBALLViewProjectFile ()
 
void quickLoadConfirm ()
 

Public Member Functions

 Mainframe (QWidget *parent=0, const char *name=0)
 
virtual ~Mainframe ()
 
- Public Member Functions inherited from BALL::VIEW::MainControl
 MainControl (QWidget *parent=0, const char *name=0, String inifile=".BALL.preferences")
 
virtual ~MainControl ()
 
 MainControl (const MainControl &main_control)
 
virtual void clear ()
 
void clearData ()
 
RepresentationManagergetRepresentationManager ()
 
bool insert (Representation &rep)
 
bool remove (Representation &rep)
 
bool update (Representation &rep)
 
bool updateRepresentationsOf (const Composite &composite, bool rebuild=true, bool force=false)
 
void redrawAllRepresentations (bool rebuild_display_lists=false)
 
ShortcutRegistrygetShortcutRegistry ()
 
CompositeManagergetCompositeManager ()
 
bool insert (Composite &composite, String name="")
 
bool remove (Composite &composite, bool to_delete=true, bool update=true)
 
void update (Composite &composite, bool changed_hierarchy=true)
 
const HashSet< Composite * > & getSelection () const
 Get the HashSet with the selected (e.g. picked) Composite objects (const) More...
 
HashSet< Composite * > & getSelection ()
 Get the HashSet with the selected (e.g. picked) Composite objects. More...
 
std::list< Composite * > & getMolecularControlSelection ()
 Get the selection (highlighted items) of the MolecularControl (not the selection with checkboxes) More...
 
SystemgetSelectedSystem ()
 If exactly one System is selected in the Control, return a pointer to this system, otherwise 0. More...
 
void selectCompositeRecursive (Composite *composite, bool first_call=false)
 Select a Composite recursive and add all Atom and AtomContainer objects to the selection. More...
 
void deselectCompositeRecursive (Composite *composite, bool first_call=false)
 Select a Composite recursive and add all Atom and AtomContainer objects to the selection. More...
 
void printSelectionInfos ()
 
void saveBALLViewProjectFile (const String &filename, bool binary=true)
 Save the current configuration, structures and representations to a BALLView project file (*.bvp) More...
 
void loadBALLViewProjectFile (const String &filename)
 Load a BALLView project file. More...
 
virtual void fetchPreferences (INIFile &inifile)
 
virtual void writePreferences (INIFile &inifile)
 
virtual void restoreWindows ()
 Restore the positions the main window and of all DockWindow's from the INIFile assigned to this instance. More...
 
virtual void restoreWindows (const INIFile &inifile)
 Restore the positions the main window and of all DockWindow's from a given inifile. More...
 
INIFilegetINIFile ()
 
const INIFilegetINIFile () const
 
PreferencesgetPreferences ()
 
virtual void applyPreferences ()
 
QAction * insertMenuEntry (Position parent_id, const String &name, const QObject *receiver=0, const char *slot=0, const String &description="", QKeySequence accel=QKeySequence())
 
void removeMenuEntry (Index parent_id, QAction *action)
 
virtual QMenu * initPopupMenu (int ID)
 
void insertPopupMenuSeparator (int ID)
 
void setMenuHint (QAction *id, const String &hint)
 Set a hint for a menu entry. More...
 
String getMenuHint (QAction *id) const
 Get the hint for a menu entry. More...
 
void setDeleteEntryEnabled (bool state)
 
void insertDeleteEntry ()
 
QAction * getLastHighLightedMenuEntry ()
 Get the ID of the last highlighted menu entry (used for the HelpViewer) More...
 
bool compositesAreLocked () const
 
bool lockCompositesFor (ModularWidget *widget)
 
bool unlockCompositesFor (ModularWidget *widget)
 Lock the Composites for a given Modular Widget. More...
 
ModularWidgetgetLockingWidget ()
 Get the ModularWidget with excluse access to the Composites. More...
 
bool updateOfRepresentationRunning ()
 Return true if Representations are (re)calculated. More...
 
bool stopedSimulation ()
 Returns true, if the simulation was told to stop, but hasnt done this so far. More...
 
bool setSimulationThread (SimulationThread *thread)
 
SimulationThreadgetSimulationThread ()
 
bool useMultithreading ()
 
void setMultithreading (bool state)
 See above. More...
 
bool isBusy () const
 
void wait ()
 Wait until the MainControl is not busy anymore. More...
 
void processEvents (Size ms)
 Added overloaded method from QApplication for access in Python. More...
 
void setStatusbarText (const String &text, bool important=false, bool beep=false)
 
void setStatusbarText (const QString &text, bool important=false, bool beep=false)
  More...
 
String getStatusbarText () const
 
const FragmentDBgetFragmentDB () const
 Get a const reference for the fragment database. More...
 
const ModelInformationgetModelInformation () const
 
void setModelInformation (ModelInformation *mi)
 
String getWorkingDir () const
 
void setWorkingDir (const String &dir)
 Set the working directory for the next file dialog and file operation to the given directory. More...
 
void enableLoggingToFile ()
 
void disableLoggingToFile ()
 
void setLoggingFilename (const String &string)
 
const StringgetLoggingFilename () const
 See above. More...
 
bool isAboutToQuit ()
 
virtual void dump (std::ostream &s=std::cout, Size depth=0) const
 
virtual void openFile (const String &file)
 
void addModularWidget (ModularWidget *widget)
 
void removeModularWidget (ModularWidget *widget)
 
virtual void onNotify (Message *message)
 
void sendMessage (Message &message)
 
- Public Member Functions inherited from BALL::VIEW::ConnectionObject
 ConnectionObject ()
 
virtual ~ConnectionObject ()
 
virtual void destroy ()
 
void registerConnectionObject (ConnectionObject &object)
 
void unregisterConnectionObject (ConnectionObject &object)
 
bool isConnectionObjectRegistered (const ConnectionObject &object)
 
ConnectionObjectgetParent () const
 
ConnectionObjectgetRoot ()
 
virtual bool isValid () const
 
- Public Member Functions inherited from BALL::Embeddable
 Embeddable (const String &identifier="<Embeddable>")
 
 Embeddable (const Embeddable &embeddable)
 
virtual ~Embeddable ()
 
void setIdentifier (const String &identifier)
 
const StringgetIdentifier () const
 
void unregisterThis ()
 
virtual void registerThis ()
 

Protected Member Functions

void changeEvent (QEvent *evt)
 
- Protected Member Functions inherited from BALL::VIEW::MainControl
virtual void initializePreferencesTab_ ()
 
void stopedSimulation_ ()
 
void lockComposites_ ()
 
bool remove_ (Composite &composite, bool update_representations_of_parent=true, bool to_delete=true)
 
void selectComposites_ (GeometricObjectSelectionMessage &message)
 
void reduceSelection_ (Composite *const composite)
 
void setup_ ()
 
void complementSelectionHelper_ (Composite &c)
 
void setBusyMode_ (bool state)
 
void setPreferencesEnabled_ (bool state)
 
void init_ ()
 
virtual void closeEvent (QCloseEvent *evt)
 
- Protected Member Functions inherited from BALL::VIEW::ConnectionObject
void onNotify_ (Message *message)
 
void notify_ (Message *message)
 
void notify_ (Message &message)
 

Protected Attributes

Scenescene_
 
- Protected Attributes inherited from BALL::VIEW::MainControl
bool about_to_quit_
 
bool multi_threading_mode_
 
FragmentDB fragment_db_
 
ModelInformationmodel_information_
 
HashSet< Composite * > selection_
 
std::list< Composite * > control_selection_
 
QLabel * message_label_
 
RepresentationManager primitive_manager_
 
CompositeManager composite_manager_
 
ShortcutRegistry shortcut_registry_
 
MainControlPreferencesmain_control_preferences_
 
OpenSavePreferencesopen_save_preferences_
 
NetworkPreferencesnetwork_preferences_
 
Preferencespreferences_dialog_
 
INIFile preferences_file_
 
bool composites_locked_
 
ModularWidgetlocking_widget_
 
bool stop_simulation_
 
SimulationThreadsimulation_thread_
 
std::list< ModularWidget * > modular_widgets_
 
QLabel * simulation_icon_
 
QLabel * rep_label_
 
Position rep_label_nr_
 
String working_dir_
 
String logging_file_name_
 
bool logging_to_file_
 
File logging_file_
 
bool important_text_in_statusbar_
 
bool was_not_busy_
 
Index rep_label_delta_
 
QTimer timer_
 
QTimer render_timer_
 
Mutex composites_locked_mutex_
 
QAction * stop_simulation_action_
 
QAction * fullscreen_action_
 
QAction * complement_selection_action_
 
QAction * clear_selection_action_
 
QAction * open_action_
 
QAction * save_project_action_
 
QAction * preferences_action_
 
QAction * delete_action_
 
QAction * qload_action_
 
QAction * qsave_action_
 
QAction * last_highlighted_menu_entry_
 
HashMap< Position, QMenu * > id_to_menu_
 
QPoint last_point_
 
QSize last_size_
 
QByteArray last_state_
 

Additional Inherited Members

- Public Types inherited from BALL::VIEW::MainControl
enum  PopUpID {
  FILE = 10001, FILE_OPEN, FILE_OPEN_GRID, FILE_IMPORT,
  FILE_EXPORT, FILE_MONITOR, EDIT = 10100, BUILD = 10200,
  DISPLAY = 10300, DISPLAY_CREATE, DISPLAY_VIEWPOINT, DISPLAY_STEREO,
  DISPLAY_ANIMATION, MOLECULARMECHANICS = 10400, CHOOSE_FF, TOOLS = 10500,
  TOOLS_GRID, TOOLS_PYTHON, WINDOWS = 10600, USER = 10700,
  MACRO = 10750, HELP = 10800
}
 
- Static Public Member Functions inherited from BALL::VIEW::MainControl
static MainControlgetMainControl (const QObject *object)
 
- Protected Slots inherited from BALL::VIEW::MainControl
virtual void applyPreferencesClicked_ ()
 
virtual void okPreferencesClicked_ ()
 
void clearStatusBarText_ ()
 
virtual void deleteClicked ()
 
void updateRepLabel_ ()
 
- Static Protected Member Functions inherited from BALL::Embeddable
static void registerInstance_ (const std::type_info &type, const Embeddable *instance)
 
static void unregisterInstance_ (const Embeddable *instance)
 
static Size countInstances_ (const std::type_info &type)
 
static EmbeddablegetInstance_ (const std::type_info &type, Position index)
 
static EmbeddablegetInstance_ (const std::type_info &type, const String &identifier)
 
- Static Protected Attributes inherited from BALL::VIEW::MainControl
static const char * simulation_running_xpm_ []
 
static const char * simulation_stoped_xpm_ []
 

Detailed Description

Definition at line 22 of file mainframe.h.

Constructor & Destructor Documentation

BALL::Mainframe::Mainframe ( QWidget parent = 0,
const char *  name = 0 
)

Definition at line 57 of file mainframe.C.

BALL::Mainframe::~Mainframe ( )
virtual

Definition at line 222 of file mainframe.C.

Member Function Documentation

void BALL::Mainframe::about ( )
slot

Definition at line 359 of file mainframe.C.

void BALL::Mainframe::changeEvent ( QEvent evt)
protected

Definition at line 386 of file mainframe.C.

bool BALL::Mainframe::eventFilter ( QObject sender,
QEvent e 
)
slot

Catch key events.

Definition at line 227 of file mainframe.C.

void BALL::Mainframe::howToCite ( )
slot

Definition at line 301 of file mainframe.C.

void BALL::Mainframe::reset ( )
slot

remove all loaded Molecules and Representations, reset Coloring options

Definition at line 285 of file mainframe.C.

void BALL::Mainframe::show ( )
slot

Definition at line 306 of file mainframe.C.

Member Data Documentation

Scene* BALL::Mainframe::scene_
protected

Definition at line 58 of file mainframe.h.