GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
QFitNamedWidget.cpp
Go to the documentation of this file.
1 // $Id: QFitNamedWidget.cpp 1134 2014-01-22 14:53:40Z linev $
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #include "QFitNamedWidget.h"
15 
16 #include <QLabel>
17 
18 #include "QGo4LineEdit.h"
19 #include "QFitItem.h"
20 #include "TGo4FitPanel.h"
21 
22 QFitNamedWidget::QFitNamedWidget( QWidget* parent, const char* name )
23  : QFitWidget(parent, name )
24 {
25  if (name==0) setObjectName( "QFitNamedWidget" );
26 
27  NameEdt = new QGo4LineEdit( this, "NameEdt" );
28  NameEdt->setGeometry( QRect( 61, 36, 100, 27 ) );
29  NameEdt->setMinimumSize( QSize( 100, 0 ) );
30  NameEdt->setMaximumSize( QSize( 100, 32767 ) );
31 
32  ClassNameLbl = new QLabel( "ClassNameLbl", this );
33  ClassNameLbl->setGeometry( QRect( 12, 12, 155, 18 ) );
34 
35  TextLabel1 = new QLabel( "Name", this );
36  TextLabel1->setGeometry( QRect( 12, 36, 49, 27 ) );
37 
38  TextLabel2 = new QLabel( "Title", this );
39  TextLabel2->setGeometry( QRect( 12, 69, 49, 27 ) );
40 
41  FullNameLbl = new QLabel( "FullNameLbl", this );
42  FullNameLbl->setGeometry( QRect( 173, 36, 95, 27 ) );
43 
44  TitleEdt = new QGo4LineEdit( this, "TitleEdt" );
45  TitleEdt->setGeometry( QRect( 61, 69, 410, 27 ) );
46  TitleEdt->setMinimumSize( QSize( 200, 0 ) );
47 
48  resize( QSize(550, 404).expandedTo(minimumSizeHint()) );
49  //clearWState( WState_Polished );
50 
51  // signals and slots connections
52  connect( NameEdt, SIGNAL( textChanged(const QString&) ), this, SLOT( NameEdt_textChanged(const QString&) ) );
53  connect( TitleEdt, SIGNAL( textChanged(const QString&) ), this, SLOT( TitleEdt_textChanged(const QString&) ) );
54 }
55 
57 {
58 }
59 
61 {
62  if (fxPanel!=0)
63  fxPanel->FillNamedWidget(this);
64 }
65 
66 void QFitNamedWidget::ChangeName(const QString & name)
67 {
68  if (name.length()>0)
69  NameEdt->setText(name);
70 }
71 
72 void QFitNamedWidget::NameEdt_textChanged(const QString & name)
73 {
74  if (!fbFillWidget && (fxPanel!=0))
75  fxPanel->ChangeObjectName(this, name.toLatin1().constData());
76 }
77 
78 void QFitNamedWidget::TitleEdt_textChanged(const QString & title)
79 {
80  if(!fbFillWidget && (fxPanel!=0))
81  fxPanel->ChangeObjectTitle(this, title.toLatin1().constData());
82 }
QLabel * FullNameLbl
virtual void ChangeObjectName(QFitNamedWidget *w, const char *newname)
virtual void ChangeName(const QString &name)
bool fbFillWidget
Definition: QFitWidget.h:64
QGo4LineEdit * TitleEdt
virtual void FillNamedWidget(QFitNamedWidget *w)
QGo4LineEdit * NameEdt
virtual void NameEdt_textChanged(const QString &name)
virtual void ChangeObjectTitle(QFitNamedWidget *w, const char *newtitle)
virtual void TitleEdt_textChanged(const QString &title)
QFitNamedWidget(QWidget *parent=0, const char *name=0)
virtual void FillSpecificData()
QLabel * ClassNameLbl
TGo4FitPanel * fxPanel
Definition: QFitWidget.h:62