add listview in consolt log
This commit is contained in:
23
Main.qml
23
Main.qml
@@ -87,10 +87,9 @@ ApplicationWindow {
|
|||||||
|
|
||||||
readonly property string consoleTitle: tabs.currentIndex === 0 ? "Консоль обновления" : tabs.currentIndex === 1 ? "Консоль установки" : "Консоль удаления"
|
readonly property string consoleTitle: tabs.currentIndex === 0 ? "Консоль обновления" : tabs.currentIndex === 1 ? "Консоль установки" : "Консоль удаления"
|
||||||
readonly property string consoleStatus: Utils.statusConsole(tabs.currentIndex, UpdateManager.isUpdating, UpdateManager.isInstalling, UpdateManager.isRemoving)
|
readonly property string consoleStatus: Utils.statusConsole(tabs.currentIndex, UpdateManager.isUpdating, UpdateManager.isInstalling, UpdateManager.isRemoving)
|
||||||
|
readonly property var consoleLog: tabs.currentIndex === 0 ? UpdateManager.updateLog
|
||||||
// readonly property var consoleLog: tabs.currentIndex === 0 ? UpdateManager.updateLog
|
: tabs.currentIndex === 1 ? UpdateManager.installLog
|
||||||
// : tabs.currentIndex === 1 ? UpdateManager.installLog
|
: UpdateManager.removalLog
|
||||||
// : UpdateManager.removalLog
|
|
||||||
|
|
||||||
Components.ConsoleBar {
|
Components.ConsoleBar {
|
||||||
id: consoleBar
|
id: consoleBar
|
||||||
@@ -100,14 +99,14 @@ ApplicationWindow {
|
|||||||
onToggled: root.consoleOpen = !root.consoleOpen
|
onToggled: root.consoleOpen = !root.consoleOpen
|
||||||
}
|
}
|
||||||
|
|
||||||
// Components.ConsolePanel {
|
Components.ConsolePanel {
|
||||||
// id: consolePanel
|
id: consolePanel
|
||||||
// anchors.bottom: consoleBar.top
|
anchors.bottom: consoleBar.top
|
||||||
// consoleOpen: root.consoleOpen
|
consoleOpen: root.consoleOpen
|
||||||
// status: root.consoleStatus
|
status: root.consoleStatus
|
||||||
// title: root.consoleTitle
|
title: root.consoleTitle
|
||||||
// consoleLogData: root.consoleLogData
|
consoleLogData: root.consoleLog
|
||||||
// }
|
}
|
||||||
|
|
||||||
Dialogs.PasswordDialog {
|
Dialogs.PasswordDialog {
|
||||||
id: passwordDialog
|
id: passwordDialog
|
||||||
|
|||||||
@@ -39,3 +39,18 @@ QVariantList UpdateManager::packages() const
|
|||||||
{
|
{
|
||||||
return m_packages;
|
return m_packages;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QStringList UpdateManager::updateLog() const
|
||||||
|
{
|
||||||
|
return m_update_log;
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList UpdateManager::installLog() const
|
||||||
|
{
|
||||||
|
return m_install_log;
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList UpdateManager::removalLog() const
|
||||||
|
{
|
||||||
|
return m_removal_log;
|
||||||
|
}
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ class UpdateManager : public QObject
|
|||||||
Q_PROPERTY(bool isUpdating READ isUpdating NOTIFY isUpdatingChanged)
|
Q_PROPERTY(bool isUpdating READ isUpdating NOTIFY isUpdatingChanged)
|
||||||
Q_PROPERTY(bool isInstalling READ isInstalling NOTIFY isInstallingChanged)
|
Q_PROPERTY(bool isInstalling READ isInstalling NOTIFY isInstallingChanged)
|
||||||
Q_PROPERTY(bool isRemoving READ isRemoving NOTIFY isRemovingChanged)
|
Q_PROPERTY(bool isRemoving READ isRemoving NOTIFY isRemovingChanged)
|
||||||
|
Q_PROPERTY(QStringList removalLog READ removalLog NOTIFY removalLogChanged)
|
||||||
|
Q_PROPERTY(QStringList updateLog READ updateLog NOTIFY updateLogChanged)
|
||||||
|
Q_PROPERTY(QStringList installLog READ installLog NOTIFY installLogChanged)
|
||||||
Q_PROPERTY(QVariantList packages READ packages NOTIFY packagesChanged)
|
Q_PROPERTY(QVariantList packages READ packages NOTIFY packagesChanged)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -31,6 +34,9 @@ class UpdateManager : public QObject
|
|||||||
bool isUpdating() const;
|
bool isUpdating() const;
|
||||||
bool isInstalling() const;
|
bool isInstalling() const;
|
||||||
bool isRemoving() const;
|
bool isRemoving() const;
|
||||||
|
QStringList updateLog() const;
|
||||||
|
QStringList installLog() const;
|
||||||
|
QStringList removalLog() const;
|
||||||
QVariantList packages() const;
|
QVariantList packages() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -67,6 +73,8 @@ class UpdateManager : public QObject
|
|||||||
std::unique_ptr<QTemporaryDir> m_askpass_dir;
|
std::unique_ptr<QTemporaryDir> m_askpass_dir;
|
||||||
QByteArray m_update_output;
|
QByteArray m_update_output;
|
||||||
QStringList m_update_log;
|
QStringList m_update_log;
|
||||||
|
QStringList m_install_log;
|
||||||
|
QStringList m_removal_log;
|
||||||
QTimer m_update_watchdog;
|
QTimer m_update_watchdog;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
@@ -77,5 +85,7 @@ class UpdateManager : public QObject
|
|||||||
void isRemovingChanged();
|
void isRemovingChanged();
|
||||||
void packagesChanged();
|
void packagesChanged();
|
||||||
void updateLogChanged();
|
void updateLogChanged();
|
||||||
|
void installLogChanged();
|
||||||
|
void removalLogChanged();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user