1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-18 16:32:33 +02:00
This commit is contained in:
kelteseth 2017-11-16 15:29:31 +01:00
parent 68e91558e7
commit e19d82ea81
6 changed files with 24 additions and 4 deletions

View File

@ -1,6 +1,5 @@
import QtQuick 2.7
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import QtQuick.Dialogs 1.2
import "Settings/"

View File

@ -28,11 +28,14 @@ Window {
font.pixelSize: 29
onTextChanged: print("changed")
}
}
MouseArea {
anchors.fill: parent;
property variant clickPos: "1,1"
anchors.fill: parent;
onPressed: {
clickPos = Qt.point(mouse.x,mouse.y)

View File

@ -76,8 +76,11 @@ void InstalledListModel::loadScreens()
QFileInfoList list = QDir(m_absoluteStoragePath.toString()).entryInfoList(QDir::NoDotAndDotDot | QDir::AllDirs);
QString tmpPath;
for (auto&& item : list) {
tmpPath = m_absoluteStoragePath.toString() + "/" + item.baseName() + "/project.json";
if (!QFile(tmpPath).exists())
continue;
@ -89,11 +92,17 @@ void InstalledListModel::loadScreens()
if (!(parseError.error == QJsonParseError::NoError))
continue;
if(jsonProject.object().value("type").toString() == "scene")
continue;
append(jsonProject.object(), item.baseName());
}
QFuture<void> future = QtConcurrent::run([&]() {
});
}
QVariantMap InstalledListModel::get(QString folderId)

View File

@ -27,7 +27,6 @@ public:
// Basic functionality:
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
void append(const QJsonObject, const QString);
QHash<int, QByteArray> roleNames() const override;
bool getProjectByAbsoluteStoragePath(QUrl *path, ProjectFile* spf);
@ -51,6 +50,7 @@ public:
}
public slots:
void append(const QJsonObject, const QString);
void setabsoluteStoragePath(QUrl absoluteStoragePath)
{
if (m_absoluteStoragePath == absoluteStoragePath)

View File

@ -1,8 +1,16 @@
#include "steamworkshoplistmodel.h"
SteamWorkshopListModel::SteamWorkshopListModel(QObject *parent)
SteamWorkshopListModel::SteamWorkshopListModel(QObject* parent)
: QAbstractListModel(parent)
{
// m_workshopItemList.append(QSharedPointer<WorkshopItem>(new WorkshopItem(1,"WoW Malstrom Full 3h Animated Low-CPU 4k-HDR",
// QUrl("http://media.blizzard.com/wow/media/artwork/wow-cataclysm/loadscreen-maelstrom-full.jpg"))));
// for (int i = 0; i < 50;i++) {
// m_workshopItemList.append(QSharedPointer<WorkshopItem>(new WorkshopItem(1, "title",
// QUrl("http://media.blizzard.com/wow/media/artwork/wow-cataclysm/loadscreen-maelstrom-full.jpg"))));
// }
}

View File

@ -3,6 +3,7 @@
#include <QString>
#include <QUrl>
#include <QtDebug>
class WorkshopItem {
public: