~ubuntu-branches/debian/stretch/cgal/stretch

« back to all changes in this revision

Viewing changes to demo/Arrangement_on_surface_2/ColorItemEditor.cpp

  • Committer: Package Import Robot
  • Author(s): Joachim Reichel
  • Date: 2014-04-05 10:56:43 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20140405105643-jgnrpu2thtx23zfs
Tags: 4.4-1
* New upstream release.
* Remove patches do-not-link-example-with-qt4-support-library.patch and
  fix_jet_fitting_3.patch (applied upstream).

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
#include "ColorItemEditor.h"
46
46
 
47
47
ColorItemEditor::ColorItemEditor( QWidget* widget ) : QPushButton( widget )
48
 
 
48
{
49
49
  this->setText( tr("Select a color") );
50
50
}
51
51
 
59
59
  this->m_color = color;
60
60
}
61
61
 
62
 
void ColorItemEditor::mousePressEvent( QMouseEvent* e )
 
62
void ColorItemEditor::mousePressEvent(QMouseEvent* /* e */)
63
63
{
64
 
  QColor selectedColor = QColorDialog::getColor( this->m_color );
65
 
  if ( selectedColor.isValid( ) )
66
 
  {
67
 
    // std::cout << selectedColor.name( ).toStdString( ) << std::endl;
 
64
  QColor selectedColor = QColorDialog::getColor(this->m_color);
 
65
  if (selectedColor.isValid()) {
 
66
    // std::cout << selectedColor.name().toStdString() << std::endl;
68
67
    this->setColor( selectedColor );
69
68
  }
70
69
 
71
 
  emit confirmed( );
 
70
  emit confirmed();
72
71
}