tools/shared/qtgradienteditor/qtgradienteditor.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
   758     icon.addPixmap(style()->standardPixmap(QStyle::SP_ArrowRight), QIcon::Normal, QIcon::Off);
   758     icon.addPixmap(style()->standardPixmap(QStyle::SP_ArrowRight), QIcon::Normal, QIcon::Off);
   759     icon.addPixmap(style()->standardPixmap(QStyle::SP_ArrowLeft), QIcon::Normal, QIcon::On);
   759     icon.addPixmap(style()->standardPixmap(QStyle::SP_ArrowLeft), QIcon::Normal, QIcon::On);
   760     d_ptr->m_ui.detailsButton->setIcon(icon);
   760     d_ptr->m_ui.detailsButton->setIcon(icon);
   761 
   761 
   762     connect(d_ptr->m_ui.detailsButton, SIGNAL(clicked(bool)), this, SLOT(slotDetailsChanged(bool)));
   762     connect(d_ptr->m_ui.detailsButton, SIGNAL(clicked(bool)), this, SLOT(slotDetailsChanged(bool)));
   763     connect(d_ptr->m_gradientStopsController, SIGNAL(gradientStopsChanged(const QGradientStops &)),
   763     connect(d_ptr->m_gradientStopsController, SIGNAL(gradientStopsChanged(QGradientStops)),
   764                 this, SLOT(slotGradientStopsChanged(const QGradientStops &)));
   764                 this, SLOT(slotGradientStopsChanged(QGradientStops)));
   765 
   765 
   766     QIcon iconLinear(QLatin1String(":/trolltech/qtgradienteditor/images/typelinear.png"));
   766     QIcon iconLinear(QLatin1String(":/trolltech/qtgradienteditor/images/typelinear.png"));
   767     QIcon iconRadial(QLatin1String(":/trolltech/qtgradienteditor/images/typeradial.png"));
   767     QIcon iconRadial(QLatin1String(":/trolltech/qtgradienteditor/images/typeradial.png"));
   768     QIcon iconConical(QLatin1String(":/trolltech/qtgradienteditor/images/typeconical.png"));
   768     QIcon iconConical(QLatin1String(":/trolltech/qtgradienteditor/images/typeconical.png"));
   769 
   769 
   804     connect(d_ptr->m_spreadGroup, SIGNAL(buttonClicked(int)),
   804     connect(d_ptr->m_spreadGroup, SIGNAL(buttonClicked(int)),
   805                 this, SLOT(slotSpreadChanged(int)));
   805                 this, SLOT(slotSpreadChanged(int)));
   806     connect(d_ptr->m_ui.spreadComboBox, SIGNAL(activated(int)),
   806     connect(d_ptr->m_ui.spreadComboBox, SIGNAL(activated(int)),
   807                 this, SLOT(slotSpreadChanged(int)));
   807                 this, SLOT(slotSpreadChanged(int)));
   808 
   808 
   809     connect(d_ptr->m_ui.gradientWidget, SIGNAL(startLinearChanged(const QPointF &)),
   809     connect(d_ptr->m_ui.gradientWidget, SIGNAL(startLinearChanged(QPointF)),
   810                 this, SLOT(startLinearChanged(const QPointF &)));
   810                 this, SLOT(startLinearChanged(QPointF)));
   811     connect(d_ptr->m_ui.gradientWidget, SIGNAL(endLinearChanged(const QPointF &)),
   811     connect(d_ptr->m_ui.gradientWidget, SIGNAL(endLinearChanged(QPointF)),
   812                 this, SLOT(endLinearChanged(const QPointF &)));
   812                 this, SLOT(endLinearChanged(QPointF)));
   813     connect(d_ptr->m_ui.gradientWidget, SIGNAL(centralRadialChanged(const QPointF &)),
   813     connect(d_ptr->m_ui.gradientWidget, SIGNAL(centralRadialChanged(QPointF)),
   814                 this, SLOT(centralRadialChanged(const QPointF &)));
   814                 this, SLOT(centralRadialChanged(QPointF)));
   815     connect(d_ptr->m_ui.gradientWidget, SIGNAL(focalRadialChanged(const QPointF &)),
   815     connect(d_ptr->m_ui.gradientWidget, SIGNAL(focalRadialChanged(QPointF)),
   816                 this, SLOT(focalRadialChanged(const QPointF &)));
   816                 this, SLOT(focalRadialChanged(QPointF)));
   817     connect(d_ptr->m_ui.gradientWidget, SIGNAL(radiusRadialChanged(qreal)),
   817     connect(d_ptr->m_ui.gradientWidget, SIGNAL(radiusRadialChanged(qreal)),
   818                 this, SLOT(radiusRadialChanged(qreal)));
   818                 this, SLOT(radiusRadialChanged(qreal)));
   819     connect(d_ptr->m_ui.gradientWidget, SIGNAL(centralConicalChanged(const QPointF &)),
   819     connect(d_ptr->m_ui.gradientWidget, SIGNAL(centralConicalChanged(QPointF)),
   820                 this, SLOT(centralConicalChanged(const QPointF &)));
   820                 this, SLOT(centralConicalChanged(QPointF)));
   821     connect(d_ptr->m_ui.gradientWidget, SIGNAL(angleConicalChanged(qreal)),
   821     connect(d_ptr->m_ui.gradientWidget, SIGNAL(angleConicalChanged(qreal)),
   822                 this, SLOT(angleConicalChanged(qreal)));
   822                 this, SLOT(angleConicalChanged(qreal)));
   823 
   823 
   824     QGradientStops stops = gradient().stops();
   824     QGradientStops stops = gradient().stops();
   825     d_ptr->m_gradientStopsController->setGradientStops(stops);
   825     d_ptr->m_gradientStopsController->setGradientStops(stops);