| Home · All Namespaces · All Classes |
#include <switcherview.h>


Public Member Functions | |
| SwitcherView (Switcher *controller) | |
| virtual | ~SwitcherView () |
Protected Slots | |
| virtual void | updateData (const QList< const char * > &modifications) |
| | |
| virtual void | applyPinchGestureTargetMode () |
Protected Member Functions | |
| virtual void | applySwitcherMode () |
| REIMPLEMENTATION | |
The switcher view draws a background for the switcher.
Definition at line 36 of file switcherview.h.
| SwitcherView::SwitcherView | ( | Switcher * | controller | ) |
Constructs a SwitcherView.
| container | the Switcher controller to be used |
Definition at line 47 of file switcherview.cpp.
:
SwitcherViewBase(switcher), pagedViewport(new PagedViewport), overviewStyle(0)
{
viewport = pagedViewport;
// Fixes NB#186716, Disable the viewport initially so that does not cause unwated screen updates
// when trying to pan an empty switcher. The disabling of the panning must be
// prior to the event connections as disabling will cause the vp to emit 'panningStopped'
// and our slot might not have the view available at that time yet.
viewport->setEnabled(false);
connect(pagedViewport, SIGNAL(pageChanged(int)), this, SLOT(updateFocusedButton(int)));
connect(pagedViewport, SIGNAL(panningStopped()), this, SLOT(panningStopped()));
connect(MainWindow::instance()->sceneManager(), SIGNAL(orientationChanged(M::Orientation)), this, SLOT(updateButtons()));
// We have custom values for this view port in the style
viewport->setObjectName("SwitcherViewport");
mainLayout->addItem(viewport);
layoutAnimation = new TransformLayoutAnimation(pannedLayout);
layoutAnimation->setObjectName("SwitcherLayoutAnimation");
connect(layoutAnimation, SIGNAL(willFinish()), this, SLOT(endTransition()));
connect(layoutAnimation, SIGNAL(finished()), this, SLOT(runOverviewBounceAnimation()));
overviewPolicy = new MGridLayoutPolicy(pannedLayout);
overviewPolicy->setObjectName("OverviewPolicy");
detailPolicy = new MLinearLayoutPolicy(pannedLayout, Qt::Horizontal);
detailPolicy->setObjectName("DetailviewPolicy");
viewport->setAutoRange(false);
viewport->setWidget(pannedWidget);
viewport->positionIndicator()->setObjectName("SwitcherOverviewPageIndicator");
focusedSwitcherButton = 0;
pinchedButtonPosition = -1;
}

| SwitcherView::~SwitcherView | ( | ) | [virtual] |
Destroys the SwitcherView.
Definition at line 83 of file switcherview.cpp.
{
if(overviewStyle) {
MTheme::releaseStyle(overviewStyle);
}
}
| void SwitcherView::applyPinchGestureTargetMode | ( | ) | [protected, virtual, slot] |
Sets the switcher mode according to current pinch gesture target
Reimplemented from SwitcherViewBase.
Definition at line 329 of file switcherview.cpp.
{
SwitcherViewBase::applyPinchGestureTargetMode();
pagedViewport->setPage(pinchGestureTargetMode == SwitcherModel::Detailview ?
pinchedButtonPosition :
pinchedButtonPosition / buttonsPerPage());
}

| void SwitcherView::applySwitcherMode | ( | ) | [protected, virtual] |
REIMPLEMENTATION
Reimplemented from SwitcherViewBase.
Definition at line 99 of file switcherview.cpp.
{
if (model()->switcherMode() == SwitcherModel::Detailview) {
pannedLayout->setPolicy(detailPolicy);
} else {
pannedLayout->setPolicy(overviewPolicy);
}
SwitcherViewBase::applySwitcherMode();
updateButtonModesAndPageCount();
}
| void SwitcherView::updateData | ( | const QList< const char * > & | modifications | ) | [protected, virtual, slot] |
REIMPLEMENTATION
Reimplemented from SwitcherViewBase.
Definition at line 112 of file switcherview.cpp.
{
SwitcherViewBase::updateData(modifications);
const char *member;
foreach(member, modifications) {
if (member == SwitcherModel::Buttons) {
updateButtons();
} else if (member == SwitcherModel::TopmostWindow) {
repositionSwitcher();
}
}
}
| Copyright © 2010 Nokia Corporation | Generated on Thu Nov 4 2010 18:20:42 Doxygen 1.7.1 |
MeeGo Touch |