LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
IMWProxy Class Referenceabstract

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

#include "imwproxy.h"

Classes

struct  DockWidgetParams
 

Public Types

enum  WidgetArea {
  WALeft,
  WARight,
  WABottom
}
 

Public Member Functions

virtual ~IMWProxy ()
 
virtual void AddDockWidget (QDockWidget *widget, const DockWidgetParams &params)=0
 Adds the given dock widget to the main window. More...
 
virtual void AssociateDockWidget (QDockWidget *dock, QWidget *tab)=0
 Connects the given dock widget with the given tab. More...
 
virtual void SetDockWidgetVisibility (QDockWidget *dock, bool visible)=0
 Sets the visibility of the previously added dock widget. 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 ToggleVisibility ()=0
 Toggles the visibility of the main window. More...
 
virtual void ShowMain ()=0
 Show/raise main window. More...
 
virtual QMenu * GetMainMenu ()=0
 Returns the main LeechCraft menu. More...
 
virtual void HideMainMenu ()=0
 Hides the main LeechCraft menu. More...
 

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 25 of file imwproxy.h.

Member Enumeration Documentation

◆ WidgetArea

Enumerator
WALeft 
WARight 
WABottom 

Definition at line 28 of file imwproxy.h.

Constructor & Destructor Documentation

◆ ~IMWProxy()

virtual IMWProxy::~IMWProxy ( )
inlinevirtual

Definition at line 35 of file imwproxy.h.

Member Function Documentation

◆ AddDockWidget()

virtual void IMWProxy::AddDockWidget ( QDockWidget *  widget,
const DockWidgetParams params 
)
pure virtual

Adds the given dock widget to the main window.

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]widgetThe dock widget to add.
[in]paramsThe parameters of the newly added dock widget.
See also
AssociateDockWidget(), ToggleViewActionVisiblity()

◆ AssociateDockWidget()

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()

◆ GetMainMenu()

virtual QMenu* IMWProxy::GetMainMenu ( )
pure virtual

Returns the main LeechCraft menu.

Returns
The main LeechCraft menu.
See also
HideMainMenu()

◆ HideMainMenu()

virtual void IMWProxy::HideMainMenu ( )
pure virtual

Hides the main LeechCraft menu.

Calling this function hides the main LeechCraft menu in the tabbar. There is no way of showing it back again after that. The menu is still accessible via GetMainMenu() and can be shown via other means.

See also
GetMainMenu().

◆ SetDockWidgetVisibility()

virtual void IMWProxy::SetDockWidgetVisibility ( QDockWidget *  dock,
bool  visible 
)
pure virtual

Sets the visibility of the previously added dock widget.

This function sets the visibility of the given dock (which should be a dock widget previously added via AddDockWidget()). If dock has been associated with a tab via AssociateDockWidget(), calling this function makes sure that the visibility of the dock dock will be equal to visible.

Note
This function should be called after AssociateDockWidget() if the later is called at all.
Parameters
[in]dockThe dock widget previously added via AddDockWidget().
[in]visibleThe visibility of the dock widget.
See also
AddDockWidget(), AssociateDockWidget()

◆ SetViewActionShortcut()

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.

◆ ShowMain()

virtual void IMWProxy::ShowMain ( )
pure virtual

Show/raise main window.

◆ ToggleViewActionVisiblity()

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.

◆ ToggleVisibility()

virtual void IMWProxy::ToggleVisibility ( )
pure virtual

Toggles the visibility of the main window.


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