void pTabFrame::setGeometry(Geometry geometry) { pWidget::setGeometry(geometry); geometry.x += 0, geometry.width -= 5; geometry.y += 29, geometry.height -= 33; for(auto& layout : tabFrame.state.layout) { if(layout) layout->setGeometry(geometry); } synchronizeLayout(); }
void pTabFrame::setGeometry(Geometry geometry) { pWidget::setGeometry(geometry); geometry.x += 1, geometry.width -= 5; geometry.y += 26, geometry.height -= 31; for(auto& layout : tabFrame.state.layout) { if(layout == nullptr) continue; layout->setGeometry(geometry); } synchronizeLayout(); }
void Window::setVisible(bool visible) { state.visible = visible; synchronizeLayout(); return p.setVisible(visible); }
void TabFrame::setLayout(unsigned selection, Layout& layout) { if(selection >= state.text.size()) return; state.layout[selection] = &layout; synchronizeLayout(); }
void Frame::setLayout(Layout& layout) { state.layout = &layout; synchronizeLayout(); }
void pTabFrame::onChange(int selection) { tabFrame.state.selection = selection; synchronizeLayout(); if(!locked && tabFrame.onChange) tabFrame.onChange(); }
void pTabFrame::setSelection(unsigned selection) { locked = true; qtTabFrame->setCurrentIndex(selection); synchronizeLayout(); locked = false; }
void pTabFrame::setSelected(unsigned selection) { lock(); qtTabFrame->setCurrentIndex(selection); synchronizeLayout(); unlock(); }