parts/filecreate/fctypeedit.cpp
Go to the documentation of this file.00001 /*************************************************************************** 00002 * Copyright (C) 2003 by Alexander Dymo * 00003 * cloudtemple@mksat.net * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 ***************************************************************************/ 00010 00011 #include <qlineedit.h> 00012 #include <qpushbutton.h> 00013 #include "fctypeedit.h" 00014 00015 00016 FCTypeEdit::FCTypeEdit(QWidget *parent, char *name) 00017 : FCTypeEditBase(parent, name) 00018 { 00019 connect( typeext_edit, SIGNAL( textChanged ( const QString & )),this, SLOT( slotTypeEditTextChanged())); 00020 connect( typename_edit, SIGNAL( textChanged ( const QString & )),this, SLOT( slotTypeEditTextChanged( ))); 00021 slotTypeEditTextChanged( ); 00022 } 00023 00024 FCTypeEdit::~FCTypeEdit() 00025 { 00026 } 00027 00028 void FCTypeEdit::slotTypeEditTextChanged( ) 00029 { 00030 ok_button->setEnabled( !typeext_edit->text().isEmpty() && 00031 !typename_edit->text().isEmpty()); 00032 } 00033 00034 void FCTypeEdit::accept() 00035 { 00036 if ( !typeext_edit->text().isEmpty() && 00037 !typename_edit->text().isEmpty() ) 00038 FCTypeEditBase::accept(); 00039 } 00040 #include "fctypeedit.moc"