umbrello 26.07.70-c53146a Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Signals | Public Member Functions | Protected Slots | Protected Attributes | Private Slots | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
CodeGenOptionsPage Class Reference

`#include <codegenoptionspage.h>`

Inheritance diagram for CodeGenOptionsPage:

## Signals

void | applyClicked ()
void | languageChanged ()
void | syncCodeDocumentsToParent ()

## Public Member Functions

| CodeGenOptionsPage (QWidget *parent=nullptr)
| ~CodeGenOptionsPage ()
QString | getLanguage ()
void | apply ()
bool | save ()
bool | validatePage ()

## Protected Slots

void | activeLanguageChanged (int id)
void | updateCodeGenerationPolicyTab ()
void | browseClicked ()

## Protected Attributes

CodeGenerationPolicy * | m_parentPolicy

## Private Slots

void | changeLanguage ()

## Private Member Functions

QRadioButton * | overwriteToWidget (CodeGenerationPolicy::OverwritePolicy value)
CodeGenerationPolicy::OverwritePolicy | widgetToOverwrite ()
void | setupActiveLanguageBox ()

## Static Private Member Functions

static int | newLineToInteger (CodeGenerationPolicy::NewLineType value)
static int | indentTypeToInteger (CodeGenerationPolicy::IndentationType value)

## Private Attributes

CodeGenerationPolicyPage * | m_pCodePolicyPage

## Detailed Description

This class is used in the code generation wizard and also in SettingsDialog.

Author
  Luis De la Parra
  Brian Thomas
  Andi Fischer

## Constructor & Destructor Documentation

## ◆ CodeGenOptionsPage()

CodeGenOptionsPage::CodeGenOptionsPage | ( | QWidget * | parent = `nullptr` | ) |

explicit

Constructor.

Parameters

  parent | the parent (wizard) of this wizard page

## ◆ ~CodeGenOptionsPage()

CodeGenOptionsPage::~CodeGenOptionsPage | ( |  | ) |

Destructor.

## Member Function Documentation

## ◆ activeLanguageChanged

void CodeGenOptionsPage::activeLanguageChanged | ( | int | id | ) |

protected slot

Transform signal.

Parameters

  id | position in combo box

## ◆ apply()

void CodeGenOptionsPage::apply | ( |  | ) |

Reads the set values from their corresponding widgets, writes them back to the data structure, and notifies clients.

## ◆ applyClicked

void CodeGenOptionsPage::applyClicked | ( |  | ) |

signal

## ◆ browseClicked

void CodeGenOptionsPage::browseClicked | ( |  | ) |

protected slot

Slot for clicked events of the browse buttons. The selected directory is written to its corresponding text field.

## ◆ changeLanguage

void CodeGenOptionsPage::changeLanguage | ( |  | ) |

private slot

When the user changes the language, the codegenoptions page language-dependent stuff has to be updated. The way to do this is to call its "apply" method.

## ◆ getLanguage()

QString CodeGenOptionsPage::getLanguage | ( |  | ) |

Returns the user selected language used for code generation.

Returns
  the programming language name

## ◆ indentTypeToInteger()

int CodeGenOptionsPage::indentTypeToInteger | ( | CodeGenerationPolicy::IndentationType | value | ) |

static private

Static utility function to convert the indentation type to integer.

Parameters

  value | the indentation type

Returns
  the corresponding integer value

## ◆ languageChanged

void CodeGenOptionsPage::languageChanged | ( |  | ) |

signal

## ◆ newLineToInteger()

int CodeGenOptionsPage::newLineToInteger | ( | CodeGenerationPolicy::NewLineType | value | ) |

static private

Static utility function to convert the new line type to integer.

Parameters

  value | the new line type

Returns
  the corresponding integer value

## ◆ overwriteToWidget()

QRadioButton * CodeGenOptionsPage::overwriteToWidget | ( | CodeGenerationPolicy::OverwritePolicy | value | ) |

private

Converts the overwrite policy value to the corresponding widget object.

Parameters

  value | the overwrite policy

Returns
  the corresponding widget object

## ◆ save()

bool CodeGenOptionsPage::save | ( |  | ) |

This function is called when leaving this wizard page. Saves the made settings and checks some values.

Returns
  the success state

## ◆ setupActiveLanguageBox()

void CodeGenOptionsPage::setupActiveLanguageBox | ( |  | ) |

private

Fills the language combo box with items and sets the currently selected value.

## ◆ syncCodeDocumentsToParent

void CodeGenOptionsPage::syncCodeDocumentsToParent | ( |  | ) |

signal

## ◆ updateCodeGenerationPolicyTab

void CodeGenOptionsPage::updateCodeGenerationPolicyTab | ( |  | ) |

protected slot

Updates the code generation policy tab.

## ◆ validatePage()

bool CodeGenOptionsPage::validatePage | ( |  | ) |

Reimplemented QWizardPage method to validate page when user clicks next button.

Returns
  the validation state

## ◆ widgetToOverwrite()

CodeGenerationPolicy::OverwritePolicy CodeGenOptionsPage::widgetToOverwrite | ( |  | ) |

private

Converts the corresponding widget checked value to the overwrite policy.

Returns
  the overwrite policy

## Member Data Documentation

## ◆ m_parentPolicy

CodeGenerationPolicy* CodeGenOptionsPage::m_parentPolicy

protected

## ◆ m_pCodePolicyPage

CodeGenerationPolicyPage* CodeGenOptionsPage::m_pCodePolicyPage

private

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

- umbrello/codegenwizard/codegenoptionspage.h
- umbrello/codegenwizard/codegenoptionspage.cpp