2016-01-19 11:17:13 +00:00
|
|
|
#ifndef CSV_RENDER_INSTANCE_SELECTION_MODE_H
|
|
|
|
#define CSV_RENDER_INSTANCE_SELECTION_MODE_H
|
|
|
|
|
|
|
|
#include "../widget/scenetoolmode.hpp"
|
|
|
|
|
2016-01-19 13:25:20 +00:00
|
|
|
class QAction;
|
|
|
|
|
2016-01-19 11:17:13 +00:00
|
|
|
namespace CSVRender
|
|
|
|
{
|
2016-01-19 13:25:20 +00:00
|
|
|
class WorldspaceWidget;
|
|
|
|
|
2016-01-19 11:17:13 +00:00
|
|
|
class InstanceSelectionMode : public CSVWidget::SceneToolMode
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
2016-01-19 13:25:20 +00:00
|
|
|
WorldspaceWidget& mWorldspaceWidget;
|
|
|
|
QAction *mSelectAll;
|
|
|
|
QAction *mDeselectAll;
|
2016-01-25 13:55:02 +00:00
|
|
|
QAction *mDeleteSelection;
|
2016-01-26 10:31:37 +00:00
|
|
|
QAction *mSelectSame;
|
2016-01-19 13:25:20 +00:00
|
|
|
|
|
|
|
/// Add context menu items to \a menu.
|
|
|
|
///
|
|
|
|
/// \attention menu can be a 0-pointer
|
|
|
|
///
|
|
|
|
/// \return Have there been any menu items to be added (if menu is 0 and there
|
|
|
|
/// items to be added, the function must return true anyway.
|
|
|
|
virtual bool createContextMenu (QMenu *menu);
|
|
|
|
|
2016-01-19 11:17:13 +00:00
|
|
|
public:
|
|
|
|
|
2016-01-19 13:25:20 +00:00
|
|
|
InstanceSelectionMode (CSVWidget::SceneToolbar *parent, WorldspaceWidget& worldspaceWidget);
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
void selectAll();
|
2016-01-19 11:17:13 +00:00
|
|
|
|
2016-01-19 13:25:20 +00:00
|
|
|
void clearSelection();
|
2016-01-25 13:55:02 +00:00
|
|
|
|
|
|
|
void deleteSelection();
|
2016-01-26 10:31:37 +00:00
|
|
|
|
|
|
|
void selectSame();
|
2016-01-19 11:17:13 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|