|
|
|
@ -155,12 +155,12 @@ void EntryEditDialog::setLayout(Data::CollPtr coll_) {
|
|
|
|
|
|
|
|
|
|
// if this tqlayout model is changed, be sure to check slotUpdateField()
|
|
|
|
|
TQWidget* page = new TQWidget(m_tabs);
|
|
|
|
|
// (tqparent, margin, spacing)
|
|
|
|
|
// (parent, margin, spacing)
|
|
|
|
|
TQVBoxLayout* boxLayout = new TQVBoxLayout(page, 0, 0);
|
|
|
|
|
|
|
|
|
|
TQWidget* grid = new TQWidget(page);
|
|
|
|
|
gridList.append(grid);
|
|
|
|
|
// (tqparent, nrows, ncols, margin, spacing)
|
|
|
|
|
// (parent, nrows, ncols, margin, spacing)
|
|
|
|
|
// spacing gets a bit weird, if there are absolutely no Choice fields,
|
|
|
|
|
// then spacing should be 5, which is set later
|
|
|
|
|
TQGridLayout* tqlayout = new TQGridLayout(grid, 0, NCOLS, 8, 2);
|
|
|
|
@ -249,7 +249,7 @@ void EntryEditDialog::setLayout(Data::CollPtr coll_) {
|
|
|
|
|
}
|
|
|
|
|
// I don't want anything to be hidden, Keramik has a bug if I don't do this
|
|
|
|
|
it.current()->setMinimumHeight(it.current()->tqsizeHint().height());
|
|
|
|
|
// the tqparent of the grid is the page that got added to the tabs
|
|
|
|
|
// the parent of the grid is the page that got added to the tabs
|
|
|
|
|
it.current()->parentWidget()->tqlayout()->tqinvalidate();
|
|
|
|
|
it.current()->parentWidget()->setMinimumHeight(it.current()->parentWidget()->tqsizeHint().height());
|
|
|
|
|
}
|
|
|
|
@ -560,7 +560,7 @@ void EntryEditDialog::removeField(Data::CollPtr, Data::FieldPtr field_) {
|
|
|
|
|
// so the category should be gone from the category list
|
|
|
|
|
if(m_currColl->fieldCategories().findIndex(field_->category()) == -1) {
|
|
|
|
|
// myDebug() << "last field in the category" << endl;
|
|
|
|
|
// fragile, widget's tqparent is the grid, whose tqparent is the tab page
|
|
|
|
|
// fragile, widget's parent is the grid, whose parent is the tab page
|
|
|
|
|
TQWidget* w = widget->parentWidget()->parentWidget();
|
|
|
|
|
m_tabs->removePage(w);
|
|
|
|
|
delete w; // automatically deletes child widget
|
|
|
|
@ -716,7 +716,7 @@ void EntryEditDialog::modifyField(Data::CollPtr coll_, Data::FieldPtr oldField_,
|
|
|
|
|
delete childList;
|
|
|
|
|
}
|
|
|
|
|
// this is very fragile!
|
|
|
|
|
// field widgets's tqparent is the grid, whose tqparent is the tab page
|
|
|
|
|
// field widgets's parent is the grid, whose parent is the tab page
|
|
|
|
|
// this is for singleCategory fields
|
|
|
|
|
if(newField_->category() != oldField_->category()) {
|
|
|
|
|
m_tabs->setTabLabel(widget->parentWidget()->parentWidget(), newField_->category());
|
|
|
|
|