Hauptseite | Klassenhierarchie | Alphabetische Liste | Übersicht | Auflistung der Dateien | Datenstruktur-Elemente | Datei-Elemente

sitzungskonfigurationdialog.cpp

gehe zur Dokumentation dieser Datei
00001 // sitzungskonfigurationdialog.cpp
00002 // LFTVideo.cpp  v1.7
00003 //               12.5.2003
00004 // 
00005 // für weitere Informationen:
00006 // siehe header von main.cpp
00007 
00008 #include "sitzungskonfigurationdialog.h"
00009 
00010 #include <qlineedit.h>
00011 #include <qlabel.h>
00012 #include <qfile.h>
00013 #include <qpushbutton.h>
00014 #include <qdatetime.h> 
00015 
00016 SitzungsKonfigurationDialog::SitzungsKonfigurationDialog( QWidget* parent, 
00017                                                                         const char* name, bool modal, WFlags f )
00018         : SitzungsKonfigurationDialogBase( parent, name, modal, f )
00019 {
00020 
00021         // Add your code
00022         LineEditInfodatei->setReadOnly(true);
00023         buttonOk->setEnabled(false);
00024 
00025         LineEditInfodatei->setPalette( parent->palette() );
00026         LineEditDatum->setPalette( parent->palette() );
00027         LineEditUhrzeit->setPalette( parent->palette() );
00028 
00029 
00030         // signals and slots connections
00031         // fertig -> checking und filename anzeigen
00032         connect( (const QObject*) PushButtonFertig, SIGNAL(clicked() ), 
00033                 this, SLOT( showTheFilename() ) );
00034 
00035         // wenn sich was ändert, geht OK erstmal nicht mehr:
00036         connect( (const QObject*) LineEditRater, 
00037                 SIGNAL(textChanged(const QString &) ), this, SLOT( disableOK() ) );
00038         connect( (const QObject*) LineEditKlient, 
00039                 SIGNAL(textChanged(const QString &) ), this, SLOT( disableOK() ) );
00040         connect( (const QObject*) ButtonGroupWeiterfuehren, SIGNAL(clicked(int) ), 
00041                 this, SLOT( disableOK() ) );
00042 };
00043 
00044 void SitzungsKonfigurationDialog::disableOK(){
00045         buttonOk->setEnabled(false);
00046 }
00047 
00048 void SitzungsKonfigurationDialog::showTheFilename(){
00049 
00050         buttonOk->setEnabled(true);
00051 
00052         if (LineEditKlient->text()==""){
00053                 TextLabelKlient->setPalette( QPalette( QColor(80, 80, 255) ) );
00054                 buttonOk->setEnabled(false);
00055         } else TextLabelKlient->unsetPalette( );
00056 
00057         if (LineEditRater->text()==""){
00058                 TextLabelRater->setPalette( QPalette( QColor(80, 80, 255) ) );
00059                 buttonOk->setEnabled(false);
00060         } else TextLabelRater->unsetPalette( );
00061 
00062         LineEditInfodatei->setText(filename());
00063 
00064         LineEditDatum->setText(QDate::currentDate().toString());
00065 
00066     QFile f( filename() );
00067     bool ok=f.open( IO_ReadOnly );
00068         if (!ok) {
00069                 TextLabelExistiert->setText("noch nicht");
00070         }
00071         else{
00072                 TextLabelExistiert->setText("schon");
00073                 f.close();
00074         }
00075 };
00076 
00077 
00078 QString SitzungsKonfigurationDialog::filename(){
00079         return (LineEditKlient->text() + "_" 
00080                     + LineEditRater->text() +"_info.dat").lower();
00081 };
00082 

Erzeugt am Mon Jun 16 18:08:24 2003 für LFTVideo von doxygen 1.3.2