MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / updateExpandability

Method updateExpandability

gui/qt/dockwidget.cpp:100–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100void DockWidget::updateExpandability(const QList<DockWidget *> &tabs) {
101 bool expandable = false;
102 for (DockWidget *tab : tabs) {
103 if (tab->isExpandable()) {
104 expandable = true;
105 break;
106 }
107 }
108 DockWidget *other = tabs.last();
109 for (DockWidget *tab : tabs) {
110 if (QWidget *widget = tab->widget()) {
111 if (expandable || tab->isExpandable()) {
112 widget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
113 } else {
114 widget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
115 }
116 }
117 tab->m_tabs = other;
118 other = tab;
119 }
120}
121
122void DockWidget::makeCloseableFloat(bool state) {
123 m_closeablefloat = state;

Callers 1

showEventMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected