Back to index

fet  5.18.0
Public Slots | Public Member Functions | Private Attributes
ModifyBuildingForm Class Reference

#include <modifybuildingform.h>

List of all members.

Public Slots

void ok ()
void cancel ()

Public Member Functions

 ModifyBuildingForm (QWidget *parent, const QString &initialBuildingName)
 ~ModifyBuildingForm ()

Private Attributes

QString _initialBuildingName

Detailed Description

Definition at line 27 of file modifybuildingform.h.


Constructor & Destructor Documentation

ModifyBuildingForm::ModifyBuildingForm ( QWidget *  parent,
const QString &  initialBuildingName 
)

Definition at line 22 of file modifybuildingform.cpp.

                                                                                         : QDialog(parent)
{
       setupUi(this);
       
       okPushButton->setDefault(true);

       connect(okPushButton, SIGNAL(clicked()), this, SLOT(ok()));
       connect(cancelPushButton, SIGNAL(clicked()), this, SLOT(cancel()));

       centerWidgetOnScreen(this);
       restoreFETDialogGeometry(this);
       
       this->_initialBuildingName=initialBuildingName;

       nameLineEdit->setText(initialBuildingName);
       nameLineEdit->selectAll();
       nameLineEdit->setFocus();
}

Here is the call graph for this function:

Definition at line 41 of file modifybuildingform.cpp.

Here is the call graph for this function:


Member Function Documentation

void ModifyBuildingForm::cancel ( ) [slot]

Definition at line 46 of file modifybuildingform.cpp.

{
       this->close();
}

Here is the caller graph for this function:

void ModifyBuildingForm::ok ( ) [slot]

Definition at line 51 of file modifybuildingform.cpp.

{
       if(nameLineEdit->text().isEmpty()){
              QMessageBox::information(this, tr("FET information"), tr("Incorrect name"));
              return;
       }
       if(this->_initialBuildingName!=nameLineEdit->text() && gt.rules.searchBuilding(nameLineEdit->text())>=0){
              QMessageBox::information(this, tr("FET information"), tr("Name existing - please choose another"));
              return;
       }
       
       bool t=gt.rules.modifyBuilding(this->_initialBuildingName, nameLineEdit->text());
       assert(t);
       
       this->close();
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 30 of file modifybuildingform.h.


The documentation for this class was generated from the following files: