+void SdiWindow::Internal::MainWindow::addPanel(QString const & name, Gui::Panel * panel)
+{
+ mPanels.append(panel);
+ mPanelNames.insert(name, panel);
+
+ // If this is the predefined main panel, add it to this window
+ if (!mMainPanelName.isEmpty()) {
+ if (name == mMainPanelName) {
+ mMainPanel = panel;
+ mLayout->addWidget(panel);
+ }
+ }
+
+ // If the predefined main panel name is not set, use the first panel
+ else {
+ if (!mMainPanel) {
+ mMainPanel = panel;
+ mLayout->addWidget(panel);
+ }
+ }
+}
+
+Gui::Panel * SdiWindow::Internal::MainWindow::panel(QString const & name) const