15 #include "qpushbutton.h" 18 #include "qlineedit.h" 19 #if (QT_VERSION > 0x039999) // Added by cholm@nbi.dk - for Qt 4 40 QVBox(wparent,wname, f | WType_Modal | WStyle_Dialog ),
47 setSizePolicy(QSizePolicy(QSizePolicy::Expanding,
48 QSizePolicy::Expanding));
49 fArgBox =
new QVBox(
this,
"args");
50 fArgBox->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,
51 QSizePolicy::Expanding));
52 QHBox *hbox =
new QHBox(
this,
"buttons");
53 QPushButton *bOk =
new QPushButton(
"Apply",hbox,
"Apply");
54 QPushButton *bCancel =
new QPushButton(
"Cancel",hbox,
"Close");
55 connect(bCancel,SIGNAL (clicked()),
this, SLOT(
close()));
56 connect(bOk,SIGNAL( clicked() ),
this, SLOT( ExecuteMethod() ));
68 TObjArray tobjlist(fCurMethod->GetListOfMethodArgs()->LastIndex()+1);
69 #if (QT_VERSION > 0x039999) // Added by cholm@nbi.dk - for Qt 4 70 typedef QList<QLineEdit*>::iterator iter;
71 for (iter st = fList.begin(); st != fList.end(); ++st) {
72 QString s = (*st)->text();
74 tobjlist.AddLast((
TObject*) t) ;
77 for ( QLineEdit* st = fList.first(); st; st = fList.next()) {
78 QString s = st->text();
80 tobjlist.AddLast((
TObject*) t) ;
85 if( strcmp(fCurMethod->GetName(),
"Delete") == 0 ) {
92 else if ( strcmp(fCurMethod->GetName(),
"SetCanvasSize") == 0 ) {
95 #if (QT_VERSION > 0x039999) // Added by cholm@nbi.dk - for Qt 4 96 for (iter st = fList.begin(); st != fList.end(); ++st) {
97 QString s = (*st)->text();
98 value[l++] = atoi ( s );
101 for ( QLineEdit* st = fList.first(); st; st = fList.next()) {
102 QString s = st->text();
103 value[l++] = atoi ( s );
106 fParent->resize(value[0], value[1]);
110 fCurObj->Execute( fCurMethod, &tobjlist);
115 gROOT->SetSelectedPad(psave);
116 gROOT->GetSelectedPad()->Modified();
117 gROOT->GetSelectedPad()->Update();
121 gROOT->GetSelectedPad()->Update();
130 if (fArgBox)
delete fArgBox;
131 if (fLineEdit)
delete fLineEdit;
132 #if (QT_VERSION > 0x039999) // Added by cholm@nbi.dk - for Qt 4 134 fList.erase(fList.begin(),fList.end());
147 new QLabel(argname,fArgBox);
148 QLineEdit* lineEdit =
new QLineEdit(fArgBox);
150 fLineEdit->setGeometry(10,10, 130, 30);
151 fLineEdit->setFocus();
152 fLineEdit->setText(s);
154 fList.append( lineEdit );
Collectable string class.
void Add(const char *argname, const char *value, const char *type)
Add widgets for arguments.
void closeEvent(QCloseEvent *ce)
Handle close event.
TQRootDialog(const TQRootDialog &)
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual ~TQRootDialog()
dtor
Mother of all ROOT objects.
Each ROOT class (see TClass) has a linked list of methods.
void Popup()
Show the dialog.
void ExecuteMethod()
Execute ROOT methods.