API reference - Class MainWindowNotation used in Ruby API documentation Description: The main application window and central controller object Class hierarchy: MainWindow » QMainWindow » QWidget » QObject
This object first is the main window but also the main controller. The main controller is the port by which access can be gained to all the data objects, view and other aspects of the program. Public constructors
Public methods
Public static methods and constants
Deprecated methods (protected, public, static, non-static and constructors)
Detailed descriptionvoid _createDescription: Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. void _destroyDescription: Explicitly destroys the object Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing. [const] bool _destroyed?Description: Returns a value indicating whether the object was already destroyed This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself. [const] bool _is_const_object?Description: Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self. void _manageDescription: Marks the object as managed by the script side. After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required. Usually it's not required to call this method. It has been introduced in version 0.24. void _unmanageDescription: Marks the object as no longer owned by the script side. Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur. Usually it's not required to call this method. It has been introduced in version 0.24. void add_current_view_observer(ObserverBase observer)Description: Add an observer for the "current view changed" event If the current view changes, this observer is triggered. The integer slot of the observer will receive the number of the view active before. The current view's reference is already updated when this event is issued. void add_new_view_observer(ObserverBase observer)Description: Add an observer for a "new view" event If a new view is created, this observer will receive a signal. The integer slot of this observer will receive the index of the newly created view. void cancelDescription: Cancel current editing operations This method call cancels all current editing operations and restores normal mouse mode. void clone_current_viewDescription: Clone the current view and make it current void close_allDescription: Closes all views This method unconditionally closes all views. No dialog will be opened if unsaved edits exist. This method was added in version 0.18. void close_current_viewDescription: Close the current view This method does not open a dialog to query which cell view to close if multiple cells are opened in the view but rather closes all cells. void cm_adjust_originDescription: 'cm_adjust_origin' action (bound to a menu) This method has been added in version 0.18. void cm_bookmark_viewDescription: 'cm_bookmark_view' action (bound to a menu) void cm_cancelDescription: 'cm_cancel' action (bound to a menu) void cm_cell_copyDescription: 'cm_cell_copy' action (bound to a menu) This method has been added in version 0.20. void cm_cell_cutDescription: 'cm_cell_cut' action (bound to a menu) This method has been added in version 0.20. void cm_cell_deleteDescription: 'cm_cell_delete' action (bound to a menu) This method has been added in version 0.18. void cm_cell_flattenDescription: 'cm_cell_flatten' action (bound to a menu) void cm_cell_hideDescription: 'cm_cell_hide' action (bound to a menu) void cm_cell_pasteDescription: 'cm_cell_paste' action (bound to a menu) This method has been added in version 0.20. void cm_cell_renameDescription: 'cm_cell_rename' action (bound to a menu) This method has been added in version 0.18. void cm_cell_selectDescription: 'cm_cell_select' action (bound to a menu) void cm_cell_showDescription: 'cm_cell_show' action (bound to a menu) void cm_cell_show_allDescription: 'cm_cell_show_all' action (bound to a menu) void cm_clear_layerDescription: 'cm_clear_layer' action (bound to a menu) This method has been added in version 0.18. void cm_cloneDescription: 'cm_clone' action (bound to a menu) void cm_closeDescription: 'cm_close' action (bound to a menu) void cm_close_allDescription: 'cm_close_all' action (bound to a menu) This method has been added in version 0.24. void cm_copyDescription: 'cm_copy' action (bound to a menu) void cm_copy_layerDescription: 'cm_copy_layer' action (bound to a menu) This method has been added in version 0.22. void cm_cutDescription: 'cm_cut' action (bound to a menu) void cm_dec_max_hierDescription: 'cm_dec_max_hier' action (bound to a menu) void cm_deleteDescription: 'cm_delete' action (bound to a menu) void cm_delete_layerDescription: 'cm_delete_layer' action (bound to a menu) This method has been added in version 0.18. void cm_edit_layerDescription: 'cm_edit_layer' action (bound to a menu) This method has been added in version 0.18. void cm_exitDescription: 'cm_exit' action (bound to a menu) void cm_goto_positionDescription: 'cm_goto_position' action (bound to a menu) void cm_help_aboutDescription: 'cm_help_about' action (bound to a menu) void cm_inc_max_hierDescription: 'cm_inc_max_hier' action (bound to a menu) void cm_last_display_stateDescription: 'cm_last_display_state' action (bound to a menu) void cm_layout_propsDescription: 'cm_layout_props' action (bound to a menu) void cm_load_bookmarksDescription: 'cm_load_bookmarks' action (bound to a menu) void cm_load_layer_propsDescription: 'cm_load_layer_props' action (bound to a menu) void cm_lv_add_missingDescription: 'cm_lv_add_missing' action (bound to a menu) void cm_lv_deleteDescription: 'cm_lv_delete' action (bound to a menu) void cm_lv_expand_allDescription: 'cm_lv_expand_all' action (bound to a menu) void cm_lv_groupDescription: 'cm_lv_group' action (bound to a menu) void cm_lv_hideDescription: 'cm_lv_hide' action (bound to a menu) void cm_lv_hide_allDescription: 'cm_lv_hide_all' action (bound to a menu) void cm_lv_insertDescription: 'cm_lv_insert' action (bound to a menu) void cm_lv_new_tabDescription: 'cm_lv_new_tab' action (bound to a menu) void cm_lv_regroup_by_datatypeDescription: 'cm_lv_regroup_by_datatype' action (bound to a menu) void cm_lv_regroup_by_indexDescription: 'cm_lv_regroup_by_index' action (bound to a menu) void cm_lv_regroup_by_layerDescription: 'cm_lv_regroup_by_layer' action (bound to a menu) void cm_lv_regroup_flattenDescription: 'cm_lv_regroup_flatten' action (bound to a menu) void cm_lv_remove_tabDescription: 'cm_lv_remove_tab' action (bound to a menu) void cm_lv_remove_unusedDescription: 'cm_lv_remove_unused' action (bound to a menu) void cm_lv_renameDescription: 'cm_lv_rename' action (bound to a menu) void cm_lv_rename_tabDescription: 'cm_lv_rename_tab' action (bound to a menu) void cm_lv_select_allDescription: 'cm_lv_select_all' action (bound to a menu) void cm_lv_showDescription: 'cm_lv_show' action (bound to a menu) void cm_lv_show_allDescription: 'cm_lv_show_all' action (bound to a menu) void cm_lv_show_onlyDescription: 'cm_lv_show_only' action (bound to a menu) This method has been added in version 0.20. void cm_lv_sort_by_dliDescription: 'cm_lv_sort_by_dli' action (bound to a menu) void cm_lv_sort_by_idlDescription: 'cm_lv_sort_by_idl' action (bound to a menu) void cm_lv_sort_by_ildDescription: 'cm_lv_sort_by_ild' action (bound to a menu) void cm_lv_sort_by_ldiDescription: 'cm_lv_sort_by_ldi' action (bound to a menu) void cm_lv_sort_by_nameDescription: 'cm_lv_sort_by_name' action (bound to a menu) void cm_lv_sourceDescription: 'cm_lv_source' action (bound to a menu) void cm_lv_ungroupDescription: 'cm_lv_ungroup' action (bound to a menu) void cm_macro_editorDescription: 'cm_macro_editor' action (bound to a menu) void cm_manage_bookmarksDescription: 'cm_manage_bookmarks' action (bound to a menu) void cm_max_hierDescription: 'cm_max_hier' action (bound to a menu) void cm_max_hier_0Description: 'cm_max_hier_0' action (bound to a menu) void cm_max_hier_1Description: 'cm_max_hier_1' action (bound to a menu) void cm_navigator_closeDescription: 'cm_navigator_close' action (bound to a menu) void cm_navigator_freezeDescription: 'cm_navigator_freeze' action (bound to a menu) void cm_new_cellDescription: 'cm_new_cell' action (bound to a menu) This method has been added in version 0.18. void cm_new_layerDescription: 'cm_new_layer' action (bound to a menu) This method has been added in version 0.18. void cm_new_layoutDescription: 'cm_new_layout' action (bound to a menu) This method has been added in version 0.18. void cm_new_panelDescription: 'cm_new_panel' action (bound to a menu) This method has been added in version 0.20. void cm_next_display_stateDescription: 'cm_next_display_state' action (bound to a menu) void cm_openDescription: 'cm_open' action (bound to a menu) void cm_open_current_cellDescription: 'cm_open_current_cell' action (bound to a menu) This method has been added in version 0.18. void cm_open_new_viewDescription: 'cm_open_new_view' action (bound to a menu) void cm_open_tooDescription: 'cm_open_too' action (bound to a menu) void cm_pan_downDescription: 'cm_pan_down' action (bound to a menu) void cm_pan_leftDescription: 'cm_pan_left' action (bound to a menu) void cm_pan_rightDescription: 'cm_pan_right' action (bound to a menu) void cm_pan_upDescription: 'cm_pan_up' action (bound to a menu) void cm_pasteDescription: 'cm_paste' action (bound to a menu) void cm_printDescription: 'cm_print' action (bound to a menu) This method has been added in version 0.21.13. void cm_pull_inDescription: 'cm_pull_in' action (bound to a menu) This method has been added in version 0.20. void cm_reader_optionsDescription: 'cm_reader_options' action (bound to a menu) This method has been added in version 0.18. void cm_redoDescription: 'cm_redo' action (bound to a menu) void cm_redrawDescription: 'cm_redraw' action (bound to a menu) void cm_reloadDescription: 'cm_reload' action (bound to a menu) void cm_restore_sessionDescription: 'cm_restore_session' action (bound to a menu) This method has been added in version 0.18. void cm_saveDescription: 'cm_save' action (bound to a menu) This method has been added in version 0.18. void cm_save_allDescription: 'cm_save_all' action (bound to a menu) This method has been added in version 0.24. void cm_save_asDescription: 'cm_save_as' action (bound to a menu) This method has been added in version 0.18. void cm_save_bookmarksDescription: 'cm_save_bookmarks' action (bound to a menu) void cm_save_current_cell_asDescription: 'cm_save_current_cell_as' action (bound to a menu) This method has been added in version 0.18. void cm_save_layer_propsDescription: 'cm_save_layer_props' action (bound to a menu) void cm_save_sessionDescription: 'cm_save_session' action (bound to a menu) This method has been added in version 0.18. void cm_screenshotDescription: 'cm_screenshot' action (bound to a menu) void cm_sel_flip_xDescription: 'cm_sel_flip_x' action (bound to a menu) This method has been added in version 0.18. void cm_sel_flip_yDescription: 'cm_sel_flip_y' action (bound to a menu) This method has been added in version 0.18. void cm_sel_free_rotDescription: 'cm_sel_free_rot' action (bound to a menu) This method has been added in version 0.18. void cm_sel_moveDescription: 'cm_sel_move' action (bound to a menu) This method has been added in version 0.18. void cm_sel_move_toDescription: 'cm_sel_move_to' action (bound to a menu) This method has been added in version 0.24. void cm_sel_rot_ccwDescription: 'cm_sel_rot_ccw' action (bound to a menu) This method has been added in version 0.18. void cm_sel_rot_cwDescription: 'cm_sel_rot_cw' action (bound to a menu) This method has been added in version 0.18. void cm_sel_scaleDescription: 'cm_sel_scale' action (bound to a menu) This method has been added in version 0.18. void cm_select_allDescription: 'cm_select_all' action (bound to a menu) This method has been added in version 0.22. void cm_select_cellDescription: 'cm_select_cell' action (bound to a menu) void cm_select_current_cellDescription: 'cm_select_current_cell' action (bound to a menu) void cm_setupDescription: 'cm_setup' action (bound to a menu) void cm_show_propertiesDescription: 'cm_show_properties' action (bound to a menu) void cm_technologiesDescription: 'cm_technologies' action (bound to a menu) This method has been added in version 0.22. void cm_undoDescription: 'cm_undo' action (bound to a menu) void cm_unselect_allDescription: 'cm_unselect_all' action (bound to a menu) This method has been added in version 0.22. void cm_view_logDescription: 'cm_view_log' action (bound to a menu) This method has been added in version 0.20. void cm_zoom_fitDescription: 'cm_zoom_fit' action (bound to a menu) void cm_zoom_fit_selDescription: 'cm_zoom_fit_sel' action (bound to a menu) This method has been added in version 0.18. void cm_zoom_inDescription: 'cm_zoom_in' action (bound to a menu) void cm_zoom_outDescription: 'cm_zoom_out' action (bound to a menu) void createDescription: Ensures the C++ object is created Use of this method is deprecated. Use _create instead CellView create_layout(int mode)Description: Create a new, empty layout
Create the layout in the current view, replacing the current layouts (mode 0), in a new view (mode 1) or adding it to the current view (mode 2). In mode 1, the new view is made the current one. This version uses the initial technology and associates it with the new layout. CellView create_layout(string tech,int mode)Description: Create a new, empty layout with the given technology
Create the layout in the current view, replacing the current layouts (mode 0), in a new view (mode 1) or adding it to the current view (mode 2). In mode 1, the new view is made the current one. If the technology name is not a valid technology name, the default technology will be used. This version was introduced in version 0.22. int create_viewDescription: Create a new, empty view
Creates an empty view that can be filled with layouts using the load_layout and create_layout methods on the view object. Use the view method to obtain the view object from the view index. This method has been added in version 0.22. LayoutView ptr current_viewDescription: Return a reference to the current view's object
[const] int current_view_indexDescription: Return the current view's index
This method will return the index of the current view. void destroyDescription: Explicitly destroys the object Use of this method is deprecated. Use _destroy instead [const] bool destroyed?Description: Returns a value indicating whether the object was already destroyed Use of this method is deprecated. Use _destroyed? instead void enable_edits(bool enable)Description: Enable or disable edits
This method allows putting the application into read-only mode by disabling all edit functions. For doing so, this method has to be called with a 'false' argument. Calling it with a 'true' parameter enables all edits again. This method must not be confused with the edit/viewer mode. That mode is a global option with heavy impact on the way, the database manages it's content. The MainWindow's enable_edits method is intended to temporarily disable all menu entries and functions which could allow the user to alter the database. void exitDescription: Schedule an exit for the application This method does not immediately exit the application but sends an exit request to the application which will cause a clean shutdown of the GUI. [const] double grid_micronDescription: Get the global grid in micron
The global grid is used at various places, i.e. for ruler snapping, for grid display etc. string initial_technologyDescription: Gets the technology used for creating or loading layouts (unless explicitly specified)
This method was added in version 0.22. Python specific notes:The object exposes a readable attribute 'initial_technology'. This is the getter. void initial_technology=(string tech)Description: Sets the technology used for creating or loading layouts (unless explicitly specified)
Setting the technology will have an effect on the next load_layout or create_layout operation which does not explicitly specify the technology but might not be reflected correctly in the reader options dialog and changes will be reset when the application is restarted. This method was added in version 0.22. Python specific notes:The object exposes a writable attribute 'initial_technology'. This is the setter. [static] MainWindow ptr instanceDescription: Gets application's main window instance This method has been added in version 0.24. [const] bool is_const_object?Description: Returns a value indicating whether the reference is a const reference Use of this method is deprecated. Use _is_const_object? instead CellView load_layout(string filename,int mode)Description: Load a new layout
Loads the given file into the current view, replacing the current layouts (mode 0), into a new view (mode 1) or adding the layout to the current view (mode 2). In mode 1, the new view is made the current one. This version will use the initial technology and the default reader options. Others versions are provided which allow specification of technology and reader options explicitly. CellView load_layout(string filename,string tech,int mode)Description: Load a new layout and associate it with the given technology
Loads the given file into the current view, replacing the current layouts (mode 0), into a new view (mode 1) or adding the layout to the current view (mode 2). In mode 1, the new view is made the current one. If the technology name is not a valid technology name, the default technology will be used. This version was introduced in version 0.22. CellView load_layout(string filename,const LoadLayoutOptions options,int mode)Description: Load a new layout with the given options
Loads the given file into the current view, replacing the current layouts (mode 0), into a new view (mode 1) or adding the layout to the current view (mode 2). In mode 1, the new view is made the current one. This version was introduced in version 0.22. CellView load_layout(string filename,const LoadLayoutOptions options,string tech,int mode)Description: Load a new layout with the given options and associate it with the given technology
Loads the given file into the current view, replacing the current layouts (mode 0), into a new view (mode 1) or adding the layout to the current view (mode 2). In mode 1, the new view is made the current one. If the technology name is not a valid technology name, the default technology will be used. This version was introduced in version 0.22. Manager managerDescription: Gets the Manager object of this window The manager object is responsible to managing the undo/redo stack. Usually this object is not required. It's more convenient and safer to use the related methods provided by LayoutView (LayoutView#transaction, LayoutView#commit) and MainWindow (such as MainWindow#cm_undo and MainWindow#cm_redo). This method has been added in version 0.24. AbstractMenu menuDescription: Return a reference to the abstract menu
void message(string message,int time)Description: Display a message in the status bar
This given message is shown in the status bar for the given time. This method has been added in version 0.18. [static] new MainWindow ptr newDescription: Creates a new object of this class Python specific notes:This method is the default initializer of the object LoadLayoutOptions reader_optionsDescription: Access to the current reader options
Modifying the current reader options will have an effect on the next load_layout operation which does not specify options explicitly but might not be reflected correctly in the reader options dialog and changes will be reset when the application is restarted. This method was added in version 0.18. void redrawDescription: Redraw the current view Issues a redraw request to the current view. This usually happens automatically, so this method does not need to be called in most relevant cases. void remove_current_view_observer(ObserverBase observer)Description: Remove an observer for the change of the "current view changed" event void remove_new_view_observer(ObserverBase observer)Description: Remove an observer for a "new view" event void resize(int width,int height)Description: Resize the window
This method resizes the window to the given target size including decoration such as menu bar and control panels void restore_session(string fn)Description: Restore a session from the given file
The session stored in the given session file is restored. All existing views are closed and all layout edits are discarded without notification. This method was added in version 0.18. void save_session(string fn)Description: Save the session to the given file
The session is saved to the given session file. Any existing layout edits are not automatically saved together with the session. The session just holds display settings and annotation objects. If layout edits exist, they have to be saved explicitly in a separate step. This method was added in version 0.18. void select_view(int index)Description: Select the view with the given index
This method will make the view with the given index the current (front) view. void synchroneous(bool sync_mode)Description: Put the main window into synchronous mode
Use of this method is deprecated. Use synchronous= instead void synchronous=(bool sync_mode)Description: Put the main window into synchronous mode
In synchronous mode, an application is allowed to block on redraw. While redrawing, no user interactions are possible. Although this is not desirable for smooth operation, it can be beneficial for test or automation purposes, i.e. if a screenshot needs to be produced once the application has finished drawing. Python specific notes:The object exposes a writable attribute 'synchronous'. This is the setter. LayoutView ptr view(int n)Description: Return a reference to a view object by index
[const] unsigned int viewsDescription: Return the number of views
|