Back to index

fet  5.18.0
Public Slots | Public Member Functions
AddBuildingForm Class Reference

#include <addbuildingform.h>

List of all members.

Public Slots

void addBuilding ()

Public Member Functions

 AddBuildingForm (QWidget *parent)
 ~AddBuildingForm ()

Detailed Description

Definition at line 27 of file addbuildingform.h.


Constructor & Destructor Documentation

AddBuildingForm::AddBuildingForm ( QWidget *  parent)

Definition at line 22 of file addbuildingform.cpp.

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

       connect(closePushButton, SIGNAL(clicked()), this, SLOT(close()));
       connect(addBuildingPushButton, SIGNAL(clicked()), this, SLOT(addBuilding()));

       centerWidgetOnScreen(this);
       restoreFETDialogGeometry(this);
}

Here is the call graph for this function:

Definition at line 35 of file addbuildingform.cpp.

Here is the call graph for this function:


Member Function Documentation

Definition at line 40 of file addbuildingform.cpp.

{
       if(nameLineEdit->text().isEmpty()){
              QMessageBox::information(this, tr("FET information"), tr("Incorrect name"));
              return;
       }
       Building* bu=new Building();
       bu->name=nameLineEdit->text();
       if(!gt.rules.addBuilding(bu)){
              QMessageBox::information(this, tr("Room insertion dialog"),
                     tr("Could not insert item. Must be a duplicate"));
              delete bu;
       }
       else{
              QMessageBox::information(this, tr("Building insertion dialog"),
                     tr("Building added"));
       }

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

Here is the call graph for this function:

Here is the caller graph for this function:


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