NDEVR
API Documentation
WidgetFactoryBuilder

Generates boilerplate header, source, and UI files for a new Qt widget class. More...

Collaboration diagram for WidgetFactoryBuilder:
[legend]

Public Member Functions

String className () const
 Returns the computed class name for the widget.
void createModuleHeader (File &file) const
 Creates the widget header file on disk.
void createModuleSource (File &file) const
 Creates the widget source file on disk.
void createModuleUI (File &file) const
 Creates the widget .ui file on disk.
bool createWidget () const
 Generates all widget files (header, source, and optionally UI).
String headerPath () const
 Returns the relative header path for the widget class.
String uiName () const
 Returns the UI file name for the widget.
String widgetHeaderString () const
 Generates the widget header file content as a string.
String widgetSourceString () const
 Generates the widget source file content as a string.
String widgetUIString () const
 Generates the .ui XML file content as a string.

Public Attributes

BoilerMaker boiler_maker
 Boilerplate template generator.
String class_name
 The derived class name (computed lazily).
bool generate_ui = true
 Whether to also generate a .ui file.
LogPtr log
 Log for status messages.
bool override = false
 Whether to overwrite existing files.
String project_name
 The module project that owns the widget.
File source_directory
 The directory where generated source files are placed.
File ui_directory
 The directory for generated .ui files.
String widget_name
 The human-readable widget name.

Detailed Description

Generates boilerplate header, source, and UI files for a new Qt widget class.

Definition at line 10 of file WidgetFactoryBuilder.h.

Member Function Documentation

◆ className()

String WidgetFactoryBuilder::className ( ) const

Returns the computed class name for the widget.

Returns
The class name string.

◆ createModuleHeader()

void WidgetFactoryBuilder::createModuleHeader ( File & file) const

Creates the widget header file on disk.

Parameters
[in]fileThe output file to write to.

◆ createModuleSource()

void WidgetFactoryBuilder::createModuleSource ( File & file) const

Creates the widget source file on disk.

Parameters
[in]fileThe output file to write to.

◆ createModuleUI()

void WidgetFactoryBuilder::createModuleUI ( File & file) const

Creates the widget .ui file on disk.

Parameters
[in]fileThe output file to write to.

◆ createWidget()

bool WidgetFactoryBuilder::createWidget ( ) const

Generates all widget files (header, source, and optionally UI).

Returns
True on success.

◆ headerPath()

String WidgetFactoryBuilder::headerPath ( ) const

Returns the relative header path for the widget class.

Returns
The header file path string.

◆ uiName()

String WidgetFactoryBuilder::uiName ( ) const

Returns the UI file name for the widget.

Returns
The .ui file name string.

◆ widgetHeaderString()

String WidgetFactoryBuilder::widgetHeaderString ( ) const

Generates the widget header file content as a string.

Returns
The header source code.

◆ widgetSourceString()

String WidgetFactoryBuilder::widgetSourceString ( ) const

Generates the widget source file content as a string.

Returns
The source code.

◆ widgetUIString()

String WidgetFactoryBuilder::widgetUIString ( ) const

Generates the .ui XML file content as a string.

Returns
The UI XML content.

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