Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/Go4GUI/TGo4OpenRemoteDialog.ui.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE 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 /****************************************************************************
00017 ** ui.h extension file, included from the uic-generated form implementation.
00018 **
00019 ** If you wish to add, delete or rename functions or slots use
00020 ** Qt Designer which will update this file, preserving your code. Create an
00021 ** init() function in place of a constructor, and a destroy() function in
00022 ** place of a destructor.
00023 *****************************************************************************/
00024 
00025 
00026 void TGo4OpenRemoteDialog::init()
00027 {
00028    TGo4QSettings settings;
00029    QString hostname = settings.readEntry( TGo4QSettings::GetSettingsName()+"/OpenRemoteFile/Host", "machine.gsi.de");
00030    QString filename = settings.readEntry( TGo4QSettings::GetSettingsName()+"/OpenRemoteFile/File", "tmp/hsimple.root");
00031    QString protocol  = settings.readEntry( TGo4QSettings::GetSettingsName()+"/OpenRemoteFile/Type", "root:");
00032    ServerEdit->setText(hostname);
00033    fxServer=hostname;
00034    FileNameEdit->setText(filename);
00035    fxFile=filename;
00036    fxType=protocol;
00037    if(protocol.contains("root:"))
00038        TypeSelectorBox->setCurrentItem(0);
00039    else if (protocol.contains("rfio:"))
00040        TypeSelectorBox->setCurrentItem(1);
00041    else if (protocol.contains("http:"))
00042        TypeSelectorBox->setCurrentItem(2);
00043    else
00044        TypeSelectorBox->setCurrentItem(3);
00045    TypeSelectorBox_activated(protocol);
00046 }
00047 
00048 void TGo4OpenRemoteDialog::destroy()
00049 {
00050    TGo4QSettings settings;
00051    QString server=GetServer();
00052    QString fname=GetFileName();
00053    QString protocol=GetFileType();
00054    if(protocol.contains("root:"))
00055        protocol="root:";
00056    else if (protocol.contains("rfio:"))
00057        protocol="rfio:";
00058    else if (protocol.contains("http:"))
00059        protocol="http:";
00060    else
00061        protocol="local:";
00062    settings.writeEntry( TGo4QSettings::GetSettingsName()+"/OpenRemoteFile/Host", server);
00063    settings.writeEntry( TGo4QSettings::GetSettingsName()+"/OpenRemoteFile/File", fname);
00064    settings.writeEntry( TGo4QSettings::GetSettingsName()+"/OpenRemoteFile/Type", protocol);
00065 }
00066 
00067 
00068 
00069 void TGo4OpenRemoteDialog::TypeSelectorBox_activated( const QString & tname)
00070 {
00071     if(tname.contains("root:") || tname.contains("http:") || tname.contains("rfio:"))
00072        ServerEdit->setEnabled(true);
00073     else
00074        ServerEdit->setEnabled(false);
00075     fxType=tname;
00076 }
00077 
00078 
00079 const QString& TGo4OpenRemoteDialog::GetFileName()
00080 {
00081    // return FileNameEdit->text();
00082     return fxFile;
00083 }
00084 
00085 
00086 const QString& TGo4OpenRemoteDialog::GetFileType()
00087 {
00088  // return TypeSelectorBox->currentText();
00089     return fxType;
00090 }
00091 
00092 
00093 const QString& TGo4OpenRemoteDialog::GetServer()
00094 {
00095    // return ServerEdit->text();
00096     return fxServer;
00097 }
00098 
00099 
00100 
00101 void TGo4OpenRemoteDialog::ServerEdit_textChanged( const QString &  txt)
00102 {
00103     fxServer=txt;
00104 }
00105 
00106 
00107 void TGo4OpenRemoteDialog::FileNameEdit_textChanged( const QString & txt)
00108 {
00109     fxFile=txt;
00110 }
00111 
00112 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:56:01 2005 for Go4-v2.10-5 by doxygen1.2.15