LeechCraft  %{LEECHCRAFT_VERSION}
Modular cross-platform feature rich live environment.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
IMWProxy Class Referenceabstract

This interface is used for manipulating the main window. More...

#include "imwproxy.h"

Public Types

enum  WidgetArea {
  WALeft,
  WARight,
  WABottom
}
 

Public Member Functions

virtual ~IMWProxy ()
 
virtual void AddDockWidget (Qt::DockWidgetArea area, QDockWidget *widget)=0
 Adds the given dock widget to the given area. More...
 
virtual void AssociateDockWidget (QDockWidget *dock, QWidget *tab)=0
 Connects the given dock widget with the given tab. More...
 
virtual void ToggleViewActionVisiblity (QDockWidget *widget, bool visible)=0
 Toggles the visibility of the toggle view action. More...
 
virtual void SetViewActionShortcut (QDockWidget *widget, const QKeySequence &seq)=0
 Sets the visibility action shortcut of the given widget. More...
 
virtual void AddToolbar (QToolBar *toolbar, Qt::ToolBarArea area=Qt::TopToolBarArea)=0
 Adds the given toolbar at the given area. More...
 
virtual void AddSideWidget (QWidget *widget, WidgetArea area=WALeft)=0
 Adds the given widget at the given area. More...
 
virtual void ToggleVisibility ()=0
 Toggles the visibility of the main window. More...
 
virtual QMenu * GetMainMenu ()=0
 
virtual void HideMainMenu ()=0
 

Detailed Description

This interface is used for manipulating the main window.

All the interaction with LeechCraft main window should be done through this interface.

Definition at line 45 of file imwproxy.h.

Member Enumeration Documentation

Enumerator
WALeft 
WARight 
WABottom 

Definition at line 48 of file imwproxy.h.

Constructor & Destructor Documentation

virtual IMWProxy::~IMWProxy ( )
inlinevirtual

Definition at line 55 of file imwproxy.h.

Member Function Documentation

virtual void IMWProxy::AddDockWidget ( Qt::DockWidgetArea  area,
QDockWidget *  widget 
)
pure virtual

Adds the given dock widget to the given area.

This function merely calls QMainWindow::addDockWidget().

The action for toggling the visibility of this dock widget is also added to the corresponding menus by default. The ToggleViewActionVisiblity() method could be used to change that.

Parameters
[in]areaThe area to add widget to.
[in]widgetThe dock widget to add.
See Also
AssociateDockWidget(), ToggleViewActionVisiblity()
virtual void IMWProxy::AddSideWidget ( QWidget *  widget,
WidgetArea  area = WALeft 
)
pure virtual

Adds the given widget at the given area.

Parameters
[in]widgetThe widget to add.
[in]areaThe area where the widget should be added.
virtual void IMWProxy::AddToolbar ( QToolBar *  toolbar,
Qt::ToolBarArea  area = Qt::TopToolBarArea 
)
pure virtual

Adds the given toolbar at the given area.

If the toolbar is already added, it will be just moved to the area.

Parameters
[in]toolbarThe toolbar to add.
[in]areaThe area where the toolbar should be added.
virtual void IMWProxy::AssociateDockWidget ( QDockWidget *  dock,
QWidget *  tab 
)
pure virtual

Connects the given dock widget with the given tab.

This function associates the given dock widget with the given tab widget so that the dock widget is only visible when the tab is current tab.

A dock widget may be associated with only one tab widget. Calling this function repeatedly will override older associations.

Parameters
[in]dockThe dock widget to associate.
[in]tabThe tab widget for which the dock widget should be active.
See Also
AddDockWidget()
virtual QMenu* IMWProxy::GetMainMenu ( )
pure virtual
virtual void IMWProxy::HideMainMenu ( )
pure virtual
virtual void IMWProxy::SetViewActionShortcut ( QDockWidget *  widget,
const QKeySequence &  seq 
)
pure virtual

Sets the visibility action shortcut of the given widget.

Parameters
[in]widgetThe widget for which the visibility action shortcut.
[in]seqThe widget's visibility action shortcut sequence.
virtual void IMWProxy::ToggleViewActionVisiblity ( QDockWidget *  widget,
bool  visible 
)
pure virtual

Toggles the visibility of the toggle view action.

By default all newly added dock widgets have their toggle view actions shown.

Parameters
[in]widgetThe widget for which to update the toggle action visibility.
[in]visibleWhether the corresponding action should be visible.
virtual void IMWProxy::ToggleVisibility ( )
pure virtual

Toggles the visibility of the main window.


The documentation for this class was generated from the following file: