// Apply the size specified in a) properties; or b) on the command line
setWindowSize();
+ // Create the default layout
+ mLayout = new QVBoxLayout;
+ setLayout(mLayout);
+
EVAF_INFO("%s created", qPrintable(objectName()));
}
{
close();
+ // Delete all the items added to the main window
+ while (mItemsAdded.count() > 0) {
+ QPointer<QObject> item = mItemsAdded.takeAt(0);
+ if (item)
+ delete item.data();
+ }
+
EVAF_INFO("%s finalized", qPrintable(objectName()));
}
+void MainWindow::addWidget(QWidget * widget)
+{
+ mLayout->addWidget(widget);
+ mItemsAdded.append(widget);
+}
+
+void MainWindow::addLayout(QLayout * layout)
+{
+ mLayout->addLayout(layout);
+ mItemsAdded.append(layout);
+}
+
void MainWindow::saveSettings()
{
static int ver[4] = {VER_FILE_VERSION};