Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
CAViewPortContainer Class Reference

Holds together resizable viewports. More...

#include <viewportcontainer.h>

Inheritance diagram for CAViewPortContainer:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CAViewPortContainer (QWidget *p)
 ~CAViewPortContainer ()
void addViewPort (CAViewPort *v, QSplitter *s=0)
void removeViewPort (CAViewPort *v)
CAViewPortsplitHorizontally (CAViewPort *v=0)
CAViewPortsplitVertically (CAViewPort *v=0)
CAViewPortunsplit (CAViewPort *v=0)
QList< CAViewPort * > unsplitAll ()
bool contains (CAViewPort *v)
QList< CAViewPort * > viewPortList ()
void setCurrentViewPort (CAViewPort *v)
CAViewPortcurrentViewPort ()

Private Attributes

QHash< CAViewPort *, QSplitter * > _viewPortMap
CAViewPort_currentViewPort
CASheet_sheet

Detailed Description

Holds together resizable viewports.

Copyright (c) 2006-2007, Matevž Jekovec, Itay Perl, Canorus development team All Rights Reserved. See AUTHORS for a complete list of authors.

Licensed under the GNU GENERAL PUBLIC LICENSE. See COPYING for details.

    This class behaves like dynamic QSplitter and can hold up a number of various viewports that can be customly resized.
    Usually this container serves as a layout class for containers in the tab widget.

    View port container should always include at least 1 view port. Otherwise there is no point of having the container at all!
    That's why the initial viewport is required in constructor already.

    \sa CAViewPort

Constructor & Destructor Documentation

Constructs the initial container having v as the initial viewport and a parent widget p.

References setCurrentViewPort().

Here is the call graph for this function:

Removes all the viewports and finally destroys container.

Warning:
This destructor also deletes the viewports!

Member Function Documentation

Adds and registers the given viewport v to the splitter s or the top splitter if not specified.

References _viewPortMap, and setCurrentViewPort().

Referenced by CAMainWin::addSheet(), CAMainWin::on_uiCanorusMLSource_triggered(), CAMainWin::on_uiLilyPondSource_triggered(), CAMainWin::on_uiScoreView_triggered(), splitHorizontally(), and splitVertically().

Here is the call graph for this function:

Here is the caller graph for this function:

bool CAViewPortContainer::contains ( CAViewPort v) [inline]

References _viewPortMap.

References _currentViewPort.

Referenced by removeViewPort(), splitHorizontally(), splitVertically(), and unsplit().

Here is the caller graph for this function:

Removes the given viewport from internal list and reselects the current viewport if the currentViewPort() points to deleted viewport.

References _viewPortMap, currentViewPort(), and setCurrentViewPort().

Referenced by unsplit().

Here is the call graph for this function:

Here is the caller graph for this function:

References _currentViewPort.

Referenced by addViewPort(), CAViewPortContainer(), removeViewPort(), and CAMainWin::viewPortClicked().

Here is the caller graph for this function:

Splits the given viewport v horizontally or the last used viewport if none given. Horizontal split uses vertical splitter. Returns the newly created viewport.

References _viewPortMap, addViewPort(), CAViewPort::clone(), and currentViewPort().

Referenced by CAMainWin::on_uiSplitHorizontally_triggered().

Here is the call graph for this function:

Here is the caller graph for this function:

Splits the given viewport v vertically or the last used viewport if none given. Vertical split uses horizontal splitter. Returns the newly created viewport.

References _viewPortMap, addViewPort(), CAViewPort::clone(), and currentViewPort().

Referenced by CAMainWin::on_uiSplitVertically_triggered().

Here is the call graph for this function:

Here is the caller graph for this function:

Unsplits the views so the given viewport v is removed. If no viewport is given, removes the last active one.

Returns:
The pointer to the viewport which was removed. If none was removed (ie. the given viewport was not found or there are no viewports left) returns 0.

References _viewPortMap, currentViewPort(), and removeViewPort().

Referenced by CAMainWin::on_uiCloseCurrentView_triggered(), and unsplitAll().

Here is the call graph for this function:

Here is the caller graph for this function:

Unsplits all the viewports except the last active one.

References unsplit().

Referenced by CAMainWin::on_uiUnsplitAll_triggered().

Here is the call graph for this function:

Here is the caller graph for this function:

References _viewPortMap.


Member Data Documentation

Map of ViewPort : Splitter widgets. Every viewport has a splitter which it belongs to. If a viewports is the top-most widget, then it belongs to CAViewPortContainer itself.

Referenced by addViewPort(), contains(), removeViewPort(), splitHorizontally(), splitVertically(), unsplit(), and viewPortList().


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