71 case Viewer::ExamineMode:
74 case Viewer::LightMode:
76 case Viewer::PickingMode:
79 case Viewer::QuestionMode:
91 case Viewer::ExamineMode:
92 cursorPainter_->
setCursor(QCursor( QPixmap( OpenFlipper::Options::iconDirStr() + QDir::separator() +
"cursor_move.png" ) ,0,0 ));
94 case Viewer::LightMode:
95 cursorPainter_->
setCursor(QCursor( QPixmap( OpenFlipper::Options::iconDirStr() + QDir::separator() +
"cursor_light.png" ) ,0,0 ));
97 case Viewer::PickingMode:
98 cursorPainter_->
setCursor(QCursor( QPixmap( OpenFlipper::Options::iconDirStr() + QDir::separator() +
"cursor_arrow.png" ) ,0,0 ));
103 case Viewer::QuestionMode:
104 cursorPainter_->
setCursor(QCursor( QPixmap( OpenFlipper::Options::iconDirStr() + QDir::separator() +
"cursor_whatsthis.png" ) ,0,0 ));
110 case Viewer::PickingMode:
125 unsigned int maxPases = 1;
130 for (
unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i ) {
135 if(_am == Viewer::PickingMode) {
188 #ifdef WIN32 //workaround for coreprofile since qt 5.9 is simply too buggy on windows 191 if(OpenFlipper::Options::coreProfile())
202 _tool->setOrientation(Qt::Horizontal);
208 QGraphicsProxyWidget* item =
glScene_->addWidget(_tool);
211 int midP = (
glScene_->width() / 2) - (
int)(_tool->width() / 2);
212 item->setPos(midP, 3);
231 ret->first->setParent(0);
254 addToolBar(Qt::LeftToolBarArea,_tool);
296 connect(
pickMenu_, SIGNAL( aboutToHide() ),
300 QActionGroup * ag =
new QActionGroup(
pickMenu_ );
301 ag->setExclusive(
true );
303 for (
unsigned int i=0; i<
pick_modes_.size(); ++i) {
314 QAction* ac =
new QAction(
pick_modes_[i].name().c_str(), ag );
315 ac->setData( QVariant( i ) );
316 ac->setCheckable(
true );
319 ac->setChecked(
true );
325 connect( ag, SIGNAL( triggered( QAction * ) ),
334 int _id = _action->data().toInt();
376 for (
unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i )
401 std::vector<PickMode>::iterator it =
pick_modes_.begin();
437 for (
unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i )
DLLEXPORT OpenFlipperQSettings & OpenFlipperSettings()
QSettings object containing all program settings of OpenFlipper.
void setPickModeMouseTracking(const std::string &_name, bool _mouseTracking)
set mouseTracking for the pick mode
void removePickModeToolbar(const std::string &_mode)
Removes the additional toolbar of the given PickMode.
void setPickModeToolbar(const std::string &_mode, QToolBar *_toolbar)
Set the additional toolbar of the given PickMode.
void actionPickMenu(QAction *_action)
void addPickMode(const std::string &_name, bool _mouse_tracking=false, int _pos=-1, bool _visible=true, QCursor _cursor=Qt::ArrowCursor)
add pick mode
CursorPainter * cursorPainter_
Cursor handling.
QToolButton * moveButton_
Called by Plugins to add a Toolbar.
Viewer::ActionMode actionMode_
void setCursor(const QCursor &_cursor)
Sets the current used cursor.
QtGLGraphicsScene * glScene_
graphics scene used to paint gl context and widgets
void setActionMode(const Viewer::ActionMode _am)
SideArea * toolBox_
Toolbox.
void getPickMode(std::string &_name)
ActionMode
Enum listing action modes of the viewers.
void signalPickModeChanged(const std::string &)
void analyzeSceneGraph(ACG::SceneGraph::BaseNode *_root, unsigned int &_maxPasses, ACG::Vec3d &_bbmin, ACG::Vec3d &_bbmax)
Analyze the SceneGraph <ACG/Scenegraph/SceneGraphAnalysis.hh>
void setPickModeCursor(const std::string &_name, QCursor _cursor)
set a new cursor for the pick mode
Viewer::ActionMode lastActionMode_
QToolBar * pickToolBarExternal_
Extra toolbar not in scene for picking.
QToolButton * pickButton_
Called by Plugins to add a Toolbar.
Struct containing information about pickModes.
void setPickMode(const std::string &_name)
std::vector< PickMode > pick_modes_
void expandToolBoxWidget(QWidget *widget, bool expand)
void setActivePickToolBar(QToolBar *_tool)
Set toolbar to be active pick toolbar.
void getActionMode(Viewer::ActionMode &_am)
QToolButton * questionButton_
Called by Plugins to add a Toolbar.
QVariant value(const QString &key, const QVariant &defaultValue=QVariant()) const
std::vector< glViewer *> examiner_widgets_
Examiner Widget.
void hidePickToolBar()
Hide picking toolbar.
std::set< QToolBar * > registeredToolbars_
Store all toolbars that once have been registered.
void updatePickMenu()
update pick mode menu
PickToolBarMap curPickingToolbarItems_
Handle to picking toolbar.
std::string pick_mode_name_
const std::string & pickMode() const
ACG::SceneGraph::BaseNode * getSceneGraphRootNode()
get scenegraph root node