Ejemplo n.º 1
0
void QmitkColorPropertyEditor::mousePressEvent(QMouseEvent* e)
{
  connect( colorChooser, SIGNAL(colorSelected(QColor)), this, SLOT(onColorSelected(QColor)) );
  if (m_ColorProperty)
  {
    colorChooser->popup( this, e->pos(), &(m_ColorProperty->GetColor()) );
  }
}
Ejemplo n.º 2
0
	void ColorEdit::setPosition(QPoint position)
	{
		QPixmap pixel = QPixmap::grabWindow(QApplication::desktop()->winId(), position.x(), position.y(), 1, 1);
		QColor pixelColor = pixel.toImage().pixel(0, 0);
		mColorDialog->setCurrentColor(pixelColor);
		onColorSelected();
		on_colorLineEdit_textChanged(QString());
	}
int MoodBox::PaletteWidget2::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QWidget::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: colorSelected((*reinterpret_cast< qint32(*)>(_a[1]))); break;
        case 1: colorChanged((*reinterpret_cast< qint32(*)>(_a[1])),(*reinterpret_cast< const QColor(*)>(_a[2]))); break;
        case 2: setPalette((*reinterpret_cast< const Palette(*)>(_a[1]))); break;
        case 3: updateSelectedColor((*reinterpret_cast< const QColor(*)>(_a[1]))); break;
        case 4: onColorSelected((*reinterpret_cast< const Color(*)>(_a[1]))); break;
        default: ;
        }
        _id -= 5;
    }
    return _id;
}
int MoodBox::BrushSettingsBar::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = ToolSettingsBar::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: changeSelectedColor((*reinterpret_cast< const QColor(*)>(_a[1]))); break;
        case 1: onColorSelected((*reinterpret_cast< qint32(*)>(_a[1]))); break;
        case 2: onColorChanged((*reinterpret_cast< qint32(*)>(_a[1])),(*reinterpret_cast< const QColor(*)>(_a[2]))); break;
        case 3: onSizeSelected((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 4: onAlphaSelected((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 5: onPaletteSelected((*reinterpret_cast< const Palette(*)>(_a[1]))); break;
        case 6: on_paletteManagerButton_toggled((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 7: onPaletteManagerFinished(); break;
        default: ;
        }
        _id -= 8;
    }
    return _id;
}
Ejemplo n.º 5
0
	void ColorEdit::on_choose_clicked()
	{
		mColorDialog->setCurrentColor(currentColor());
		mColorDialog->open(this, SLOT(onColorSelected()));
	}
Ejemplo n.º 6
0
void QmitkColorPropertyEditor::mouseReleaseEvent(QMouseEvent*)
{
  disconnect( colorChooser, SIGNAL(colorSelected(QColor)), this, SLOT(onColorSelected(QColor)) );
}
Ejemplo n.º 7
0
void PaletteWidget2::updateSelectedColor(const QColor &color)
{
	onColorSelected(Color(color));
}