##// END OF EJS Templates
Add fix for default repository init
Add fix for default repository init

File last commit:

r1126:2462f21d8a36
r1317:686305865878
Show More
VisualizationDragDropContainer.cpp
496 lines | 17.9 KiB | text/x-c | CppLexer
/ gui / src / Visualization / VisualizationDragDropContainer.cpp
New visualization classes for the drag&drop
r841 #include "Visualization/VisualizationDragDropContainer.h"
Rename "DragDropHelper" in "DragDropGuiController"
r1110 #include "DragAndDrop/DragDropGuiController.h"
Format changes
r847 #include "SqpApplication.h"
#include "Visualization/VisualizationDragWidget.h"
New visualization classes for the drag&drop
r841
Move the GRAPH_MINIMUM_HEIGHT constant in a place accessible everywhere and use it in the drag&drop
r853 #include "Common/VisualizationDef.h"
New visualization classes for the drag&drop
r841 #include <QDrag>
#include <QDragEnterEvent>
Format changes
r847 #include <QVBoxLayout>
New visualization classes for the drag&drop
r841
MR for linux compilation
r848 #include <cmath>
New visualization classes for the drag&drop
r841 #include <memory>
drop of variables in the visualization
r852 Q_LOGGING_CATEGORY(LOG_VisualizationDragDropContainer, "VisualizationDragDropContainer")
Displays the miniature of the graph of the zone during a drag
r975 auto DRAGGED_MINIATURE_WIDTH = 200; // in pixels
New visualization classes for the drag&drop
r841 struct VisualizationDragDropContainer::VisualizationDragDropContainerPrivate {
Format changes
r847 QVBoxLayout *m_Layout;
Drag of the time widget on a graph
r885 QHash<QString, VisualizationDragDropContainer::DropBehavior> m_AcceptedMimeTypes;
Add an empty area at the bottom of the tab where a new zone can be created from a drop. Differentiate graph and zone placeHolders.
r887 QString m_PlaceHolderText;
Rename "DragDropHelper" in "DragDropGuiController"
r1110 DragDropGuiController::PlaceHolderType m_PlaceHolderType;
Drag of the time widget on a graph
r885
drop of variables in the visualization
r852 VisualizationDragDropContainer::AcceptMimeDataFunction m_AcceptMimeDataFun
= [](auto mimeData) { return true; };
Alexandre Leroux
Handle the previous prohibition for drag and drop
r1064 VisualizationDragDropContainer::AcceptDragWidgetFunction m_AcceptDragWidgetFun
= [](auto dragWidget, auto mimeData) { return true; };
Drag of the time widget on a graph
r885
Improves visual effect of dropping a variable in a graph
r879 int m_MinContainerHeight = 0;
New visualization classes for the drag&drop
r841
Format changes
r847 explicit VisualizationDragDropContainerPrivate(QWidget *widget)
Rename "DragDropHelper" in "DragDropGuiController"
r1110 : m_PlaceHolderType(DragDropGuiController::PlaceHolderType::Graph)
New visualization classes for the drag&drop
r841 {
Format changes
r847 m_Layout = new QVBoxLayout(widget);
m_Layout->setContentsMargins(0, 0, 0, 0);
New visualization classes for the drag&drop
r841 }
Format changes
r847 bool acceptMimeData(const QMimeData *data) const
New visualization classes for the drag&drop
r841 {
drop of zone on the time widget
r977 auto accepted = false;
for (auto it = m_AcceptedMimeTypes.constBegin(); it != m_AcceptedMimeTypes.constEnd();
++it) {
const auto &type = it.key();
const auto &behavior = it.value();
if (data->hasFormat(type)) {
if (behavior != DropBehavior::Forbidden) {
accepted = true;
}
else {
accepted = false;
break;
}
Format changes
r847 }
New visualization classes for the drag&drop
r841 }
drop of zone on the time widget
r977 if (accepted) {
accepted = m_AcceptMimeDataFun(data);
}
return accepted;
New visualization classes for the drag&drop
r841 }
Drag of the time widget on a graph
r885 bool allowMergeForMimeData(const QMimeData *data) const
New visualization classes for the drag&drop
r841 {
code improvements
r980 auto result = false;
Drag of the time widget on a graph
r885 for (auto it = m_AcceptedMimeTypes.constBegin(); it != m_AcceptedMimeTypes.constEnd();
++it) {
if (data->hasFormat(it.key())
&& (it.value() == VisualizationDragDropContainer::DropBehavior::Merged
|| it.value()
== VisualizationDragDropContainer::DropBehavior::InsertedAndMerged)) {
result = true;
}
else if (data->hasFormat(it.key())
&& it.value() == VisualizationDragDropContainer::DropBehavior::Inserted) {
// Merge is forbidden if the mime data contain an acceptable type which cannot be
// merged
result = false;
break;
}
}
return result;
}
bool allowInsertForMimeData(const QMimeData *data) const
{
for (auto it = m_AcceptedMimeTypes.constBegin(); it != m_AcceptedMimeTypes.constEnd();
++it) {
if (data->hasFormat(it.key())
&& (it.value() == VisualizationDragDropContainer::DropBehavior::Inserted
|| it.value()
== VisualizationDragDropContainer::DropBehavior::InsertedAndMerged)) {
New visualization classes for the drag&drop
r841 return true;
Format changes
r847 }
New visualization classes for the drag&drop
r841 }
return false;
}
bool hasPlaceHolder() const
{
Rename "DragDropHelper" in "DragDropGuiController"
r1110 return sqpApp->dragDropGuiController().placeHolder().parentWidget()
== m_Layout->parentWidget();
New visualization classes for the drag&drop
r841 }
Improves visual effect of dropping a variable in a graph
r879 VisualizationDragWidget *getChildDragWidgetAt(const QWidget *parent, const QPoint &pos) const
New visualization classes for the drag&drop
r841 {
Format changes
r847 VisualizationDragWidget *dragWidget = nullptr;
for (auto child : parent->children()) {
auto widget = qobject_cast<VisualizationDragWidget *>(child);
if (widget && widget->isVisible()) {
if (widget->frameGeometry().contains(pos)) {
New visualization classes for the drag&drop
r841 dragWidget = widget;
break;
}
}
}
return dragWidget;
}
Format changes
r847 bool cursorIsInContainer(QWidget *container) const
New visualization classes for the drag&drop
r841 {
fix some wrong drag&drop behavior appearing on mac
r979 auto widgetUnderMouse = sqpApp->widgetAt(QCursor::pos());
return container->isAncestorOf(widgetUnderMouse) && widgetUnderMouse != container
Rename "DragDropHelper" in "DragDropGuiController"
r1110 && sqpApp->dragDropGuiController().placeHolder().isAncestorOf(widgetUnderMouse);
New visualization classes for the drag&drop
r841 }
Improves visual effect of dropping a variable in a graph
r879
Fix some glitches which occurred when dragging in the visualization something from the sides.
r886 int countDragWidget(const QWidget *parent, bool onlyVisible = false) const
Improves visual effect of dropping a variable in a graph
r879 {
auto nbGraph = 0;
for (auto child : parent->children()) {
if (qobject_cast<VisualizationDragWidget *>(child)) {
Fix some glitches which occurred when dragging in the visualization something from the sides.
r886 if (!onlyVisible || qobject_cast<VisualizationDragWidget *>(child)->isVisible()) {
nbGraph += 1;
}
Improves visual effect of dropping a variable in a graph
r879 }
}
return nbGraph;
}
Alexandre Leroux
Handle the previous prohibition for drag and drop
r1064 bool findPlaceHolderPosition(const QPoint &pos, const QMimeData *mimeData, bool canInsert,
bool canMerge, const VisualizationDragDropContainer *container);
New visualization classes for the drag&drop
r841 };
VisualizationDragDropContainer::VisualizationDragDropContainer(QWidget *parent)
Fix some glitches which occurred when dragging in the visualization something from the sides.
r886 : QFrame{parent},
Format changes
r847 impl{spimpl::make_unique_impl<VisualizationDragDropContainerPrivate>(this)}
New visualization classes for the drag&drop
r841 {
setAcceptDrops(true);
}
void VisualizationDragDropContainer::addDragWidget(VisualizationDragWidget *dragWidget)
{
Format changes
r847 impl->m_Layout->addWidget(dragWidget);
New visualization classes for the drag&drop
r841 disconnect(dragWidget, &VisualizationDragWidget::dragDetected, nullptr, nullptr);
Format changes
r847 connect(dragWidget, &VisualizationDragWidget::dragDetected, this,
&VisualizationDragDropContainer::startDrag);
New visualization classes for the drag&drop
r841 }
Format changes
r847 void VisualizationDragDropContainer::insertDragWidget(int index,
VisualizationDragWidget *dragWidget)
New visualization classes for the drag&drop
r841 {
Format changes
r847 impl->m_Layout->insertWidget(index, dragWidget);
New visualization classes for the drag&drop
r841 disconnect(dragWidget, &VisualizationDragWidget::dragDetected, nullptr, nullptr);
Format changes
r847 connect(dragWidget, &VisualizationDragWidget::dragDetected, this,
&VisualizationDragDropContainer::startDrag);
New visualization classes for the drag&drop
r841 }
drop of zone on the time widget
r977 void VisualizationDragDropContainer::setMimeType(
Drag of the time widget on a graph
r885 const QString &mimeType, VisualizationDragDropContainer::DropBehavior behavior)
New visualization classes for the drag&drop
r841 {
Drag of the time widget on a graph
r885 impl->m_AcceptedMimeTypes[mimeType] = behavior;
New visualization classes for the drag&drop
r841 }
int VisualizationDragDropContainer::countDragWidget() const
{
Improves visual effect of dropping a variable in a graph
r879 return impl->countDragWidget(this);
New visualization classes for the drag&drop
r841 }
drop of variables in the visualization
r852 void VisualizationDragDropContainer::setAcceptMimeDataFunction(
VisualizationDragDropContainer::AcceptMimeDataFunction fun)
{
impl->m_AcceptMimeDataFun = fun;
}
Alexandre Leroux
Handle the previous prohibition for drag and drop
r1064 void VisualizationDragDropContainer::setAcceptDragWidgetFunction(
VisualizationDragDropContainer::AcceptDragWidgetFunction fun)
{
impl->m_AcceptDragWidgetFun = fun;
}
Rename "DragDropHelper" in "DragDropGuiController"
r1110 void VisualizationDragDropContainer::setPlaceHolderType(DragDropGuiController::PlaceHolderType type,
Add an empty area at the bottom of the tab where a new zone can be created from a drop. Differentiate graph and zone placeHolders.
r887 const QString &placeHolderText)
{
impl->m_PlaceHolderType = type;
impl->m_PlaceHolderText = placeHolderText;
}
Format changes
r847 void VisualizationDragDropContainer::startDrag(VisualizationDragWidget *dragWidget,
const QPoint &dragPosition)
New visualization classes for the drag&drop
r841 {
Rename "DragDropHelper" in "DragDropGuiController"
r1110 auto &helper = sqpApp->dragDropGuiController();
drop of variables in the visualization
r852 helper.resetDragAndDrop();
New visualization classes for the drag&drop
r841
Format changes
r847 // Note: The management of the drag object is done by Qt
Fixes for review
r849 auto drag = new QDrag{dragWidget};
New visualization classes for the drag&drop
r841
drag of selection zones
r1087 auto mimeData = dragWidget->mimeData(dragPosition);
New visualization classes for the drag&drop
r841 drag->setMimeData(mimeData);
drag of selection zones
r1087 auto pixmap = dragWidget->customDragPixmap(dragPosition);
if (pixmap.isNull()) {
pixmap = QPixmap{dragWidget->size()};
dragWidget->render(&pixmap);
}
Displays the miniature of the graph of the zone during a drag
r975 drag->setPixmap(pixmap.scaled(DRAGGED_MINIATURE_WIDTH, DRAGGED_MINIATURE_WIDTH,
Qt::KeepAspectRatio, Qt::SmoothTransformation));
New visualization classes for the drag&drop
r841
auto image = pixmap.toImage();
mimeData->setImageData(image);
mimeData->setUrls({helper.imageTemporaryUrl(image)});
Format changes
r847 if (impl->m_Layout->indexOf(dragWidget) >= 0) {
New visualization classes for the drag&drop
r841
drag of selection zones
r1087 if (impl->acceptMimeData(mimeData) && impl->allowInsertForMimeData(mimeData)) {
helper.setCurrentDragWidget(dragWidget);
if (impl->cursorIsInContainer(this)) {
auto dragWidgetIndex = impl->m_Layout->indexOf(dragWidget);
helper.insertPlaceHolder(impl->m_Layout, dragWidgetIndex, impl->m_PlaceHolderType,
impl->m_PlaceHolderText);
dragWidget->setVisible(false);
}
else {
// The drag starts directly outside the drop zone
// do not add the placeHolder
}
Improves reliability
r880 }
New visualization classes for the drag&drop
r841
Thibaud Rabillard
Fix for D&D bug on mac
r912 drag->exec(Qt::MoveAction | Qt::CopyAction, Qt::MoveAction);
helper.doCloseWidgets();
drop of variables in the visualization
r852 }
else {
qCWarning(LOG_VisualizationDragDropContainer())
<< tr("VisualizationDragDropContainer::startDrag, drag aborted, the specified "
"VisualizationDragWidget is not found in this container.");
}
New visualization classes for the drag&drop
r841 }
void VisualizationDragDropContainer::dragEnterEvent(QDragEnterEvent *event)
{
Format changes
r847 if (impl->acceptMimeData(event->mimeData())) {
New visualization classes for the drag&drop
r841 event->acceptProposedAction();
Rename "DragDropHelper" in "DragDropGuiController"
r1110 auto &helper = sqpApp->dragDropGuiController();
New visualization classes for the drag&drop
r841
Format changes
r847 if (!impl->hasPlaceHolder()) {
New visualization classes for the drag&drop
r841 auto dragWidget = helper.getCurrentDragWidget();
drop of variables in the visualization
r852
if (dragWidget) {
// If the drag&drop is internal to the visualization, entering the container hide
Improves visual effect of dropping a variable in a graph
r879 // the dragWidget which was made visible by the dragLeaveEvent
drop of variables in the visualization
r852 auto parentWidget
= qobject_cast<VisualizationDragDropContainer *>(dragWidget->parentWidget());
if (parentWidget) {
dragWidget->setVisible(false);
}
New visualization classes for the drag&drop
r841 }
Drag of the time widget on a graph
r885 auto canMerge = impl->allowMergeForMimeData(event->mimeData());
auto canInsert = impl->allowInsertForMimeData(event->mimeData());
Alexandre Leroux
Handle the previous prohibition for drag and drop
r1064 if (!impl->findPlaceHolderPosition(event->pos(), event->mimeData(), canInsert, canMerge,
this)) {
event->ignore();
}
New visualization classes for the drag&drop
r841 }
drop of variables in the visualization
r852 else {
// do nothing
}
New visualization classes for the drag&drop
r841 }
Fixes for review
r849 else {
New visualization classes for the drag&drop
r841 event->ignore();
Fixes for review
r849 }
New visualization classes for the drag&drop
r841
QWidget::dragEnterEvent(event);
}
void VisualizationDragDropContainer::dragLeaveEvent(QDragLeaveEvent *event)
{
Q_UNUSED(event);
Rename "DragDropHelper" in "DragDropGuiController"
r1110 auto &helper = sqpApp->dragDropGuiController();
New visualization classes for the drag&drop
r841
Format changes
r847 if (!impl->cursorIsInContainer(this)) {
New visualization classes for the drag&drop
r841 helper.removePlaceHolder();
Improves visual effect of dropping a variable in a graph
r879 helper.setHightlightedDragWidget(nullptr);
impl->m_MinContainerHeight = 0;
New visualization classes for the drag&drop
r841
drop of variables in the visualization
r852 auto dragWidget = helper.getCurrentDragWidget();
if (dragWidget) {
// dragWidget has a value only if the drag is started from the visualization
// In that case, shows the drag widget at its original place
Format changes
r847 // So the drag widget doesn't stay hidden if the drop occurs outside the visualization
// drop zone (It is not possible to catch a drop event outside of the application)
New visualization classes for the drag&drop
r841
Format changes
r847 if (dragWidget) {
New visualization classes for the drag&drop
r841 dragWidget->setVisible(true);
}
}
}
drop of variables in the visualization
r852 else {
// Leave event probably received for a child widget.
// Do nothing.
// Note: The DragLeave event, doesn't have any mean to determine who sent it.
}
New visualization classes for the drag&drop
r841
QWidget::dragLeaveEvent(event);
}
void VisualizationDragDropContainer::dragMoveEvent(QDragMoveEvent *event)
{
Format changes
r847 if (impl->acceptMimeData(event->mimeData())) {
Drag of the time widget on a graph
r885 auto canMerge = impl->allowMergeForMimeData(event->mimeData());
auto canInsert = impl->allowInsertForMimeData(event->mimeData());
Alexandre Leroux
Handle the previous prohibition for drag and drop
r1064 impl->findPlaceHolderPosition(event->pos(), event->mimeData(), canInsert, canMerge, this);
New visualization classes for the drag&drop
r841 }
Fixes for review
r849 else {
New visualization classes for the drag&drop
r841 event->ignore();
Fixes for review
r849 }
New visualization classes for the drag&drop
r841
QWidget::dragMoveEvent(event);
}
void VisualizationDragDropContainer::dropEvent(QDropEvent *event)
{
Rename "DragDropHelper" in "DragDropGuiController"
r1110 auto &helper = sqpApp->dragDropGuiController();
drop of variable inside an existing graph
r881
Format changes
r847 if (impl->acceptMimeData(event->mimeData())) {
drop of variable inside an existing graph
r881 auto dragWidget = helper.getCurrentDragWidget();
drop of variables in the visualization
r852 if (impl->hasPlaceHolder()) {
drop of variable inside an existing graph
r881 // drop where the placeHolder is located
New visualization classes for the drag&drop
r841
Drag of the time widget on a graph
r885 auto canInsert = impl->allowInsertForMimeData(event->mimeData());
if (canInsert) {
auto droppedIndex = impl->m_Layout->indexOf(&helper.placeHolder());
New visualization classes for the drag&drop
r841
Drag of the time widget on a graph
r885 if (dragWidget) {
auto dragWidgetIndex = impl->m_Layout->indexOf(dragWidget);
if (dragWidgetIndex >= 0 && dragWidgetIndex < droppedIndex) {
// Correction of the index if the drop occurs in the same container
// and if the drag is started from the visualization (in that case, the
// dragWidget is hidden)
droppedIndex -= 1;
}
New visualization classes for the drag&drop
r841
Drag of the time widget on a graph
r885 dragWidget->setVisible(true);
}
New visualization classes for the drag&drop
r841
Drag of the time widget on a graph
r885 event->acceptProposedAction();
New visualization classes for the drag&drop
r841
Drag of the time widget on a graph
r885 helper.removePlaceHolder();
New visualization classes for the drag&drop
r841
Drag of the time widget on a graph
r885 emit dropOccuredInContainer(droppedIndex, event->mimeData());
}
else {
qCWarning(LOG_VisualizationDragDropContainer()) << tr(
"VisualizationDragDropContainer::dropEvent, dropping on the placeHolder, but "
"the insertion is forbidden.");
Q_ASSERT(false);
}
New visualization classes for the drag&drop
r841 }
drop of variable inside an existing graph
r881 else if (helper.getHightlightedDragWidget()) {
// drop on the highlighted widget
Drag of the time widget on a graph
r885 auto canMerge = impl->allowMergeForMimeData(event->mimeData());
drop of variable inside an existing graph
r881 if (canMerge) {
event->acceptProposedAction();
emit dropOccuredOnWidget(helper.getHightlightedDragWidget(), event->mimeData());
}
else {
qCWarning(LOG_VisualizationDragDropContainer())
<< tr("VisualizationDragDropContainer::dropEvent, dropping on a widget, but "
"the merge is forbidden.");
Q_ASSERT(false);
}
drop of variables in the visualization
r852 }
New visualization classes for the drag&drop
r841 }
Fixes for review
r849 else {
New visualization classes for the drag&drop
r841 event->ignore();
Fixes for review
r849 }
New visualization classes for the drag&drop
r841
Rename "DragDropHelper" in "DragDropGuiController"
r1110 sqpApp->dragDropGuiController().setHightlightedDragWidget(nullptr);
Improves visual effect of dropping a variable in a graph
r879 impl->m_MinContainerHeight = 0;
New visualization classes for the drag&drop
r841 QWidget::dropEvent(event);
}
Improves visual effect of dropping a variable in a graph
r879
Alexandre Leroux
Handle the previous prohibition for drag and drop
r1064 bool VisualizationDragDropContainer::VisualizationDragDropContainerPrivate::findPlaceHolderPosition(
const QPoint &pos, const QMimeData *mimeData, bool canInsert, bool canMerge,
Drag of the time widget on a graph
r885 const VisualizationDragDropContainer *container)
Improves visual effect of dropping a variable in a graph
r879 {
Rename "DragDropHelper" in "DragDropGuiController"
r1110 auto &helper = sqpApp->dragDropGuiController();
Improves visual effect of dropping a variable in a graph
r879
Fix some glitches which occurred when dragging in the visualization something from the sides.
r886 auto absPos = container->mapToGlobal(pos);
fix some wrong drag&drop behavior appearing on mac
r979 auto isOnPlaceHolder = helper.placeHolder().isAncestorOf(sqpApp->widgetAt(absPos));
Fix some glitches which occurred when dragging in the visualization something from the sides.
r886
if (countDragWidget(container, true) == 0) {
// Drop on an empty container, just add the placeHolder at the top
Add an empty area at the bottom of the tab where a new zone can be created from a drop. Differentiate graph and zone placeHolders.
r887 helper.insertPlaceHolder(m_Layout, 0, m_PlaceHolderType, m_PlaceHolderText);
Fix some glitches which occurred when dragging in the visualization something from the sides.
r886 }
else if (!isOnPlaceHolder) {
Improves visual effect of dropping a variable in a graph
r879 auto nbDragWidget = countDragWidget(container);
if (nbDragWidget > 0) {
if (m_MinContainerHeight == 0) {
m_MinContainerHeight = container->size().height();
}
m_MinContainerHeight = qMin(m_MinContainerHeight, container->size().height());
auto graphHeight = qMax(m_MinContainerHeight / nbDragWidget, GRAPH_MINIMUM_HEIGHT);
auto posY = pos.y();
auto dropIndex = floor(posY / graphHeight);
Change the margins of the drag&drop
r1126 auto zoneSize = graphHeight / 4.0;
Improves visual effect of dropping a variable in a graph
r879
auto isOnTop = posY < dropIndex * graphHeight + zoneSize;
auto isOnBottom = posY > (dropIndex + 1) * graphHeight - zoneSize;
auto placeHolderIndex = m_Layout->indexOf(&(helper.placeHolder()));
Fix some glitches which occurred when dragging in the visualization something from the sides.
r886 auto dragWidgetHovered = getChildDragWidgetAt(container, pos);
Improves drag&drop with spectro
r1125 auto acceptMerge = m_AcceptDragWidgetFun(dragWidgetHovered, mimeData);
if (canInsert && (isOnTop || isOnBottom || !canMerge || !acceptMerge)) {
if (posY > (dropIndex + 1) * graphHeight - graphHeight / 2.0) {
Improves visual effect of dropping a variable in a graph
r879 dropIndex += 1;
}
if (helper.getCurrentDragWidget()) {
auto dragWidgetIndex = m_Layout->indexOf(helper.getCurrentDragWidget());
if (dragWidgetIndex >= 0 && dragWidgetIndex <= dropIndex) {
// Correction of the index if the drop occurs in the same container
// and if the drag is started from the visualization (in that case, the
// dragWidget is hidden)
dropIndex += 1;
}
}
if (dropIndex != placeHolderIndex) {
Add an empty area at the bottom of the tab where a new zone can be created from a drop. Differentiate graph and zone placeHolders.
r887 helper.insertPlaceHolder(m_Layout, dropIndex, m_PlaceHolderType,
m_PlaceHolderText);
Improves visual effect of dropping a variable in a graph
r879 }
helper.setHightlightedDragWidget(nullptr);
}
Fix some glitches which occurred when dragging in the visualization something from the sides.
r886 else if (canMerge && dragWidgetHovered) {
Improves visual effect of dropping a variable in a graph
r879 // drop on the middle -> merge
if (hasPlaceHolder()) {
helper.removePlaceHolder();
}
Improves drag&drop with spectro
r1125 helper.setHightlightedDragWidget(dragWidgetHovered);
Improves visual effect of dropping a variable in a graph
r879 }
Drag of the time widget on a graph
r885 else {
Add an empty area at the bottom of the tab where a new zone can be created from a drop. Differentiate graph and zone placeHolders.
r887 qCWarning(LOG_VisualizationDragDropContainer())
<< tr("VisualizationDragDropContainer::findPlaceHolderPosition, no valid drop "
"action.");
Drag of the time widget on a graph
r885 }
Improves visual effect of dropping a variable in a graph
r879 }
else {
Change the margins of the drag&drop
r1126 qCInfo(LOG_VisualizationDragDropContainer())
Add an empty area at the bottom of the tab where a new zone can be created from a drop. Differentiate graph and zone placeHolders.
r887 << tr("VisualizationDragDropContainer::findPlaceHolderPosition, no widget "
"found in the "
"container");
Improves visual effect of dropping a variable in a graph
r879 }
}
else {
Fix some glitches which occurred when dragging in the visualization something from the sides.
r886 // the mouse is hover the placeHolder
Improves visual effect of dropping a variable in a graph
r879 // Do nothing
}
Alexandre Leroux
Handle the previous prohibition for drag and drop
r1064
return true;
Improves visual effect of dropping a variable in a graph
r879 }