# eric7.Project.CreateDialogCodeDialog

Module implementing a dialog to generate code for a Qt5 dialog.

### Global Attributes

parameterNamesListRole
parameterTypesListRole
pyqtSignatureRole
pythonSignatureRole
returnTypeRole
rubySignatureRole

### Classes

CreateDialogCodeDialog | Class implementing a dialog to generate code for a Qt5 dialog.

### Functions

None

## CreateDialogCodeDialog

Class implementing a dialog to generate code for a Qt5 dialog.

### Derived from

QDialog, Ui_CreateDialogCodeDialog

### Class Attributes

DialogClasses
Separator

### Class Methods

None

### Methods

CreateDialogCodeDialog | Constructor
__className | Private method to get the class name of a form.
__generateCode | Private slot to generate the code as requested by the user.
__generatePythonCode | Private slot to generate Python code as requested by the user.
__mapType | Private method to map a type as reported by Qt's meta object to the correct Python type.
__objectName | Private method to get the object name of a form.
__runUicLoadUi | Private method to run the UicLoadUi.py script with the given command and return the output.
__signatures | Private slot to get the signatures.
__updateSlotsModel | Private slot to update the slots tree display.
initError | Public method to determine, if there was an initialzation error.
on_buttonBox_clicked | Private slot to handle the buttonBox clicked signal.
on_classNameCombo_activated | Private slot to handle the activated signal of the classname combo.
on_filterEdit_textChanged | Private slot called, when thext of the filter edit has changed.
on_newButton_clicked | Private slot called to enter the data for a new dialog class.

### Static Methods

None

#### CreateDialogCodeDialog (Constructor)

CreateDialogCodeDialog(formName, project, parent=None)

Constructor

formName
  name of the file containing the form (string)
project
  reference to the project object
parent
  parent widget if the dialog (QWidget)

#### CreateDialogCodeDialog.__className

__className()

Private method to get the class name of a form.

Return:
  class name

Return Type:
  str

#### CreateDialogCodeDialog.__generateCode

__generateCode()

Private slot to generate the code as requested by the user.

#### CreateDialogCodeDialog.__generatePythonCode

__generatePythonCode()

Private slot to generate Python code as requested by the user.

#### CreateDialogCodeDialog.__mapType

__mapType(type_)

Private method to map a type as reported by Qt's meta object to the correct Python type.

type_
  type as reported by Qt (QByteArray)

Return:
  mapped Python type (string)

#### CreateDialogCodeDialog.__objectName

__objectName()

Private method to get the object name of a form.

Return:
  object name

Return Type:
  str

#### CreateDialogCodeDialog.__runUicLoadUi

__runUicLoadUi(command)

Private method to run the UicLoadUi.py script with the given command and return the output.

command (str)
  uic command to be run

Return:
  tuple of process output and error flag

Return Type:
  tuple of (str, bool)

#### CreateDialogCodeDialog.__signatures

__signatures()

Private slot to get the signatures.

Return:
  list of signatures (list of strings)

#### CreateDialogCodeDialog.__updateSlotsModel

__updateSlotsModel()

Private slot to update the slots tree display.

#### CreateDialogCodeDialog.initError

initError()

Public method to determine, if there was an initialzation error.

Return:
  flag indicating an initialzation error (boolean)

#### CreateDialogCodeDialog.on_buttonBox_clicked

on_buttonBox_clicked(button)

Private slot to handle the buttonBox clicked signal.

button
  reference to the button that was clicked (QAbstractButton)

#### CreateDialogCodeDialog.on_classNameCombo_activated

on_classNameCombo_activated(index)

Private slot to handle the activated signal of the classname combo.

index
  index of the activated item (integer)

#### CreateDialogCodeDialog.on_filterEdit_textChanged

on_filterEdit_textChanged(text)

Private slot called, when thext of the filter edit has changed.

text
  changed text (string)

#### CreateDialogCodeDialog.on_newButton_clicked

on_newButton_clicked()

Private slot called to enter the data for a new dialog class.

Up