GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
QFitNamedWidget.cpp
Go to the documentation of this file.
1// $Id$
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 fuer 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 "TGo4FitPanel.h"
20
21QFitNamedWidget::QFitNamedWidget( QWidget *parent, const char *name )
22 : QFitWidget(parent, name )
23{
24 if (!name) setObjectName( "QFitNamedWidget" );
25
26 NameEdt = new QGo4LineEdit(this, "NameEdt");
27 NameEdt->setGeometry( QRect( 61, 36, 100, 27 ) );
28 NameEdt->setMinimumSize( QSize( 100, 0 ) );
29 NameEdt->setMaximumSize( QSize( 100, 32767 ) );
30
31 ClassNameLbl = new QLabel( "ClassNameLbl", this );
32 ClassNameLbl->setGeometry( QRect( 12, 12, 155, 18 ) );
33
34 TextLabel1 = new QLabel( "Name", this );
35 TextLabel1->setGeometry( QRect( 12, 36, 49, 27 ) );
36
37 TextLabel2 = new QLabel( "Title", this );
38 TextLabel2->setGeometry( QRect( 12, 69, 49, 27 ) );
39
40 FullNameLbl = new QLabel( "FullNameLbl", this );
41 FullNameLbl->setGeometry( QRect( 173, 36, 95, 27 ) );
42
43 TitleEdt = new QGo4LineEdit( this, "TitleEdt" );
44 TitleEdt->setGeometry( QRect( 61, 69, 410, 27 ) );
45 TitleEdt->setMinimumSize( QSize( 200, 0 ) );
46
47 resize( QSize(550, 404).expandedTo(minimumSizeHint()) );
48 //clearWState( WState_Polished );
49
50 // signals and slots connections
51 QObject::connect(NameEdt, &QGo4LineEdit::textChanged, this, &QFitNamedWidget::NameEdt_textChanged);
52 QObject::connect(TitleEdt, &QGo4LineEdit::textChanged, this, &QFitNamedWidget::TitleEdt_textChanged);
53}
54
58
60{
61 if (fxPanel)
62 fxPanel->FillNamedWidget(this);
63}
64
65void QFitNamedWidget::ChangeName(const QString & name)
66{
67 if (name.length() > 0)
68 NameEdt->setText(name);
69}
70
71void QFitNamedWidget::NameEdt_textChanged(const QString & name)
72{
73 if (!fbFillWidget && fxPanel)
74 fxPanel->ChangeObjectName(this, name.toLatin1().constData());
75}
76
77void QFitNamedWidget::TitleEdt_textChanged(const QString & title)
78{
79 if(!fbFillWidget && fxPanel)
80 fxPanel->ChangeObjectTitle(this, title.toLatin1().constData());
81}
virtual void TitleEdt_textChanged(const QString &title)
QFitNamedWidget(QWidget *parent=nullptr, const char *name=nullptr)
virtual void ChangeName(const QString &name)
void FillSpecificData() override
QGo4LineEdit * NameEdt
QGo4LineEdit * TitleEdt
virtual void NameEdt_textChanged(const QString &name)
bool fbFillWidget
Definition QFitWidget.h:63
TGo4FitPanel * fxPanel
Definition QFitWidget.h:61
QFitWidget(QWidget *parent=nullptr, const char *name=nullptr, Qt::WindowFlags fl=Qt::Widget)