X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_MainWindow.cpp;h=b675c5fd7d59639c83e5075dec96d6d27092df76;hb=6654a921211670c15a79a997ca666a174fe8a6f6;hp=99d2422e9c32dced0a0ce88ac985f384998ed7f5;hpb=a142c8797585ec0b35310ec3608d38b3a4908b7c;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_MainWindow.cpp b/src/XGUI/XGUI_MainWindow.cpp index 99d2422e9..b675c5fd7 100644 --- a/src/XGUI/XGUI_MainWindow.cpp +++ b/src/XGUI/XGUI_MainWindow.cpp @@ -28,9 +28,9 @@ XGUI_MainWindow::XGUI_MainWindow(QWidget* parent) : QMainWindow(parent), - myObjectBrowser(NULL), - myPythonConsole(NULL), - myPropertyPanelDock(NULL) + myObjectBrowser(0), + myPythonConsole(0), + myPropertyPanelDock(0) { setWindowTitle(tr("New Geom")); myMenuBar = new XGUI_MainMenu(this); @@ -40,7 +40,7 @@ XGUI_MainWindow::XGUI_MainWindow(QWidget* parent) myViewer = new XGUI_Viewer(this); - createDockWidgets(); + //createDockWidgets(); } XGUI_MainWindow::~XGUI_MainWindow(void) @@ -75,11 +75,7 @@ void XGUI_MainWindow::showPythonConsole() aDoc->setMinimumHeight(0); aDoc->setWindowTitle("Console"); myPythonConsole = new PyConsole_EnhConsole( aDoc, new PyConsole_EnhInterp()); - //myPythonConsole = new QTextEdit(aDoc); - //myPythonConsole->setGeometry(0,0,200, 50); - //myPythonConsole->setText(">>>"); aDoc->setWidget(myPythonConsole); - //myPythonConsole->setMinimumHeight(0); addDockWidget(Qt::TopDockWidgetArea, aDoc); tabifyDockWidget(myMenuBar->getLastDockWindow(), aDoc); } @@ -121,15 +117,21 @@ void XGUI_MainWindow::createDockWidgets() myPropertyPanelDock = createPropertyPanel(); addDockWidget(Qt::LeftDockWidgetArea, myPropertyPanelDock); hidePropertyPanel(); //setWindowTitle(theTitle); +} + QDockWidget* XGUI_MainWindow::createPropertyPanel() { QDockWidget* aPropPanel = new QDockWidget(this); aPropPanel->setWindowTitle(tr("Property Panel")); + QAction* aViewAct = aPropPanel->toggleViewAction(); aPropPanel->setObjectName(XGUI::PROP_PANEL); QWidget* aContent = new QWidget(aPropPanel); @@ -137,11 +139,6 @@ QDockWidget* XGUI_MainWindow::createPropertyPanel() aMainLay->setContentsMargins(3, 3, 3, 3); aPropPanel->setWidget(aContent); - QWidget* aCustomWidget = new QWidget(aContent); - aCustomWidget->setObjectName(XGUI::PROP_PANEL_WDG); - aMainLay->addWidget(aCustomWidget); - aMainLay->addStretch(1); - QFrame* aFrm = new QFrame(aContent); aFrm->setFrameStyle(QFrame::Sunken); aFrm->setFrameShape(QFrame::Panel); @@ -151,17 +148,25 @@ QDockWidget* XGUI_MainWindow::createPropertyPanel() QPushButton* aBtn = new QPushButton(QIcon(":pictures/button_help.png"), "", aFrm); aBtn->setFlat(true); + //connect(aBtn, SIGNAL(clicked()), this, SIGNAL(propertyHelpPressed())); aBtnLay->addWidget(aBtn); aBtnLay->addStretch(1); aBtn = new QPushButton(QIcon(":pictures/button_ok.png"), "", aFrm); aBtn->setObjectName(XGUI::PROP_PANEL_OK); aBtn->setFlat(true); + //connect(aBtn, SIGNAL(clicked()), this, SIGNAL(propertyOkPressed())); aBtnLay->addWidget(aBtn); aBtn = new QPushButton(QIcon(":pictures/button_cancel.png"), "", aFrm); aBtn->setObjectName(XGUI::PROP_PANEL_CANCEL); aBtn->setFlat(true); + //connect(aBtn, SIGNAL(clicked()), this, SIGNAL(propertyClosePressed())); aBtnLay->addWidget(aBtn); + QWidget* aCustomWidget = new QWidget(aContent); + aCustomWidget->setObjectName(XGUI::PROP_PANEL_WDG); + aMainLay->addWidget(aCustomWidget); + aMainLay->addStretch(1); + return aPropPanel; } @@ -171,9 +176,6 @@ QDockWidget* XGUI_MainWindow::createObjectBrowser() aObjDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); aObjDock->setWindowTitle(tr("Object browser")); myObjectBrowser = new XGUI_ObjectsBrowser(aObjDock); - //myObjectBrowser->setColumnCount(1); - //myObjectBrowser->setHeaderHidden(true); aObjDock->setWidget(myObjectBrowser); -// fillObjectBrowser(); return aObjDock; }