77 case Viewer::ExamineMode:
80 case Viewer::LightMode:
82 case Viewer::PickingMode:
85 case Viewer::QuestionMode:
97 case Viewer::ExamineMode:
98 cursorPainter_->
setCursor(QCursor( QPixmap( OpenFlipper::Options::iconDirStr() + QDir::separator() +
"cursor_move.png" ) ,0,0 ));
100 case Viewer::LightMode:
101 cursorPainter_->
setCursor(QCursor( QPixmap( OpenFlipper::Options::iconDirStr() + QDir::separator() +
"cursor_light.png" ) ,0,0 ));
103 case Viewer::PickingMode:
104 cursorPainter_->
setCursor(QCursor( QPixmap( OpenFlipper::Options::iconDirStr() + QDir::separator() +
"cursor_arrow.png" ) ,0,0 ));
109 case Viewer::QuestionMode:
110 cursorPainter_->
setCursor(QCursor( QPixmap( OpenFlipper::Options::iconDirStr() + QDir::separator() +
"cursor_whatsthis.png" ) ,0,0 ));
116 case Viewer::PickingMode:
131 unsigned int maxPases = 1;
136 for (
unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i ) {
141 if(_am == Viewer::PickingMode) {
199 _tool->setOrientation(Qt::Horizontal);
205 QGraphicsProxyWidget* item =
glScene_->addWidget(_tool);
208 int midP = (
glScene_->width() / 2) - (
int)(_tool->width() / 2);
209 item->setPos(midP, 3);
228 ret->first->setParent(0);
251 addToolBar(Qt::LeftToolBarArea,_tool);
293 connect(
pickMenu_, SIGNAL( aboutToHide() ),
297 QActionGroup * ag =
new QActionGroup(
pickMenu_ );
298 ag->setExclusive(
true );
300 for (
unsigned int i=0; i<
pick_modes_.size(); ++i) {
311 QAction* ac =
new QAction(
pick_modes_[i].name().c_str(), ag );
312 ac->setData( QVariant( i ) );
313 ac->setCheckable(
true );
316 ac->setChecked(
true );
322 connect( ag, SIGNAL( triggered( QAction * ) ),
331 int _id = _action->data().toInt();
373 for (
unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i )
398 std::vector<PickMode>::iterator it =
pick_modes_.begin();
434 for (
unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i )
DLLEXPORT OpenFlipperQSettings & OpenFlipperSettings()
QSettings object containing all program settings of OpenFlipper.
void removePickModeToolbar(const std::string &_mode)
Removes the additional toolbar of the given PickMode.
void getActionMode(Viewer::ActionMode &_am)
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.
void setActivePickToolBar(QToolBar *_tool)
Set toolbar to be active pick toolbar.
void setPickModeToolbar(const std::string &_mode, QToolBar *_toolbar)
Set the additional toolbar of the given PickMode.
void expandToolBoxWidget(QWidget *widget, bool expand)
QtGLGraphicsScene * glScene_
graphics scene used to paint gl context and widgets
SideArea * toolBox_
Toolbox.
QToolButton * questionButton_
Called by Plugins to add a Toolbar.
void setPickModeMouseTracking(const std::string &_name, bool _mouseTracking)
set mouseTracking for the pick mode
Viewer::ActionMode lastActionMode_
PickToolBarMap curPickingToolbarItems_
Handle to picking toolbar.
ACG::SceneGraph::BaseNode * getSceneGraphRootNode()
get scenegraph root node
void getPickMode(std::string &_name)
void setPickModeCursor(const std::string &_name, QCursor _cursor)
set a new cursor for the pick mode
void setActionMode(const Viewer::ActionMode _am)
QToolBar * pickToolBarExternal_
Extra toolbar not in scene for picking.
Struct containing information about pickModes.
void analyzeSceneGraph(ACG::SceneGraph::BaseNode *_root, unsigned int &_maxPasses, ACG::Vec3d &_bbmin, ACG::Vec3d &_bbmax)
void hidePickToolBar()
Hide picking toolbar.
std::set< QToolBar * > registeredToolbars_
Store all toolbars that once have been registered.
void actionPickMenu(QAction *_action)
std::string pick_mode_name_
void updatePickMenu()
update pick mode menu
QToolButton * pickButton_
Called by Plugins to add a Toolbar.
Viewer::ActionMode actionMode_
const std::string & pickMode() const
void signalPickModeChanged(const std::string &)
std::vector< PickMode > pick_modes_
void setCursor(const QCursor &_cursor)
Sets the current used cursor.
void setPickMode(const std::string &_name)
QToolButton * moveButton_
Called by Plugins to add a Toolbar.
std::vector< glViewer * > examiner_widgets_
Examiner Widget.