##// END OF EJS Templates
Handles items with same names in the same node...
Handles items with same names in the same node This case is handled by adding suffix (plugin name) when displaying items in the widget

File last commit:

r912:9102bdac4611
r1077:c90049fe7bc2
Show More
DragDropHelper.h
75 lines | 2.6 KiB | text/x-c | CLexer
Format changes
r847 #ifndef SCIQLOP_DRAGDROPHELPER_H
#define SCIQLOP_DRAGDROPHELPER_H
New helper class for the drag&drop
r840
#include <Common/spimpl.h>
drop of variables in the visualization
r852 #include <QLoggingCategory>
New helper class for the drag&drop
r840 #include <QWidget>
class QVBoxLayout;
class QScrollArea;
New event filter class to manage the tab switching of a tabBar during a drag&drop
r892 class QTabBar;
New helper class for the drag&drop
r840 class VisualizationDragWidget;
drop of variables in the visualization
r852 class VisualizationDragDropContainer;
New helper class for the drag&drop
r840 class QMimeData;
drop of variables in the visualization
r852 Q_DECLARE_LOGGING_CATEGORY(LOG_DragDropHelper)
Manage the scroll of the tab QScrollArea during a drag&drop operation
r843
New helper class for the drag&drop
r840 /**
* @brief Helper class for drag&drop operations.
drop of variables in the visualization
r852 * @note The helper is accessible from the sqpApp singleton and has the same life as the whole
* application (like a controller). But contrary to a controller, it doesn't live in a thread and
* can interect with the gui.
* @see SqpApplication
New helper class for the drag&drop
r840 */
Format changes
r847 class DragDropHelper {
New helper class for the drag&drop
r840 public:
static const QString MIME_TYPE_GRAPH;
static const QString MIME_TYPE_ZONE;
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 enum class PlaceHolderType { Default, Graph, Zone };
Format changes
r847 DragDropHelper();
virtual ~DragDropHelper();
drop of variables in the visualization
r852 /// Resets some internal variables. Must be called before any new drag&drop operation.
void resetDragAndDrop();
/// Sets the visualization widget currently being drag on the visualization.
Format changes
r847 void setCurrentDragWidget(VisualizationDragWidget *dragWidget);
drop of variables in the visualization
r852
/// Returns the visualization widget currently being drag on the visualization.
/// Can be null if a new visualization widget is intended to be created by the drag&drop
/// operation.
Format changes
r847 VisualizationDragWidget *getCurrentDragWidget() const;
New helper class for the drag&drop
r840
QWidget &placeHolder() const;
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 void insertPlaceHolder(QVBoxLayout *layout, int index, PlaceHolderType type,
const QString &topLabelText);
New helper class for the drag&drop
r840 void removePlaceHolder();
bool isPlaceHolderSet() const;
drop of variables in the visualization
r852 /// Checks if the specified mime data is valid for a drop in the visualization
bool checkMimeDataForVisualization(const QMimeData *mimeData,
VisualizationDragDropContainer *dropContainer);
Format changes
r847 void addDragDropScrollArea(QScrollArea *scrollArea);
void removeDragDropScrollArea(QScrollArea *scrollArea);
New helper class for the drag&drop
r840
New event filter class to manage the tab switching of a tabBar during a drag&drop
r892 void addDragDropTabBar(QTabBar *tabBar);
void removeDragDropTabBar(QTabBar *tabBar);
Format changes
r847 QUrl imageTemporaryUrl(const QImage &image) const;
New helper class for the drag&drop
r840
Improves visual effect of dropping a variable in a graph
r879 void setHightlightedDragWidget(VisualizationDragWidget *dragWidget);
drop of variable inside an existing graph
r881 VisualizationDragWidget *getHightlightedDragWidget() const;
Improves visual effect of dropping a variable in a graph
r879
Thibaud Rabillard
Fix for D&D bug on mac
r912 /// Delays the closing of a widget during a drag&drop operation
void delayedCloseWidget(QWidget *widget);
void doCloseWidgets();
New helper class for the drag&drop
r840 private:
class DragDropHelperPrivate;
spimpl::unique_impl_ptr<DragDropHelperPrivate> impl;
};
Format changes
r847 #endif // SCIQLOP_DRAGDROPHELPER_H