Commit d8d81d58 authored by Jan Möbius's avatar Jan Möbius

Add Toolbars to view modes:

Main Toolbar,
Viewer Toolbar

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7331 383ad7c9-94d9-4d36-a494-682f7c89f535
parent facaad33
......@@ -333,6 +333,8 @@ CoreWidget( QVector<ViewMode*>& _viewModes,
viewerToolbar_->setAllowedAreas(Qt::AllToolBarAreas);
viewerToolbar_->setIconSize(QSize(20,20));
viewerToolbar_->setObjectName(tr("ViewerToolbar"));
slotAddToolbar(viewerToolbar_);
moveButton_ = new QToolButton( viewerToolbar_ );
moveButton_->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"transform-move.png") );
......
......@@ -307,7 +307,7 @@ void CoreWidget::slotChangeView(QString _mode, QStringList _toolboxWidgets, QStr
if (_toolboxWidgets[i] == plugins_[p].toolboxWidgets[j].first )
toolBox_->addItem (plugins_[p].toolboxWidgets[j].second, plugins_[p].toolboxWidgets[j].first);
}
//find all Toolbars that should be visible and hide the others
for (uint p=0; p < plugins_.size(); p++)
for ( uint j = 0 ; j < plugins_[p].toolbars.size(); ++j )
......@@ -315,7 +315,21 @@ void CoreWidget::slotChangeView(QString _mode, QStringList _toolboxWidgets, QStr
plugins_[p].toolbars[j].second->show();
else
plugins_[p].toolbars[j].second->hide();
// Check the Main Toolbar:
if ( _toolbars.contains(tr("Main Toolbar")) )
mainToolbar_->show();
else
mainToolbar_->hide();
// Check the Main Toolbar:
if ( _toolbars.contains(tr("Viewer Toolbar")) )
viewerToolbar_->show();
else
viewerToolbar_->hide();
if (_mode != "")
OpenFlipper::Options::defaultToolboxMode(_mode);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment