00001 // $Id: TGo4Style.cpp 1134 2014-01-22 14:53:40Z linev $ 00002 //----------------------------------------------------------------------- 00003 // The GSI Online Offline Object Oriented (Go4) Project 00004 // Experiment Data Processing at EE department, GSI 00005 //----------------------------------------------------------------------- 00006 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH 00007 // Planckstr. 1, 64291 Darmstadt, Germany 00008 // Contact: http://go4.gsi.de 00009 //----------------------------------------------------------------------- 00010 // This software can be used under the license agreements as stated 00011 // in Go4License.txt file which is part of the distribution. 00012 //----------------------------------------------------------------------- 00013 00014 #include "TGo4Style.h" 00015 #include "TColor.h" 00016 #include <QColorDialog> 00017 #include "TGo4MdiArea.h" 00018 #include "TGo4ViewPanel.h" 00019 00020 TGo4Style::TGo4Style( QWidget* parent, const char* name, Qt::WindowFlags fl ) : 00021 QWidget( parent, fl ) 00022 { 00023 setObjectName( name ? name : "Go4Style"); 00024 setupUi(this); 00025 } 00026 00027 00028 void TGo4Style::SetPadColor() 00029 { 00030 QColor c = QColorDialog::getColor(); 00031 if (!c.isValid()) return; 00032 00033 Int_t color = TColor::GetColor(c.red(), c.green(), c.blue()); 00034 00035 TGo4ViewPanel* panel = TGo4MdiArea::Instance()->GetActivePanel(); 00036 if (panel!=0) 00037 panel->ChangeDrawOption(101, color, 0); 00038 } 00039 00040 void TGo4Style::SetPalette( int t ) 00041 { 00042 TGo4ViewPanel* panel = TGo4MdiArea::Instance()->GetActivePanel(); 00043 if (panel!=0) 00044 panel->ChangeDrawOption(100, t, 0); 00045 }