#include "VisuGUI_Tools.h"
#include "VisuGUI_InputPane.h"
-#include "VISU_ColoredPrs3dFactory.hh"
+#include <VISU_ColoredPrs3dFactory.hh>
-#include "LightApp_Application.h"
+#include <LightApp_Application.h>
-#include "SUIT_Desktop.h"
-#include "SUIT_Session.h"
-#include "SUIT_MessageBox.h"
-#include "SUIT_ResourceMgr.h"
+#include <QtxColorButton.h>
+#include <SUIT_Desktop.h>
+#include <SUIT_Session.h>
+#include <SUIT_MessageBox.h>
+#include <SUIT_ResourceMgr.h>
#include <limits.h>
myUseMagnitude = new QCheckBox(tr("MAGNITUDE_COLORING_CHK"), TopGroup);
myUseMagnitude->setChecked(true);
TopGroupLayout->addWidget( myUseMagnitude, 3, 0 );
- mySelColor = new QPushButton(tr("SEL_COLOR_BTN"), TopGroup);
- QPalette pal = mySelColor->palette();
- pal.setColor(mySelColor->backgroundRole(), Qt::black);
- pal.setColor(mySelColor->foregroundRole(), Qt::gray);
- mySelColor->setPalette(pal);
- mySelColor->setDisabled(true);
+
+ mySelColor = new QtxColorButton( TopGroup );
+ mySelColor->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
TopGroupLayout->addWidget( mySelColor, 3, 1 );
- connect( mySelColor, SIGNAL( clicked() ), this, SLOT( setColor() ) );
+ //connect( mySelColor, SIGNAL( clicked() ), this, SLOT( setColor() ) );
connect( myUseMagnitude, SIGNAL( toggled(bool) ), mySelColor, SLOT( setDisabled(bool) ) );
myUseLabels = new QCheckBox(tr("SHOW_VALUES_CHK"), TopGroup);
QPushButton* aUpdateBtn = new QPushButton( "Update scalar bar range with these values", TopGroup);
TopGroupLayout->addWidget( aUpdateBtn, 5, 0, 1, 2);
connect( aUpdateBtn, SIGNAL( clicked() ), this, SLOT(onCBUpdate() ) );
+ mySelColor->setEnabled( !myUseMagnitude->isChecked() );
}
void VisuGUI_IsoSurfPane::initFromPrsObject (VISU::IsoSurfaces_i* thePrs)
myUseLabels->setChecked(thePrs->IsLabeled());
myNbLabels->setValue(thePrs->GetNbLabels());
+ mySelColor->setEnabled( !myUseMagnitude->isChecked() );
}
int VisuGUI_IsoSurfPane::storeToPrsObject (VISU::IsoSurfaces_i* thePrs)
setColor(cnew);
}
-void VisuGUI_IsoSurfPane::setColor(const QColor& theColor)
+void VisuGUI_IsoSurfPane::setColor( const QColor& theColor)
{
- QPalette pal = mySelColor->palette();
+ /* QPalette pal = mySelColor->palette();
pal.setColor(mySelColor->backgroundRole(), theColor);
- mySelColor->setPalette(pal);
+ mySelColor->setPalette(pal);*/
+ mySelColor->setColor( theColor );
}
QColor VisuGUI_IsoSurfPane::color() const
{
- return mySelColor->palette().color(mySelColor->backgroundRole());
+ return mySelColor->color();
}