2 #ifndef __libquark_gui_SearchPathModel_hxx 3 #define __libquark_gui_SearchPathModel_hxx 5 #include <QtCore/QString> 47 QString
findFile(
const QString &filename)
const;
59 virtual QVariant
getFieldValue(
const QString &item,
int field)
const;
60 virtual QIcon
getIcon(
const QString &item)
const;
72 #endif // __libquark_gui_SearchPathModel_hxx SearchPathModel(const QString &settingName, QObject *parent=NULL)
Constructs a new SearchPathModel with the given setting name.
void save()
Writes the model's data to the settings.
QString findFile(const QString &filename) const
Searches for a file with the given name within each of the directories in the search path...
An implementation of BasicTableModel that represents a file search path, that is, a list of directori...
Definition: SearchPathModel.h++:20
virtual QVariant getFieldValue(const QString &item, int field) const
Returns the value of the given field of an object.
bool containsDirectory(const QString &dir) const
Tests if the model contains a given directory.
Definition: BarChartView.h++:6
A partial implementation of AbstractTableModel that stores its elements in a QVector.
Definition: BasicTableModel.h++:17
virtual QIcon getIcon(const QString &item) const
Returns the icon for a given item, if any.
void load()
Loads the model's data from the settings.
virtual QModelIndex parent(const QModelIndex &index) const
Specified by QAbstractItemModel.
virtual ~SearchPathModel()
Destructor.