Extending Qt Creator Manual | PathListEditor

Extending Qt Creator Manual 4.6.0

# PathListEditor Class

(Utils::PathListEditor)

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

Header: | #include <PathListEditor>

- List of all members, including inherited members

## Properties

- fileDialogTitle : QString
- pathList : QStringList

## Public Functions

| PathListEditor(QWidget *parent = 0)
virtual | ~PathListEditor()
void | clear()
QString | fileDialogTitle() const
QStringList | pathList() const
QString | pathListString() const
void | setFileDialogTitle(const QString &l)
void | setPathList(const QStringList &l)
void | setPathList(const QString &pathString)

## Protected Functions

QPushButton * | addButton(const QString &text, QObject *parent, std::function<void() > slotFunc)
void | deletePathAtCursor()
QPushButton * | insertButton(int index, const QString &text, QObject *parent, std::function<void() > slotFunc)
void | insertPathAtCursor(const QString &)
void | setText(const QString &)
QString | text() const

## Detailed Description

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

Typically used for path lists controlled by environment variables, such as PATH. It is based on a QPlainTextEdit as it should allow for convenient editing and non-directory type elements like

      "etc/mydir1:$SPECIAL_SYNTAX:/etc/mydir2".

When pasting text into it, the platform separator will be replaced by new line characters for convenience.

## Property Documentation

### fileDialogTitle : QString

Access functions:

QString | fileDialogTitle() const
void | setFileDialogTitle(const QString &l)

### pathList : QStringList

Access functions:

QStringList | pathList() const
void | setPathList(const QStringList &l)
void | setPathList(const QString &pathString)

## Member Function Documentation

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

Default constructs an instance of PathListEditor.

### `[virtual]` PathListEditor::~PathListEditor()

Destroys the instance of PathListEditor. The destructor is virtual.

### `[protected]` QPushButton *PathListEditor::addButton(const QString &text, QObject *parent, std::function<void() > slotFunc)

### void PathListEditor::clear()

### `[protected]` void PathListEditor::deletePathAtCursor()

### `[protected]` QPushButton *PathListEditor::insertButton(int index, const QString &text, QObject *parent, std::function<void() > slotFunc)

### `[protected]` void PathListEditor::insertPathAtCursor(const QString &)

### QString PathListEditor::pathListString() const

### `[protected]` void PathListEditor::setText(const QString &)

See also text().

### `[protected]` QString PathListEditor::text() const

See also setText().