Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TGo4StartClient.ui.h

Go to the documentation of this file.
00001 //-------------------------------------------------------------
00002 //        Go4 Release Package v3.04-01 (build 30401)
00003 //                      28-November-2008
00004 //---------------------------------------------------------------
00005 //   The GSI Online Offline Object Oriented (Go4) Project
00006 //   Experiment Data Processing at EE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 void TGo4StartClient::init()
00017 {
00018    LineEditClientName->setText(go4sett->getClientName());
00019    LineEditClientNode->setText(go4sett->getClientNode());
00020    LineEditClientDir->setText(go4sett->getClientDir());
00021    LineEditClientExec->setText(go4sett->getClientExec());
00022    ClientShellGroup->setButton(go4sett->getClientShellMode());
00023    ClientTermGroup->setButton(go4sett->getClientTermMode());
00024 
00025    bool isserver = go4sett->getClientIsServer();
00026    ServerModeCombo->setCurrentItem(isserver ? 1 : 0);
00027    qt_selected->setEnabled(!isserver);
00028    if (isserver && ClientTermGroup->selectedId()==1)
00029       ClientTermGroup->setButton(2);
00030 }
00031 
00032 void TGo4StartClient::getResults()
00033 {
00034    go4sett->setClientName(LineEditClientName->text());
00035    go4sett->setClientNode(LineEditClientNode->text());
00036    go4sett->setClientDir(LineEditClientDir->text());
00037    go4sett->setClientExec(LineEditClientExec->text());
00038    go4sett->setClientShellMode(ClientShellGroup->selectedId());
00039    go4sett->setClientTermMode(ClientTermGroup->selectedId());
00040    go4sett->setClientIsServer(ServerModeCombo->currentItem()==1);
00041 }
00042 
00043 void TGo4StartClient::SelectDir()
00044 {
00045    QFileDialog fd(this, "file name", TRUE);
00046    fd.setMode(QFileDialog::DirectoryOnly);
00047    fd.setName("Select your working dir");
00048    fd.setCaption("Select your working dir");
00049 
00050    if (fd.exec() != QDialog::Accepted ) return;
00051 
00052    QString fileName = fd.selectedFile();
00053    LineEditClientDir->setText(fileName);
00054    QDir::setCurrent(fileName);
00055 }
00056 
00057 void TGo4StartClient::SelectProg()
00058 {
00059    QFileDialog fd(this, "file name", TRUE);
00060    fd.setMode(QFileDialog::ExistingFile);
00061    fd.setName("Select your analysis program");
00062    fd.setCaption("Select your analysis program");
00063 
00064    if (fd.exec() != QDialog::Accepted) return;
00065 
00066    QFileInfo fi(fd.selectedFile());
00067    LineEditClientExec->setText(fi.fileName());
00068    LineEditClientDir->setText(fi.dirPath(TRUE));
00069    QDir::setCurrent(fi.dirPath(TRUE));
00070 }
00071 
00072 
00073 void TGo4StartClient::ServerModeCombo_activated(int id)
00074 {
00075    bool isserver = (id==1);
00076 
00077    qt_selected->setEnabled(!isserver);
00078 
00079    if (isserver) {
00080      if (ClientTermGroup->selectedId()==1)
00081        ClientTermGroup->setButton(2);
00082    }
00083 }
00084 
00085 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Fri Nov 28 12:59:22 2008 for Go4-v3.04-1 by  doxygen 1.4.2