-/*!
- Adds window to application.
- \param wid - QWidget
- \param flag - key for window
- \param studyId - study id
- Flag used how identificator of window in windows list.
-*/
-/*
-void LightApp_Application::addWindow( QWidget* wid, const int flag, const int studyId )
-{
- if ( !wid )
- return;
-
- int sId = studyId;
- if ( sId < 0 )
- {
- if ( !activeStudy() )
- return;
- else
- sId = activeStudy()->id();
- }
-
- if ( !myWindows.contains( flag ) )
- {
- QMap<int, int> winMap;
- currentWindows( winMap );
-
- LightApp_WidgetContainer* newWC = new LightApp_WidgetContainer( flag, desktop() );
- connect( newWC, SIGNAL( destroyed ( QObject* ) ), this, SLOT( onWCDestroyed( QObject* ) ) );
- // asv: connecting a slot for storing visibility flag of a window
- connect( newWC, SIGNAL( visibilityChanged ( bool ) ), SLOT( onVisibilityChanged( bool ) ) );
- myWindows.insert( flag, newWC );
- if ( winMap.contains( flag ) ) {
- //desktop()->removeDockWidget( myWindows[flag] );
- desktop()->addDockWidget( (Qt::DockWidgetArea)winMap[flag], myWindows[flag] );
- }
-
- //myWindows[flag]->setResizeEnabled( true );
- myWindows[flag]->setFeatures( QDockWidget::AllDockWidgetFeatures );
- myWindows[flag]->setObjectName( QString( "dock_window_%1" ).arg( flag ) );
- //myWindows[flag]->setFixedExtentWidth( wid->width() );
- //myWindows[flag]->setFixedExtentHeight( wid->height() );
- myWindows[flag]->resize( wid->width(), wid->height() );
- }
-
- QFont f;
-#ifndef DISABLE_PYCONSOLE
- if( wid->inherits( "PyConsole_Console" ) )
- {
- if( resourceMgr()->hasValue( "PyConsole", "font" ) )
- f = resourceMgr()->fontValue( "PyConsole", "font" );
- else
- {
- f = ( ( PyConsole_Console* )wid )->font();
- resourceMgr()->setValue( "PyConsole", "font", f );
- }
- }
- else
-#endif
- f = wid->font();
-
- myWindows[flag]->insert( sId, wid );
- wid->setFont( f );
-
- setWindowShown( flag, !myWindows[flag]->isEmpty() );
-}
-*/
-