cleaned up a bit
This commit is contained in:
parent
de327ccbc4
commit
28b5abca7d
@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 7.0.2, 2022-07-21T21:29:21. -->
|
||||
<!-- Written by QtCreator 7.0.2, 2022-07-23T21:09:37. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{45a71af6-65bb-4af1-a2df-6ab519c8565c}</value>
|
||||
<value type="QByteArray">{055df76c-eb5f-479b-9e45-f478a706e6f9}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
@ -77,15 +77,12 @@
|
||||
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
|
||||
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
||||
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
|
||||
<value type="int" key="ClangTools.ParallelJobs">2</value>
|
||||
<value type="int" key="ClangTools.ParallelJobs">0</value>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
||||
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="CppEditor.QuickFix">
|
||||
<value type="bool" key="UseGlobalSettings">true</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
@ -94,7 +91,7 @@
|
||||
<value type="QString" key="DeviceType">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{0d1d96e7-0317-4f7a-a513-68284676b112}</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{f0d093c2-ceeb-4303-9c63-b1e5c487b907}</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
@ -107,8 +104,7 @@
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="QString" key="CMake.Source.Directory">/home/SMB.BASEALT.RU/kozyrevid/work/new_alterator</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/SMB.BASEALT.RU/kozyrevid/work/new_alterator/build</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/yura/work/new_alterator/build</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
@ -142,27 +138,25 @@
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Отладка</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="CMake.Build.Type">Release</value>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Unix Makefiles
|
||||
-DCMAKE_BUILD_TYPE:STRING=Debug
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="QString" key="CMake.Source.Directory">/home/SMB.BASEALT.RU/kozyrevid/work/new_alterator</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/SMB.BASEALT.RU/kozyrevid/work/new_alterator/release</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/yura/work/build-new_alterator-Desktop-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Сборка</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
@ -176,7 +170,6 @@
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Сборка</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
@ -189,10 +182,98 @@
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Выпуск</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="QString" key="CMake.Build.Type">RelWithDebInfo</value>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Unix Makefiles
|
||||
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/yura/work/build-new_alterator-Desktop-RelWithDebInfo</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Сборка</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Очистка</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Очистка</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release with Debug Information</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.3">
|
||||
<value type="QString" key="CMake.Build.Type">MinSizeRel</value>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Unix Makefiles
|
||||
-DCMAKE_BUILD_TYPE:STRING=MinSizeRel
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/yura/work/build-new_alterator-Desktop-MinSizeRel</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Сборка</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Очистка</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Очистка</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Minimum Size Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">4</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
@ -221,7 +302,7 @@
|
||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/SMB.BASEALT.RU/kozyrevid/work/new_alterator/build</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/yura/work/new_alterator/build</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
|
@ -20,16 +20,10 @@ find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Quick QuickWidgets D
|
||||
|
||||
set(SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/alterator_loader.cpp
|
||||
# ${CMAKE_CURRENT_SOURCE_DIR}/src/dbus_connector.cpp
|
||||
# ${CMAKE_CURRENT_SOURCE_DIR}/src/dbus_interface.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/dbus_property_map.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/new_interface.cpp)
|
||||
|
||||
set(HEADERS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include/alterator_loader.h
|
||||
# ${CMAKE_CURRENT_SOURCE_DIR}/include/dbus_connector.h
|
||||
# ${CMAKE_CURRENT_SOURCE_DIR}/include/dbus_interface.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include/dbus_property_map.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include/new_interface.h)
|
||||
|
||||
set(ALTERATORLIB_VERSION 0.0.1)
|
||||
|
@ -8,10 +8,7 @@
|
||||
#include <QVector>
|
||||
#include <QProcess>
|
||||
#include <QQmlApplicationEngine>
|
||||
//#include "dbus_connector.h"
|
||||
//#include "dbus_interface.h"
|
||||
#include "alterator_loader_config.h"
|
||||
//#include "dbus_action.h"
|
||||
|
||||
namespace Alterator{
|
||||
class Loader: public QObject
|
||||
@ -22,9 +19,6 @@ public:
|
||||
|
||||
signals:
|
||||
void move(QString windowId, QString targetUrl);
|
||||
// void ifaceReqS( QString senderId, QString shortName
|
||||
// , QString service, QString path
|
||||
// , QString interface, bool isSessionBus );
|
||||
|
||||
public slots:
|
||||
void openReq(QString targetUrl);
|
||||
@ -32,23 +26,18 @@ public slots:
|
||||
void closed(QString senderId);
|
||||
void back(QString senderId);
|
||||
void forvard(QString senderId);
|
||||
// void getIface(QString targetId, DBusInterface * iface);
|
||||
// void collectIfaces(QString targetId, QVariant data);
|
||||
|
||||
private:
|
||||
const QString windowUrl = windowURLM;
|
||||
|
||||
void open(QString targetUrl);
|
||||
void justMove(QString senderId, QString targetUrl);
|
||||
private slots:
|
||||
void deathCertificate(QObject *that);
|
||||
private:
|
||||
private:
|
||||
QHash<QString, QVector<QString>> past;
|
||||
QHash<QString, QVector<QString>> future;
|
||||
QHash<QString, QObject *> widgets;
|
||||
QHash<QObject *, QString> reverse_widgets;
|
||||
QQmlApplicationEngine *engine;
|
||||
// DBusConnector *dbus;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -38,9 +38,6 @@ class newInterface: public QQmlComponent{
|
||||
// WRITE setProperties
|
||||
NOTIFY propertiesChanged)
|
||||
|
||||
// Q_PROPERTY(bool isReady READ isReady)
|
||||
|
||||
// Q_ENUM(QDBus::CallMode)
|
||||
public:
|
||||
newInterface(QObject *parent = 0);
|
||||
~newInterface();
|
||||
@ -95,8 +92,6 @@ private:
|
||||
int status;
|
||||
bool ready;
|
||||
|
||||
// DBusPropertyMap *introspectProperties(QString service, QString path,
|
||||
// QString interface, bool isSessionBus);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include "../include/alterator_loader.h"
|
||||
//#include "../../include/dist_info.h"
|
||||
//#include "../include/dbus_connector.h"
|
||||
#include "../../include/dist_info.h"
|
||||
#include <QQmlComponent>
|
||||
#include <QQmlApplicationEngine>
|
||||
#include <QQuickItem>
|
||||
@ -12,38 +11,19 @@
|
||||
namespace Alterator {
|
||||
Loader::Loader(QObject *p):QObject(p)
|
||||
{
|
||||
// dbus = new DBusConnector(this);
|
||||
engine = new QQmlApplicationEngine(this);
|
||||
engine->addImportPath("../../new_alterator/");
|
||||
qmlRegisterType<Alterator::newInterface>("Alterator.newInterface", 1, 0, "NewInterface");
|
||||
// qmlRegisterType<Alterator::DistInfo>("Alterator.DistInfo", 1, 0, "DistInfo");
|
||||
// qmlRegisterType<Alterator::DBusConnector>("Alterator.DBusConnector", 1, 0, "DBusConnector");
|
||||
qmlRegisterType<Alterator::DistInfo>("Alterator.DistInfo", 1, 0, "DistInfo");
|
||||
QString startingPage = "../resources/DistInfo.qml";
|
||||
past = QHash<QString, QVector<QString>>();
|
||||
future = QHash<QString, QVector<QString>>();
|
||||
widgets = QHash<QString, QObject *>();
|
||||
// if(!connect(dbus, SIGNAL(giveInterface(QString, DBusInterface *))
|
||||
// , this, SLOT(getIface(QString, DBusInterface *)))){
|
||||
// qDebug() << __func__ << "failed to connect to getIface\n";
|
||||
// } else {
|
||||
// qDebug() << __func__ << "getIface signal connected\n";
|
||||
// }
|
||||
|
||||
// if (!connect(this,
|
||||
// SIGNAL(ifaceReqS(QString, QString, QString, QString, QString, bool)),
|
||||
// dbus,
|
||||
// SLOT(ifaceReq(QString, QString, QString, QString, QString, bool)))) {
|
||||
// fprintf(stderr, "%s: failed to connect to DBusConnector::ifaceReq\n", __func__);
|
||||
// } else {
|
||||
// fprintf(stderr, "%s: ifaceReqS signal connected\n", __func__);
|
||||
// }
|
||||
open(startingPage);
|
||||
}
|
||||
|
||||
void Loader::open(QString targetUrl){
|
||||
QString windowId = QUuid::createUuid().toString();
|
||||
// engine->load(windowUrl);
|
||||
// QObject *window = engine->rootObjects().last();
|
||||
QQmlComponent *component = new QQmlComponent(engine, windowUrl,
|
||||
QQmlComponent::PreferSynchronous);
|
||||
auto t = QVariantMap();
|
||||
@ -57,20 +37,11 @@ void Loader::open(QString targetUrl){
|
||||
connect(window, SIGNAL(closedS(QString)), this, SLOT(closed(QString)), Qt::QueuedConnection);
|
||||
connect(window, SIGNAL(backS(QString)), this, SLOT(back(QString)));
|
||||
connect(window, SIGNAL(forvardS(QString)), this, SLOT(forvard(QString)));
|
||||
// if(!connect(window, SIGNAL(neededIfaces(QString, QVariant)),
|
||||
// this, SLOT(collectIfaces(QString, QVariant)))){
|
||||
// qDebug() << __func__ << "failed to connect to collectIfaces\n";
|
||||
// } else {
|
||||
// qDebug() << __func__ << "collectIfaces signal connected\n";
|
||||
// }
|
||||
|
||||
past.insert(windowId, QVector<QString>() << targetUrl);
|
||||
future.insert(windowId, QVector<QString>());
|
||||
widgets.insert(windowId, window);
|
||||
reverse_widgets.insert(window, windowId);
|
||||
connect(window, SIGNAL(destroyed(QObject*)), this, SLOT(deathCertificate(QObject *)));
|
||||
// QQmlContext *windowContext = new QQmlContext(engine->rootContext(), window);
|
||||
// windowContext->setObjectName("windowContext");
|
||||
|
||||
component->completeCreate();
|
||||
|
||||
@ -78,16 +49,6 @@ void Loader::open(QString targetUrl){
|
||||
component->deleteLater();
|
||||
}
|
||||
|
||||
void Loader::deathCertificate(QObject *thatWindow) {
|
||||
auto iter = reverse_widgets.constFind(thatWindow);
|
||||
if (iter == reverse_widgets.constEnd()) {
|
||||
qDebug() << __PRETTY_FUNCTION__ << ": bogus destroyed notification\n";
|
||||
return;
|
||||
}
|
||||
widgets.remove(iter.value());
|
||||
qDebug()<< __PRETTY_FUNCTION__ << ": removing window '" << iter.value() << "' from widgets QHash\n";
|
||||
}
|
||||
|
||||
void Loader::openReq(QString targetUrl){
|
||||
open(targetUrl);
|
||||
}
|
||||
@ -110,29 +71,6 @@ void Loader::moveReq(QString senderId, QString targetUrl){
|
||||
void Loader::closed(QString senderId){
|
||||
past.remove(senderId);
|
||||
future.remove(senderId);
|
||||
// QObject *window = widgets[senderId];
|
||||
// if (!window) {
|
||||
// qDebug() << __func__ << ": window is NULL\n";
|
||||
// return;
|
||||
// }
|
||||
// if (window->parent()) {
|
||||
// qDebug()<< __PRETTY_FUNCTION__ << ": window has a parent\n";
|
||||
// }
|
||||
widgets.remove(senderId);
|
||||
// disconnect(window, SIGNAL(openReqS(QString)), this, SLOT(openReq(QString)));
|
||||
// disconnect(window, SIGNAL(moveReqS(QString, QString)),
|
||||
// this, SLOT(moveReq(QString, QString)));
|
||||
// disconnect(window, SIGNAL(closedS(QString)), this, SLOT(closed(QString)));
|
||||
// disconnect(window, SIGNAL(backS(QString)), this, SLOT(back(QString)));
|
||||
// disconnect(window, SIGNAL(forvardS(QString)), this, SLOT(forvard(QString)));
|
||||
// window->deleteLater();
|
||||
/* if(widgets.isEmpty()) {
|
||||
QMetaObject::invokeMethod(QCoreApplication::instance(),
|
||||
"quit",
|
||||
Qt::QueuedConnection);
|
||||
}
|
||||
*/
|
||||
qDebug() << __PRETTY_FUNCTION__ << " that's all, folks\n";
|
||||
}
|
||||
|
||||
void Loader::back(QString senderId){
|
||||
@ -152,38 +90,4 @@ void Loader::forvard(QString senderId){
|
||||
justMove(senderId, targetUrl);
|
||||
}
|
||||
}
|
||||
|
||||
//void Loader::getIface(QString targetId, DBusInterface *iface){
|
||||
|
||||
//// QObject *window = widgets[targetId];
|
||||
//// if (!window) {
|
||||
//// qDebug() << __func__<<": eek, window is NULL";
|
||||
//// return;
|
||||
//// }
|
||||
//// QObject *page = window->findChild<QObject *>("currentPageN");
|
||||
//// if(!page) {
|
||||
//// qDebug() << __func__ <<": eek, page is NULL";
|
||||
//// return;
|
||||
//// }
|
||||
//// QQmlContext *windowContext = window->findChild<QQmlContext *>("windowContext");
|
||||
//// windowContext->setContextProperty(iface->getShortName(), iface);
|
||||
//// engine->rootContext()->setContextProperty("abc", "qwerty");
|
||||
//// QQmlContext *ifaceContext = new QQmlContext(windowContext, iface);
|
||||
//// ifaceContext->setContextProperty("properties", iface->getProperties());
|
||||
//// window->findChild<QObject *>("currentPageN")->setProperty("active", true);
|
||||
//// qDebug() << 1;
|
||||
//}
|
||||
|
||||
//void Loader::collectIfaces(QString targetId, QVariant data){
|
||||
//// QList<QVariant> raw = data.toList();
|
||||
//// QVariant i;
|
||||
//// foreach(i, raw){
|
||||
//// QHash<QString, QVariant> t = i.toHash();
|
||||
//// emit(ifaceReqS(targetId, t["shortName"].toString(), t["service"].toString(),
|
||||
//// t["path"].toString(), t["interface"].toString(), t["isSessionBus"].toBool()));
|
||||
//// }
|
||||
//// qDebug() << 1;
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
|
@ -2,8 +2,7 @@ import QtQuick 2.15
|
||||
import QtQuick.Window 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
import QtQuick.Controls 2.15
|
||||
//import Alterator.DistInfo 1.0
|
||||
//import Alterator.DBusConnector 1.0
|
||||
import Alterator.DistInfo 1.0
|
||||
import Alterator.newInterface 1.0
|
||||
import shared 1.0
|
||||
|
||||
@ -22,91 +21,90 @@ ScrollView {
|
||||
|
||||
anchors.fill: parent
|
||||
TextArea{text: hostname.isReady() ? hostname.properties.Chassis : ""}
|
||||
// ColumnLayout{
|
||||
// id: content
|
||||
ColumnLayout{
|
||||
id: content
|
||||
|
||||
// height: view.height
|
||||
height: view.height
|
||||
|
||||
// DistInfo{id: back}
|
||||
// DBusConnector{id: dbus}
|
||||
DistInfo{id: back}
|
||||
|
||||
// TextWithHeader{
|
||||
// id: editionArea
|
||||
TextWithHeader{
|
||||
id: editionArea
|
||||
|
||||
// Layout.minimumWidth: 500
|
||||
// Layout.preferredWidth: currentPage.width
|
||||
// headerS: "ALT edition"
|
||||
// keys: ["Kernel", "OS version", "Updated to"]
|
||||
// vals: [dbus.getProperty("hostname", "KernelName").toString() + " " +
|
||||
// dbus.getProperty("hostname", "KernelRelease").toString()
|
||||
// , back.getInstalledOS()
|
||||
// , dbus.getProperty("hostname", "OperatingSystemPrettyName").toString()]
|
||||
// n: 3
|
||||
// comp: Component{
|
||||
// Image {
|
||||
// sourceSize.width: 100
|
||||
// sourceSize.height: 100
|
||||
// source: "../resources/wiki_logo.svg"
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
Layout.minimumWidth: 500
|
||||
Layout.preferredWidth: currentPage.width
|
||||
headerS: "ALT edition"
|
||||
keys: ["Kernel", "OS version", "Updated to"]
|
||||
vals: [hostname.properties.KernelName + " " +
|
||||
hostname.properties.KernelRelease
|
||||
, back.getInstalledOS()
|
||||
, hostname.properties.OperatingSystemPrettyName]
|
||||
n: 3
|
||||
comp: Component{
|
||||
Image {
|
||||
sourceSize.width: 100
|
||||
sourceSize.height: 100
|
||||
source: "../resources/wiki_logo.svg"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TextWithHeader {
|
||||
// id: systemArea
|
||||
TextWithHeader {
|
||||
id: systemArea
|
||||
|
||||
// Layout.minimumWidth: 550
|
||||
// Layout.preferredWidth: currentPage.width
|
||||
// headerS: "System"
|
||||
// keys: ["Chassis", "Vendor", "Device name", "Processor", "RAM", "GPU"]
|
||||
// vals: [ dbus.getProperty("hostname", "Chassis").toString()
|
||||
// , dbus.getProperty("hostname", "HardwareVendor").toString()
|
||||
// , dbus.getProperty("hostname", "HardwareModel").toString()
|
||||
// , back.getProcessor(), back.getRAM(), getSysType() ]
|
||||
// n: 6
|
||||
// comp: Component{
|
||||
// Button{
|
||||
// text: '<font color="blue"><u>More information</u></font>'
|
||||
// background: Rectangle{
|
||||
// color: "white"
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
Layout.minimumWidth: 550
|
||||
Layout.preferredWidth: currentPage.width
|
||||
headerS: "System"
|
||||
keys: ["Chassis", "Vendor", "Device name", "Processor", "RAM", "GPU"]
|
||||
vals: [ hostname.properties.Chassis,
|
||||
hostname.properties.HardwareVendor,
|
||||
hostname.properties.HardwareModel,
|
||||
back.getProcessor(), back.getRAM(), getSysType() ]
|
||||
n: 6
|
||||
comp: Component{
|
||||
Button{
|
||||
text: '<font color="blue"><u>More information</u></font>'
|
||||
background: Rectangle{
|
||||
color: "white"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// function getSysType() { return "qwerty" }
|
||||
// }
|
||||
function getSysType() { return "qwerty" }
|
||||
}
|
||||
|
||||
// TextWithHeader{
|
||||
// id: hostnameArea
|
||||
TextWithHeader{
|
||||
id: hostnameArea
|
||||
|
||||
// Layout.minimumWidth: 550
|
||||
// Layout.preferredWidth: currentPage.width
|
||||
// headerS: "Computer name, domain..."
|
||||
// keys: ["Hostname", "Realm", "Domain role", "Workgroup"]
|
||||
// vals: [dbus.getProperty("hostname", "Hostname").toString()
|
||||
// , back.getRealm(), back.getRole(), back.getWorkgroup()]
|
||||
// n: 4
|
||||
// comp: Component{
|
||||
// Button{
|
||||
// text: '<font color="blue"><u>Domain settings</u></font>'
|
||||
// background: Rectangle{
|
||||
// color: "white"
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
Layout.minimumWidth: 550
|
||||
Layout.preferredWidth: currentPage.width
|
||||
headerS: "Computer name, domain..."
|
||||
keys: ["Hostname", "Realm", "Domain role", "Workgroup"]
|
||||
vals: [hostname.properties.Hostname,
|
||||
back.getRealm(), back.getRole(), back.getWorkgroup()]
|
||||
n: 4
|
||||
comp: Component{
|
||||
Button{
|
||||
text: '<font color="blue"><u>Domain settings</u></font>'
|
||||
background: Rectangle{
|
||||
color: "white"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Item {Layout.fillHeight: true}
|
||||
Item {Layout.fillHeight: true}
|
||||
|
||||
// TextArea{
|
||||
// textFormat: Text.AutoText
|
||||
// text: "<html><p>Project's site: <a href=" +
|
||||
// back.getHomeURL() + ">" + back.getHomeURL() +
|
||||
// "</a><br>Report bugs here: <a href=" +
|
||||
// back.getBugURL() + ">" + back.getBugURL() + "</a></p></html>"
|
||||
// onLinkActivated: Qt.openUrlExternally(link)
|
||||
// selectByMouse: true
|
||||
// selectByKeyboard: true
|
||||
// Layout.bottomMargin: 12
|
||||
// }
|
||||
// }
|
||||
TextArea{
|
||||
textFormat: Text.AutoText
|
||||
text: "<html><p>Project's site: <a href=" +
|
||||
back.getHomeURL() + ">" + back.getHomeURL() +
|
||||
"</a><br>Report bugs here: <a href=" +
|
||||
back.getBugURL() + ">" + back.getBugURL() + "</a></p></html>"
|
||||
onLinkActivated: Qt.openUrlExternally(link)
|
||||
selectByMouse: true
|
||||
selectByKeyboard: true
|
||||
Layout.bottomMargin: 12
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user