}
-QMap<int, QVariant>
- GuiIdListModel::itemData(QModelIndex const & index ) const
+QMap<int, QVariant> GuiIdListModel::itemData(QModelIndex const & index) const
{
int const row = index.row();
if (!rowIsValid(row))
return qm;
}
-/* The following functions are currently unused but are retained here in
- case they should at some point be useful.
+
+int GuiIdListModel::findIDString(std::string const & idString)
+{
+ vector<OurData>::const_iterator it = userData_.begin();
+ vector<OurData>::const_iterator end = userData_.end();
+ for (; it != end; ++it)
+ if (fromqstr(it->idString.toString()) == idString)
+ return it - userData_.begin();
+ return -1;
+}
+
+
+#if 0
+// The following functions are currently unused but are retained here in
+// case they should at some point be useful.
-QStringList GuiIdListModel::getIDStringList() const {
+QStringList GuiIdListModel::getIDStringList() const
+{
QStringList qsl;
vector<OurData>::const_iterator it = userData_.begin();
vector<OurData>::const_iterator end = userData_.end();
setIDString(i, idString);
}
-bool GuiIdListModel::containsID(QVariant const & q) const
-{
- vector<OurData>::const_iterator it = userData_.begin();
- vector<OurData>::const_iterator end = userData_.end();
- for (; it != end; ++it)
- if (it->idString == q)
- return true;
- return false;
-}
-*/
+#endif
-}
-}
+} // namespace frontend
+} // namespace lyx