|
|
@ -87,7 +87,8 @@ UBTeacherGuideEditionWidget::UBTeacherGuideEditionWidget(QWidget *parent, const |
|
|
|
mpTreeWidget->setColumnCount(2); |
|
|
|
mpTreeWidget->setColumnCount(2); |
|
|
|
mpTreeWidget->header()->setStretchLastSection(false); |
|
|
|
mpTreeWidget->header()->setStretchLastSection(false); |
|
|
|
mpTreeWidget->header()->setResizeMode(0, QHeaderView::Stretch); |
|
|
|
mpTreeWidget->header()->setResizeMode(0, QHeaderView::Stretch); |
|
|
|
mpTreeWidget->header()->setResizeMode(1, QHeaderView::Custom); |
|
|
|
mpTreeWidget->header()->setResizeMode(1, QHeaderView::Fixed); |
|
|
|
|
|
|
|
mpTreeWidget->header()->setDefaultSectionSize(32); |
|
|
|
|
|
|
|
|
|
|
|
connect(mpTreeWidget,SIGNAL(itemClicked(QTreeWidgetItem*,int)),this,SLOT(onAddItemClicked(QTreeWidgetItem*,int))); |
|
|
|
connect(mpTreeWidget,SIGNAL(itemClicked(QTreeWidgetItem*,int)),this,SLOT(onAddItemClicked(QTreeWidgetItem*,int))); |
|
|
|
|
|
|
|
|
|
|
@ -158,7 +159,9 @@ QVector<tUBGEElementNode*> UBTeacherGuideEditionWidget::getData() |
|
|
|
children << getChildrenList(mpAddALinkItem); |
|
|
|
children << getChildrenList(mpAddALinkItem); |
|
|
|
result << getPageAndCommentData(); |
|
|
|
result << getPageAndCommentData(); |
|
|
|
foreach(QTreeWidgetItem* widgetItem, children){ |
|
|
|
foreach(QTreeWidgetItem* widgetItem, children){ |
|
|
|
result << dynamic_cast<iUBTGSavableData*>(mpTreeWidget->itemWidget(widgetItem,0))->saveData(); |
|
|
|
tUBGEElementNode* node = dynamic_cast<iUBTGSavableData*>(mpTreeWidget->itemWidget(widgetItem,0))->saveData(); |
|
|
|
|
|
|
|
if(node) |
|
|
|
|
|
|
|
result << node; |
|
|
|
} |
|
|
|
} |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|