Добавлен кастомный диалог при переходе

This commit is contained in:
Станислав Хозяенок 2025-05-21 11:00:07 +07:00
parent 471fe59b72
commit eb6152cb8a
46 changed files with 1371 additions and 491 deletions

1
ArrDifferentTypes.cpp Normal file
View File

@ -0,0 +1 @@
#include "ArrDifferentTypes.h"

View File

@ -1,5 +1,5 @@
#ifndef QUICKUPDATER_H
#define QUICKUPDATER_H
#ifndef ARRDIFFERENTTYPES_H
#define ARRDIFFERENTTYPES_H
#include <QObject>
#include <QQmlEngine>
@ -16,7 +16,9 @@ class ArrDifferentTypes : public QObject
public:
explicit ArrDifferentTypes(QObject *parent = nullptr) : QObject(parent) {}
~ArrDifferentTypes() override {
qDebug() << "ArrDifferentTypes object is being destroyed:" << this;
}
QList<QVariant> getArrDifferentTypes() const { return arrDifferentTypes; }
void setArrDifferentTypes(const QList<QVariant> &arr) {
if (arrDifferentTypes != arr) {
@ -38,4 +40,4 @@ private:
QList<QVariant> arrDifferentTypes;
};
#endif // QUICKUPDATER_H
#endif // ARRDIFFERENTTYPES_H

View File

@ -36,7 +36,12 @@ qt_add_qml_module(appQtQuckApp
SOURCES FigmaQmlNames.h
SOURCES settingsrepository.h settingsrepository.cpp
SOURCES settingspageactivity.h settingspageactivity.cpp
SOURCES quickupdater.h quickupdater.cpp
SOURCES ArrDifferentTypes.h ArrDifferentTypes.cpp
SOURCES FigmaStyles.h
QML_FILES qml/SaveChangesDialog.qml
SOURCES interfaces/IPageActivity.h
SOURCES
SOURCES models/settingspagemodel.h models/settingspagemodel.cpp
)
# Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.

View File

@ -1,5 +1,6 @@
#ifndef FIGMAQMLNAMES_H
#define FIGMAQMLNAMES_H
namespace QML{
namespace Windows{
constexpr const char * MAIN= "pages/FigmaQmlInterface/qml/TestPage_MainWindow2_figma.qml";

14
FigmaStyles.h Normal file
View File

@ -0,0 +1,14 @@
#ifndef FIGMASTYLES_H
#define FIGMASTYLES_H
#include "QColor"
namespace QML {
const QColor CORLOR_MENU_ITEM_SELECTED(qRgb(222,222,222));
const QColor CORLOR_MENU_ITEM_BASE(qRgba(255,255,255,0));
const QColor CORLOR_BUTTON_DISABLED(qRgb(252,251,252));
const QColor CORLOR_BUTTON_BASE(qRgb(139,110,245));
const QColor CORLOR_BUTTON_FOCUSED(qRgb(161,140,238));
}
#endif // FIGMASTYLES_H

4
IPageActivity.h Normal file
View File

@ -0,0 +1,4 @@
#ifndef IPAGEACTIVITY_H
#define IPAGEACTIVITY_H
#endif // IPAGEACTIVITY_H

View File

@ -3,13 +3,16 @@ import QtQuick.Controls
import QtQuick.Window
import FigmaQmlInterface
Window {
ApplicationWindow {
id: rootWindow
width: 1600
height: 900
visible: true
// flags: Qt.Window | Qt.FramelessWindowHint // Убираем рамку и заголовок
//flags: Qt.Window | Qt.MSWindowsFixedSizeDialogHint
minimumWidth: width // Фиксированная ширина
maximumWidth: width
minimumHeight: height
maximumHeight: height
flags: Qt.Window | Qt.WindowTitleHint | Qt.WindowCloseButtonHint | Qt.WindowMinimizeButtonHint
color: "transparent" // Прозрачный фон (если нужно)
title: "Заголовок" // Пустой заголовок

View File

@ -6,21 +6,21 @@
class CallbackWrapper : public QObject {
Q_OBJECT
Q_PROPERTY(QString name READ name WRITE setName FINAL)
// Q_PROPERTY(QString name READ name WRITE setName FINAL)
QML_ELEMENT
public:
explicit CallbackWrapper(std::function<void()> callback, QObject* parent = nullptr)
: QObject(parent), m_callback(std::move(callback)) {}
QString name() const {return m_name;}
void setName(const QString &name) {m_name = name;}
// QString name() const {return m_name;}
// void setName(const QString &name) {m_name = name;}
Q_INVOKABLE void invoke() {
if (m_callback) m_callback();
}
private:
QString m_name;
// QString m_name;
std::function<void()> m_callback;
};
#endif // CALLBACKWRAPPER_H

View File

@ -10,6 +10,7 @@ void DynamicLoader::createComponent(const QString& qmlFile, QQuickItem* parentIt
QQmlComponent component(m_engine, QUrl(qmlFile));
if (component.isError()) {
qDebug()<<"Error create component:" << component.errorString();
emit errorOccurred(component.errorString());
return;
}
@ -38,3 +39,27 @@ void DynamicLoader::createComponent(const QString& qmlFile, QQuickItem* parentIt
}
emit componentCreated(item);
}
void DynamicLoader::createComponentObject(const QString& qmlFile, QObject **createdComponent)
{
QQmlComponent component(m_engine, QUrl(qmlFile));
if (component.isError()) {
qDebug()<<"Error create component:" << component.errorString();
emit errorOccurred(component.errorString());
return;
}
QObject* object = component.create();
if (!object) {
emit errorOccurred("Failed to create object");
return;
}
// object->setParent(parentItem);
if (createdComponent) {
*createdComponent = object;
}
// emit componentCreated(object);
}

View File

@ -13,6 +13,7 @@ public:
Q_INVOKABLE void createComponent(const QString& qmlFile, QQuickItem* parentItem, QQuickItem **createdComponent = 0);
void createComponentObject(const QString &qmlFile, QObject **createdComponent);
signals:
void componentCreated(QQuickItem* item);
void errorOccurred(const QString& message);

View File

@ -14,6 +14,7 @@
#include "mainpagepresentor.h"
#include "settingspageactivity.h"
#include "settingsrepository.h"
#include "FigmaStyles.h"
const char * HOME_ITEM = "HomeItem";
const char * PROJECT_ITEM = "ProjectsItem";
@ -29,16 +30,43 @@ FigmaAdapter::FigmaAdapter(void * figmaQtInstance, QQmlApplicationEngine &engine
loader = new DynamicLoader(&engine,this);
connect(loader,&DynamicLoader::componentCreated, this, &FigmaAdapter::componentCreated);
connect(loader,&DynamicLoader::errorOccurred, this, &FigmaAdapter::errorOccurred);
saveSettingClickCallback = [this]{saveSettingClick();};
}
void FigmaAdapter::Init()
{
QObject *rootObject = engine.rootObjects().first();
updateElement(rootObject, HOME_ITEM, QuickHelper::addMouseArea, [this] {homeItemClick();});
updateElement(rootObject, PROJECT_ITEM, QuickHelper::addMouseArea, [this] {projectsItemClick();});
updateElement(rootObject, SETTINGS_ITEM, QuickHelper::addMouseArea, [this] {settingsItemClick();});
updateElement(rootObject, CLOSE_ITEM, QuickHelper::addMouseArea, [this] {closeItemClick();});
updateElement(rootObject, HOME_ITEM, [this](QObject* rootObject, std::function<void()> onClickAction){
QuickHelper::addMouseAreaElements(rootObject,
[this]{ homeItemClick();},
[this,rootObject]{headerEntered((QQuickItem*)rootObject);},
[this,rootObject]{headerExited((QQuickItem*)rootObject);}
);
},0);
updateElement(rootObject, PROJECT_ITEM, [this](QObject* rootObject, std::function<void()> onClickAction){
QuickHelper::addMouseAreaElements(rootObject,
[this]{ projectsItemClick();},
[this,rootObject]{headerEntered((QQuickItem*)rootObject);},
[this,rootObject]{headerExited((QQuickItem*)rootObject);}
);
},0);
updateElement(rootObject, SETTINGS_ITEM, [this](QObject* rootObject, std::function<void()> onClickAction){
QuickHelper::addMouseAreaElements(rootObject,
[this]{ settingsItemClick();},
[this,rootObject]{headerEntered((QQuickItem*)rootObject);},
[this,rootObject]{headerExited((QQuickItem*)rootObject);}
);
},0);
updateElement(rootObject, CLOSE_ITEM, [this](QObject* rootObject, std::function<void()> onClickAction){
QuickHelper::addMouseAreaElements(rootObject,
[this]{ closeItemClick();},
[this,rootObject]{headerEntered((QQuickItem*)rootObject);},
[this,rootObject]{headerExited((QQuickItem*)rootObject);}
);
},0);
labelAvailibleSizeButton = QuickHelper::getQuickItem(rootObject, LABEL_AVAILIBLE_SIZE);
rectAvailibleSize = QuickHelper::getQuickItem(rootObject, RECT_AVAILIBLE_SIZE_BAR);
@ -72,7 +100,8 @@ void FigmaAdapter::homeItemClick()
MainPageActivity * mainPageActivity = 0;
if (rootObject && mainViewItem) {
mainPageActivity = new MainPageActivity(mainViewItem,mainPage);
mainPageActivity = new MainPageActivity(mainViewItem,mainPage);
activity = mainPageActivity;
}
MainPagePresentor *presentor = new MainPagePresentor(mainPageActivity, mainPage);
@ -101,7 +130,8 @@ void FigmaAdapter::settingsItemClick()
SettingsPageActivity * settingsPageActivity = 0;
if (rootObject && mainViewItem) {
settingsPageActivity = new SettingsPageActivity(mainViewItem, settingsPage);
settingsPageActivity = new SettingsPageActivity(mainViewItem,saveSettingClickCallback, settingsPage);
activity = settingsPageActivity;
}
}
@ -117,9 +147,11 @@ void FigmaAdapter::loadPage(const QString& pageName)
QString page = DEFAULT_PAGE_PATH + pageName;
auto updateFunc = [this, page](QObject* rootObject, std::function<void()>){
QQuickItem* parentItem = qobject_cast<QQuickItem*>(rootObject);
auto updateFunc = [this, page](QObject* rootObject, std::function<void()>) {
// std::function<void()> d;
// doActionOnSuccess
doActionOnSuccessAllowChangePaged = [this, rootObject,page]{
QQuickItem* parentItem = qobject_cast<QQuickItem*>(rootObject);
Helper::clearChildren(parentItem);
@ -129,12 +161,29 @@ void FigmaAdapter::loadPage(const QString& pageName)
}
QQmlEngine* engine = qmlEngine(rootObject);
if (!engine) {
qWarning() << "[C++] Failed to get QQmlEngine";
return;
}
loader->createComponent(page , parentItem);
QQuickItem *createdComponent = 0;
loader->createComponent(page , parentItem, &createdComponent);
if (createdComponent) {
if (activity) {
activity->pageChanged();
activity = 0;
}
}
};
doActionOnBlockAllowChangePaged = []{};
if (activity) {
activity->isAllowChangePage(doActionOnSuccessAllowChangePaged,doActionOnBlockAllowChangePaged);
} else {
doActionOnSuccessAllowChangePaged();
}
};
updateElement(rootObject,"MainView", updateFunc, 0);
@ -159,42 +208,54 @@ quint64 getFreeDiskSpace(const QString &path)
return storage.bytesAvailable(); // свободное место в байтах
}
// #include <QQuickText>
// #include <private/qquicktextnode_p.h>
void FigmaAdapter::updateStorageInfo()
{
QString path = SettingsRepository::instance().defaultProjectDirectory();
if (path == ""){
if (componentLabelAvailibleSize) {
componentLabelAvailibleSize->setVisible(false);
QuickHelper::addMouseAreaElements(componentLabelAvailibleSize->parent(),
[this]{settingsItemClick();},
[this]{headerEntered((QQuickItem*)componentLabelAvailibleSize->parent());},
[this]{headerExited((QQuickItem*)componentLabelAvailibleSize->parent());}
);
}
if (rectAvailibleSize){
rectAvailibleSize->setVisible(false);
}
if (labelAvailibleSizeButton) {
labelAvailibleSizeButton->setProperty("text", "Хранилище не задано");
const QMetaObject *metaObject = labelAvailibleSizeButton->metaObject();
int enumIndex = metaObject->indexOfEnumerator("FontSizeMode");
QMetaEnum metaEnum = metaObject->enumerator(enumIndex);
// Получаем числовое значение нужного enum
int horizontalFitValue = metaEnum.keyToValue("HorizontalFit");
// Устанавливаем свойство fontSizeMode
labelAvailibleSizeButton->setProperty("fontSizeMode", horizontalFitValue);
if (rectPassedBar){
rectPassedBar->setVisible(false);
}
if (labelAvailibleSizeButton) {
labelAvailibleSizeButton->setProperty("text", "Хранилище не задано");
QuickHelper::setPorpetryEnumerator(
labelAvailibleSizeButton,"FontSizeMode", "fontSizeMode", "HorizontalFit"
);
}
return;
}
quint64 freeBytes = getFreeDiskSpace(path);
QString numberFormat = QString::number(freeBytes / (1024 * 1024 * 1024),'g', 2);
QString numberFormat = QString::number(freeBytes / (1024.0 * 1024.0 * 1024.0), 'f', 2);
if (labelAvailibleSizeButton) {
labelAvailibleSizeButton->setProperty("text", numberFormat + " Гб");
}
}
void FigmaAdapter::saveSettingClick()
{
qDebug()<< "FigmaAdapter::saveSettingClick";
}
void FigmaAdapter::eventReceived(const QString &element, const QString &event)
{
qDebug() << "event: "<< event << " element: " << element;
@ -210,6 +271,21 @@ void FigmaAdapter::errorOccurred(const QString &message)
qDebug()<< message;
}
void FigmaAdapter::headerEntered(QQuickItem *item)
{
if (item->isEnabled()) {
item->setProperty("color", QML::CORLOR_MENU_ITEM_SELECTED);
}
}
void FigmaAdapter::headerExited(QQuickItem *item)
{
if (item->isEnabled()) {
item->setProperty("color", QML::CORLOR_MENU_ITEM_BASE);
}
}
void FigmaAdapter::Helper::clearChildren(QQuickItem *parentItem)
{
const auto children = parentItem->children();
@ -219,6 +295,7 @@ void FigmaAdapter::Helper::clearChildren(QQuickItem *parentItem)
for (QObject* child : children) {
if (QQuickItem* item = qobject_cast<QQuickItem*>(child)) {
item->setParentItem(nullptr);
item->setParent(nullptr);
item->deleteLater();
}
}

View File

@ -3,6 +3,7 @@
#include <QObject>
#include <QQmlApplicationEngine>
#include "interfaces/IPageActivity.h"
class DynamicLoader;
class QQuickItem;
@ -15,6 +16,9 @@ class FigmaAdapter : public QObject
private:
void * figmaAdapter;
QQmlApplicationEngine &engine;
std::function<void()> saveSettingClickCallback;
std::function<void()> doActionOnSuccessAllowChangePaged;
std::function<void()> doActionOnBlockAllowChangePaged;
public:
explicit FigmaAdapter(void * figmaQtInstance, QQmlApplicationEngine &engine, QObject *parent = nullptr);
@ -29,8 +33,6 @@ private:
std::function<void()> onClick
);
// void addMouseAreaWithClickAction(QObject *rootObject, std::function<void ()> onClickAction);
// handler clicks
void homeItemClick();
void projectsItemClick();
@ -38,6 +40,8 @@ private:
void closeItemClick();
void loadPage(const QString& pageName);
void updateStorageInfo();
void saveSettingClick();
class Helper {
public:
static void clearChildren(QQuickItem* parentItem);
@ -61,13 +65,17 @@ private:
const QString MAIN_PAGE = "TestPage_MainPage2_figma.qml";
const QString SETTINS_PAGE = "TestPage_SettingsPage2_figma.qml";
const QString PROJECTS_PAGE = "TestPage_ProjectPage2_figma.qml";
private:
IPageActivity *activity = 0;
public slots:
void eventReceived(const QString& element, const QString& event);
private slots:
void componentCreated(QQuickItem* item);
void errorOccurred(const QString& message);
void headerEntered(QQuickItem*item);
void headerExited(QQuickItem*item);
};

View File

@ -0,0 +1,12 @@
#ifndef IPAGEACTIVITY_H
#define IPAGEACTIVITY_H
#include <functional>
class IPageActivity {
public:
virtual void pageChanged() = 0;
virtual void isAllowChangePage(const std::function<void()> &continueChange, const std::function<void()> &blockChange) = 0;
};
#endif // IPAGEACTIVITY_H

View File

@ -6,38 +6,39 @@
#include "FigmaQmlInterface.hpp"
QQmlApplicationEngine *engine=0;
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
engine = new QQmlApplicationEngine();
// QApplication app(argc, argv);
QQmlApplicationEngine engine;
QObject::connect(
&engine,
engine,
&QQmlApplicationEngine::objectCreationFailed,
&app,
[]() { QCoreApplication::exit(-1); },
Qt::QueuedConnection);
FigmaQmlInterface::registerFigmaQmlSingleton(engine);
FigmaQmlInterface::registerFigmaQmlSingleton(*engine);
for (const auto &path : engine.importPathList()) {
for (const auto &path : engine->importPathList()) {
qDebug() << " - " << path;
}
engine.addImportPath("qrc:/");
engine.addImportPath(QCoreApplication::applicationDirPath() + "/qml");
engine.addImportPath(QCoreApplication::applicationDirPath() + "/qml");
engine->addImportPath("qrc:/");
engine->addImportPath(QCoreApplication::applicationDirPath() + "/qml");
engine->addImportPath(QCoreApplication::applicationDirPath() + "/qml");
FigmaQmlSingleton * instance = FigmaQmlSingleton::instance(engine);
FigmaQmlSingleton * instance = FigmaQmlSingleton::instance(*engine);
FigmaAdapter * figmaAdapter = 0;
if (instance) {
figmaAdapter = new FigmaAdapter(instance, engine);
figmaAdapter = new FigmaAdapter(instance, *engine);
}
qDebug() << "Before";
engine.loadFromModule("QtQuckApp", "Main");
engine->loadFromModule("QtQuckApp", "Main");
if (figmaAdapter) {
figmaAdapter->Init();

View File

@ -8,6 +8,7 @@
#include "dynamicloader.h"
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include "FigmaStyles.h"
MainPageActivity::MainPageActivity(QQuickItem * item, QObject *parent)
: QObject{parent}, root(item)
@ -34,6 +35,11 @@ void MainPageActivity::setProjectName(QString name)
projectNameTextField->setProperty("text",name);
}
void MainPageActivity::pageChanged()
{
}
bool MainPageActivity::isVariablesSet(){
bool ret_code = false; // Флаг ошибки
@ -99,12 +105,34 @@ void MainPageActivity::init() {
void MainPageActivity::setInitialView() {
listFilesItem = 0;
loader->createComponent("QtQuckApp/qml/ScrollableTextList.qml", columnLeft, &listFilesItem);
QuickHelper::addMouseArea(buttonChooseFiles,[this] {handleChooseFiles();});
QuickHelper::addMouseAreaElements(buttonChooseFiles,
[this] {handleChooseFiles();},
[this]{buttonEntered(buttonChooseFiles);},
[this]{buttonExited(buttonChooseFiles);});
setColumnCenteTranslate();
setDefaultValues();
blockTranslate();
}
void MainPageActivity::buttonEntered(QQuickItem * item){
if (item->isEnabled()) {
item->setProperty("color", QML::CORLOR_BUTTON_FOCUSED);
}
}
void MainPageActivity::buttonExited(QQuickItem * item){
if (item->isEnabled()) {
item->setProperty("color", QML::CORLOR_BUTTON_BASE);
}
}
void MainPageActivity::isAllowChangePage(const std::function<void ()> &continueChange, const std::function<void ()> &blockChange)
{
continueChange();
}
void MainPageActivity::setDefaultValues()
{
if (projectNameTextField){
@ -132,12 +160,16 @@ void MainPageActivity::setColumnCenteTranslate(){
}
if (transformButton) {
QuickHelper::addMouseArea(transformButton,[this]{translateClick();});
QuickHelper::addMouseAreaElements(transformButton,
[this] {handleChooseFiles();},
[this]{buttonEntered(transformButton);},
[this]{buttonExited(transformButton);});
auto defaultColor = transformButton->property("color").toString();
//auto newColor = "enabled ? \" + defaultColor + \" : \"black\"";//lightgray
// auto newColor = "enabled ? \" + lightblue + \" : \"black\"";//lightgray
// transformButton->setProperty("color",newColor);
QuickHelper::updateColor(transformButton, qRgb(255,0,0),qRgb(0,255,0));
QuickHelper::updateColor(transformButton, QML::CORLOR_BUTTON_DISABLED, QML::CORLOR_BUTTON_BASE);
}
if (projectNameTextField) {

View File

@ -2,18 +2,20 @@
#define MAINPAGEACTIVITY_H
#include <QObject>
#include "interfaces/IPageActivity.h"
class QQuickItem;
class DynamicLoader;
class QQmlEngine;
class MainPageActivity : public QObject
class MainPageActivity : public QObject, public IPageActivity
{
Q_OBJECT
public:
explicit MainPageActivity(QQuickItem * item, QObject *parent = nullptr);
void setProjectName(QString name);
void pageChanged() override final;
private:
QQuickItem * root;
@ -21,6 +23,7 @@ private:
QQmlEngine * engine;
const QString BUTTON_CHOOSE_FILES = "ButtonChooseFiles";
QQuickItem * buttonChooseFiles = 0;
@ -63,6 +66,8 @@ private:
void setColumnCenteTranslate();
void buttonEntered(QQuickItem *item);
void buttonExited(QQuickItem *item);
public:
QQuickItem* getButtonChooseFiles() const { return buttonChooseFiles; }
QQuickItem* getContentMainPageTransform() const { return contentMainPageTransform; }
@ -73,6 +78,8 @@ public:
QQuickItem* getTransformButton() const { return transformButton; }
QQuickItem* getProjectNameTextField() const { return projectNameTextField; }
void isAllowChangePage(const std::function<void()> &continueChange, const std::function<void()> &blockChange) override final;
public slots:
void listFilePathSet(QVariant);
private slots:

View File

@ -0,0 +1,17 @@
#include "settingspagemodel.h"
SettingsPageModel::SettingsPageModel(QObject *parent)
: QObject{parent}
{}
SettingsPageModel::~SettingsPageModel(){
qDebug() << "SettingsPageModel destryoed " << this;
}
QString SettingsPageModel::projectPath() const {return m_projectPath;}
void SettingsPageModel::setProjectPath(const QString &projectPath) {m_projectPath = projectPath;}
QString SettingsPageModel::remoteAddressUri() const {return m_remoteAddressUri;}
void SettingsPageModel::setRemoteAddressUri(const QString &projectPath) {m_remoteAddressUri = projectPath;}

View File

@ -0,0 +1,29 @@
#ifndef SETTINGSPAGEMODEL_H
#define SETTINGSPAGEMODEL_H
#include<QObject>
#include<QQmlEngine>
class SettingsPageModel : public QObject
{
Q_OBJECT
Q_PROPERTY(QString projectPath READ projectPath WRITE setProjectPath FINAL)
Q_PROPERTY(QString remoteAddressUri READ remoteAddressUri WRITE setRemoteAddressUri FINAL)
QML_ELEMENT
public:
explicit SettingsPageModel(QObject *parent = nullptr);
~SettingsPageModel() override;
QString projectPath() const;
void setProjectPath(const QString &projectPath);
QString remoteAddressUri() const;
void setRemoteAddressUri(const QString &projectPath);
private:
QString m_projectPath = "";
QString m_remoteAddressUri = "";
signals:
};
#endif // SETTINGSPAGEMODEL_H

View File

@ -85,7 +85,7 @@ Rectangle {
onDelegate_98_58_widthChanged: {if(i_delegate_98_58 && i_delegate_98_58.width != delegate_98_58_width) i_delegate_98_58.width = delegate_98_58_width;}
property real delegate_98_58_height: NaN
onDelegate_98_58_heightChanged: {if(i_delegate_98_58 && i_delegate_98_58.height != delegate_98_58_height) i_delegate_98_58.height = delegate_98_58_height;}
property Component delegate_98_59: LabelHeaderComponentH2_bold20_figma {
property Component delegate_98_59: LabelHeaderComponentH2_bold46_figma {
// component (Instance) level: 0 LabelHeaderComponentH2-bold
id: figma_98_59
// # "LabelHeaderComponentH2-bold"

View File

@ -85,7 +85,7 @@ Rectangle {
onDelegate_98_55_widthChanged: {if(i_delegate_98_55 && i_delegate_98_55.width != delegate_98_55_width) i_delegate_98_55.width = delegate_98_55_width;}
property real delegate_98_55_height: NaN
onDelegate_98_55_heightChanged: {if(i_delegate_98_55 && i_delegate_98_55.height != delegate_98_55_height) i_delegate_98_55.height = delegate_98_55_height;}
property Component delegate_98_56: LabelHeaderComponentH2_bold20_figma {
property Component delegate_98_56: LabelHeaderComponentH2_bold46_figma {
// component (Instance) level: 0 LabelHeaderComponentH2-bold
id: figma_98_56
// # "LabelHeaderComponentH2-bold"

View File

@ -0,0 +1,64 @@
//Generated by FigmaQML 3.2.1
import QtQuick
import QtQuick.Effects
import QtQuick.Shapes
import QtQuick.Controls
import QtQuick.Shapes
import FigmaQmlInterface
Rectangle {
// component (Instance) level: 0 HeaderValueComponent
id: figma_269_178
// # "HeaderValueComponent"
objectName:"HeaderValueComponent"
x:0
y:0
width:54
height:13
color:"#00ffffff"
clip: false
property Component delegate_269_179: Text {
// component (Instance) level: 0 Label
id: figma_269_179
// # "Label"
objectName:"Label"
x:0
y:0
width:54
height:13
color:"#ff7d7e82"
wrapMode: TextEdit.WordWrap
text:"Свободно"
font.family: "Tahoma"
font.italic: false
font.letterSpacing: 0
font.pixelSize: 11
font.weight: Font.Normal
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignTop
}
property Item i_delegate_269_179
property matrix4x4 delegate_269_179_transform: Qt.matrix4x4(Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,)
onDelegate_269_179_transformChanged: {if(i_delegate_269_179 && i_delegate_269_179.transform != delegate_269_179_transform) i_delegate_269_179.transform = delegate_269_179_transform;}
property real delegate_269_179_x: NaN
onDelegate_269_179_xChanged: {if(i_delegate_269_179 && i_delegate_269_179.x != delegate_269_179_x) i_delegate_269_179.x = delegate_269_179_x;}
property real delegate_269_179_y: NaN
onDelegate_269_179_yChanged: {if(i_delegate_269_179 && i_delegate_269_179.y != delegate_269_179_y) i_delegate_269_179.y = delegate_269_179_y;}
property real delegate_269_179_width: NaN
onDelegate_269_179_widthChanged: {if(i_delegate_269_179 && i_delegate_269_179.width != delegate_269_179_width) i_delegate_269_179.width = delegate_269_179_width;}
property real delegate_269_179_height: NaN
onDelegate_269_179_heightChanged: {if(i_delegate_269_179 && i_delegate_269_179.height != delegate_269_179_height) i_delegate_269_179.height = delegate_269_179_height;}
Component.onCompleted: {
const o_delegate_269_179 = {}
if(!isNaN(delegate_269_179_transform.m11)) o_delegate_269_179['transform'] = delegate_269_179_transform;
if(!isNaN(delegate_269_179_x)) o_delegate_269_179['x'] = delegate_269_179_x;
if(!isNaN(delegate_269_179_y)) o_delegate_269_179['y'] = delegate_269_179_y;
if(!isNaN(delegate_269_179_width)) o_delegate_269_179['width'] = delegate_269_179_width;
if(!isNaN(delegate_269_179_height)) o_delegate_269_179['height'] = delegate_269_179_height;
i_delegate_269_179 = delegate_269_179.createObject(this, o_delegate_269_179)
delegate_269_179_x = Qt.binding(()=>i_delegate_269_179.x)
delegate_269_179_y = Qt.binding(()=>i_delegate_269_179.y)
delegate_269_179_width = Qt.binding(()=>i_delegate_269_179.width)
delegate_269_179_height = Qt.binding(()=>i_delegate_269_179.height)
}
}

View File

@ -73,7 +73,6 @@ PathLine { x: 226; y: 0 }
PathLine { x: 226; y: -0.5 }
PathLine { x: 5; y: -0.5 }
PathLine { x: 5; y: 0 }
PathLine { x: 5; y: 0 }
PathMove { x: 231; y: 5 }
PathLine { x: 230.5; y: 5 }
PathLine { x: 230.5; y: 18 }
@ -81,7 +80,6 @@ PathLine { x: 231; y: 18 }
PathLine { x: 231.5; y: 18 }
PathLine { x: 231.5; y: 5 }
PathLine { x: 231; y: 5 }
PathLine { x: 231; y: 5 }
PathMove { x: 226; y: 23 }
PathLine { x: 226; y: 22.5 }
PathLine { x: 5; y: 22.5 }
@ -89,7 +87,6 @@ PathLine { x: 5; y: 23 }
PathLine { x: 5; y: 23.5 }
PathLine { x: 226; y: 23.5 }
PathLine { x: 226; y: 23 }
PathLine { x: 226; y: 23 }
PathMove { x: 0; y: 18 }
PathLine { x: 0.5; y: 18 }
PathLine { x: 0.5; y: 5 }
@ -97,7 +94,6 @@ PathLine { x: 0; y: 5 }
PathLine { x: -0.5; y: 5 }
PathLine { x: -0.5; y: 18 }
PathLine { x: 0; y: 18 }
PathLine { x: 0; y: 18 }
PathMove { x: 5; y: 23 }
PathLine { x: 5; y: 22.5 }
PathCubic { control1X: 2.51472; control1Y: 22.5; control2X: 0.5; control2Y: 20.4853; x: 0.5; y: 18 }
@ -105,7 +101,6 @@ PathLine { x: 0; y: 18 }
PathLine { x: -0.5; y: 18 }
PathCubic { control1X: -0.5; control1Y: 21.0376; control2X: 1.96243; control2Y: 23.5; x: 5; y: 23.5 }
PathLine { x: 5; y: 23 }
PathLine { x: 5; y: 23 }
PathMove { x: 231; y: 18 }
PathLine { x: 230.5; y: 18 }
PathCubic { control1X: 230.5; control1Y: 20.4853; control2X: 228.485; control2Y: 22.5; x: 226; y: 22.5 }
@ -113,7 +108,6 @@ PathLine { x: 226; y: 23 }
PathLine { x: 226; y: 23.5 }
PathCubic { control1X: 229.038; control1Y: 23.5; control2X: 231.5; control2Y: 21.0376; x: 231.5; y: 18 }
PathLine { x: 231; y: 18 }
PathLine { x: 231; y: 18 }
PathMove { x: 226; y: 0 }
PathLine { x: 226; y: 0.5 }
PathCubic { control1X: 228.485; control1Y: 0.5; control2X: 230.5; control2Y: 2.51472; x: 230.5; y: 5 }
@ -121,7 +115,6 @@ PathLine { x: 231; y: 5 }
PathLine { x: 231.5; y: 5 }
PathCubic { control1X: 231.5; control1Y: 1.96243; control2X: 229.038; control2Y: -0.5; x: 226; y: -0.5 }
PathLine { x: 226; y: 0 }
PathLine { x: 226; y: 0 }
PathMove { x: 5; y: 0 }
PathLine { x: 5; y: -0.5 }
PathCubic { control1X: 1.96243; control1Y: -0.5; control2X: -0.5; control2Y: 1.96243; x: -0.5; y: 5 }
@ -129,7 +122,6 @@ PathLine { x: 0; y: 5 }
PathLine { x: 0.5; y: 5 }
PathCubic { control1X: 0.5; control1Y: 2.51472; control2X: 2.51472; control2Y: 0.5; x: 5; y: 0.5 }
PathLine { x: 5; y: 0 }
PathLine { x: 5; y: 0 }
}}
TextField {
// component (Instance) level: 0 TextField

View File

@ -0,0 +1,64 @@
//Generated by FigmaQML 3.2.1
import QtQuick
import QtQuick.Effects
import QtQuick.Shapes
import QtQuick.Controls
import QtQuick.Shapes
import FigmaQmlInterface
Rectangle {
// component (Instance) level: 0 LabelHeaderComponentH2-bold
id: figma_269_147
// # "LabelHeaderComponentH2-bold"
objectName:"LabelHeaderComponentH2-bold"
x:0
y:0
width:171
height:31
color:"#00ffffff"
clip: false
property Component delegate_269_148: Text {
// component (Instance) level: 0 Label
id: figma_269_148
// # "Label"
objectName:"Label"
x:0
y:0
width:171
height:31
color:"#ff000000"
wrapMode: TextEdit.WordWrap
text:"Информация"
font.family: "Tahoma"
font.italic: false
font.letterSpacing: 0
font.pixelSize: 26
font.weight: Font.DemiBold
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignTop
}
property Item i_delegate_269_148
property matrix4x4 delegate_269_148_transform: Qt.matrix4x4(Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,)
onDelegate_269_148_transformChanged: {if(i_delegate_269_148 && i_delegate_269_148.transform != delegate_269_148_transform) i_delegate_269_148.transform = delegate_269_148_transform;}
property real delegate_269_148_x: NaN
onDelegate_269_148_xChanged: {if(i_delegate_269_148 && i_delegate_269_148.x != delegate_269_148_x) i_delegate_269_148.x = delegate_269_148_x;}
property real delegate_269_148_y: NaN
onDelegate_269_148_yChanged: {if(i_delegate_269_148 && i_delegate_269_148.y != delegate_269_148_y) i_delegate_269_148.y = delegate_269_148_y;}
property real delegate_269_148_width: NaN
onDelegate_269_148_widthChanged: {if(i_delegate_269_148 && i_delegate_269_148.width != delegate_269_148_width) i_delegate_269_148.width = delegate_269_148_width;}
property real delegate_269_148_height: NaN
onDelegate_269_148_heightChanged: {if(i_delegate_269_148 && i_delegate_269_148.height != delegate_269_148_height) i_delegate_269_148.height = delegate_269_148_height;}
Component.onCompleted: {
const o_delegate_269_148 = {}
if(!isNaN(delegate_269_148_transform.m11)) o_delegate_269_148['transform'] = delegate_269_148_transform;
if(!isNaN(delegate_269_148_x)) o_delegate_269_148['x'] = delegate_269_148_x;
if(!isNaN(delegate_269_148_y)) o_delegate_269_148['y'] = delegate_269_148_y;
if(!isNaN(delegate_269_148_width)) o_delegate_269_148['width'] = delegate_269_148_width;
if(!isNaN(delegate_269_148_height)) o_delegate_269_148['height'] = delegate_269_148_height;
i_delegate_269_148 = delegate_269_148.createObject(this, o_delegate_269_148)
delegate_269_148_x = Qt.binding(()=>i_delegate_269_148.x)
delegate_269_148_y = Qt.binding(()=>i_delegate_269_148.y)
delegate_269_148_width = Qt.binding(()=>i_delegate_269_148.width)
delegate_269_148_height = Qt.binding(()=>i_delegate_269_148.height)
}
}

View File

@ -0,0 +1,64 @@
//Generated by FigmaQML 3.2.1
import QtQuick
import QtQuick.Effects
import QtQuick.Shapes
import QtQuick.Controls
import QtQuick.Shapes
import FigmaQmlInterface
Rectangle {
// component (Instance) level: 0 LabelHeaderComponentH3
id: figma_269_166
// # "LabelHeaderComponentH3"
objectName:"LabelHeaderComponentH3"
x:0
y:0
width:110
height:20
color:"#00ffffff"
clip: false
property Component delegate_269_167: Text {
// component (Instance) level: 0 Label
id: figma_269_167
// # "Label"
objectName:"Label"
x:0
y:0
width:110
height:20
color:"#ff000000"
wrapMode: TextEdit.WordWrap
text:"Информация"
font.family: "Tahoma"
font.italic: false
font.letterSpacing: 0
font.pixelSize: 16
font.weight: Font.DemiBold
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignTop
}
property Item i_delegate_269_167
property matrix4x4 delegate_269_167_transform: Qt.matrix4x4(Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,Nan,)
onDelegate_269_167_transformChanged: {if(i_delegate_269_167 && i_delegate_269_167.transform != delegate_269_167_transform) i_delegate_269_167.transform = delegate_269_167_transform;}
property real delegate_269_167_x: NaN
onDelegate_269_167_xChanged: {if(i_delegate_269_167 && i_delegate_269_167.x != delegate_269_167_x) i_delegate_269_167.x = delegate_269_167_x;}
property real delegate_269_167_y: NaN
onDelegate_269_167_yChanged: {if(i_delegate_269_167 && i_delegate_269_167.y != delegate_269_167_y) i_delegate_269_167.y = delegate_269_167_y;}
property real delegate_269_167_width: NaN
onDelegate_269_167_widthChanged: {if(i_delegate_269_167 && i_delegate_269_167.width != delegate_269_167_width) i_delegate_269_167.width = delegate_269_167_width;}
property real delegate_269_167_height: NaN
onDelegate_269_167_heightChanged: {if(i_delegate_269_167 && i_delegate_269_167.height != delegate_269_167_height) i_delegate_269_167.height = delegate_269_167_height;}
Component.onCompleted: {
const o_delegate_269_167 = {}
if(!isNaN(delegate_269_167_transform.m11)) o_delegate_269_167['transform'] = delegate_269_167_transform;
if(!isNaN(delegate_269_167_x)) o_delegate_269_167['x'] = delegate_269_167_x;
if(!isNaN(delegate_269_167_y)) o_delegate_269_167['y'] = delegate_269_167_y;
if(!isNaN(delegate_269_167_width)) o_delegate_269_167['width'] = delegate_269_167_width;
if(!isNaN(delegate_269_167_height)) o_delegate_269_167['height'] = delegate_269_167_height;
i_delegate_269_167 = delegate_269_167.createObject(this, o_delegate_269_167)
delegate_269_167_x = Qt.binding(()=>i_delegate_269_167.x)
delegate_269_167_y = Qt.binding(()=>i_delegate_269_167.y)
delegate_269_167_width = Qt.binding(()=>i_delegate_269_167.width)
delegate_269_167_height = Qt.binding(()=>i_delegate_269_167.height)
}
}

View File

@ -1,23 +0,0 @@
//Generated by FigmaQML 3.2.1
import QtQuick
import QtQuick.Effects
import QtQuick.Shapes
import QtQuick.Controls
import QtQuick.Shapes
import FigmaQmlInterface
Rectangle {
// component (Instance) level: 0 ProgressBarComponent
id: figma_94_16
// # "ProgressBarComponent"
objectName:"ProgressBarComponent"
x:0
y:0
width:209
height:10
color: "transparent"
radius:5
clip: true
Component.onCompleted: {
}
}

View File

@ -120,7 +120,7 @@ Rectangle {
verticalAlignment: Text.AlignTop
}
}
InputComponent33_figma {
InputComponent27_figma {
// component (Instance) level: 0 InputComponent
id: figma_219_169
// # "InputComponent"
@ -172,7 +172,6 @@ PathLine { x: 226; y: 0 }
PathLine { x: 226; y: -0.5 }
PathLine { x: 5; y: -0.5 }
PathLine { x: 5; y: 0 }
PathLine { x: 5; y: 0 }
PathMove { x: 231; y: 5 }
PathLine { x: 230.5; y: 5 }
PathLine { x: 230.5; y: 18 }
@ -180,7 +179,6 @@ PathLine { x: 231; y: 18 }
PathLine { x: 231.5; y: 18 }
PathLine { x: 231.5; y: 5 }
PathLine { x: 231; y: 5 }
PathLine { x: 231; y: 5 }
PathMove { x: 226; y: 23 }
PathLine { x: 226; y: 22.5 }
PathLine { x: 5; y: 22.5 }
@ -188,7 +186,6 @@ PathLine { x: 5; y: 23 }
PathLine { x: 5; y: 23.5 }
PathLine { x: 226; y: 23.5 }
PathLine { x: 226; y: 23 }
PathLine { x: 226; y: 23 }
PathMove { x: 0; y: 18 }
PathLine { x: 0.5; y: 18 }
PathLine { x: 0.5; y: 5 }
@ -196,7 +193,6 @@ PathLine { x: 0; y: 5 }
PathLine { x: -0.5; y: 5 }
PathLine { x: -0.5; y: 18 }
PathLine { x: 0; y: 18 }
PathLine { x: 0; y: 18 }
PathMove { x: 5; y: 23 }
PathLine { x: 5; y: 22.5 }
PathCubic { control1X: 2.51472; control1Y: 22.5; control2X: 0.5; control2Y: 20.4853; x: 0.5; y: 18 }
@ -204,7 +200,6 @@ PathLine { x: 0; y: 18 }
PathLine { x: -0.5; y: 18 }
PathCubic { control1X: -0.5; control1Y: 21.0376; control2X: 1.96243; control2Y: 23.5; x: 5; y: 23.5 }
PathLine { x: 5; y: 23 }
PathLine { x: 5; y: 23 }
PathMove { x: 231; y: 18 }
PathLine { x: 230.5; y: 18 }
PathCubic { control1X: 230.5; control1Y: 20.4853; control2X: 228.485; control2Y: 22.5; x: 226; y: 22.5 }
@ -212,7 +207,6 @@ PathLine { x: 226; y: 23 }
PathLine { x: 226; y: 23.5 }
PathCubic { control1X: 229.038; control1Y: 23.5; control2X: 231.5; control2Y: 21.0376; x: 231.5; y: 18 }
PathLine { x: 231; y: 18 }
PathLine { x: 231; y: 18 }
PathMove { x: 226; y: 0 }
PathLine { x: 226; y: 0.5 }
PathCubic { control1X: 228.485; control1Y: 0.5; control2X: 230.5; control2Y: 2.51472; x: 230.5; y: 5 }
@ -220,7 +214,6 @@ PathLine { x: 231; y: 5 }
PathLine { x: 231.5; y: 5 }
PathCubic { control1X: 231.5; control1Y: 1.96243; control2X: 229.038; control2Y: -0.5; x: 226; y: -0.5 }
PathLine { x: 226; y: 0 }
PathLine { x: 226; y: 0 }
PathMove { x: 5; y: 0 }
PathLine { x: 5; y: -0.5 }
PathCubic { control1X: 1.96243; control1Y: -0.5; control2X: -0.5; control2Y: 1.96243; x: -0.5; y: 5 }
@ -228,7 +221,6 @@ PathLine { x: 0; y: 5 }
PathLine { x: 0.5; y: 5 }
PathCubic { control1X: 0.5; control1Y: 2.51472; control2X: 2.51472; control2Y: 0.5; x: 5; y: 0.5 }
PathLine { x: 5; y: 0 }
PathLine { x: 5; y: 0 }
}}
TextField {
// component (Instance) level: 1 ProjectTextField

View File

@ -18,7 +18,7 @@ Rectangle {
color: "transparent"
clip: true
LabelComponent22_figma {
LabelComponent20_figma {
// component (Instance) level: 0 ProgressTransformLabelItem
id: figma_94_98
// # "ProgressTransformLabelItem"
@ -68,25 +68,21 @@ PathLine { x: 0; y: -2 }
PathLine { x: -2; y: -2 }
PathLine { x: -2; y: 0 }
PathLine { x: 0; y: 0 }
PathLine { x: 0; y: 0 }
PathMove { x: 249; y: 0 }
PathLine { x: 251; y: 0 }
PathLine { x: 251; y: -2 }
PathLine { x: 249; y: -2 }
PathLine { x: 249; y: 0 }
PathLine { x: 249; y: 0 }
PathMove { x: 249; y: 22 }
PathLine { x: 249; y: 24 }
PathLine { x: 251; y: 24 }
PathLine { x: 251; y: 22 }
PathLine { x: 249; y: 22 }
PathLine { x: 249; y: 22 }
PathMove { x: 0; y: 22 }
PathLine { x: -2; y: 22 }
PathLine { x: -2; y: 24 }
PathLine { x: 0; y: 24 }
PathLine { x: 0; y: 22 }
PathLine { x: 0; y: 22 }
PathMove { x: 0; y: 0 }
PathLine { x: 0; y: 2 }
PathLine { x: 249; y: 2 }
@ -94,7 +90,6 @@ PathLine { x: 249; y: 0 }
PathLine { x: 249; y: -2 }
PathLine { x: 0; y: -2 }
PathLine { x: 0; y: 0 }
PathLine { x: 0; y: 0 }
PathMove { x: 249; y: 0 }
PathLine { x: 247; y: 0 }
PathLine { x: 247; y: 22 }
@ -102,7 +97,6 @@ PathLine { x: 249; y: 22 }
PathLine { x: 251; y: 22 }
PathLine { x: 251; y: 0 }
PathLine { x: 249; y: 0 }
PathLine { x: 249; y: 0 }
PathMove { x: 249; y: 22 }
PathLine { x: 249; y: 20 }
PathLine { x: 0; y: 20 }
@ -110,7 +104,6 @@ PathLine { x: 0; y: 22 }
PathLine { x: 0; y: 24 }
PathLine { x: 249; y: 24 }
PathLine { x: 249; y: 22 }
PathLine { x: 249; y: 22 }
PathMove { x: 0; y: 22 }
PathLine { x: 2; y: 22 }
PathLine { x: 2; y: 0 }
@ -118,7 +111,6 @@ PathLine { x: 0; y: 0 }
PathLine { x: -2; y: 0 }
PathLine { x: -2; y: 22 }
PathLine { x: 0; y: 22 }
PathLine { x: 0; y: 22 }
}}
Rectangle {
// component (Instance) level: 0 ProgressBarFilled

View File

@ -6,17 +6,9 @@ import QtQuick.Shapes
import QtQuick.Controls
import QtQuick.Shapes
import FigmaQmlInterface
Rectangle {
HeaderValueComponent27_figma {
// component (Instance) level: 0 HeaderValueComponent
id: figma_94_14
id: figma_269_178
// # "HeaderValueComponent"
objectName:"HeaderValueComponent"
x:0
y:0
width:54
height:13
color:"#00ffffff"
clip: false
Component.onCompleted: {
}
}

View File

@ -6,7 +6,7 @@ import QtQuick.Shapes
import QtQuick.Controls
import QtQuick.Shapes
import FigmaQmlInterface
InputComponent33_figma {
InputComponent27_figma {
// component (Instance) level: 0 InputComponent
id: figma_219_72
// # "InputComponent"

View File

@ -0,0 +1,14 @@
//Generated by FigmaQML 3.2.1
import QtQuick
import QtQuick.Effects
import QtQuick.Shapes
import QtQuick.Controls
import QtQuick.Shapes
import FigmaQmlInterface
LabelHeaderComponentH2_bold45_figma {
// component (Instance) level: 0 LabelHeaderComponentH2-bold
id: figma_269_147
// # "LabelHeaderComponentH2-bold"
objectName:"LabelHeaderComponentH2-bold"
}

View File

@ -0,0 +1,14 @@
//Generated by FigmaQML 3.2.1
import QtQuick
import QtQuick.Effects
import QtQuick.Shapes
import QtQuick.Controls
import QtQuick.Shapes
import FigmaQmlInterface
LabelHeaderComponentH353_figma {
// component (Instance) level: 0 LabelHeaderComponentH3
id: figma_269_166
// # "LabelHeaderComponentH3"
objectName:"LabelHeaderComponentH3"
}

View File

@ -18,7 +18,7 @@ Rectangle {
color: "transparent"
clip: true
LabelHeaderComponentH123_figma {
LabelHeaderComponentH122_figma {
// component (Instance) level: 0 MainPageHeader
id: figma_94_73
// # "MainPageHeader"
@ -131,7 +131,7 @@ Rectangle {
clip: true
}
LabelComponent22_figma {
LabelComponent20_figma {
// component (Instance) level: 0 16
id: figma_94_79
// # "16"

View File

@ -28,23 +28,9 @@ Rectangle {
width:283
height:900
color:"#ffffffff"
clip: true
Shape {
anchors.fill: parent
ShapePath {
strokeColor: Qt.rgba(0.964706, 0.964706, 0.964706, 1)
strokeWidth: 1
fillColor: "transparent"
PathMove { x: 0; y: 900 }
PathLine { x: 5; y: 900 }
PathLine { x: 5; y: 0 }
PathLine { x: 0; y: 0 }
PathLine { x: -5; y: 0 }
PathLine { x: -5; y: 900 }
PathLine { x: 0; y: 900 }
PathLine { x: 0; y: 900 }
}}
LabelHeaderComponentH330_figma {
clip: false
LabelHeaderComponentH354_figma {
// component (Instance) level: 0 InformationHeader
id: figma_94_66
// # "InformationHeader"
@ -73,17 +59,17 @@ PathLine { x: 0; y: 900 }
}
}
Rectangle {
// component (Instance) level: 0 Frame 789
// component (Instance) level: 0 StorageInfoWidget
id: figma_94_67
// # "Frame 789"
objectName:"Frame 789"
// # "StorageInfoWidget"
objectName:"StorageInfoWidget"
x:21
y:67
y:64
width:242
height:92
height:111
color: "transparent"
radius:8
clip: true
clip: false
Shape {
anchors.fill: parent
ShapePath {
@ -91,80 +77,134 @@ ShapePath {
strokeWidth: 4
fillColor: "transparent"
PathMove { x: 8; y: 0 }
PathLine { x: 8; y: 4 }
PathLine { x: 234; y: 4 }
PathLine { x: 8; y: 2 }
PathLine { x: 234; y: 2 }
PathLine { x: 234; y: 0 }
PathLine { x: 234; y: -4 }
PathLine { x: 8; y: -4 }
PathLine { x: 8; y: 0 }
PathLine { x: 234; y: -2 }
PathLine { x: 8; y: -2 }
PathLine { x: 8; y: 0 }
PathMove { x: 242; y: 8 }
PathLine { x: 238; y: 8 }
PathLine { x: 238; y: 84 }
PathLine { x: 242; y: 84 }
PathLine { x: 246; y: 84 }
PathLine { x: 246; y: 8 }
PathLine { x: 240; y: 8 }
PathLine { x: 240; y: 103 }
PathLine { x: 242; y: 103 }
PathLine { x: 244; y: 103 }
PathLine { x: 244; y: 8 }
PathLine { x: 242; y: 8 }
PathLine { x: 242; y: 8 }
PathMove { x: 234; y: 92 }
PathLine { x: 234; y: 88 }
PathLine { x: 8; y: 88 }
PathLine { x: 8; y: 92 }
PathLine { x: 8; y: 96 }
PathLine { x: 234; y: 96 }
PathLine { x: 234; y: 92 }
PathLine { x: 234; y: 92 }
PathMove { x: 0; y: 84 }
PathLine { x: 4; y: 84 }
PathLine { x: 4; y: 8 }
PathMove { x: 234; y: 111 }
PathLine { x: 234; y: 109 }
PathLine { x: 8; y: 109 }
PathLine { x: 8; y: 111 }
PathLine { x: 8; y: 113 }
PathLine { x: 234; y: 113 }
PathLine { x: 234; y: 111 }
PathMove { x: 0; y: 103 }
PathLine { x: 2; y: 103 }
PathLine { x: 2; y: 8 }
PathLine { x: 0; y: 8 }
PathLine { x: -4; y: 8 }
PathLine { x: -4; y: 84 }
PathLine { x: 0; y: 84 }
PathLine { x: 0; y: 84 }
PathMove { x: 8; y: 92 }
PathLine { x: 8; y: 88 }
PathCubic { control1X: 5.79086; control1Y: 88; control2X: 4; control2Y: 86.2091; x: 4; y: 84 }
PathLine { x: 0; y: 84 }
PathLine { x: -4; y: 84 }
PathCubic { control1X: -4; control1Y: 90.6274; control2X: 1.37259; control2Y: 96; x: 8; y: 96 }
PathLine { x: 8; y: 92 }
PathLine { x: 8; y: 92 }
PathMove { x: 242; y: 84 }
PathLine { x: 238; y: 84 }
PathCubic { control1X: 238; control1Y: 86.2091; control2X: 236.209; control2Y: 88; x: 234; y: 88 }
PathLine { x: 234; y: 92 }
PathLine { x: 234; y: 96 }
PathCubic { control1X: 240.627; control1Y: 96; control2X: 246; control2Y: 90.6274; x: 246; y: 84 }
PathLine { x: 242; y: 84 }
PathLine { x: 242; y: 84 }
PathLine { x: -2; y: 8 }
PathLine { x: -2; y: 103 }
PathLine { x: 0; y: 103 }
PathMove { x: 8; y: 111 }
PathLine { x: 8; y: 109 }
PathCubic { control1X: 4.68629; control1Y: 109; control2X: 2; control2Y: 106.314; x: 2; y: 103 }
PathLine { x: 0; y: 103 }
PathLine { x: -2; y: 103 }
PathCubic { control1X: -2; control1Y: 108.523; control2X: 2.47716; control2Y: 113; x: 8; y: 113 }
PathLine { x: 8; y: 111 }
PathMove { x: 242; y: 103 }
PathLine { x: 240; y: 103 }
PathCubic { control1X: 240; control1Y: 106.314; control2X: 237.314; control2Y: 109; x: 234; y: 109 }
PathLine { x: 234; y: 111 }
PathLine { x: 234; y: 113 }
PathCubic { control1X: 239.523; control1Y: 113; control2X: 244; control2Y: 108.523; x: 244; y: 103 }
PathLine { x: 242; y: 103 }
PathMove { x: 234; y: 0 }
PathLine { x: 234; y: 4 }
PathCubic { control1X: 236.209; control1Y: 4; control2X: 238; control2Y: 5.79086; x: 238; y: 8 }
PathLine { x: 234; y: 2 }
PathCubic { control1X: 237.314; control1Y: 2; control2X: 240; control2Y: 4.68629; x: 240; y: 8 }
PathLine { x: 242; y: 8 }
PathLine { x: 246; y: 8 }
PathCubic { control1X: 246; control1Y: 1.37258; control2X: 240.627; control2Y: -4; x: 234; y: -4 }
PathLine { x: 234; y: 0 }
PathLine { x: 244; y: 8 }
PathCubic { control1X: 244; control1Y: 2.47715; control2X: 239.523; control2Y: -2; x: 234; y: -2 }
PathLine { x: 234; y: 0 }
PathMove { x: 8; y: 0 }
PathLine { x: 8; y: -4 }
PathCubic { control1X: 1.37258; control1Y: -4; control2X: -4; control2Y: 1.37258; x: -4; y: 8 }
PathLine { x: 8; y: -2 }
PathCubic { control1X: 2.47715; control1Y: -2; control2X: -2; control2Y: 2.47716; x: -2; y: 8 }
PathLine { x: 0; y: 8 }
PathLine { x: 4; y: 8 }
PathCubic { control1X: 4; control1Y: 5.79086; control2X: 5.79086; control2Y: 4; x: 8; y: 4 }
PathLine { x: 8; y: 0 }
PathLine { x: 2; y: 8 }
PathCubic { control1X: 2; control1Y: 4.68629; control2X: 4.68629; control2Y: 2; x: 8; y: 2 }
PathLine { x: 8; y: 0 }
}}
Rectangle {
// component (Instance) level: 0 LabelHeaderComponentH3
id: figma_269_172
// # "LabelHeaderComponentH3"
objectName:"LabelHeaderComponentH3"
x: (figma_94_67.width - width) / 2 + 0.5
y:7
width:83
height:19
color: "transparent"
clip: false
Text {
// component (Instance) level: 0 Label
id: figma_269_173
// # "Label"
objectName:"Label"
x:2
y:1
width:79
height:17
color:"#ff000000"
wrapMode: TextEdit.WordWrap
text:"Хранилище"
font.family: "Tahoma"
font.italic: false
font.letterSpacing: 0
font.pixelSize: 14
font.weight: Font.Normal
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignTop
}
}
HeaderValueComponent27_figma {
// component (Instance) level: 0 LabelAvailibleSizeComponent
id: figma_269_181
// # "LabelAvailibleSizeComponent"
objectName:"LabelAvailibleSizeComponent"
x:17
y:35
color: "transparent"
delegate_269_179: Text {
// component (Instance) level: 1 LabelAvailibleSize
id: figma_i269_181_269_179
// # "LabelAvailibleSize"
objectName:"LabelAvailibleSize"
x:0
y:0
width:54
height:13
color:"#ff000000"
wrapMode: TextEdit.WordWrap
text:"Свободно"
font.family: "Tahoma"
font.italic: false
font.letterSpacing: 0
font.pixelSize: 11
font.weight: Font.Normal
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignTop
}
}
Rectangle {
// component (Instance) level: 0 LabelAvailibleSizeButtonComponent
id: figma_98_96
// # "LabelAvailibleSizeButtonComponent"
objectName:"LabelAvailibleSizeButtonComponent"
x:20
y:30
width:203
x:17
y:51
width:209
height:31
color:"#00ffffff"
color: "transparent"
clip: false
Text {
@ -174,7 +214,7 @@ PathLine { x: 8; y: 0 }
objectName:"LabelAvailibleSizeButton"
x:0
y:0
width:203
width:209
height:31
color:"#ff000000"
wrapMode: TextEdit.WordWrap
@ -188,56 +228,95 @@ PathLine { x: 8; y: 0 }
verticalAlignment: Text.AlignTop
}
}
HeaderValueComponent28_figma {
// component (Instance) level: 0 LabelAvailibleSizeComponent
id: figma_94_69
// # "LabelAvailibleSizeComponent"
objectName:"LabelAvailibleSizeComponent"
x:20
y:17
Text {
// component (Instance) level: 1 LabelAvailibleSize
id: figma_i94_69_613_433
// # "LabelAvailibleSize"
objectName:"LabelAvailibleSize"
x:0
y:0
width:54
height:13
color:"#ff7d7e82"
wrapMode: TextEdit.WordWrap
text:"Свободно"
font.family: "Tahoma"
font.italic: false
font.letterSpacing: 0
font.pixelSize: 11
font.weight: Font.Normal
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignTop
}
}
ProgressBarComponent24_figma {
// component (Instance) level: 0 AvailibleSizeProgressBar
id: figma_94_70
// # "AvailibleSizeProgressBar"
objectName:"AvailibleSizeProgressBar"
Rectangle {
// component (Instance) level: 0 Frame 800
id: figma_269_210
// # "Frame 800"
objectName:"Frame 800"
x:19
y:68
y:85
width:159
height:8
color: "transparent"
clip: true
Rectangle {
// component (Instance) level: 1 AvailibleSizeProgressBarPassedBar
id: figma_i94_70_613_435
// component (Instance) level: 0 AvailibleSizeProgressBarPassedBar
id: figma_269_206
// # "AvailibleSizeProgressBarPassedBar"
objectName:"AvailibleSizeProgressBarPassedBar"
x:0
y:0
width:154
height:10
width:159
height:8
color:"#ffdb1c1c"
radius:5
clip: true
clip: false
}
}
Rectangle {
// component (Instance) level: 0 AvailibleSizeProgressBar
id: figma_269_205
// # "AvailibleSizeProgressBar"
objectName:"AvailibleSizeProgressBar"
x:20
y:84
width:209
height:10
color: "transparent"
radius:5
clip: false
Shape {
anchors.fill: parent
ShapePath {
strokeColor: Qt.rgba(0.201923, 0.119406, 0.119406, 1)
strokeWidth: 1
fillColor: "transparent"
PathMove { x: 5; y: 0 }
PathLine { x: 5; y: 0.5 }
PathLine { x: 204; y: 0.5 }
PathLine { x: 204; y: 0 }
PathLine { x: 204; y: -0.5 }
PathLine { x: 5; y: -0.5 }
PathLine { x: 5; y: 0 }
PathMove { x: 204; y: 10 }
PathLine { x: 204; y: 9.5 }
PathLine { x: 5; y: 9.5 }
PathLine { x: 5; y: 10 }
PathLine { x: 5; y: 10.5 }
PathLine { x: 204; y: 10.5 }
PathLine { x: 204; y: 10 }
PathMove { x: 5; y: 10 }
PathLine { x: 5; y: 9.5 }
PathCubic { control1X: 2.51472; control1Y: 9.5; control2X: 0.5; control2Y: 7.48528; x: 0.5; y: 5 }
PathLine { x: 0; y: 5 }
PathLine { x: -0.5; y: 5 }
PathCubic { control1X: -0.5; control1Y: 8.03757; control2X: 1.96244; control2Y: 10.5; x: 5; y: 10.5 }
PathLine { x: 5; y: 10 }
PathMove { x: 209; y: 5 }
PathLine { x: 208.5; y: 5 }
PathCubic { control1X: 208.5; control1Y: 7.48528; control2X: 206.485; control2Y: 9.5; x: 204; y: 9.5 }
PathLine { x: 204; y: 10 }
PathLine { x: 204; y: 10.5 }
PathCubic { control1X: 207.038; control1Y: 10.5; control2X: 209.5; control2Y: 8.03757; x: 209.5; y: 5 }
PathLine { x: 209; y: 5 }
PathMove { x: 204; y: 0 }
PathLine { x: 204; y: 0.5 }
PathCubic { control1X: 206.485; control1Y: 0.5; control2X: 208.5; control2Y: 2.51472; x: 208.5; y: 5 }
PathLine { x: 209; y: 5 }
PathLine { x: 209.5; y: 5 }
PathCubic { control1X: 209.5; control1Y: 1.96243; control2X: 207.038; control2Y: -0.5; x: 204; y: -0.5 }
PathLine { x: 204; y: 0 }
PathMove { x: 5; y: 0 }
PathLine { x: 5; y: -0.5 }
PathCubic { control1X: 1.96243; control1Y: -0.5; control2X: -0.5; control2Y: 1.96243; x: -0.5; y: 5 }
PathLine { x: 0; y: 5 }
PathLine { x: 0.5; y: 5 }
PathCubic { control1X: 0.5; control1Y: 2.51472; control2X: 2.51472; control2Y: 0.5; x: 5; y: 0.5 }
PathLine { x: 5; y: 0 }
}}
}
}
}
Rectangle {
@ -250,7 +329,7 @@ PathLine { x: 8; y: 0 }
width:1096
height:900
color: "transparent"
clip: true
clip: false
}
Rectangle {
@ -258,27 +337,13 @@ PathLine { x: 8; y: 0 }
id: figma_139_49
// # "PanelLeft"
objectName:"PanelLeft"
x:0
x:1
y:0
width:221
height:900
height:898
color:"#ffffffff"
clip: true
Shape {
anchors.fill: parent
ShapePath {
strokeColor: Qt.rgba(0.964706, 0.964706, 0.964706, 1)
strokeWidth: 1
fillColor: "transparent"
PathMove { x: 221; y: 0 }
PathLine { x: 216; y: 0 }
PathLine { x: 216; y: 900 }
PathLine { x: 221; y: 900 }
PathLine { x: 226; y: 900 }
PathLine { x: 226; y: 0 }
PathLine { x: 221; y: 0 }
PathLine { x: 221; y: 0 }
}}
clip: false
Rectangle {
// component (Instance) level: 0 Logo
id: figma_139_50
@ -546,7 +611,7 @@ PathLine { x: 221; y: 0 }
}
}
}
Rectangle_134_figma {
Rectangle_128_figma {
// component (Instance) level: 0 Rectangle 3
id: figma_139_59
// # "Rectangle 3"
@ -739,7 +804,7 @@ PathLine { x: 221; y: 0 }
color: "transparent"
clip: false
Rectangle_134_figma {
Rectangle_128_figma {
// component (Instance) level: 0 Rectangle 2
id: figma_139_62
// # "Rectangle 2"
@ -1223,7 +1288,7 @@ PathLine { x: 221; y: 0 }
x:6
y:229
width:209
height:660.524
height:658.524
color: "transparent"
clip: false
@ -1239,7 +1304,7 @@ PathLine { x: 221; y: 0 }
color: "transparent"
clip: false
ColumnaItemComponent32_figma {
ColumnaItemComponent27_figma {
// component (Instance) level: 0 HomeItem
id: figma_139_77
// # "HomeItem"
@ -1324,7 +1389,7 @@ PathLine { x: 221; y: 0 }
verticalAlignment: Text.AlignTop
}
}
ColumnaItemComponent32_figma {
ColumnaItemComponent27_figma {
// component (Instance) level: 0 ProjectsItem
id: figma_139_78
// # "ProjectsItem"
@ -1416,13 +1481,13 @@ PathLine { x: 221; y: 0 }
// # "Column"
objectName:"Column"
x:0
y:602
y:600
width:209
height:58
color: "transparent"
clip: false
ColumnaItemComponent32_figma {
ColumnaItemComponent27_figma {
// component (Instance) level: 0 CloseItem
id: figma_139_80
// # "CloseItem"
@ -1507,7 +1572,7 @@ PathLine { x: 221; y: 0 }
verticalAlignment: Text.AlignTop
}
}
ColumnaItemComponent32_figma {
ColumnaItemComponent27_figma {
// component (Instance) level: 0 SettingsItem
id: figma_139_81
// # "SettingsItem"

View File

@ -18,7 +18,7 @@ Rectangle {
color: "transparent"
clip: true
LabelHeaderComponentH123_figma {
LabelHeaderComponentH122_figma {
// component (Instance) level: 0 ProjectPageHeader
id: figma_94_81
// # "ProjectPageHeader"
@ -48,7 +48,7 @@ Rectangle {
verticalAlignment: Text.AlignTop
}
}
LabelComponent22_figma {
LabelComponent20_figma {
// component (Instance) level: 0 SubDirectoryLabelComponent
id: figma_94_82
// # "SubDirectoryLabelComponent"

View File

@ -17,8 +17,8 @@ Rectangle {
height:900
color: "transparent"
clip: true
LabelHeaderComponentH123_figma {
LabelHeaderComponentH122_figma {
// component (Instance) level: 0 MainPageHeader
id: figma_94_87
// # "MainPageHeader"
@ -48,7 +48,7 @@ Rectangle {
verticalAlignment: Text.AlignTop
}
}
LabelComponent22_figma {
LabelComponent20_figma {
// component (Instance) level: 0 LabelComponent
id: figma_94_88
// # "LabelComponent"
@ -89,13 +89,139 @@ Rectangle {
color:"#ffffffff"
clip: true
InputComponent33_figma {
InputComponent27_figma {
// component (Instance) level: 0 InputComponent
id: figma_249_58
// # "InputComponent"
objectName:"InputComponent"
x: (figma_94_89.width - width) / 2 - 239
y:275
width:470
height:40
delegate_219_73: Text {
// component (Instance) level: 1 ProjectLabel
id: figma_i249_58_219_73
// # "ProjectLabel"
objectName:"ProjectLabel"
x:0
y:0
width:470
height:13
color:"#ff302f38"
wrapMode: TextEdit.WordWrap
text:"Адрес"
font.family: "Tahoma"
font.italic: false
font.letterSpacing: 0
font.pixelSize: 11
font.weight: Font.Normal
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignTop
}
delegate_219_155: Rectangle {
// component (Instance) level: 1 StrokeElement
id: figma_i249_58_219_155
// # "StrokeElement"
objectName:"StrokeElement"
x:0
y:17
width:470
height:23
color: "transparent"
radius:5
clip: false
Shape {
anchors.fill: parent
ShapePath {
strokeColor: Qt.rgba(0, 0, 0, 1)
strokeWidth: 1
fillColor: "transparent"
PathMove { x: 5; y: 0 }
PathLine { x: 5; y: 0.5 }
PathLine { x: 465; y: 0.5 }
PathLine { x: 465; y: 0 }
PathLine { x: 465; y: -0.5 }
PathLine { x: 5; y: -0.5 }
PathLine { x: 5; y: 0 }
PathMove { x: 470; y: 5 }
PathLine { x: 469.5; y: 5 }
PathLine { x: 469.5; y: 18 }
PathLine { x: 470; y: 18 }
PathLine { x: 470.5; y: 18 }
PathLine { x: 470.5; y: 5 }
PathLine { x: 470; y: 5 }
PathMove { x: 465; y: 23 }
PathLine { x: 465; y: 22.5 }
PathLine { x: 5; y: 22.5 }
PathLine { x: 5; y: 23 }
PathLine { x: 5; y: 23.5 }
PathLine { x: 465; y: 23.5 }
PathLine { x: 465; y: 23 }
PathMove { x: 0; y: 18 }
PathLine { x: 0.5; y: 18 }
PathLine { x: 0.5; y: 5 }
PathLine { x: 0; y: 5 }
PathLine { x: -0.5; y: 5 }
PathLine { x: -0.5; y: 18 }
PathLine { x: 0; y: 18 }
PathMove { x: 5; y: 23 }
PathLine { x: 5; y: 22.5 }
PathCubic { control1X: 2.51472; control1Y: 22.5; control2X: 0.5; control2Y: 20.4853; x: 0.5; y: 18 }
PathLine { x: 0; y: 18 }
PathLine { x: -0.5; y: 18 }
PathCubic { control1X: -0.5; control1Y: 21.0376; control2X: 1.96243; control2Y: 23.5; x: 5; y: 23.5 }
PathLine { x: 5; y: 23 }
PathMove { x: 470; y: 18 }
PathLine { x: 469.5; y: 18 }
PathCubic { control1X: 469.5; control1Y: 20.4853; control2X: 467.485; control2Y: 22.5; x: 465; y: 22.5 }
PathLine { x: 465; y: 23 }
PathLine { x: 465; y: 23.5 }
PathCubic { control1X: 468.038; control1Y: 23.5; control2X: 470.5; control2Y: 21.0376; x: 470.5; y: 18 }
PathLine { x: 470; y: 18 }
PathMove { x: 465; y: 0 }
PathLine { x: 465; y: 0.5 }
PathCubic { control1X: 467.485; control1Y: 0.5; control2X: 469.5; control2Y: 2.51472; x: 469.5; y: 5 }
PathLine { x: 470; y: 5 }
PathLine { x: 470.5; y: 5 }
PathCubic { control1X: 470.5; control1Y: 1.96243; control2X: 468.038; control2Y: -0.5; x: 465; y: -0.5 }
PathLine { x: 465; y: 0 }
PathMove { x: 5; y: 0 }
PathLine { x: 5; y: -0.5 }
PathCubic { control1X: 1.96243; control1Y: -0.5; control2X: -0.5; control2Y: 1.96243; x: -0.5; y: 5 }
PathLine { x: 0; y: 5 }
PathLine { x: 0.5; y: 5 }
PathCubic { control1X: 0.5; control1Y: 2.51472; control2X: 2.51472; control2Y: 0.5; x: 5; y: 0.5 }
PathLine { x: 5; y: 0 }
}}
TextField {
// component (Instance) level: 1 RemoteAddressLabelField
id: figma_i249_58_219_74
// # "RemoteAddressLabelField"
objectName:"RemoteAddressLabelField"
x:3
y:0
width:464
height:23
color:"#ff7d7e82"
wrapMode: TextEdit.WordWrap
text:"http://localhost:1234"
background: Rectangle {color: "transparent"} font.family: "Tahoma"
font.italic: false
font.letterSpacing: 0
font.pixelSize: 16
font.weight: Font.Normal
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
}
}
InputComponent27_figma {
// component (Instance) level: 0 InputComponent
id: figma_249_53
// # "InputComponent"
objectName:"InputComponent"
x: (figma_94_89.width - width) / 2 - 272
y:33
x: (figma_94_89.width - width) / 2 - 242
y:70
width:470
height:40
delegate_219_73: Text {
@ -143,7 +269,6 @@ PathLine { x: 465; y: 0 }
PathLine { x: 465; y: -0.5 }
PathLine { x: 5; y: -0.5 }
PathLine { x: 5; y: 0 }
PathLine { x: 5; y: 0 }
PathMove { x: 470; y: 5 }
PathLine { x: 469.5; y: 5 }
PathLine { x: 469.5; y: 18 }
@ -151,7 +276,6 @@ PathLine { x: 470; y: 18 }
PathLine { x: 470.5; y: 18 }
PathLine { x: 470.5; y: 5 }
PathLine { x: 470; y: 5 }
PathLine { x: 470; y: 5 }
PathMove { x: 465; y: 23 }
PathLine { x: 465; y: 22.5 }
PathLine { x: 5; y: 22.5 }
@ -159,7 +283,6 @@ PathLine { x: 5; y: 23 }
PathLine { x: 5; y: 23.5 }
PathLine { x: 465; y: 23.5 }
PathLine { x: 465; y: 23 }
PathLine { x: 465; y: 23 }
PathMove { x: 0; y: 18 }
PathLine { x: 0.5; y: 18 }
PathLine { x: 0.5; y: 5 }
@ -167,7 +290,6 @@ PathLine { x: 0; y: 5 }
PathLine { x: -0.5; y: 5 }
PathLine { x: -0.5; y: 18 }
PathLine { x: 0; y: 18 }
PathLine { x: 0; y: 18 }
PathMove { x: 5; y: 23 }
PathLine { x: 5; y: 22.5 }
PathCubic { control1X: 2.51472; control1Y: 22.5; control2X: 0.5; control2Y: 20.4853; x: 0.5; y: 18 }
@ -175,7 +297,6 @@ PathLine { x: 0; y: 18 }
PathLine { x: -0.5; y: 18 }
PathCubic { control1X: -0.5; control1Y: 21.0376; control2X: 1.96243; control2Y: 23.5; x: 5; y: 23.5 }
PathLine { x: 5; y: 23 }
PathLine { x: 5; y: 23 }
PathMove { x: 470; y: 18 }
PathLine { x: 469.5; y: 18 }
PathCubic { control1X: 469.5; control1Y: 20.4853; control2X: 467.485; control2Y: 22.5; x: 465; y: 22.5 }
@ -183,7 +304,6 @@ PathLine { x: 465; y: 23 }
PathLine { x: 465; y: 23.5 }
PathCubic { control1X: 468.038; control1Y: 23.5; control2X: 470.5; control2Y: 21.0376; x: 470.5; y: 18 }
PathLine { x: 470; y: 18 }
PathLine { x: 470; y: 18 }
PathMove { x: 465; y: 0 }
PathLine { x: 465; y: 0.5 }
PathCubic { control1X: 467.485; control1Y: 0.5; control2X: 469.5; control2Y: 2.51472; x: 469.5; y: 5 }
@ -191,7 +311,6 @@ PathLine { x: 470; y: 5 }
PathLine { x: 470.5; y: 5 }
PathCubic { control1X: 470.5; control1Y: 1.96243; control2X: 468.038; control2Y: -0.5; x: 465; y: -0.5 }
PathLine { x: 465; y: 0 }
PathLine { x: 465; y: 0 }
PathMove { x: 5; y: 0 }
PathLine { x: 5; y: -0.5 }
PathCubic { control1X: 1.96243; control1Y: -0.5; control2X: -0.5; control2Y: 1.96243; x: -0.5; y: 5 }
@ -199,7 +318,6 @@ PathLine { x: 0; y: 5 }
PathLine { x: 0.5; y: 5 }
PathCubic { control1X: 0.5; control1Y: 2.51472; control2X: 2.51472; control2Y: 0.5; x: 5; y: 0.5 }
PathLine { x: 5; y: 0 }
PathLine { x: 5; y: 0 }
}}
TextField {
// component (Instance) level: 1 ProjectsPathLabelField
@ -223,139 +341,71 @@ background: Rectangle {color: "transparent"} font.family: "Ta
}
}
}
InputComponent33_figma {
// component (Instance) level: 0 InputComponent
id: figma_249_58
// # "InputComponent"
objectName:"InputComponent"
x: (figma_94_89.width - width) / 2 - 272
y:86
width:470
height:40
delegate_219_73: Text {
// component (Instance) level: 1 ProjectLabel
id: figma_i249_58_219_73
// # "ProjectLabel"
objectName:"ProjectLabel"
LabelHeaderComponentH2_bold45_figma {
// component (Instance) level: 0 LabelHeaderComponentH2-bold
id: figma_269_150
// # "LabelHeaderComponentH2-bold"
objectName:"LabelHeaderComponentH2-bold"
x:71
y:37
width:154
height:31
color: "transparent"
delegate_269_148: Text {
// component (Instance) level: 1 Label
id: figma_i269_150_269_148
// # "Label"
objectName:"Label"
x:0
y:0
width:470
height:13
color:"#ff302f38"
width:154
height:31
color:"#ff000000"
wrapMode: TextEdit.WordWrap
text:"Адрес сервера"
text:"Хранилище"
font.family: "Tahoma"
font.italic: false
font.letterSpacing: 0
font.pixelSize: 11
font.weight: Font.Normal
font.pixelSize: 26
font.weight: Font.DemiBold
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignTop
}
delegate_219_155: Rectangle {
// component (Instance) level: 1 StrokeElement
id: figma_i249_58_219_155
// # "StrokeElement"
objectName:"StrokeElement"
}
LabelHeaderComponentH2_bold45_figma {
// component (Instance) level: 0 LabelHeaderComponentH2-bold
id: figma_269_160
// # "LabelHeaderComponentH2-bold"
objectName:"LabelHeaderComponentH2-bold"
x:71
y:241
width:99
height:31
color: "transparent"
delegate_269_148: Text {
// component (Instance) level: 1 Label
id: figma_i269_160_269_148
// # "Label"
objectName:"Label"
x:0
y:17
width:470
height:23
color: "transparent"
radius:5
clip: false
Shape {
anchors.fill: parent
ShapePath {
strokeColor: Qt.rgba(0, 0, 0, 1)
strokeWidth: 1
fillColor: "transparent"
PathMove { x: 5; y: 0 }
PathLine { x: 5; y: 0.5 }
PathLine { x: 465; y: 0.5 }
PathLine { x: 465; y: 0 }
PathLine { x: 465; y: -0.5 }
PathLine { x: 5; y: -0.5 }
PathLine { x: 5; y: 0 }
PathLine { x: 5; y: 0 }
PathMove { x: 470; y: 5 }
PathLine { x: 469.5; y: 5 }
PathLine { x: 469.5; y: 18 }
PathLine { x: 470; y: 18 }
PathLine { x: 470.5; y: 18 }
PathLine { x: 470.5; y: 5 }
PathLine { x: 470; y: 5 }
PathLine { x: 470; y: 5 }
PathMove { x: 465; y: 23 }
PathLine { x: 465; y: 22.5 }
PathLine { x: 5; y: 22.5 }
PathLine { x: 5; y: 23 }
PathLine { x: 5; y: 23.5 }
PathLine { x: 465; y: 23.5 }
PathLine { x: 465; y: 23 }
PathLine { x: 465; y: 23 }
PathMove { x: 0; y: 18 }
PathLine { x: 0.5; y: 18 }
PathLine { x: 0.5; y: 5 }
PathLine { x: 0; y: 5 }
PathLine { x: -0.5; y: 5 }
PathLine { x: -0.5; y: 18 }
PathLine { x: 0; y: 18 }
PathLine { x: 0; y: 18 }
PathMove { x: 5; y: 23 }
PathLine { x: 5; y: 22.5 }
PathCubic { control1X: 2.51472; control1Y: 22.5; control2X: 0.5; control2Y: 20.4853; x: 0.5; y: 18 }
PathLine { x: 0; y: 18 }
PathLine { x: -0.5; y: 18 }
PathCubic { control1X: -0.5; control1Y: 21.0376; control2X: 1.96243; control2Y: 23.5; x: 5; y: 23.5 }
PathLine { x: 5; y: 23 }
PathLine { x: 5; y: 23 }
PathMove { x: 470; y: 18 }
PathLine { x: 469.5; y: 18 }
PathCubic { control1X: 469.5; control1Y: 20.4853; control2X: 467.485; control2Y: 22.5; x: 465; y: 22.5 }
PathLine { x: 465; y: 23 }
PathLine { x: 465; y: 23.5 }
PathCubic { control1X: 468.038; control1Y: 23.5; control2X: 470.5; control2Y: 21.0376; x: 470.5; y: 18 }
PathLine { x: 470; y: 18 }
PathLine { x: 470; y: 18 }
PathMove { x: 465; y: 0 }
PathLine { x: 465; y: 0.5 }
PathCubic { control1X: 467.485; control1Y: 0.5; control2X: 469.5; control2Y: 2.51472; x: 469.5; y: 5 }
PathLine { x: 470; y: 5 }
PathLine { x: 470.5; y: 5 }
PathCubic { control1X: 470.5; control1Y: 1.96243; control2X: 468.038; control2Y: -0.5; x: 465; y: -0.5 }
PathLine { x: 465; y: 0 }
PathLine { x: 465; y: 0 }
PathMove { x: 5; y: 0 }
PathLine { x: 5; y: -0.5 }
PathCubic { control1X: 1.96243; control1Y: -0.5; control2X: -0.5; control2Y: 1.96243; x: -0.5; y: 5 }
PathLine { x: 0; y: 5 }
PathLine { x: 0.5; y: 5 }
PathCubic { control1X: 0.5; control1Y: 2.51472; control2X: 2.51472; control2Y: 0.5; x: 5; y: 0.5 }
PathLine { x: 5; y: 0 }
PathLine { x: 5; y: 0 }
}}
TextField {
// component (Instance) level: 1 RemoteAddressLabelField
id: figma_i249_58_219_74
// # "RemoteAddressLabelField"
objectName:"RemoteAddressLabelField"
x:3
y:0
width:464
height:23
color:"#ff7d7e82"
wrapMode: TextEdit.WordWrap
text:"http://localhost:1234"
background: Rectangle {color: "transparent"} font.family: "Tahoma"
font.italic: false
font.letterSpacing: 0
font.pixelSize: 16
font.weight: Font.Normal
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
y:0
width:99
height:31
color:"#ff000000"
wrapMode: TextEdit.WordWrap
text:"Сервер"
font.family: "Tahoma"
font.italic: false
font.letterSpacing: 0
font.pixelSize: 26
font.weight: Font.DemiBold
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignTop
}
}
}
function showMe1() {
dialogLoader1.source = "../../../QtQuckApp/qml/SaveChangesDialog.qml"
}
}

85
qml/SaveChangesDialog.qml Normal file
View File

@ -0,0 +1,85 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
Dialog {
id: saveDialog
modal: true
title: "Сохранить изменения"
width: 300 // фиксированная ширина, чтобы избежать циклов
// standardButtons: Dialog.Yes | Dialog.No | Dialog.Cancel
anchors.centerIn: Overlay.overlay
footer: DialogButtonBox {
Button {
text: qsTr("Да")
DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
onClicked: {
saveRequested()
}
}
Button {
text: qsTr("Нет")
DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
onClicked: {
cancelRequested()
}
}
Button {
text: qsTr("Отмена")
DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
onClicked: {
abortRequested()
}
}
}
// onAccepted: {
// saveDialog.visible = false
// saveRequested()
// // doDeleteModel();
// }
// onRejected: {
// console.log("Rejected")
// var button = saveDialog.standardButton(saveDialog.buttonType)
// if (button === Dialog.Cancel) {
// console.log("Pressed Cancel")
// } else if (button === Dialog.No) {
// console.log("Pressed No")
// }
// }
// onCanceled: console.log("Нажата Cancel - действие отменено")
// onCanceled: {
// abortRequested();
// doDeleteModel();
// }
onVisibleChanged: {
if (!saveDialog.visible) {
console.log("Диалог закрыт (видимость false)")
doDeleteModel();
}
}
contentItem: Text {
text: "Вы хотите сохранить изменения перед выходом?"
wrapMode: Text.WordWrap
width: parent.width - 40 // с отступами, чтобы текст не растягивался бесконечно
}
signal saveRequested()
signal cancelRequested()
signal abortRequested()
function doDeleteModel() {
if (typeof settingsPageModel !== "undefined" && settingsPageModel) {
// settingsPageModel.deleteLater();
} else {
console.error("settingsPageModel is not defined!");
}
}
}

View File

@ -6,6 +6,8 @@
#include "QQuickItem"
#include "callbackwrapper.h"
#include "qrgb.h"
#include "ArrDifferentTypes.h"
QuickHelper::QuickHelper() {}
void QuickHelper::updateElement(QObject *rootObject, const QString &elementName, std::function<void (QObject *, std::function<void ()>)> updateItemFunction, std::function<void ()> onClick)
@ -58,59 +60,6 @@ QQuickItem *QuickHelper::getQuickItem(QObject *rootObject, const QString &elemen
return quickItem;
}
void QuickHelper::addMouseArea(QObject* rootObject, std::function<void()> onClickAction) {
qDebug() << "[C++] Starting to create MouseArea";
if (!rootObject) {
qWarning() << "[C++] Root object is null";
return;
}
QQuickItem* parentItem = qobject_cast<QQuickItem*>(rootObject);
if (!parentItem) {
qWarning() << "[C++] Root object is not a QQuickItem";
return;
}
QQmlEngine* engine = qmlEngine(rootObject);
if (!engine) {
qWarning() << "[C++] Failed to get QQmlEngine";
return;
}
// 1. Создаем CallbackWrapper и добавляем в контекст QML
CallbackWrapper* wrapper = new CallbackWrapper(onClickAction, parentItem);
QQmlContext* context = new QQmlContext(engine->rootContext(), parentItem);
context->setContextProperty("callbackWrapper", wrapper); // Делаем доступным в QML
// 2. Создаем MouseArea (уже будет видеть callbackWrapper)
QQmlComponent component(engine);
component.setData(R"(
import QtQuick 2.15
MouseArea {
anchors.fill: parent
onClicked: callbackWrapper.invoke()
}
)", QUrl());
// 3. Создаем MouseArea в этом контексте
QObject* mouseAreaObj = component.create(context);
if (!mouseAreaObj) {
qWarning() << "Error creating MouseArea:" << component.errors();
delete context;
return;
}
// 4. Настраиваем родительские связи
mouseAreaObj->setParent(parentItem);
QQuickItem* mouseAreaItem = qobject_cast<QQuickItem*>(mouseAreaObj);
mouseAreaItem->setParentItem(parentItem);
// 5. Удаление контекста при удалении MouseArea
context->setParent(mouseAreaObj);
};
#include "quickupdater.h"
void QuickHelper::doFunction(
QObject* rootObject,
const QList<QVariant>& listItems,
@ -161,7 +110,11 @@ void QuickHelper::doFunction(
// 4. Настраиваем родительские связи (управление памятью через Qt-родителя)
updaterObject->setParent(parentItem);
QQuickItem *updaterObjectItem = qobject_cast<QQuickItem*>(updaterObject);
if (updaterObjectItem) {
updaterObjectItem->setParentItem(parentItem);
}
// 5. Контекст удалится автоматически при удалении updaterObject
context->setParent(updaterObject);
@ -175,34 +128,68 @@ void QuickHelper::doFunction(
if (!success) {
qWarning() << "Failed to invoke QML function:" << functionName;
}
}
void QuickHelper::addComponent(
QObject* rootObject,
const QList<QVariant>& listItems,
const QString& textComponent
) {
qDebug() << "[C++] Starting to create function";
if (!rootObject) {
qWarning() << "[C++] Root object is null";
return;
}
QQuickItem* parentItem = qobject_cast<QQuickItem*>(rootObject);
if (!parentItem) {
qWarning() << "[C++] Root object is not a QQuickItem";
return;
}
QQmlEngine* engine = qmlEngine(rootObject);
if (!engine) {
qWarning() << "[C++] Failed to get QQmlEngine";
return;
}
// 1. Создаем ArrDifferentTypes и добавляем в контекст QML
ArrDifferentTypes* arrDifferentTypes = new ArrDifferentTypes(parentItem);
arrDifferentTypes->setArrDifferentTypes(listItems);
QQmlContext* context = new QQmlContext(engine->rootContext(), parentItem);
context->setContextProperty("quickUpdaterData", arrDifferentTypes);
QQmlComponent component(engine);
component.setData(textComponent.toLocal8Bit(), QUrl());
if (component.isError()) {
qWarning() << "QML Component errors:" << component.errors() << "\n" << textComponent;
delete context;
return;
}
QObject* updaterObject = component.create(context);
if (!updaterObject) {
qWarning() << "Error creating updaterObject:" << component.errors();
delete context;
return;
}
// 4. Настраиваем родительские связи (управление памятью через Qt-родителя)
updaterObject->setParent(parentItem);
QQuickItem* updaterObjectItem = qobject_cast<QQuickItem*>(updaterObject);
if (updaterObjectItem) {
updaterObjectItem->setParentItem(parentItem);
}
// 5. Контекст удалится автоматически при удалении updaterObject
context->setParent(updaterObject);
updaterObject->deleteLater();
arrDifferentTypes->deleteLater();
}
void QuickHelper::updateColor(QObject* rootObject, QColor disabledColor, QColor enabledColor){
// Присваивает значение
/*QString textComponent = R"(
import QtQuick 2.0
QtObject {
function updateColor(smthItem) {
if (!quickUpdaterData || quickUpdaterData.arrDifferentTypes.length < 2) {
console.log("quickUpdaterData not set or length < 2");
return;
}
var colorDisabled = quickUpdaterData.arrDifferentTypes[0];
var colorEnabled = quickUpdaterData.arrDifferentTypes[1];
if (smthItem && smthItem.hasOwnProperty("color") && smthItem.hasOwnProperty("enabled")) {
smthItem.color = smthItem.enabled ? colorEnabled : colorDisabled;
} else {
console.log("item does not have color or enabled property");
}
}
}
)";*/
QString textComponent = R"(
import QtQuick 2.15
@ -225,9 +212,78 @@ QtObject {
)";
QString function = "updateColor";
QVariantList list;
// list.append(QColor(qRgb(255,255,0)));
// list.append(QColor(qRgb(0,255,0)));
list.append(disabledColor);
list.append(enabledColor);
QuickHelper::doFunction(rootObject, list,textComponent,function);
}
void QuickHelper::setPorpetryEnumerator(
QQuickItem * item,
const QString & enumeratorName,
const QString & propertyName,
const QString & propertyValue
){
const QMetaObject *metaObject = item->metaObject();
int enumIndex = metaObject->indexOfEnumerator(enumeratorName.toUtf8().constData());
QMetaEnum metaEnum = metaObject->enumerator(enumIndex);
// Получаем числовое значение нужного enum
int horizontalFitValue = metaEnum.keyToValue(propertyValue.toUtf8().constData());
// Устанавливаем свойство fontSizeMode
item->setProperty(propertyName.toUtf8().constData(), horizontalFitValue);
}
void QuickHelper::textChangedSubscription(QObject* rootObject, CallbackWrapper* wrapper){
QString textComponent = R"(
import QtQuick 2.15
QtObject {
function addTrigger(smthItem) {
if (!quickUpdaterData) {
console.log("quickUpdaterData not set")
return
}
smthItem.textChanged.connect(function() {
quickUpdaterData.arrDifferentTypes[0].invoke()
})
}
}
)";
QVariantList list;
list.append(QVariant::fromValue(wrapper));
QuickHelper::doFunction(rootObject, list,textComponent,"addTrigger");
}
void QuickHelper::addMouseAreaElements(QObject* rootObject,
std::function<void()> onClickedAction,
std::function<void()> onEnteredAction,
std::function<void()> onExitedAction
) {
// 1. Создаем CallbackWrapper и добавляем в контекст QML
CallbackWrapper* wrapperClickedAction = new CallbackWrapper(onClickedAction, rootObject);
CallbackWrapper* wrapperonEnteredAction = new CallbackWrapper(onEnteredAction, rootObject);
CallbackWrapper* wrapperonExitedAction = new CallbackWrapper(onExitedAction, rootObject);
QString textComponent = R"(
import QtQuick 2.15
MouseArea {
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: quickUpdaterData.arrDifferentTypes[0].invoke()
onEntered: quickUpdaterData.arrDifferentTypes[1].invoke()
onExited: quickUpdaterData.arrDifferentTypes[2].invoke()
}
)";
QVariantList list;
list.append(QVariant::fromValue(wrapperClickedAction));
list.append(QVariant::fromValue(wrapperonEnteredAction));
list.append(QVariant::fromValue(wrapperonExitedAction));
QuickHelper::addComponent(rootObject, list,textComponent);
};

View File

@ -4,6 +4,7 @@
#include "QObject"
class QQuickItem;
class CallbackWrapper;
class QuickHelper
{
public:
@ -16,10 +17,20 @@ public:
static void clearChildren(QQuickItem *parentItem);
static void moveTextFiledX(QQuickItem *parentItem);
static QQuickItem * getQuickItem(QObject *rootObject, const QString &elementName);
static void addMouseArea(QObject *rootObject, std::function<void ()> onClickAction);
// static void addMouseArea(QObject *rootObject, std::function<void ()> onClickAction);
static void doFunction(QObject *rootObject, const QList<QVariant> &listItems, const QString &textFunction, const QString &functionName);
static void updateColor(QObject *rootObject, QColor disabledColor, QColor enabledColor);
static void setPorpetryEnumerator(
QQuickItem * item,
const QString & enumeratorName,
const QString & propertyName,
const QString & propertyValue
);
static void textChangedSubscription(QObject *rootObject, CallbackWrapper *wrapper);
static void addComponent(QObject *rootObject, const QList<QVariant> &listItems, const QString &textComponent);
static void addMouseAreaElements(QObject *rootObject, std::function<void ()> onClickedAction, std::function<void ()> onEnteredAction, std::function<void ()> onExitedAction);
};
#endif // QUICKHELPER_H

View File

@ -1 +0,0 @@
#include "quickupdater.h"

View File

@ -1,5 +1,4 @@
#include "settingspageactivity.h"
#include "mainpageactivity.h"
#include <QJSEngine>
#include <QQmlContext>
#include <QQmlEngine>
@ -10,9 +9,11 @@
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include "settingsrepository.h"
#include "callbackwrapper.h"
#include "models/settingspagemodel.h"
SettingsPageActivity::SettingsPageActivity(QQuickItem *item, QObject *parent)
: root(item)
SettingsPageActivity::SettingsPageActivity(QQuickItem *item,const std::function<void()>& onSave, QObject *parent)
: root(item), QObject(parent), onSave(&onSave)
{
if (!item) {
qWarning() << "[C++] Root object is null";
@ -31,8 +32,19 @@ SettingsPageActivity::SettingsPageActivity(QQuickItem *item, QObject *parent)
SettingsPageActivity::init();
}
extern QQmlApplicationEngine *engine;
SettingsPageActivity::~SettingsPageActivity() {
qDebug()<<textProjectPath;
qDebug()<<textRemoteAddress;
}
void SettingsPageActivity::pageChanged()
{
// showDialogSave();
}
bool SettingsPageActivity::isAllElementsFound(){
bool retCode = true; // Флаг ошибки
bool retCode = true;
fieldProjectPath = QuickHelper::getQuickItem(root, FIELD_PROJECT_PATH);
if (!fieldProjectPath) {
@ -50,21 +62,203 @@ bool SettingsPageActivity::isAllElementsFound(){
return retCode;
}
#include "ArrDifferentTypes.h"
void doFunction(
QObject* rootObject,
const QList<QVariant>& listItems,
const QString& textComponent,
const QString& functionName,
SettingsPageActivity& activity
) {
qDebug() << "[C++] Starting to create function";
if (!rootObject) {
qWarning() << "[C++] Root object is null";
return;
}
QQuickItem* parentItem = qobject_cast<QQuickItem*>(rootObject);
if (!parentItem) {
qWarning() << "[C++] Root object is not a QQuickItem";
return;
}
QQmlEngine* engine = qmlEngine(rootObject);
if (!engine) {
qWarning() << "[C++] Failed to get QQmlEngine";
return;
}
// 1. Создаем ArrDifferentTypes и добавляем в контекст QML
ArrDifferentTypes* arrDifferentTypes = new ArrDifferentTypes(parentItem);
arrDifferentTypes->setArrDifferentTypes(listItems);
// SettingsPageModel * settingsPageModel = new SettingsPageModel(parentItem);
// settingsPageModel->setProjectPath(activity.textProjectPath);
// settingsPageModel->setRemoteAddressUri(activity.textRemoteAddress);
QQmlContext* context = new QQmlContext(engine->rootContext(), parentItem);
context->setContextProperty("quickUpdaterData", arrDifferentTypes);
QQmlComponent component(engine);
component.setData(textComponent.toLocal8Bit(), QUrl());
if (component.isError()) {
qWarning() << "QML Component errors:" << component.errors() << "\n" << textComponent;
delete context;
return;
}
QObject* updaterObject = component.create(context);
if (!updaterObject) {
qWarning() << "Error creating updaterObject:" << component.errors();
delete context;
return;
}
// 4. Настраиваем родительские связи (управление памятью через Qt-родителя)
updaterObject->setParent(parentItem);
QQuickItem *updaterObjectItem = qobject_cast<QQuickItem*>(updaterObject);
if (updaterObjectItem) {
updaterObjectItem->setParentItem(parentItem);
}
// 5. Контекст удалится автоматически при удалении updaterObject
context->setParent(updaterObject);
// 6. Вызываем функцию в QML
bool success = QMetaObject::invokeMethod(
updaterObject,
functionName.toUtf8().constData(),
Q_ARG(QVariant, QVariant::fromValue(rootObject))
);
if (!success) {
qWarning() << "Failed to invoke QML function:" << functionName;
}
}
void SettingsPageActivity::init()
{
if(!isAllElementsFound()) return;
QString projectDir = SettingsRepository::instance().defaultProjectDirectory();
QUrl remoteAddress = SettingsRepository::instance().remoteAddressUrl();
textProjectPath = SettingsRepository::instance().defaultProjectDirectory();
textRemoteAddress = SettingsRepository::instance().remoteAddressUrl().toString();
fieldRemoteAdress->setProperty("text", remoteAddress.toString());
fieldProjectPath->setProperty("text", projectDir);
fieldRemoteAdress->setProperty("text", textRemoteAddress);
fieldProjectPath->setProperty("text", textProjectPath);
QuickHelper::moveTextFiledX(fieldRemoteAdress);
QuickHelper::moveTextFiledX(fieldProjectPath);
}
void SettingsPageActivity::showDialogSave(std::function<void()> doYes, std::function<void()> doNo, std::function<void()> doCancel)
{
CallbackWrapper *wraper = new CallbackWrapper([this]{textProjectPathChanged();},this);
QuickHelper::textChangedSubscription(fieldProjectPath,wraper);
wraper = new CallbackWrapper([this]{textRemoteAddressPathChanged();},this);
QuickHelper::textChangedSubscription(fieldRemoteAdress,wraper);
QQuickItem *rootItem= qobject_cast<QQuickItem*>(::engine->rootObjects()[0]->children()[0]);
QString componentText = R"(
import QtQuick 2.15
import QtQuick.Controls 2.15
Item {
function showMe(item) {
console.log("showMe dialog")
dialogLoader.source = "QtQuckApp/qml/SaveChangesDialog.qml"
console.log("showMe dialog after")
}
Loader {
id: dialogLoader
onLoaded: {
console.log("onLoaded")
if (item) {
console.log("item exsist")
item.saveRequested.connect(function() {
console.log("Yes")
quickUpdaterData.arrDifferentTypes[0].invoke()
})
item.cancelRequested.connect(function() {
console.log("No")
quickUpdaterData.arrDifferentTypes[1].invoke()
})
item.abortRequested.connect(function() {
console.log("Abort")
quickUpdaterData.arrDifferentTypes[2].invoke()
})
item.open()
}
}
}
}
)";
QObject *item = 0;
QVariantList list;
CallbackWrapper * wrapperYes = new CallbackWrapper([this,doYes] {
qDebug() << "CallbackWrapperSave";
doYes();
});
CallbackWrapper * wrapperNo = new CallbackWrapper([this,doNo] {
qDebug() << "CallbackWrapperSave";
doNo();
});
CallbackWrapper * wrapperCancel = new CallbackWrapper([this,doCancel] {
qDebug() << "CallbackWrapperSave";
doCancel();
});
list.append(QVariant::fromValue(wrapperYes));
list.append(QVariant::fromValue(wrapperNo));
list.append(QVariant::fromValue(wrapperCancel));
QQuickItem* parentItem = qobject_cast<QQuickItem*>(rootItem);
if (!parentItem) {
qWarning() << "[C++] Root object is not a QQuickItem";
return;
}
SettingsPageModel * settingsPageModel = new SettingsPageModel();
settingsPageModel->setProjectPath(textProjectPath);
settingsPageModel->setRemoteAddressUri(textRemoteAddress);
engine->rootContext()->setContextProperty("settingsPageModel", settingsPageModel);
// (*onSave)();
// doFunction(parentItem, list, componentText, "showMe", *this);
QuickHelper::doFunction(parentItem, list, componentText, "showMe");
}
void SettingsPageActivity::textProjectPathChanged() {
textProjectPath = fieldProjectPath->property("text").toString();
}
void SettingsPageActivity::textRemoteAddressPathChanged()
{
textRemoteAddress = fieldRemoteAdress->property("text").toString();
}
void SettingsPageActivity::isAllowChangePage(const std::function<void ()> &continueChange, const std::function<void ()> &blockChange)
{
showDialogSave(
[this,continueChange]{ if(onSave) (*onSave)(); continueChange();}
,[this,continueChange]{continueChange();}
,[this,blockChange]{blockChange();}
);
};
void SettingsPageActivity::errorOccurredDynamycLoaderHandler(const QString &message)
{
qDebug()<<message;
}

View File

@ -2,18 +2,23 @@
#define SETTINGSPAGEACTIVITY_H
#include <QObject>
#include "QDebug"
#include "interfaces/IPageActivity.h"
class QQuickItem;
class DynamicLoader;
class QQmlEngine;
class SettingsPageActivity : public QObject
class SettingsPageActivity : public QObject, public IPageActivity
{
Q_OBJECT
const std::function<void()>* onSave;
public:
explicit SettingsPageActivity(QQuickItem * item, QObject *parent = nullptr);
explicit SettingsPageActivity(QQuickItem * item,const std::function<void()>& onSave, QObject *parent = nullptr);
~SettingsPageActivity() override;
void pageChanged() override final;
private:
QQuickItem * root;
DynamicLoader* loader = 0;
@ -27,8 +32,19 @@ private:
bool isAllElementsFound();
void init();
void destroyedHandler(QObject * = nullptr);
void showDialogSave (
std::function<void()> doYes,
std::function<void()> doNo,
std::function<void()> doCancel);
public:
QString textProjectPath;
QString textRemoteAddress;
void textProjectPathChanged();
void textRemoteAddressPathChanged();
void isAllowChangePage(const std::function<void()> &continueChange, const std::function<void()> &blockChange) override final;
private slots:
void errorOccurredDynamycLoaderHandler(const QString& message);
signals: