NewClassWidget Class | Extending Qt Creator Manual

Extending Qt Creator Manual | NewClassWidget

Extending Qt Creator Manual 4.6.0

# NewClassWidget Class

(Utils::NewClassWidget)

The NewClassWidget class is a utility widget for 'New Class' wizards. More...

Header: | #include <NewClassWidget>

- List of all members, including inherited members

## Public Types

enum | ClassType { NoClassType, ClassInheritsQObject, ClassInheritsQWidget, ClassInheritsQDeclarativeItem, ClassInheritsQQuickItem, SharedDataClass }

## Properties

allowDirectories : bool baseClassChoices : QStringList baseClassEditable : bool baseClassInputVisible : bool baseClassName : QString className : QString classType : ClassType classTypeComboVisible : bool files : const QStringList formExtension : QString formFileName : const QString formInputCheckable : bool formInputChecked : bool | formInputVisible : bool headerExtension : QString headerFileName : const QString headerInputVisible : bool lowerCaseFiles : bool namesDelimiter : QString namespacesEnabled : bool path : QString pathInputVisible : bool sourceExtension : QString sourceFileName : const QString sourceInputVisible : bool

## Public Functions

| NewClassWidget(QWidget *parent = 0)
| ~NewClassWidget()
bool | allowDirectories() const
QStringList | baseClassChoices() const
QString | baseClassName() const
QString | className() const
ClassType | classType() const
QStringList | files() const
QString | formExtension() const
QString | formFileName() const
bool | formInputCheckable() const
bool | formInputChecked() const
QString | headerExtension() const
QString | headerFileName() const
bool | isBaseClassEditable() const
bool | isBaseClassInputVisible() const
bool | isClassTypeComboVisible() const
bool | isFormInputVisible() const
bool | isHeaderInputVisible() const
bool | isPathInputVisible() const
bool | isSourceInputVisible() const
bool | isValid(QString *error = 0) const
bool | lowerCaseFiles() const
QString | namesDelimiter() const
bool | namespacesEnabled() const
QString | path() const
QString | sourceExtension() const
QString | sourceFileName() const

## Public Slots

void | setAllowDirectories(bool v)
void | setBaseClassChoices(const QStringList &choices)
void | setBaseClassEditable(bool editable)
void | setBaseClassInputVisible(bool visible)
void | setBaseClassName(const QString &)
void | setClassName(const QString &suggestedName)
void | setClassType(ClassType ct)
void | setClassTypeComboVisible(bool v)
void | setFormExtension(const QString &e)
void | setFormInputCheckable(bool v)
void | setFormInputChecked(bool v)
void | setFormInputVisible(bool visible)
void | setHeaderExtension(const QString &e)
void | setHeaderInputVisible(bool visible)
void | setLowerCaseFiles(bool v)
void | setNamesDelimiter(const QString &delimiter)
void | setNamespacesEnabled(bool b)
void | setPath(const QString &path)
void | setPathInputVisible(bool visible)
void | setSourceExtension(const QString &e)
void | setSourceInputVisible(bool visible)
void | suggestClassNameFromBase()

## Signals

void | activated()
void | validChanged()

## Detailed Description

The NewClassWidget class is a utility widget for 'New Class' wizards.

This widget prompts the user to enter a class name (optionally derived from some base class) and file names for header, source and form files. Has some smart logic to derive the file names from the class name.

## Member Type Documentation

### enum NewClassWidget::ClassType

## Property Documentation

### allowDirectories : bool

Access functions:

bool | allowDirectories() const
void | setAllowDirectories(bool v)

### baseClassChoices : QStringList

Access functions:

QStringList | baseClassChoices() const
void | setBaseClassChoices(const QStringList &choices)

### baseClassEditable : bool

Access functions:

bool | isBaseClassEditable() const
void | setBaseClassEditable(bool editable)

### baseClassInputVisible : bool

Access functions:

bool | isBaseClassInputVisible() const
void | setBaseClassInputVisible(bool visible)

### baseClassName : QString

Access functions:

QString | baseClassName() const
void | setBaseClassName(const QString &)

### className : QString

Access functions:

QString | className() const
void | setClassName(const QString &suggestedName)

### classType : ClassType

Access functions:

ClassType | classType() const
void | setClassType(ClassType ct)

### classTypeComboVisible : bool

Access functions:

bool | isClassTypeComboVisible() const
void | setClassTypeComboVisible(bool v)

### files : const QStringList

Access functions:

QStringList | files() const

### formExtension : QString

Access functions:

QString | formExtension() const
void | setFormExtension(const QString &e)

### formFileName : const QString

Access functions:

QString | formFileName() const

### formInputCheckable : bool

Access functions:

bool | formInputCheckable() const
void | setFormInputCheckable(bool v)

### formInputChecked : bool

Access functions:

bool | formInputChecked() const
void | setFormInputChecked(bool v)

### formInputVisible : bool

Access functions:

bool | isFormInputVisible() const
void | setFormInputVisible(bool visible)

### headerExtension : QString

Access functions:

QString | headerExtension() const
void | setHeaderExtension(const QString &e)

### headerFileName : const QString

Access functions:

QString | headerFileName() const

### headerInputVisible : bool

Access functions:

bool | isHeaderInputVisible() const
void | setHeaderInputVisible(bool visible)

### lowerCaseFiles : bool

Access functions:

bool | lowerCaseFiles() const
void | setLowerCaseFiles(bool v)

### namesDelimiter : QString

Access functions:

QString | namesDelimiter() const
void | setNamesDelimiter(const QString &delimiter)

### namespacesEnabled : bool

Access functions:

bool | namespacesEnabled() const
void | setNamespacesEnabled(bool b)

### path : QString

Access functions:

QString | path() const
void | setPath(const QString &path)

### pathInputVisible : bool

Access functions:

bool | isPathInputVisible() const
void | setPathInputVisible(bool visible)

### sourceExtension : QString

Access functions:

QString | sourceExtension() const
void | setSourceExtension(const QString &e)

### sourceFileName : const QString

Access functions:

QString | sourceFileName() const

### sourceInputVisible : bool

Access functions:

bool | isSourceInputVisible() const
void | setSourceInputVisible(bool visible)

## Member Function Documentation

### NewClassWidget::NewClassWidget(QWidget *parent = 0)

Default constructs an instance of NewClassWidget.

### NewClassWidget::~NewClassWidget()

Destroys the instance of NewClassWidget.

### `[signal]` void NewClassWidget::activated()

### bool NewClassWidget::isValid(QString *error = 0) const

### `[slot]` void NewClassWidget::suggestClassNameFromBase()

### `[signal]` void NewClassWidget::validChanged()