SubmitFileModel Class | Extending Qt Creator Manual

Extending Qt Creator Manual | SubmitFileModel

Extending Qt Creator Manual 4.3.0

# SubmitFileModel Class

(VcsBase::SubmitFileModel)

The SubmitFileModel class is a 2-column (checkable, state, file name) model to be used to list the files in the submit editor. More...

Header: | #include <SubmitFileModel>

- List of all members, including inherited members

## Public Types

enum | FileStatusHint { FileStatusUnknown, FileAdded, FileModified, FileDeleted, FileRenamed, FileUnmerged }
typedef | FileStatusQualifier

## Public Functions

| SubmitFileModel(QObject *parent = 0)
QList<QStandardItem *> | addFile(const QString &fileName, const QString &status = QString(), CheckMode checkMode = Checked, const QVariant &data = QVariant())
bool | checked(int row) const
QVariant | extraData(int row) const
QString | file(int row) const
const FileStatusQualifier & | fileStatusQualifier() const
unsigned int | filterFiles(const QStringList &filter)
bool | hasCheckedFiles() const
bool | isCheckable(int row) const
const QString & | repositoryRoot() const
void | setAllChecked(bool check)
void | setChecked(int row, bool check)
void | setFileStatusQualifier(FileStatusQualifier &&func)
void | setRepositoryRoot(const QString &repoRoot)
QString | state(int row) const
virtual void | updateSelections(SubmitFileModel *source)

## Detailed Description

The SubmitFileModel class is a 2-column (checkable, state, file name) model to be used to list the files in the submit editor.

Provides header items and a convenience function to add files.

## Member Type Documentation

### enum SubmitFileModel::FileStatusHint

### typedef SubmitFileModel::FileStatusQualifier

## Member Function Documentation

### SubmitFileModel::SubmitFileModel(QObject *parent = 0)

Default constructs an instance of SubmitFileModel.

### QList<QStandardItem *> SubmitFileModel::addFile(const QString &fileName, const QString &status = QString(), CheckMode checkMode = Checked, const QVariant &data = QVariant())

### bool SubmitFileModel::checked(int row) const

See also setChecked().

### QVariant SubmitFileModel::extraData(int row) const

### QString SubmitFileModel::file(int row) const

### const FileStatusQualifier &SubmitFileModel::fileStatusQualifier() const

See also setFileStatusQualifier().

### unsigned int SubmitFileModel::filterFiles(const QStringList &filter)

### bool SubmitFileModel::hasCheckedFiles() const

### bool SubmitFileModel::isCheckable(int row) const

### const QString &SubmitFileModel::repositoryRoot() const

See also setRepositoryRoot().

### void SubmitFileModel::setAllChecked(bool check)

### void SubmitFileModel::setChecked(int row, bool check)

See also checked().

### void SubmitFileModel::setFileStatusQualifier(FileStatusQualifier &&func)

See also fileStatusQualifier().

### void SubmitFileModel::setRepositoryRoot(const QString &repoRoot)

See also repositoryRoot().

### QString SubmitFileModel::state(int row) const

### `[virtual]` void SubmitFileModel::updateSelections(SubmitFileModel *source)

Updates user selections from source model.

Assumes that both models are sorted with the same order, and there are no duplicate entries.