- Extending Qt Creator Manual
- Utils Namespace
- Extending Qt Creator Manual 10.0.0-rc1

# Utils Namespace

Header: | #include <Utils>

## Namespaces

namespace | MathUtils

## Classes

class | AnsiEscapeCodeHandler
class | AspectContainer
class | BaseAspect
class | BoolAspect
class | CheckableMessageBox
class | CompletingTextEdit
class | DetailsWidget
class | DoubleAspect
class | ElidingLabel
class | FileNameValidatingLineEdit
class | FileWizardPage
class | FixedSizeClickLabel
class | IntegerAspect
class | MultiSelectionAspect
class | NavigationTreeView
class | ParameterAction
class | PathListEditor
class | ProcessHandle
class | ProjectIntroPage
class | QtcProcess
class | SelectionAspect
class | StatusLabel
class | StringAspect
class | StringListAspect
class | TaskTree
class | TextDisplay
class | TextFieldCheckBox
class | TreeModel

## Types

flags | LanguageExtensions
enum class | ProgressIndicatorSize { Small, Medium, Large }

## Functions

QAction * | execMenuAtWidget(QMenu *menu, QWidget *widget)

## Detailed Description

The Utils namespace contains a collection of utility classes and functions for use by all plugins.

## Namespaces

### namespace Utils::MathUtils

## Classes

### class AnsiEscapeCodeHandler

The AnsiEscapeCodeHandler class parses text and extracts ANSI escape codes from it. More...

### class AspectContainer

The AspectContainer class wraps one or more aspects while providing the interface of a single aspect. More...

### class BaseAspect

The `BaseAspect` class provides a common base for classes implementing aspects. More...

### class BoolAspect

A boolean aspect is a boolean property of some object, together with a description of its behavior for common operations like visualizing or persisting. More...

### class CheckableMessageBox

The CheckableMessageBox class implements a message box suitable for questions with a "Do not ask me again" checkbox. More...

### class CompletingTextEdit

The CompletingTextEdit class is a QTextEdit with auto-completion support. More...

### class DetailsWidget

The DetailsWidget class implements a button to expand a Details area. More...

### class DoubleAspect

An double aspect is a numerical property of some object, together with a description of its behavior for common operations like visualizing or persisting. More...

### class ElidingLabel

The ElidingLabel class is a label suitable for displaying elided text. More...

### class FileNameValidatingLineEdit

The FileNameValidatingLineEdit class is a control that lets the user choose a (base) file name, based on a QLineEdit. More...

### class FileWizardPage

The FileWizardPage class is a standard wizard page for a single file letting the user choose name and path. More...

### class FixedSizeClickLabel

The FixedSizeClickLabel class is a label with a size hint derived from a sample text that can be different to the text that is shown. More...

### class IntegerAspect

An integer aspect is a integral property of some object, together with a description of its behavior for common operations like visualizing or persisting. More...

### class MultiSelectionAspect

A multi-selection aspect represents one or more choices out of several. More...

### class NavigationTreeView

The NavigationTreeView class implements a general TreeView for any sidebar widget. More...

### class ParameterAction

The ParameterAction class is intended for actions that act on a 'current', string-type parameter (typically a file name), for example 'Save file %1'. More...

### class PathListEditor

The PathListEditor class is a control that lets the user edit a list of (directory) paths using the platform separator (';',':'). More...

### class ProcessHandle

The ProcessHandle class is a helper class to describe a process. More...

### class ProjectIntroPage

The ProjectIntroPage class is the standard wizard page for a project, letting the user choose its name and path. More...

### class QtcProcess

The QtcProcess class provides functionality for with processes. More...

### class SelectionAspect

A selection aspect represents a specific choice out of several. More...

### class StatusLabel

The StatusLabel class displays messages for a while with a timeout. More...

### class StringAspect

A string aspect is a string-like property of some object, together with a description of its behavior for common operations like visualizing or persisting. More...

### class StringListAspect

A string list aspect represents a property of some object that is a list of strings. More...

### class TaskTree

The TaskTree class runs an async task tree structure defined in a declarative way. More...

### class TextDisplay

A text display is a phony aspect with the sole purpose of providing some text display using an Utils::InfoLabel in places where otherwise more expensive Utils::StringAspect items would be used. More...

### class TextFieldCheckBox

The TextFieldCheckBox class is a aheckbox that plays with `QWizard::registerField`. More...

### class TreeModel

The TreeModel class is a convienience base class for models to use in a QTreeView. More...

## Type Documentation

### enum class Utils::ProgressIndicatorSize

Size of a progress indicator.

Constant | Value | Description
--- | --- | ---
`Utils::ProgressIndicatorSize::Small` | `0` | Small icon size. Useful for tool bars, status bars, rows in tree views, and so on.
`Utils::ProgressIndicatorSize::Medium` | `1` | Larger progress indicator useful for covering whole medium sized widgets.
`Utils::ProgressIndicatorSize::Large` | `2` | Very large progress indicator that can be used to cover large parts of a UI.

See also Utils::ProgressIndicator and Utils::ProgressIndicatorPainter.

## Function Documentation

### QAction *Utils::execMenuAtWidget(QMenu *menu, QWidget *widget)

Opens menu at the specified widget position. This function computes the position where to show the menu, and opens it with QMenu::exec().