DEBTRACE("Creating BL::MainWindows_SALOME");
_actionId = 190;
_currentViewId = -1;
+ _svm = 0;
}
void
BL::MainWindows_SALOME::createView()
{
DEBTRACE("BL::MainWindows_SALOME CreateView");
- _svm = new SUIT_ViewManager(_appli->activeStudy(), _appli->desktop(), new SUIT_ViewModel());
- _appli->addViewManager(_svm);
- _viewWin = _svm->createViewWindow();
+ QString vmType = "JobManager View";
+
+ // Get JobManager View Manager
+ _svm = _appli->getViewManager( vmType, true );
+ if (!_svm) {
+ // view manager not found
+ QTextEdit* w = new QTextEdit;
+ _svm = _appli->createViewManager( vmType, w );
+ }
+
+ // Create a view
+ _viewWin = _svm->getActiveView();
+ _viewWin->setClosable( false );
_currentViewId = _viewWin->getId();
- if (_viewWin && _appli->desktop())
- _viewWin->resize((int)(_appli->desktop()->width() * 0.6), (int)(_appli->desktop()->height() * 0.6 ));
DEBTRACE("End of BL::MainWindows_SALOME CreateView");
}
BL::MainWindows_SALOME::viewManagers(QStringList& list) const
{
DEBTRACE("Entering in BL::SalomeGui::viewManagers");
- list.append(_svm->getType());
+ if (_svm)
+ list.append(_svm->getType());
}
namespace BL
{
class MainWindows_SALOME : virtual public MainWindows_Wrap,
- virtual public SalomeApp_Module
+ virtual public SalomeApp_Module
{
public:
MainWindows_SALOME(const QString & module_name);
virtual QMainWindow * getTabParent();
virtual QAction* createAction(const QString& toolTip,
- const QIcon& icon,
- const QString& menu,
- const QString& status,
- const int shortCut,
- QObject* parent =0,
- bool checkable = false,
- QObject* receiver =0,
- const char* member =0);
+ const QIcon& icon,
+ const QString& menu,
+ const QString& status,
+ const int shortCut,
+ QObject* parent =0,
+ bool checkable = false,
+ QObject* receiver =0,
+ const char* member =0);
virtual int createTopMenu(const QString & menu_name);
virtual void addActionToMenu(QAction * action, int menu_id);