00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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