|
Canorus
0.7
|
Holds together resizable viewports. More...
#include <viewportcontainer.h>

Public Member Functions | |
| CAViewPortContainer (QWidget *p) | |
| ~CAViewPortContainer () | |
| void | addViewPort (CAViewPort *v, QSplitter *s=0) |
| void | removeViewPort (CAViewPort *v) |
| CAViewPort * | splitHorizontally (CAViewPort *v=0) |
| CAViewPort * | splitVertically (CAViewPort *v=0) |
| CAViewPort * | unsplit (CAViewPort *v=0) |
| QList< CAViewPort * > | unsplitAll () |
| bool | contains (CAViewPort *v) |
| QList< CAViewPort * > | viewPortList () |
| void | setCurrentViewPort (CAViewPort *v) |
| CAViewPort * | currentViewPort () |
Private Attributes | |
| QHash< CAViewPort *, QSplitter * > | _viewPortMap |
| CAViewPort * | _currentViewPort |
| CASheet * | _sheet |
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.
| CAViewPortContainer::CAViewPortContainer | ( | QWidget * | parent | ) |
Constructs the initial container having v as the initial viewport and a parent widget p.
References setCurrentViewPort().

| CAViewPortContainer::~CAViewPortContainer | ( | ) |
Removes all the viewports and finally destroys container.
| void CAViewPortContainer::addViewPort | ( | CAViewPort * | v, |
| QSplitter * | s = 0 |
||
| ) |
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().


|
inline |
References _viewPortMap.
|
inline |
References _currentViewPort.
Referenced by removeViewPort(), splitHorizontally(), splitVertically(), and unsplit().

| void CAViewPortContainer::removeViewPort | ( | CAViewPort * | v | ) |
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().


|
inline |
References _currentViewPort.
Referenced by addViewPort(), CAViewPortContainer(), removeViewPort(), and CAMainWin::viewPortClicked().

| CAViewPort * CAViewPortContainer::splitHorizontally | ( | CAViewPort * | v = 0 | ) |
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().


| CAViewPort * CAViewPortContainer::splitVertically | ( | CAViewPort * | v = 0 | ) |
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().


| CAViewPort * CAViewPortContainer::unsplit | ( | CAViewPort * | v = 0 | ) |
Unsplits the views so the given viewport v is removed. If no viewport is given, removes the last active one.
References _viewPortMap, currentViewPort(), and removeViewPort().
Referenced by CAMainWin::on_uiCloseCurrentView_triggered(), and unsplitAll().


| QList< CAViewPort * > CAViewPortContainer::unsplitAll | ( | ) |
Unsplits all the viewports except the last active one.
References unsplit().
Referenced by CAMainWin::on_uiUnsplitAll_triggered().


|
inline |
References _viewPortMap.
|
private |
Referenced by currentViewPort(), and setCurrentViewPort().
|
private |
|
private |
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().
1.8.3