This commit is contained in:
Andrei Yankovich 2020-06-22 13:51:28 +03:00
parent 708591b6a8
commit e587812c9f
4 changed files with 8 additions and 7 deletions

@ -1 +1 @@
Subproject commit f4dc253d2fa449a42ac88f194505cebd1482575b Subproject commit b7d04a770c044da43567ff4087092df3ec818cb4

View File

@ -3,7 +3,7 @@
#include <quasarapp.h> #include <quasarapp.h>
MainModel::MainModel(QObject *parent) : QObject(parent) { MainModel::MainModel(QObject *parent) : QObject(parent) {
setListModel(new BaseFront::ListViewModel(this)); setListModel(new ViewSolutions::ListViewModel(this));
initQuasarApp(); initQuasarApp();
} }
@ -47,7 +47,7 @@ QObject *MainModel::listModel() const {
} }
void MainModel::setListModel(QObject *listModel) { void MainModel::setListModel(QObject *listModel) {
auto model = dynamic_cast<BaseFront::ListViewModel*>(listModel); auto model = dynamic_cast<ViewSolutions::ListViewModel*>(listModel);
if (!model || _listModel == model) if (!model || _listModel == model)
return; return;
@ -60,7 +60,7 @@ void MainModel::initQuasarApp() {
return; return;
} }
_QuasarAppPage = new QList<BaseFront::InfoBlock*>(); _QuasarAppPage = new QList<QObject*>();
auto block = new BaseFront::InfoBlock(this); auto block = new BaseFront::InfoBlock(this);
_QuasarAppPage->push_back(block); _QuasarAppPage->push_back(block);

View File

@ -2,6 +2,7 @@
#define MAINPAGE_H #define MAINPAGE_H
#include <QObject> #include <QObject>
#include <infoblock.h>
#include <listviewmodel.h> #include <listviewmodel.h>
enum class Languages { enum class Languages {
@ -31,8 +32,8 @@ signals:
private: private:
void initQuasarApp(); void initQuasarApp();
QList<BaseFront::InfoBlock*> * _QuasarAppPage = nullptr; QList<QObject*> * _QuasarAppPage = nullptr;
BaseFront::ListViewModel *_listModel = nullptr; ViewSolutions::ListViewModel *_listModel = nullptr;
}; };
#endif // MAINPAGE_H #endif // MAINPAGE_H

View File

@ -17,7 +17,7 @@ ListView {
anchors.rightMargin: 40 anchors.rightMargin: 40
delegate: Component { delegate: Component {
ViewPortGradientPage { ViewPortGradientPage {
property var data: block property var data: modelData
scrollPos: viewPort.globalPos scrollPos: viewPort.globalPos
source: (data)? data.bakcBroundPicture: "" source: (data)? data.bakcBroundPicture: ""
viewPortDelegatW: viewPort.width viewPortDelegatW: viewPort.width