return r.read( fname, cr );
}
-bool QtxActionMenuMgr::contains( const QString& title, const int id, const int pid )
+bool QtxActionMenuMgr::contains( const QString& title, const int id, const int pid ) const
{
return (bool)find( title, id, pid );
}
-bool QtxActionMenuMgr::contains( const int id, const int pid )
+bool QtxActionMenuMgr::contains( const int id, const int pid ) const
{
return (bool)find( id, pid );
}
virtual bool load( const QString&, QtxActionMgr::Reader& );
- bool contains( const QString&, const int, const int );
- bool contains( const int, const int );
+ bool contains( const QString&, const int, const int ) const;
+ bool contains( const int, const int ) const;
private slots:
return find( tname ) != -1;
}
+bool QtxActionToolMgr::contains( const int id, const int tid ) const
+{
+ for ( ToolBarMap::ConstIterator it = myToolBars.begin(); it != myToolBars.end(); ++it )
+ {
+ if ( tid == -1 || it.key() == tid ) {
+ const NodeList& list = it.data().nodes;
+ for ( NodeList::const_iterator nit = list.begin(); nit != list.end(); ++nit )
+ if ( (*nit).id == id )
+ return true;
+ }
+ }
+ return false;
+}
+
void QtxActionToolMgr::onToolBarDestroyed()
{
myToolBars.remove( find( (QToolBar*)sender() ) );
bool hasToolBar( const int ) const;
bool hasToolBar( const QString& ) const;
+ bool contains( const int, const int = -1 ) const;
+
virtual bool load( const QString&, QtxActionMgr::Reader& );
protected slots: