Commit 8ec357bc authored by Jan Möbius's avatar Jan Möbius

Cleanup icon mess

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@2851 383ad7c9-94d9-4d36-a494-682f7c89f535
parent d9ef2536
...@@ -12,12 +12,12 @@ ...@@ -12,12 +12,12 @@
// it under the terms of the GNU Lesser General Public License as published by // it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
// OpenFlipper is distributed in the hope that it will be useful, // OpenFlipper is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details. // GNU Lesser General Public License for more details.
// //
// You should have received a copy of the GNU Lesser General Public License // You should have received a copy of the GNU Lesser General Public License
// along with OpenFlipper. If not, see <http://www.gnu.org/licenses/>. // along with OpenFlipper. If not, see <http://www.gnu.org/licenses/>.
// //
...@@ -47,12 +47,12 @@ ...@@ -47,12 +47,12 @@
#include <OpenFlipper/BasePlugin/PluginFunctions.hh> #include <OpenFlipper/BasePlugin/PluginFunctions.hh>
#include <OpenFlipper/common/GlobalOptions.hh> #include <OpenFlipper/common/GlobalOptions.hh>
//== IMPLEMENTATION ========================================================== //== IMPLEMENTATION ==========================================================
void CoreWidget::slotCustomContextMenu( const QPoint& _point ) { void CoreWidget::slotCustomContextMenu( const QPoint& _point ) {
updatePopupMenu(_point); updatePopupMenu(_point);
// If not initialized, dont show it!! // If not initialized, dont show it!!
if ( !contextMenu_->isEmpty () ) if ( !contextMenu_->isEmpty () )
contextMenu_->exec( examiner_widget_->mapToGlobal(_point) ); contextMenu_->exec( examiner_widget_->mapToGlobal(_point) );
...@@ -61,20 +61,20 @@ void CoreWidget::slotCustomContextMenu( const QPoint& _point ) { ...@@ -61,20 +61,20 @@ void CoreWidget::slotCustomContextMenu( const QPoint& _point ) {
void CoreWidget::updatePopupMenu(const QPoint& _point) { void CoreWidget::updatePopupMenu(const QPoint& _point) {
contextMenu_->clear(); contextMenu_->clear();
contextSelectionMenu_->clear(); contextSelectionMenu_->clear();
QIcon icon; QIcon icon;
QAction* typeEntry = new QAction("No type",contextMenu_); QAction* typeEntry = new QAction("No type",contextMenu_);
contextMenu_->addAction( typeEntry ); contextMenu_->addAction( typeEntry );
QAction* entrySeparator = contextMenu_->addSeparator( ); QAction* entrySeparator = contextMenu_->addSeparator( );
QAction* contextSelectionAction = contextMenu_->addMenu( contextSelectionMenu_ ); QAction* contextSelectionAction = contextMenu_->addMenu( contextSelectionMenu_ );
// -1 if no object id found for the current picking position // -1 if no object id found for the current picking position
// otherwise the id of the object // otherwise the id of the object
int objectId = -1; int objectId = -1;
// Do picking in the gl area to find an object // Do picking in the gl area to find an object
unsigned int node_idx, target_idx; unsigned int node_idx, target_idx;
ACG::Vec3d hit_point; ACG::Vec3d hit_point;
...@@ -83,19 +83,19 @@ void CoreWidget::updatePopupMenu(const QPoint& _point) { ...@@ -83,19 +83,19 @@ void CoreWidget::updatePopupMenu(const QPoint& _point) {
if ( PluginFunctions::get_picked_object(node_idx, object) ) if ( PluginFunctions::get_picked_object(node_idx, object) )
objectId = object->id(); objectId = object->id();
} }
int topLevelAdded = 0; int topLevelAdded = 0;
if ( objectId != -1) { if ( objectId != -1) {
// Add an empty Menu defining the current Type // Add an empty Menu defining the current Type
if ( object->dataType() == DATA_POLY_MESH ){ if ( object->dataType() == DATA_POLY_MESH ){
typeEntry->setText("Poly Mesh"); typeEntry->setText("Poly Mesh");
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"PolyType.png"); icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"PolyType.svg");
typeEntry->setIcon(icon); typeEntry->setIcon(icon);
} else if ( object->dataType() == DATA_TRIANGLE_MESH ) { } else if ( object->dataType() == DATA_TRIANGLE_MESH ) {
typeEntry->setText("Triangle Mesh"); typeEntry->setText("Triangle Mesh");
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"TriangleType.png"); icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"TriangleType.svg");
typeEntry->setIcon(icon); typeEntry->setIcon(icon);
} else if ( object->dataType() == DATA_POLY_LINE ) { } else if ( object->dataType() == DATA_POLY_LINE ) {
typeEntry->setText("Poly Line"); typeEntry->setText("Poly Line");
...@@ -103,14 +103,14 @@ void CoreWidget::updatePopupMenu(const QPoint& _point) { ...@@ -103,14 +103,14 @@ void CoreWidget::updatePopupMenu(const QPoint& _point) {
typeEntry->setIcon(icon); typeEntry->setIcon(icon);
} else if ( object->dataType() == DATA_BSPLINE_CURVE ) { } else if ( object->dataType() == DATA_BSPLINE_CURVE ) {
typeEntry->setText("BSpline Curve"); typeEntry->setText("BSpline Curve");
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"BSplineCurveType.png"); icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"BSplineCurveType.svg");
typeEntry->setIcon(icon); typeEntry->setIcon(icon);
} }
// Add real context Menus first // Add real context Menus first
for ( uint i = 0 ; i < contextMenus_.size(); ++i ) { for ( uint i = 0 ; i < contextMenus_.size(); ++i ) {
// check if the dataType of the object matches the context type // check if the dataType of the object matches the context type
if ( object->dataType( contextMenus_[i].contextType ) ) { if ( object->dataType( contextMenus_[i].contextType ) ) {
if ( contextMenus_[i].position == CONTEXTTOPLEVELMENU ) { if ( contextMenus_[i].position == CONTEXTTOPLEVELMENU ) {
...@@ -119,20 +119,20 @@ void CoreWidget::updatePopupMenu(const QPoint& _point) { ...@@ -119,20 +119,20 @@ void CoreWidget::updatePopupMenu(const QPoint& _point) {
} else if ( contextMenus_[i].position == CONTEXTSELECTIONMENU ) { } else if ( contextMenus_[i].position == CONTEXTSELECTIONMENU ) {
contextSelectionMenu_->addMenu(contextMenus_[i].menu); contextSelectionMenu_->addMenu(contextMenus_[i].menu);
} }
// Get all Actions in the menu and its submenus. // Get all Actions in the menu and its submenus.
// Set their data to the picked Object id // Set their data to the picked Object id
QList< QAction *> allActions = contextMenus_[i].menu->actions(); QList< QAction *> allActions = contextMenus_[i].menu->actions();
while ( !allActions.empty() ) { while ( !allActions.empty() ) {
QList< QAction *> tmpList; QList< QAction *> tmpList;
// Set userdata of all actions to the picked Object Id // Set userdata of all actions to the picked Object Id
for ( int j = 0 ; j < allActions.size(); ++j ) { for ( int j = 0 ; j < allActions.size(); ++j ) {
allActions[j]->setData( QVariant( objectId ) ); allActions[j]->setData( QVariant( objectId ) );
if ( allActions[j]->menu() != 0 ) if ( allActions[j]->menu() != 0 )
tmpList << allActions[j]->menu()->actions(); tmpList << allActions[j]->menu()->actions();
} }
allActions = tmpList; allActions = tmpList;
} }
} }
...@@ -141,62 +141,62 @@ void CoreWidget::updatePopupMenu(const QPoint& _point) { ...@@ -141,62 +141,62 @@ void CoreWidget::updatePopupMenu(const QPoint& _point) {
contextMenu_->removeAction(typeEntry); contextMenu_->removeAction(typeEntry);
contextMenu_->removeAction(entrySeparator); contextMenu_->removeAction(entrySeparator);
} }
if ( contextSelectionMenu_->isEmpty() ) if ( contextSelectionMenu_->isEmpty() )
contextMenu_->removeAction( contextSelectionAction ); contextMenu_->removeAction( contextSelectionAction );
if ( topLevelAdded > 0 ) if ( topLevelAdded > 0 )
contextMenu_->addSeparator(); contextMenu_->addSeparator();
emit updateContextMenu(objectId); emit updateContextMenu(objectId);
// Add persistent context Menus as second part // Add persistent context Menus as second part
for ( uint i = 0 ; i < persistentContextMenus_.size(); ++i ) { for ( uint i = 0 ; i < persistentContextMenus_.size(); ++i ) {
contextMenu_->addMenu( persistentContextMenus_[i].menu ); contextMenu_->addMenu( persistentContextMenus_[i].menu );
// Get all Actions in the menu and its submenus. // Get all Actions in the menu and its submenus.
// Set their data to the picked Object id // Set their data to the picked Object id
QList< QAction *> allActions = persistentContextMenus_[i].menu->actions(); QList< QAction *> allActions = persistentContextMenus_[i].menu->actions();
while ( !allActions.empty() ) { while ( !allActions.empty() ) {
QList< QAction *> tmpList; QList< QAction *> tmpList;
// Set userdata of all actions to the picked Object Id // Set userdata of all actions to the picked Object Id
for ( int j = 0 ; j < allActions.size(); ++j ) { for ( int j = 0 ; j < allActions.size(); ++j ) {
allActions[j]->setData( QVariant( objectId ) ); allActions[j]->setData( QVariant( objectId ) );
if ( allActions[j]->menu() != 0 ) if ( allActions[j]->menu() != 0 )
tmpList << allActions[j]->menu()->actions(); tmpList << allActions[j]->menu()->actions();
} }
allActions = tmpList; allActions = tmpList;
} }
} }
// Only add Separator if we had plugin context menus // Only add Separator if we had plugin context menus
if ( persistentContextMenus_.size() > 0 ) if ( persistentContextMenus_.size() > 0 )
contextMenu_->addSeparator(); contextMenu_->addSeparator();
if (examiner_widget_->getPickMenu() != NULL) { if (examiner_widget_->getPickMenu() != NULL) {
examiner_widget_->getPickMenu()->setTitle("&Picking"); examiner_widget_->getPickMenu()->setTitle("&Picking");
contextMenu_->addMenu(examiner_widget_->getPickMenu() ); contextMenu_->addMenu(examiner_widget_->getPickMenu() );
examiner_widget_->getPickMenu()->setTearOffEnabled(true); examiner_widget_->getPickMenu()->setTearOffEnabled(true);
} }
if (examiner_widget_->getFuncMenu() != NULL) { if (examiner_widget_->getFuncMenu() != NULL) {
examiner_widget_->getFuncMenu()->setTitle("&Functions"); examiner_widget_->getFuncMenu()->setTitle("&Functions");
contextMenu_->addMenu(examiner_widget_->getFuncMenu() ); contextMenu_->addMenu(examiner_widget_->getFuncMenu() );
examiner_widget_->getFuncMenu()->setTearOffEnabled(true); examiner_widget_->getFuncMenu()->setTearOffEnabled(true);
} }
if (examiner_widget_->getDrawMenu() != NULL) { if (examiner_widget_->getDrawMenu() != NULL) {
examiner_widget_->getDrawMenu()->setTitle("&DrawModes"); examiner_widget_->getDrawMenu()->setTitle("&DrawModes");
QAction* drawMenuAction = contextMenu_->addMenu(examiner_widget_->getDrawMenu() ); QAction* drawMenuAction = contextMenu_->addMenu(examiner_widget_->getDrawMenu() );
QIcon icon; QIcon icon;
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"drawModes.png"); icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"drawModes.png");
drawMenuAction->setIcon(icon); drawMenuAction->setIcon(icon);
examiner_widget_->getDrawMenu()->setTearOffEnabled(true); examiner_widget_->getDrawMenu()->setTearOffEnabled(true);
} }
} }
...@@ -204,7 +204,7 @@ void CoreWidget::updatePopupMenu(const QPoint& _point) { ...@@ -204,7 +204,7 @@ void CoreWidget::updatePopupMenu(const QPoint& _point) {
void CoreWidget::slotAddContextMenu(QMenu* _menu) { void CoreWidget::slotAddContextMenu(QMenu* _menu) {
MenuInfo info; MenuInfo info;
info.menu = _menu; info.menu = _menu;
persistentContextMenus_.push_back(info); persistentContextMenus_.push_back(info);
} }
...@@ -213,7 +213,7 @@ void CoreWidget::slotAddContextMenu( QMenu* _menu , DataType _dataType ,ContextM ...@@ -213,7 +213,7 @@ void CoreWidget::slotAddContextMenu( QMenu* _menu , DataType _dataType ,ContextM
info.menu = _menu; info.menu = _menu;
info.contextType = _dataType; info.contextType = _dataType;
info.position = _type; info.position = _type;
contextMenus_.push_back(info); contextMenus_.push_back(info);
} }
......
...@@ -12,12 +12,12 @@ ...@@ -12,12 +12,12 @@
// it under the terms of the GNU Lesser General Public License as published by // it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
// OpenFlipper is distributed in the hope that it will be useful, // OpenFlipper is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details. // GNU Lesser General Public License for more details.
// //
// You should have received a copy of the GNU Lesser General Public License // You should have received a copy of the GNU Lesser General Public License
// along with OpenFlipper. If not, see <http://www.gnu.org/licenses/>. // along with OpenFlipper. If not, see <http://www.gnu.org/licenses/>.
// //
...@@ -54,10 +54,10 @@ ...@@ -54,10 +54,10 @@
#define WIDGET_HEIGHT 800 #define WIDGET_HEIGHT 800
#define WIDGET_WIDTH 800 #define WIDGET_WIDTH 800
//== IMPLEMENTATION ========================================================== //== IMPLEMENTATION ==========================================================
/** \brief Constuctor for the Core Widget /** \brief Constuctor for the Core Widget
* *
*/ */
CoreWidget:: CoreWidget::
CoreWidget( QVector<ViewMode*>& _viewModes, CoreWidget( QVector<ViewMode*>& _viewModes,
...@@ -77,21 +77,21 @@ CoreWidget( QVector<ViewMode*>& _viewModes, ...@@ -77,21 +77,21 @@ CoreWidget( QVector<ViewMode*>& _viewModes,
viewMenu_(0), viewMenu_(0),
fileMenuEnd_(0), fileMenuEnd_(0),
contextMenu_(0), contextMenu_(0),
contextSelectionMenu_(0), contextSelectionMenu_(0),
stackMenu_(0), stackMenu_(0),
stackedWidget_(0), stackedWidget_(0),
helpBrowserDeveloper_(0), helpBrowserDeveloper_(0),
helpBrowserUser_(0), helpBrowserUser_(0),
optionsWidget_(0), optionsWidget_(0),
plugins_(_plugins) plugins_(_plugins)
{ {
setupStatusBar(); setupStatusBar();
splitter_ = new QSplitter(Qt::Vertical,this); splitter_ = new QSplitter(Qt::Vertical,this);
setCentralWidget(splitter_); setCentralWidget(splitter_);
stackedWidget_ = new QStackedWidget(splitter_); stackedWidget_ = new QStackedWidget(splitter_);
// ====================================================================== // ======================================================================
// Set up the logging window // Set up the logging window
// ====================================================================== // ======================================================================
...@@ -100,27 +100,27 @@ CoreWidget( QVector<ViewMode*>& _viewModes, ...@@ -100,27 +100,27 @@ CoreWidget( QVector<ViewMode*>& _viewModes,
textedit_->setSizePolicy( QSizePolicy ( QSizePolicy::Preferred , QSizePolicy::Preferred ) ); textedit_->setSizePolicy( QSizePolicy ( QSizePolicy::Preferred , QSizePolicy::Preferred ) );
textedit_->resize( splitter_->width() ,120); textedit_->resize( splitter_->width() ,120);
textedit_->setLineWrapMode( QTextEdit::NoWrap ); textedit_->setLineWrapMode( QTextEdit::NoWrap );
QList<int> wsizes( splitter_->sizes() ); QList<int> wsizes( splitter_->sizes() );
if (OpenFlipper::Options::hideLogger()) { if (OpenFlipper::Options::hideLogger()) {
wsizes[1] = 0; wsizes[1] = 0;
splitter_->setSizes(wsizes); splitter_->setSizes(wsizes);
} }
// ====================================================================== // ======================================================================
// Create examiner // Create examiner
// ====================================================================== // ======================================================================
QGLFormat format; QGLFormat format;
QGLFormat::setDefaultFormat(format); QGLFormat::setDefaultFormat(format);
format.setStereo( OpenFlipper::Options::stereo() ); format.setStereo( OpenFlipper::Options::stereo() );
examiner_widget_ = new ACG::QtWidgets::QtExaminerViewer(stackedWidget_, examiner_widget_ = new ACG::QtWidgets::QtExaminerViewer(stackedWidget_,
"Examiner Widget", "Examiner Widget",
statusBar_ , statusBar_ ,
&format); &format);
examiner_widget_->sceneGraph( PluginFunctions::getSceneGraphRootNode() ); examiner_widget_->sceneGraph( PluginFunctions::getSceneGraphRootNode() );
examiner_widget_->enablePopupMenu(false); examiner_widget_->enablePopupMenu(false);
stackedWidget_->addWidget(examiner_widget_); stackedWidget_->addWidget(examiner_widget_);
// ====================================================================== // ======================================================================
// Setup dragging for examiner widget // Setup dragging for examiner widget
// ====================================================================== // ======================================================================
...@@ -130,104 +130,104 @@ CoreWidget( QVector<ViewMode*>& _viewModes, ...@@ -130,104 +130,104 @@ CoreWidget( QVector<ViewMode*>& _viewModes,
connect( examiner_widget_, SIGNAL(dragEnterEvent( QDragEnterEvent*)), connect( examiner_widget_, SIGNAL(dragEnterEvent( QDragEnterEvent*)),
this, SLOT(dragEnterEvent(QDragEnterEvent* ))); this, SLOT(dragEnterEvent(QDragEnterEvent* )));
connect( examiner_widget_, SIGNAL(dropEvent( QDropEvent*)), connect( examiner_widget_, SIGNAL(dropEvent( QDropEvent*)),
this, SLOT(dropEvent(QDropEvent* ))); this, SLOT(dropEvent(QDropEvent* )));
// ====================================================================== // ======================================================================
// Create main Toolbar // Create main Toolbar
// ====================================================================== // ======================================================================
mainToolbar_ = new QToolBar("Main Toolbar"); mainToolbar_ = new QToolBar("Main Toolbar");
addToolBar(mainToolbar_); addToolBar(mainToolbar_);
// ====================================================================== // ======================================================================
// Get Toolbar from examiner and integrate it into main window // Get Toolbar from examiner and integrate it into main window
// ====================================================================== // ======================================================================
// Take control over the toolbar // Take control over the toolbar
viewerToolbar_ = examiner_widget_->removeToolBar(); viewerToolbar_ = examiner_widget_->removeToolBar();
addToolBar(Qt::TopToolBarArea,viewerToolbar_); addToolBar(Qt::TopToolBarArea,viewerToolbar_);
viewerToolbar_->setParent(this); viewerToolbar_->setParent(this);
viewerToolbar_->setAllowedAreas(Qt::AllToolBarAreas); viewerToolbar_->setAllowedAreas(Qt::AllToolBarAreas);
viewerToolbar_->setIconSize(QSize(20,20)); viewerToolbar_->setIconSize(QSize(20,20));
// Set our own Icons // Set our own Icons
QList<QAction *> actions = viewerToolbar_->actions(); QList<QAction *> actions = viewerToolbar_->actions();
for ( int i = 0 ; i < actions.size(); ++i ) { for ( int i = 0 ; i < actions.size(); ++i ) {
if ( actions[i]->text() == "Move" ) { if ( actions[i]->text() == "Move" ) {
QIcon icon; QIcon icon;
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"transform-move.png"); icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"transform-move.png");
QToolButton * button = qobject_cast<QToolButton *>( viewerToolbar_->widgetForAction ( actions[i] ) ); QToolButton * button = qobject_cast<QToolButton *>( viewerToolbar_->widgetForAction ( actions[i] ) );
button->setIcon(icon); button->setIcon(icon);
} else if ( actions[i]->text() == "Home" ) { } else if ( actions[i]->text() == "Home" ) {
QIcon icon; QIcon icon;
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"go-home.png"); icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"go-home.png");
QToolButton * button = qobject_cast<QToolButton *>( viewerToolbar_->widgetForAction ( actions[i] ) ); QToolButton * button = qobject_cast<QToolButton *>( viewerToolbar_->widgetForAction ( actions[i] ) );
button->setIcon(icon); button->setIcon(icon);
} else if ( actions[i]->text() == "Set Home" ) { } else if ( actions[i]->text() == "Set Home" ) {
QIcon icon; QIcon icon;
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"set-home.png"); icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"set-home.png");
QToolButton * button = qobject_cast<QToolButton *>( viewerToolbar_->widgetForAction ( actions[i] ) ); QToolButton * button = qobject_cast<QToolButton *>( viewerToolbar_->widgetForAction ( actions[i] ) );
button->setIcon(icon); button->setIcon(icon);
} else if ( actions[i]->text() == "Light" ) { } else if ( actions[i]->text() == "Light" ) {
QIcon icon; QIcon icon;
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"ktip.png"); icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"ktip.png");
QToolButton * button = qobject_cast<QToolButton *>( viewerToolbar_->widgetForAction ( actions[i] ) ); QToolButton * button = qobject_cast<QToolButton *>( viewerToolbar_->widgetForAction ( actions[i] ) );
button->setIcon(icon); button->setIcon(icon);
} else if ( actions[i]->text() == "Question" ) { } else if ( actions[i]->text() == "Question" ) {
QIcon icon; QIcon icon;
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"help-about.png"); icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"help-about.png");
QToolButton * button = qobject_cast<QToolButton *>( viewerToolbar_->widgetForAction ( actions[i] ) ); QToolButton * button = qobject_cast<QToolButton *>( viewerToolbar_->widgetForAction ( actions[i] ) );
button->setIcon(icon); button->setIcon(icon);
} else if ( actions[i]->text() == "SceneGraph" ) { } else if ( actions[i]->text() == "SceneGraph" ) {
QIcon icon; QIcon icon;
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"scenegraph.png"); icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"scenegraph.png");
QToolButton * button = qobject_cast<QToolButton *>( viewerToolbar_->widgetForAction ( actions[i] ) ); QToolButton * button = qobject_cast<QToolButton *>( viewerToolbar_->widgetForAction ( actions[i] ) );
button->setIcon(icon); button->setIcon(icon);
} else if ( actions[i]->text() == "Pick" ) { } else if ( actions[i]->text() == "Pick" ) {
// QIcon icon; // QIcon icon;
// icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"scenegraph.png"); // icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"scenegraph.png");
// //
// QToolButton * button = qobject_cast<QToolButton *>( viewerToolbar_->widgetForAction ( actions[i] ) ); // QToolButton * button = qobject_cast<QToolButton *>( viewerToolbar_->widgetForAction ( actions[i] ) );
// button->setIcon(icon); // button->setIcon(icon);
} else if ( actions[i]->text() == "View All" ) { } else if ( actions[i]->text() == "View All" ) {
// QIcon icon; // QIcon icon;
// icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"scenegraph.png"); // icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"scenegraph.png");
// //
// QToolButton * button = qobject_cast<QToolButton *>( viewerToolbar_->widgetForAction ( actions[i] ) ); // QToolButton * button = qobject_cast<QToolButton *>( viewerToolbar_->widgetForAction ( actions[i] ) );
// button->setIcon(icon); // button->setIcon(icon);
} else if ( actions[i]->text() == "Projection" ) { } else if ( actions[i]->text() == "Projection" ) {
// QIcon icon; // QIcon icon;
// icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"scenegraph.png"); // icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"scenegraph.png");
// //
// QToolButton * button = qobject_cast<QToolButton *>( viewerToolbar_->widgetForAction ( actions[i] ) ); // QToolButton * button = qobject_cast<QToolButton *>( viewerToolbar_->widgetForAction ( actions[i] ) );
// button->setIcon(icon); // button->setIcon(icon);
} else if ( actions[i]->text() == "Stereo" ) { } else if ( actions[i]->text() == "Stereo" ) {
// QIcon icon; // QIcon icon;
// icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"scenegraph.png"); // icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"scenegraph.png");
// //
// QToolButton * button = qobject_cast<QToolButton *>( viewerToolbar_->widgetForAction ( actions[i] ) );