|
@@ -39,7 +39,6 @@ struct FSNode {
|
|
struct FSLeafNode : public FSNode {
|
|
struct FSLeafNode : public FSNode {
|
|
using FSNode::FSNode;
|
|
using FSNode::FSNode;
|
|
QSize size;
|
|
QSize size;
|
|
- qreal ratio;
|
|
|
|
};
|
|
};
|
|
|
|
|
|
FSNode::FSNode(const QString& rname, const FSNode *pparent)
|
|
FSNode::FSNode(const QString& rname, const FSNode *pparent)
|
|
@@ -124,7 +123,6 @@ void FSNodeTree::addModelNode(const FSNode* parentNode)
|
|
qDebug() << "Image" << fullPath << "has excessive ratio" << ratio << "excluded";
|
|
qDebug() << "Image" << fullPath << "has excessive ratio" << ratio << "excluded";
|
|
} else {
|
|
} else {
|
|
rational = true;
|
|
rational = true;
|
|
- file->ratio = ratio;
|
|
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
qDebug() << "Discarding" << fullPath << "due to invalid size";
|
|
qDebug() << "Discarding" << fullPath << "due to invalid size";
|
|
@@ -209,8 +207,6 @@ QVariant PictureModel::data(const QModelIndex &index, int role) const
|
|
switch (role) {
|
|
switch (role) {
|
|
case SizeRole:
|
|
case SizeRole:
|
|
return QSize(1222,900);
|
|
return QSize(1222,900);
|
|
- case RatioRole:
|
|
|
|
- return 1222/900;
|
|
|
|
case NameRole:
|
|
case NameRole:
|
|
return "Qt logo";
|
|
return "Qt logo";
|
|
case PathRole:
|
|
case PathRole:
|
|
@@ -223,8 +219,6 @@ QVariant PictureModel::data(const QModelIndex &index, int role) const
|
|
switch (role) {
|
|
switch (role) {
|
|
case SizeRole:
|
|
case SizeRole:
|
|
return d->fsTree->files.at(index.row())->size;
|
|
return d->fsTree->files.at(index.row())->size;
|
|
- case RatioRole:
|
|
|
|
- return d->fsTree->files.at(index.row())->ratio;
|
|
|
|
case NameRole:
|
|
case NameRole:
|
|
return d->fsTree->files.at(index.row())->name;
|
|
return d->fsTree->files.at(index.row())->name;
|
|
case PathRole:
|
|
case PathRole:
|
|
@@ -241,7 +235,6 @@ QHash<int, QByteArray> PictureModel::roleNames() const
|
|
roles[NameRole] = "name";
|
|
roles[NameRole] = "name";
|
|
roles[PathRole] = "path";
|
|
roles[PathRole] = "path";
|
|
roles[SizeRole] = "size";
|
|
roles[SizeRole] = "size";
|
|
- roles[RatioRole] = "ratio";
|
|
|
|
return roles;
|
|
return roles;
|
|
}
|
|
}
|
|
|
|
|