:Palapeli::Interactor(20,Palapeli::MouseInteractor,view)//priority: very high because this is the most important interaction
:Palapeli::Interactor(20,Palapeli::MouseInteractor,view)//priority: very high because this is the most important interaction
{
{
setMetadata(PieceInteraction,i18nc("Description (used like a name) for a mouse interaction method","Move pieces by dragging"),QIcon());
setMetadata(PieceInteraction,i18nc("Description (used like a name) for a mouse interaction method","Move pieces by dragging"),KIcon("transform-move"));
:Palapeli::Interactor(1,Palapeli::MouseInteractor,view)//priority: very low because specific interaction points (e.g. pieces, scene boundaries) are much more important
:Palapeli::Interactor(1,Palapeli::MouseInteractor,view)//priority: very low because specific interaction points (e.g. pieces, scene boundaries) are much more important
{
{
setMetadata(ViewportInteraction,i18nc("Description (used like a name) for a mouse interaction method","Move viewport by dragging"),QIcon());
setMetadata(ViewportInteraction,i18nc("Description (used like a name) for a mouse interaction method","Move viewport by dragging"),KIcon("transform-move"));
:Palapeli::Interactor(2,Palapeli::MouseInteractor,view)//priority: a bit more than MoveViewport, but still much less than interactions with specific interaction points (e.g. pieces, scene boundaries)
:Palapeli::Interactor(2,Palapeli::MouseInteractor,view)//priority: a bit more than MoveViewport, but still much less than interactions with specific interaction points (e.g. pieces, scene boundaries)
,m_item(newPalapeli::RubberBandItem)
,m_item(newPalapeli::RubberBandItem)
{
{
setMetadata(PieceInteraction,i18nc("Description (used like a name) for a mouse interaction method","Select multiple pieces at once"),QIcon());
setMetadata(PieceInteraction,i18nc("Description (used like a name) for a mouse interaction method","Select multiple pieces at once"),KIcon("select-rectangular"));
if(scene())
if(scene())
scene()->addItem(m_item);
scene()->addItem(m_item);
m_item->hide();//NOTE: This is not necessary for the painting, but we use m_item->isVisible() to determine whether we are rubberbanding at the moment. //FIXME: really?
m_item->hide();//NOTE: This is not necessary for the painting, but we use m_item->isVisible() to determine whether we are rubberbanding at the moment. //FIXME: really?