public AvatarGridZoomAction(AvatarGrid <T> grid) : base(grid) { m_Grid = grid; m_SliderContainer = new QWidget(); m_SliderContainer.SetLayout(new QHBoxLayout()); m_SliderContainer.Layout().AddWidget(new QLabel("Zoom:", m_SliderContainer)); var zoomSlider = new QSlider(Orientation.Horizontal, m_SliderContainer); zoomSlider.Minimum = 16; zoomSlider.Maximum = 60; zoomSlider.Value = m_Grid.IconSize; QObject.Connect <int>(zoomSlider, Qt.SIGNAL("valueChanged(int)"), HandleZoomSliderValueChanged); m_SliderContainer.Layout().AddWidget(zoomSlider); base.SetDefaultWidget(m_SliderContainer); }
public void ShowLightbox(QWidget widget) { if (m_LightboxChild != null) { throw new InvalidOperationException("Lightbox is already visible"); } var layout = (QBoxLayout)m_LightboxWidget.Layout(); m_LightboxChild = widget; widget.SetParent(m_LightboxWidget); layout.AddWidget(widget); widget.Show(); base.Widget(1).Enabled = false; m_LightboxWidget.Show(); base.CurrentIndex = 0; }