]> Creatis software - cpPlugins.git/blob - lib/cpBaseQtApplication/ActorPropertiesQDialog.cxx
...
[cpPlugins.git] / lib / cpBaseQtApplication / ActorPropertiesQDialog.cxx
1 #include <cpBaseQtApplication/ActorPropertiesQDialog.h>
2
3 #include <cpBaseQtApplication/ActorAxesProperties.h>
4 #include <cpBaseQtApplication/ActorImageProperties.h>
5 #include <cpBaseQtApplication/ActorPolyDataProperties.h>
6
7 #include <vtkActor.h>
8 #include <vtkAxesActor.h>
9 #include <vtkImageActor.h>
10 /*
11   #include <vtkImageData.h>
12   #include <vtkImageProperty.h>
13   #include <vtkMapper.h>
14   #include <vtkProperty.h>
15
16   #include <QCheckBox>
17   #include <QColorDialog>
18   #include <QDoubleSpinBox>
19   #include <QPushButton>
20   #include <QSlider>
21 */
22
23 // -------------------------------------------------------------------------
24 cpBaseQtApplication::ActorPropertiesQDialog::
25 ActorPropertiesQDialog( QWidget* parent, Qt::WindowFlags f )
26   : QDialog( parent, f ),
27     m_MainWidget( NULL )
28 {
29   this->m_Title = new QLabel( this );
30   this->m_Title->setText( "Visualization properties" );
31   this->m_MainLayout = new QGridLayout( this );
32   this->m_ToolsLayout = new QVBoxLayout( );
33   this->m_ToolsLayout->addWidget( this->m_Title );
34   this->m_MainLayout->addLayout( this->m_ToolsLayout, 0, 0, 1, 1 );
35 }
36
37 // -------------------------------------------------------------------------
38 cpBaseQtApplication::ActorPropertiesQDialog::
39 ~ActorPropertiesQDialog( )
40 {
41 }
42
43 // -------------------------------------------------------------------------
44 bool cpBaseQtApplication::ActorPropertiesQDialog::
45 addActor( vtkProp* obj )
46 {
47   if( this->m_MainWidget == NULL )
48   {
49     std::stringstream title;
50     title << "Parameters for an object of class";
51     auto mesh = dynamic_cast< vtkActor* >( obj );
52     auto axes = dynamic_cast< vtkAxesActor* >( obj );
53     auto image = dynamic_cast< vtkImageActor* >( obj );
54     if( mesh != NULL )
55     {
56       title << "\"Mesh\"";
57       this->m_MainWidget = new cpBaseQtApplication::ActorPolyDataProperties( this );
58     }
59     else if( axes != NULL )
60     {
61       title << "\"Axes\"";
62       this->m_MainWidget = new cpBaseQtApplication::ActorAxesProperties( this );
63     }
64     else if( image != NULL )
65     {
66       title << "\"Image\"";
67       this->m_MainWidget = new cpBaseQtApplication::ActorImageProperties( this );
68     }
69     /* TODO
70        else if( axes != NULL )
71     */
72
73     if( this->m_MainWidget != NULL )
74     {
75       this->m_Title->setText( title.str( ).c_str( ) );
76       this->m_ToolsLayout->addWidget( this->m_MainWidget );
77       this->m_Buttons = new QDialogButtonBox( QDialogButtonBox::Ok );
78       this->connect(
79         this->m_Buttons, SIGNAL( accepted( ) ), this, SLOT( accept( ) )
80         );
81       this->connect(
82         this->m_Buttons, SIGNAL( rejected( ) ), this, SLOT( reject( ) )
83         );
84       this->m_ToolsLayout->addWidget( this->m_Buttons );
85
86     } // fi
87
88   } // fi
89
90   if( this->m_MainWidget != NULL )
91     return( this->m_MainWidget->addActor( obj ) );
92   else
93     return( false );
94 }
95
96 // -------------------------------------------------------------------------
97 bool cpBaseQtApplication::ActorPropertiesQDialog::
98 addRenderWindow( vtkRenderWindow* win )
99 {
100   if( this->m_MainWidget != NULL && win != NULL )
101     return( this->m_MainWidget->addRenderWindow( win ) );
102   else
103     return( false );
104 }
105
106 // -------------------------------------------------------------------------
107 int cpBaseQtApplication::ActorPropertiesQDialog::
108 exec( )
109 {
110   int ret = this->QDialog::exec( );
111   /* TODO
112      if( ret == 1 )
113      this->updateParameters( );
114      else
115      this->updateView( );
116   */
117   return( ret );
118 }
119
120 // -------------------------------------------------------------------------
121 /* TODO
122 void cpBaseQtApplication::ActorPropertiesQDialog::
123 _addButtons( )
124 {
125   // Add buttons
126   this->m_Buttons = new QDialogButtonBox( QDialogButtonBox::Ok );
127   this->connect(
128     this->m_Buttons, SIGNAL( accepted( ) ), this, SLOT( accept( ) )
129     );
130   this->connect(
131     this->m_Buttons, SIGNAL( rejected( ) ), this, SLOT( reject( ) )
132     );
133   this->m_ToolsLayout->addWidget( this->m_Buttons );
134   this->m_WidgetsUpdated = true;
135 }
136
137 // -------------------------------------------------------------------------
138 void cpBaseQtApplication::ActorPropertiesQDialog::
139 _updateWidgets( )
140 {
141   if( this->m_WidgetsUpdated || this->m_Actors.size( ) == 0 )
142     return;
143   bool     s = this->_configureForAxes( );
144   if( !s ) s = this->_configureForImage( );
145   if( !s ) s = this->_configureForMesh( );
146   this->_addButtons( );
147 }
148
149 // -------------------------------------------------------------------------
150 bool cpBaseQtApplication::ActorPropertiesQDialog::
151 _configureForAxes( )
152 {
153   if( this->m_Actors.size( ) == 0 )
154     return( false );
155   auto actor =
156     dynamic_cast< vtkAxesActor* >( this->m_Actors.begin( )->GetPointer( ) );
157   if( actor == NULL )
158     return( false );
159
160   // Set dialog title
161   std::stringstream title;
162   title << "Parameters for an object of class \"Axes\"";
163   this->m_Title->setText( title.str( ).c_str( ) );
164
165   return( true );
166 }
167
168 // -------------------------------------------------------------------------
169 bool cpBaseQtApplication::ActorPropertiesQDialog::
170 _configureForImage( )
171 {
172   if( this->m_Actors.size( ) == 0 )
173     return( false );
174   auto actor =
175     dynamic_cast< vtkImageActor* >( this->m_Actors.begin( )->GetPointer( ) );
176   if( actor == NULL )
177     return( false );
178   auto image = actor->GetInput( );
179   if( image == NULL )
180     return( false );
181
182   // Get properties
183   auto prop = actor->GetProperty( );
184   double r[ 2 ];
185   image->GetScalarRange( r );
186   double w = actor->GetProperty( )->GetColorWindow( );
187   double l = actor->GetProperty( )->GetColorLevel( );
188   double sw = double( 1000 ) * w / ( r[ 1 ] - r[ 0 ] );
189   double sl = double( 1000 ) * ( l - r[ 0 ] ) / ( r[ 1 ] - r[ 0 ] );
190   double op = double( 10 ) * prop->GetOpacity( );
191
192   // Set dialog title
193   std::stringstream title;
194   title << "Parameters for an object of class \"Image\"";
195   this->m_Title->setText( title.str( ).c_str( ) );
196
197   // Create widgets
198   QDoubleSpinBox* win_box = new QDoubleSpinBox( this );
199   win_box->setObjectName( "win_box" );
200   win_box->setDecimals( 3 );
201   win_box->setMinimum( 0 );
202   win_box->setMaximum( r[ 1 ] - r[ 0 ] );
203   win_box->setValue( w );
204   win_box->connect(
205     win_box, SIGNAL( valueChanged( double ) ),
206     this, SLOT( _boxWindow( double ) )
207     );
208
209   QSlider* win_sld = new QSlider( Qt::Horizontal, this );
210   win_sld->setObjectName( "win_sld" );
211   win_sld->setRange( 0, 1000 );
212   win_sld->setValue( ( unsigned int )( sw ) );
213   win_sld->connect(
214     win_sld, SIGNAL( valueChanged( int ) ),
215     this, SLOT( _sldWindow( int ) )
216     );
217
218   QHBoxLayout* win_layout = new QHBoxLayout( );
219   QLabel* win_label = new QLabel( this );
220   win_label->setText( QString( "Window: " ) );
221   win_layout->addWidget( win_label );
222   win_layout->addWidget( win_box );
223   win_layout->addWidget( win_sld );
224   this->m_ToolsLayout->addLayout( win_layout );
225
226   QDoubleSpinBox* lev_box = new QDoubleSpinBox( this );
227   lev_box->setObjectName( "lev_box" );
228   lev_box->setDecimals( 3 );
229   lev_box->setMinimum( r[ 0 ] );
230   lev_box->setMaximum( r[ 1 ] );
231   lev_box->setValue( l );
232   lev_box->connect(
233     lev_box, SIGNAL( valueChanged( double ) ),
234     this, SLOT( _boxLevel( double ) )
235     );
236
237   QSlider* lev_sld = new QSlider( Qt::Horizontal, this );
238   lev_sld->setObjectName( "lev_sld" );
239   lev_sld->setRange( 0, 1000 );
240   lev_sld->setValue( ( unsigned int )( sl ) );
241   lev_sld->connect(
242     lev_sld, SIGNAL( valueChanged( int ) ),
243     this, SLOT( _sldLevel( int ) )
244     );
245
246   QHBoxLayout* lev_layout = new QHBoxLayout( );
247   QLabel* lev_label = new QLabel( this );
248   lev_label->setText( QString( "Level: " ) );
249   lev_layout->addWidget( lev_label );
250   lev_layout->addWidget( lev_box );
251   lev_layout->addWidget( lev_sld );
252   this->m_ToolsLayout->addLayout( lev_layout );
253
254   // Configure generic objects
255   QSlider* op_sld = new QSlider( Qt::Horizontal, this );
256   op_sld->setObjectName( "op_sld" );
257   op_sld->setRange( 0, 10 );
258   op_sld->setValue( ( unsigned int )( op ) );
259   op_sld->connect(
260     op_sld, SIGNAL( valueChanged( int ) ),
261     this, SLOT( _sldOpacity( int ) )
262     );
263
264   QHBoxLayout* op_layout = new QHBoxLayout( );
265   QLabel* op_label = new QLabel( this );
266   op_label->setText( QString( "Opacity: " ) );
267   op_layout->addWidget( op_label );
268   op_layout->addWidget( op_sld );
269   this->m_ToolsLayout->addLayout( op_layout );
270
271   return( true );
272 }
273
274 // -------------------------------------------------------------------------
275 bool cpBaseQtApplication::ActorPropertiesQDialog::
276 _configureForMesh( )
277 {
278   if( this->m_Actors.size( ) == 0 )
279     return( false );
280   auto actor =
281     dynamic_cast< vtkActor* >( this->m_Actors.begin( )->GetPointer( ) );
282   if( actor == NULL )
283     return( false );
284   auto prop = actor->GetProperty( );
285
286   // Set dialog title
287   std::stringstream title;
288   title << "Parameters for an object of class \"Mesh\"";
289   this->m_Title->setText( title.str( ).c_str( ) );
290
291   // Input boxes
292   QSpinBox* ps_box = new QSpinBox( this );
293   ps_box->setObjectName( "ps_box" );
294   ps_box->setMinimum( 1 );
295   ps_box->setMaximum( 100 );
296   ps_box->setValue( prop->GetPointSize( ) );
297   ps_box->connect(
298     ps_box, SIGNAL( valueChanged( int ) ),
299     this, SLOT( _boxPointSize( int ) )
300     );
301
302   QHBoxLayout* ps_layout = new QHBoxLayout( );
303   QLabel* ps_label = new QLabel( this );
304   ps_label->setText( QString( "Point size: " ) );
305   ps_layout->addWidget( ps_label );
306   ps_layout->addWidget( ps_box );
307   this->m_ToolsLayout->addLayout( ps_layout );
308
309   QSpinBox* lw_box = new QSpinBox( this );
310   lw_box->setObjectName( "lw_box" );
311   lw_box->setMinimum( 1 );
312   lw_box->setMaximum( 100 );
313   lw_box->setValue( prop->GetLineWidth( ) );
314   lw_box->connect(
315     lw_box, SIGNAL( valueChanged( int ) ),
316     this, SLOT( _boxLineWidth( int ) )
317     );
318
319   QHBoxLayout* lw_layout = new QHBoxLayout( );
320   QLabel* lw_label = new QLabel( this );
321   lw_label->setText( QString( "Line width: " ) );
322   lw_layout->addWidget( lw_label );
323   lw_layout->addWidget( lw_box );
324   this->m_ToolsLayout->addLayout( lw_layout );
325
326   QCheckBox* sv_box = new QCheckBox( this );
327   sv_box->setObjectName( "sv_box" );
328   sv_box->setText( "Scalar visibility: " );
329   sv_box->setChecked( ( actor->GetMapper( )->GetScalarVisibility( ) == 1 ) );
330   sv_box->connect(
331     sv_box, SIGNAL( stateChanged( int ) ),
332     this, SLOT( _scalarVisibility( int ) )
333     );
334
335   QHBoxLayout* sv_layout = new QHBoxLayout( );
336   sv_layout->addWidget( sv_box );
337   this->m_ToolsLayout->addLayout( sv_layout );
338
339   double cr, cg, cb;
340   prop->GetColor( cr, cg, cb );
341   cr *= double( 255 );
342   cg *= double( 255 );
343   cb *= double( 255 );
344
345   QPushButton* color_button = new QPushButton( "Color", this );
346   color_button->setObjectName( "color_button" );
347   QPalette color_palette = color_button->palette( );
348   color_palette.setColor( QPalette::Button, QColor( cr, cg, cb ) );
349   color_button->setAutoFillBackground( true );
350   color_button->setPalette( color_palette );
351   color_button->update( );
352   color_button->connect(
353     color_button, SIGNAL( clicked( ) ),
354     this, SLOT( _color( ) )
355     );
356
357   QHBoxLayout* color_layout = new QHBoxLayout( );
358   color_layout->addWidget( color_button );
359   this->m_ToolsLayout->addLayout( color_layout );
360
361   // Configure generic objects
362   QSlider* op_sld = new QSlider( Qt::Horizontal, this );
363   op_sld->setObjectName( "op_sld" );
364   op_sld->setRange( 0, 10 );
365   op_sld->setValue(
366     ( unsigned int )( prop->GetOpacity( ) * double( 10 ) )
367     );
368   op_sld->connect(
369     op_sld, SIGNAL( valueChanged( int ) ),
370     this, SLOT( _sldOpacity( int ) )
371     );
372
373   QHBoxLayout* op_layout = new QHBoxLayout( );
374   QLabel* op_label = new QLabel( this );
375   op_label->setText( QString( "Opacity: " ) );
376   op_layout->addWidget( op_label );
377   op_layout->addWidget( op_sld );
378   this->m_ToolsLayout->addLayout( op_layout );
379
380   return( true );
381 }
382
383 // -------------------------------------------------------------------------
384 void cpBaseQtApplication::ActorPropertiesQDialog::
385 _setWindow( double w )
386 {
387   if( this->m_Actors.size( ) == 0 )
388     return;
389   auto aIt = this->m_Actors.begin( );
390   for( ; aIt != this->m_Actors.end( ); ++aIt )
391   {
392     auto actor = dynamic_cast< vtkImageActor* >( aIt->GetPointer( ) );
393     if( actor != NULL )
394     {
395       actor->GetProperty( )->SetColorWindow( w );
396       actor->Modified( );
397
398     } // fi
399
400   } // rof
401   this->_render( );
402 }
403
404 // -------------------------------------------------------------------------
405 void cpBaseQtApplication::ActorPropertiesQDialog::
406 _setLevel( double l )
407 {
408   if( this->m_Actors.size( ) == 0 )
409     return;
410   auto aIt = this->m_Actors.begin( );
411   for( ; aIt != this->m_Actors.end( ); ++aIt )
412   {
413     auto actor = dynamic_cast< vtkImageActor* >( aIt->GetPointer( ) );
414     if( actor != NULL )
415     {
416       actor->GetProperty( )->SetColorLevel( l );
417       actor->Modified( );
418
419     } // fi
420
421   } // rof
422   this->_render( );
423 }
424
425 // -------------------------------------------------------------------------
426 void cpBaseQtApplication::ActorPropertiesQDialog::
427 _render( )
428 {
429   for( auto i = this->m_Windows.begin( ); i != this->m_Windows.end( ); ++i )
430     ( *i )->Render( );
431 }
432
433 // -------------------------------------------------------------------------
434 template< class _TActor >
435 bool cpBaseQtApplication::ActorPropertiesQDialog::
436 _addActor( vtkProp* obj )
437 {
438   auto new_obj = dynamic_cast< _TActor* >( obj );
439   auto pre_obj =
440     dynamic_cast< _TActor* >( this->m_Actors.begin( )->GetPointer( ) );
441   if( new_obj != NULL && pre_obj != NULL )
442   {
443     this->m_Actors.insert( obj );
444     this->m_WidgetsUpdated = false;
445     return( true );
446   }
447   else
448     return( false );
449 }
450
451 // -------------------------------------------------------------------------
452 void cpBaseQtApplication::ActorPropertiesQDialog::
453 _boxWindow( double v )
454 {
455   auto* box = this->findChild< QDoubleSpinBox* >( "win_box" );
456   auto* sld = this->findChild< QSlider* >( "win_sld" );
457   if( box == NULL || sld == NULL )
458     return;
459
460   double min = double( sld->minimum( ) );
461   double max = double( sld->maximum( ) );
462   double vmin = box->minimum( );
463   double vmax = box->maximum( );
464   double s = ( v - vmin ) / ( vmax - vmin );
465   s = ( ( max - min ) * s ) + min;
466
467   bool o = sld->blockSignals( true );
468   sld->setValue( ( unsigned int )( s ) );
469   sld->blockSignals( o );
470   this->_setWindow( v );
471 }
472
473 // -------------------------------------------------------------------------
474 void cpBaseQtApplication::ActorPropertiesQDialog::
475 _sldWindow( int v )
476 {
477   auto* box = this->findChild< QDoubleSpinBox* >( "win_box" );
478   auto* sld = this->findChild< QSlider* >( "win_sld" );
479   if( box == NULL || sld == NULL )
480     return;
481
482   double min = double( sld->minimum( ) );
483   double max = double( sld->maximum( ) );
484   double vmin = box->minimum( );
485   double vmax = box->maximum( );
486   double s = ( double( v ) - min ) / ( max - min );
487   s = ( ( vmax - vmin ) * s ) + vmin;
488
489   bool o = box->blockSignals( true );
490   box->setValue( s );
491   box->blockSignals( o );
492   this->_setWindow( s );
493 }
494
495 // -------------------------------------------------------------------------
496 void cpBaseQtApplication::ActorPropertiesQDialog::
497 _boxLevel( double v )
498 {
499   auto* box = this->findChild< QDoubleSpinBox* >( "lev_box" );
500   auto* sld = this->findChild< QSlider* >( "lev_sld" );
501   if( box == NULL || sld == NULL )
502     return;
503
504   double min = double( sld->minimum( ) );
505   double max = double( sld->maximum( ) );
506   double vmin = box->minimum( );
507   double vmax = box->maximum( );
508   double s = ( v - vmin ) / ( vmax - vmin );
509   s = ( ( max - min ) * s ) + min;
510
511   bool o = sld->blockSignals( true );
512   sld->setValue( ( unsigned int )( s ) );
513   sld->blockSignals( o );
514   this->_setLevel( v );
515 }
516
517 // -------------------------------------------------------------------------
518 void cpBaseQtApplication::ActorPropertiesQDialog::
519 _sldLevel( int v )
520 {
521   auto* box = this->findChild< QDoubleSpinBox* >( "lev_box" );
522   auto* sld = this->findChild< QSlider* >( "lev_sld" );
523   if( box == NULL || sld == NULL )
524     return;
525
526   double min = double( sld->minimum( ) );
527   double max = double( sld->maximum( ) );
528   double vmin = box->minimum( );
529   double vmax = box->maximum( );
530   double s = ( double( v ) - min ) / ( max - min );
531   s = ( ( vmax - vmin ) * s ) + vmin;
532
533   bool o = box->blockSignals( true );
534   box->setValue( s );
535   box->blockSignals( o );
536   this->_setLevel( s );
537 }
538
539 // -------------------------------------------------------------------------
540 void cpBaseQtApplication::ActorPropertiesQDialog::
541 _sldOpacity( int v )
542 {
543   if( this->m_Actors.size( ) == 0 )
544     return;
545   auto* sld = this->findChild< QSlider* >( "op_sld" );
546   if( sld == NULL )
547     return;
548
549   double min = double( sld->minimum( ) );
550   double max = double( sld->maximum( ) );
551   double s = ( double( v ) - min ) / ( max - min );
552
553   auto aIt = this->m_Actors.begin( );
554   for( ; aIt != this->m_Actors.end( ); ++aIt )
555   {
556     auto ia = dynamic_cast< vtkImageActor* >( aIt->GetPointer( ) );
557     auto ma = dynamic_cast< vtkActor* >( aIt->GetPointer( ) );
558     if( ia != NULL )
559     {
560       ia->GetProperty( )->SetOpacity( s );
561       ia->Modified( );
562     }
563     else if( ma != NULL )
564     {
565       ma->GetProperty( )->SetOpacity( s );
566       ma->Modified( );
567
568     } // fi
569
570   } // rof
571   this->_render( );
572 }
573
574 // -------------------------------------------------------------------------
575 void cpBaseQtApplication::ActorPropertiesQDialog::
576 _boxPointSize( int v )
577 {
578   if( this->m_Actors.size( ) == 0 )
579     return;
580   auto aIt = this->m_Actors.begin( );
581   for( ; aIt != this->m_Actors.end( ); ++aIt )
582   {
583     auto ma = dynamic_cast< vtkActor* >( aIt->GetPointer( ) );
584     if( ma != NULL )
585     {
586       ma->GetProperty( )->SetPointSize( v );
587       ma->Modified( );
588
589     } // fi
590
591   } // rof
592   this->_render( );
593 }
594
595 // -------------------------------------------------------------------------
596 void cpBaseQtApplication::ActorPropertiesQDialog::
597 _boxLineWidth( int v )
598 {
599   if( this->m_Actors.size( ) == 0 )
600     return;
601   auto aIt = this->m_Actors.begin( );
602   for( ; aIt != this->m_Actors.end( ); ++aIt )
603   {
604     auto ma = dynamic_cast< vtkActor* >( aIt->GetPointer( ) );
605     if( ma != NULL )
606     {
607       ma->GetProperty( )->SetLineWidth( v );
608       ma->Modified( );
609
610     } // fi
611
612   } // rof
613   this->_render( );
614 }
615
616 // -------------------------------------------------------------------------
617 void cpBaseQtApplication::ActorPropertiesQDialog::
618 _scalarVisibility( int v )
619 {
620   if( this->m_Actors.size( ) == 0 )
621     return;
622   auto* btn = this->findChild< QPushButton* >( "color_button" );
623   auto* chk = this->findChild< QCheckBox* >( "sv_box" );
624   if( btn == NULL || chk == NULL )
625     return;
626   QPalette pal = btn->palette( );
627   QColor color = pal.color( QPalette::Button );
628   double rgb[ 3 ];
629   rgb[ 0 ] = double( color.red( ) ) / double( 255 );
630   rgb[ 1 ] = double( color.green( ) ) / double( 255 );
631   rgb[ 2 ] = double( color.blue( ) ) / double( 255 );
632
633   auto aIt = this->m_Actors.begin( );
634   for( ; aIt != this->m_Actors.end( ); ++aIt )
635   {
636     auto ma = dynamic_cast< vtkActor* >( aIt->GetPointer( ) );
637     if( ma != NULL )
638     {
639       if( !( chk->isChecked( ) ) )
640       {
641         ma->GetMapper( )->ScalarVisibilityOff( );
642         ma->GetProperty( )->SetColor( rgb );
643       }
644       else
645         ma->GetMapper( )->ScalarVisibilityOn( );
646       ma->Modified( );
647
648     } // fi
649
650   } // rof
651   this->_render( );
652 }
653
654 // -------------------------------------------------------------------------
655 void cpBaseQtApplication::ActorPropertiesQDialog::
656 _color( )
657 {
658   if( this->m_Actors.size( ) == 0 )
659     return;
660   auto* btn = this->findChild< QPushButton* >( "color_button" );
661   auto* chk = this->findChild< QCheckBox* >( "sv_box" );
662   if( btn == NULL || chk == NULL )
663     return;
664
665   QPalette pal = btn->palette( );
666   QColor color =
667     QColorDialog::getColor(
668       pal.color( QPalette::Button ),
669       this,
670       "Select Color",
671       QColorDialog::DontUseNativeDialog
672       );
673   if( color.isValid( ) )
674   {
675     pal.setColor( QPalette::Button, color );
676     btn->setAutoFillBackground( true );
677     btn->setPalette( pal );
678     btn->update( );
679     this->_scalarVisibility( 0 );
680
681   } // fi
682 }
683 */
684
685 // eof - $RCSfile$