00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 void TGo4LogSettings::init()
00018 {
00019 bool iswrite=TGo4Log::IsLogfileEnabled();
00020
00021 IgnoreCombo->setCurrentItem(TGo4Log::GetIgnoreLevel());
00022 ModeCombo->setCurrentItem(TGo4Log::IsAutoEnabled());
00023 LogfilePrint->setChecked(TGo4Log::IsOutputEnabled());
00024
00025 LogfileWrite->setChecked(iswrite);
00026 LogfileName->setText(TGo4Log::GetLogname());
00027 LogfileName->setEnabled(iswrite);
00028 FileNameLog->setEnabled(iswrite);
00029 }
00030
00031 void TGo4LogSettings::LogfileDialog()
00032 {
00033 QFileDialog fd( this, "Set GUI logfile:", TRUE );
00034 fd.setMode( QFileDialog::AnyFile );
00035 fd.setFilter( "Log textfile (*.log)" );
00036 if (fd.exec() != QDialog::Accepted) return;
00037
00038 QString fileName = fd.selectedFile();
00039 if(!fileName.endsWith(".log")) fileName.append(".log");
00040 LogfileName->setText(fileName);
00041 }
00042
00043