10#include <QAbstractItemModel>
12#include <QFutureWatcher>
93 int childCount()
const;
96 const QString &
path()
const {
return keypath; };
99 const QString &
label()
const {
return m_label; };
125 QVariant data(
const QModelIndex &
index,
int role)
const override;
127 Qt::ItemFlags flags(
const QModelIndex &
index)
const override;
129 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const override;
131 QModelIndex
index(
int row,
int column,
const QModelIndex &parent = QModelIndex())
const override;
133 QModelIndex parent(
const QModelIndex &
index)
const override;
135 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
137 int columnCount(
const QModelIndex &parent = QModelIndex())
const override;
139 bool setData(
const QModelIndex &
index,
const QVariant &
value,
int role = Qt::EditRole)
override;
141 static const QString &localOnlySt();
142 static const QString &remoteOnlySt();
143 static const QString &localChangedSt();
144 static const QString &remoteChangedSt();
145 static const QString &updatedSt();
146 static const QString &bothChangedSt();
147 static const QString &downloadSt();
149 QString fileDescription(
const QModelIndex &
index);
150 QString filePath(
const QModelIndex &
index);
151 QString author(
const QModelIndex &
index);
160 void setupModelData(
RepoItem *parent);
176 bool showWarning =
true)
const;
183 bool isDownloading(
const QModelIndex &
index)
const;
185 void downloadFinished();
#define EXPORT_OPT_MANTIDQT_COMMON
double value
The value of the point.
std::map< DeltaEMode::Type, std::string > index
A nested class to help RepoModel to implement the QAbstractItemModel.
QString keypath
the path of the script repository
const RepoItem & operator=(const RepoItem &)
RepoItem * parent() const
access to the parent of this entry
RepoItem(const RepoItem &)
const QString & label() const
access to the label provided at construction
QString m_label
the label of this entry
const QString & path() const
access to the script repository path
QList< RepoItem * > childItems
track the list of children for this entry
RepoItem * parentItem
the parent of this entry
RepoModel : Wrapper for ScriptRepository to fit the Model View Qt Framework.
Mantid::API::ScriptRepository_sptr repo_ptr
pointer to the ScriptRepository
QModelIndex download_index
QFutureWatcher< QString > download_watcher
void executingThread(bool)
Mantid::API::ScriptRepository_sptr getRepoPtr()
QString repo_path
ScriptLocalRepository path, to be able to retrieve the absolute path.
RepoItem * rootItem
pointer to the RepoItem root
QFuture< QString > download_threads
The ScriptRepository class is intended to be used mainly by users, who will want to share and downloa...
const QString LOCALCHANGED
const QString REMOTECHANGED
const QString BOTHUNCHANGED
const QString BOTHCHANGED
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...
std::shared_ptr< ScriptRepository > ScriptRepository_sptr
shared pointer to the ScriptRepository base class
SCRIPTSTATUS
Represent the possible states for a given file: