**************************************************************************/
#include "liveselectiontool.h"
-#include "layeritem.h"
+#include "livelayeritem.h"
#include "../qdeclarativeviewobserver_p.h"
m_rubberbandSelectionMode = value;
}
-SingleSelectionManipulator::SelectionType LiveSelectionTool::getSelectionType(Qt::KeyboardModifiers
+LiveSingleSelectionManipulator::SelectionType LiveSelectionTool::getSelectionType(Qt::KeyboardModifiers
modifiers)
{
- SingleSelectionManipulator::SelectionType selectionType
- = SingleSelectionManipulator::ReplaceSelection;
+ LiveSingleSelectionManipulator::SelectionType selectionType
+ = LiveSingleSelectionManipulator::ReplaceSelection;
if (modifiers.testFlag(Qt::ControlModifier)) {
- selectionType = SingleSelectionManipulator::RemoveFromSelection;
+ selectionType = LiveSingleSelectionManipulator::RemoveFromSelection;
} else if (modifiers.testFlag(Qt::ShiftModifier)) {
- selectionType = SingleSelectionManipulator::AddToSelection;
+ selectionType = LiveSingleSelectionManipulator::AddToSelection;
}
return selectionType;
}
QDeclarativeViewObserverPrivate *observerPrivate
= QDeclarativeViewObserverPrivate::get(observer());
QList<QGraphicsItem*> itemList = observerPrivate->selectableItems(event->pos());
- SingleSelectionManipulator::SelectionType selectionType = getSelectionType(event->modifiers());
+ LiveSingleSelectionManipulator::SelectionType selectionType = getSelectionType(event->modifiers());
if (event->buttons() & Qt::LeftButton) {
m_mousePressTimer.start();
QPointF updatePt(0, 0);
QGraphicsItem *item = m_contextMenuItemList.at(itemListIndex);
m_singleSelectionManipulator.begin(updatePt);
- m_singleSelectionManipulator.select(SingleSelectionManipulator::InvertSelection,
+ m_singleSelectionManipulator.select(LiveSingleSelectionManipulator::InvertSelection,
QList<QGraphicsItem*>() << item,
false);
m_singleSelectionManipulator.end(updatePt);
m_singleSelectionManipulator.begin(event->pos());
if (event->modifiers().testFlag(Qt::ControlModifier))
- m_singleSelectionManipulator.select(SingleSelectionManipulator::RemoveFromSelection,
+ m_singleSelectionManipulator.select(LiveSingleSelectionManipulator::RemoveFromSelection,
m_selectOnlyContentItems);
else if (event->modifiers().testFlag(Qt::ShiftModifier))
- m_singleSelectionManipulator.select(SingleSelectionManipulator::AddToSelection,
+ m_singleSelectionManipulator.select(LiveSingleSelectionManipulator::AddToSelection,
m_selectOnlyContentItems);
else
- m_singleSelectionManipulator.select(SingleSelectionManipulator::InvertSelection,
+ m_singleSelectionManipulator.select(LiveSingleSelectionManipulator::InvertSelection,
m_selectOnlyContentItems);
m_singleSelectionManipulator.end(event->pos());
QPointF updatePt(0, 0);
m_singleSelectionManipulator.begin(updatePt);
- m_singleSelectionManipulator.select(SingleSelectionManipulator::ReplaceSelection,
+ m_singleSelectionManipulator.select(LiveSingleSelectionManipulator::ReplaceSelection,
QList<QGraphicsItem*>() << itemList.at(selectedIdx),
false);
m_singleSelectionManipulator.end(updatePt);
m_singleSelectionManipulator.begin(event->pos());
if (event->modifiers().testFlag(Qt::ControlModifier))
- m_singleSelectionManipulator.select(SingleSelectionManipulator::RemoveFromSelection,
+ m_singleSelectionManipulator.select(LiveSingleSelectionManipulator::RemoveFromSelection,
m_selectOnlyContentItems);
else if (event->modifiers().testFlag(Qt::ShiftModifier))
- m_singleSelectionManipulator.select(SingleSelectionManipulator::AddToSelection,
+ m_singleSelectionManipulator.select(LiveSingleSelectionManipulator::AddToSelection,
m_selectOnlyContentItems);
else
- m_singleSelectionManipulator.select(SingleSelectionManipulator::InvertSelection,
+ m_singleSelectionManipulator.select(LiveSingleSelectionManipulator::InvertSelection,
m_selectOnlyContentItems);
m_singleSelectionManipulator.end(event->pos());
#define LIVESELECTIONTOOL_H
-#include "abstractformeditortool.h"
-#include "rubberbandselectionmanipulator.h"
-#include "singleselectionmanipulator.h"
-#include "selectionindicator.h"
+#include "abstractliveedittool.h"
+#include "liverubberbandselectionmanipulator.h"
+#include "livesingleselectionmanipulator.h"
+#include "liveselectionindicator.h"
#include <QtCore/QList>
#include <QtCore/QTime>
private:
void createContextMenu(QList<QGraphicsItem*> itemList, QPoint globalPos);
- SingleSelectionManipulator::SelectionType getSelectionType(Qt::KeyboardModifiers modifiers);
+ LiveSingleSelectionManipulator::SelectionType getSelectionType(Qt::KeyboardModifiers modifiers);
bool alreadySelected(const QList<QGraphicsItem*> &itemList) const;
private:
bool m_rubberbandSelectionMode;
LiveRubberBandSelectionManipulator m_rubberbandSelectionManipulator;
- SingleSelectionManipulator m_singleSelectionManipulator;
+ LiveSingleSelectionManipulator m_singleSelectionManipulator;
LiveSelectionIndicator m_selectionIndicator;
//ResizeIndicator m_resizeIndicator;
QTime m_mousePressTimer;