myObjectBrowser(0),
myPythonConsole(0)
{
- setWindowTitle(tr("WINDOW_TITLE"));
+ setWindowTitle(tr("New Geom"));
myMenuBar = new XGUI_MainMenu(this);
- QDockWidget* aDoc = new QDockWidget(this);
- aDoc->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
- aDoc->setWindowTitle(tr("Object browser"));
-
- myObjectBrowser = new XGUI_ObjectsBrowser(aDoc);
- //myObjectBrowser->setColumnCount(1);
- //myObjectBrowser->setHeaderHidden(true);
- aDoc->setWidget(myObjectBrowser);
- addDockWidget(Qt::LeftDockWidgetArea, aDoc);
- //aDoc->hide();
-
QMdiArea* aMdiArea = new QMdiArea(this);
setCentralWidget(aMdiArea);
aBtn->setFlat(true);
aBtnLay->addWidget(aBtn);
- addDockWidget(Qt::RightDockWidgetArea, aPropPanel);
+ return aPropPanel;
+}
+
+QDockWidget* XGUI_MainWindow::createObjectBrowser()
+{
+ QDockWidget* aObjDock = new QDockWidget(this);
+ aObjDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
- aObjDock->setWindowTitle(tr("OBJECT_BROWSER_TITLE"));
- myObjectBrowser = new QTreeWidget(aObjDock);
- myObjectBrowser->setColumnCount(1);
- myObjectBrowser->setHeaderHidden(true);
++ aObjDock->setWindowTitle(tr("Object browser"));
++ myObjectBrowser = new XGUI_ObjectsBrowser(aObjDock);
++ //myObjectBrowser->setColumnCount(1);
++ //myObjectBrowser->setHeaderHidden(true);
+ aObjDock->setWidget(myObjectBrowser);
+// fillObjectBrowser();
+ return aObjDock;
}
-
- //******************************************************
-
- // TEST FUNCTIONS
-
- //******************************************************
- void XGUI_MainWindow::fillObjectBrowser()
- {
- QStringList aNames;
- aNames << "Parameters" << "Constructions";
- aNames << "Part 1" << "Part 2" << "Part 3";
- aNames << "Properties";
-
- QStringList aIcons;
- aIcons << ":pictures/params_folder.png";
- aIcons << ":pictures/constr_folder.png";
- aIcons << ":pictures/part_ico.png";
- aIcons << ":pictures/part_ico.png";
- aIcons << ":pictures/part_ico.png";
- aIcons << ":pictures/properties.png";
-
- QList<QTreeWidgetItem*> aItems;
- foreach(QString aName, aNames)
- {
- QTreeWidgetItem* aItem = new QTreeWidgetItem(myObjectBrowser);
- aItem->setText(0, aName);
- aItems.append(aItem);
- }
- for(int i = 0; i < aItems.length(); i++) {
- aItems[i]->setIcon(0, QIcon(aIcons[i]));
- }
- myObjectBrowser->addTopLevelItems(aItems);
-
- for(int i = 2; i < 5; i++) {
- QTreeWidgetItem* aItem = new QTreeWidgetItem(aItems[i]);
- aItem->setText(0, "Parameters");
- aItem->setIcon(0, QIcon(":pictures/params_folder.png"));
-
- aItem = new QTreeWidgetItem(aItems[i]);
- aItem->setText(0, "Construction");
- aItem->setIcon(0, QIcon(":pictures/constr_folder.png"));
-
- aItem = new QTreeWidgetItem(aItems[i]);
- aItem->setText(0, "Bodies");
- aItem->setIcon(0, QIcon(":pictures/part_ico.png"));
-
- aItem = new QTreeWidgetItem(aItems[i]);
- aItem->setText(0, "Features");
- aItem->setIcon(0, QIcon(":pictures/features.png"));
- }
- }