Пример #1
0
//! [20]
void Window::fillGradientChanged()
{
    QColor color1 = qvariant_cast<QColor>(currentItemData(fillColor1ComboBox));
    QColor color2 = qvariant_cast<QColor>(currentItemData(fillColor2ComboBox));

    for(QList<RenderArea*>::iterator it = renderAreas.begin(); it != renderAreas.end(); it++)
        (*it)->setFillGradient(color1, color2);
}
Пример #2
0
//! [20]
void Window::fillGradientChanged()
{
    QColor color1 = qvariant_cast<QColor>(currentItemData(fillColor1ComboBox));
    QColor color2 = qvariant_cast<QColor>(currentItemData(fillColor2ComboBox));

    for (int i = 0; i < NumRenderAreas; ++i)
        renderAreas[i]->setFillGradient(color1, color2);
}
Пример #3
0
//! [21]
void Window::penColorChanged()
{
    QColor color = qvariant_cast<QColor>(currentItemData(penColorComboBox));

    for(QList<RenderArea*>::iterator it = renderAreas.begin(); it != renderAreas.end(); it++)
        (*it)->setPenColor(color);
}
Пример #4
0
//! [19]
void Window::fillRuleChanged()
{
    Qt::FillRule rule = (Qt::FillRule)currentItemData(fillRuleComboBox).toInt();

    for(QList<RenderArea*>::iterator it = renderAreas.begin(); it != renderAreas.end(); it++)
        (*it)->setFillRule(rule);
}
Пример #5
0
//! [21]
void Window::penColorChanged()
{
    QColor color = qvariant_cast<QColor>(currentItemData(penColorComboBox));

    for (int i = 0; i < NumRenderAreas; ++i)
        renderAreas[i]->setPenColor(color);
}
Пример #6
0
//! [19]
void Window::fillRuleChanged()
{
    Qt::FillRule rule = (Qt::FillRule)currentItemData(fillRuleComboBox).toInt();

    for (int i = 0; i < NumRenderAreas; ++i)
        renderAreas[i]->setFillRule(rule);
}
Пример #7
0
Interface::Interface( QWidget* parent )
	: QDialog( parent )
{
setWindowFlags(Qt::Window); 
setWindowModality(Qt::ApplicationModal);
setupUi( this );
setWindowTitle(tr("Image minimal editor"));
pushButton->setText(tr("Save and Exit"));
pushButton->setToolTip(tr("Only save CTRL+S"));
airotato = false;
cento = 100.0;
onwi = false;
rotazione = 0;
ratio = cento;
CTRL_Pressed = false;
moverecci = false;
Dstart = QPoint(0,0);
wrapper = new Foto_DD(this);  
scrolla->setWidget(wrapper);
scrolla->setBackgroundRole(QPalette::Dark);
    
    
QRect areaplace(QPoint(0,0),QPoint(0,0));
      TagliaPoi = areaplace;
    
sx1 = scrolla->verticalScrollBar();
sx2 = scrolla->horizontalScrollBar();
    
connect(wrapper, SIGNAL(PrMouse(QMouseEvent*)),this, SLOT(Mousepress(QMouseEvent*)));   
connect(wrapper, SIGNAL(MoMouse(QMouseEvent*)),this, SLOT(Mousemove(QMouseEvent*)));   
populateWithColors(comboBox);
color1 = qvariant_cast<QColor>(currentItemData(comboBox));
connect(comboBox, SIGNAL(currentIndexChanged(int)),this, SLOT(SetColor()));
connect(horizontalSlider, SIGNAL(sliderMoved(int)),this, SLOT(SetZoom(int)));   
    
connect(horizontalSlider_2, SIGNAL(sliderReleased()), this, SLOT(misurecambiaA()));
connect(horizontalSlider_3, SIGNAL(sliderReleased()), this, SLOT(misurecambiaL()));
connect(spinBox, SIGNAL(valueChanged(int)), this, SLOT(misurecambiaA()));
connect(spinBox_2, SIGNAL(valueChanged(int)), this, SLOT(misurecambiaL()));
    
    
connect(spinBox_4, SIGNAL(valueChanged(int)), this , SLOT(setRotate(int)));
connect(pushButton, SIGNAL(clicked()), this , SLOT(BaseSave()));
connect(pushButton_2, SIGNAL(clicked()), this , SLOT(CropNow()));

connect(comboBox_2, SIGNAL(currentIndexChanged(QString)), this , SLOT(applyFilter(QString)));

populateFilter(comboBox_2);

}
Пример #8
0
void Interface::SetColor()
{
  color1 = qvariant_cast<QColor>(currentItemData(comboBox));
  wrapper->paint(display);
}