| 65 | } |
| 66 | |
| 67 | QLayout* EditSheet::createColumn(const column& c) { |
| 68 | ColumnEditSheet* col = new ColumnEditSheet(c,ui->vboxLayout->count(),ui->vboxLayout->count()+1,C); |
| 69 | |
| 70 | connect(col,SIGNAL(somethingChanged()),SLOT(refreshDisplay())); |
| 71 | connect(col,SIGNAL(moveMeUp(int)),SLOT(upCol(int))); |
| 72 | connect(col,SIGNAL(moveMeDown(int)),SLOT(downCol(int))); |
| 73 | connect(col,SIGNAL(removeMe(int)),SLOT(delCol(int))); |
| 74 | connect(this,SIGNAL(switchPos(int,int,int)),col,SLOT(posSwitched(int,int,int))); |
| 75 | connect(this,SIGNAL(deletePos(int,int)),col,SLOT(posRemoved(int,int))); |
| 76 | connect(this,SIGNAL(newPos(int)),col,SLOT(posChanged(int))); |
| 77 | connect(ui->checkBoxAdapt,SIGNAL(toggled(bool)),col->widthBox(),SLOT(setDisabled(bool))); |
| 78 | |
| 79 | col->widthBox()->setDisabled(ui->checkBoxAdapt->isChecked()); |
| 80 | |
| 81 | col->setContentsMargins(0,0,0,0); |
| 82 | col->setSpacing(0); |
| 83 | |
| 84 | return col; |
| 85 | } |
| 86 | |
| 87 | void EditSheet::upCol(int i) { |
| 88 | if(i>0) { |