diff --git a/CellFrameDashboardGUI/main.qml b/CellFrameDashboardGUI/main.qml index ae336dc30f0f00133c56d3afcb9d6c63eac29057..073f94b1c1ea2b91f6848ed7b806492c926f02da 100755 --- a/CellFrameDashboardGUI/main.qml +++ b/CellFrameDashboardGUI/main.qml @@ -1,5 +1,6 @@ import QtQuick 2.0 import QtQuick.Controls 2.0 +import QtGraphicalEffects 1.0 import "screen" ApplicationWindow @@ -8,16 +9,37 @@ ApplicationWindow visible: true width: 1280 height: 800 - + //Main window DapMainApplicationWindow { + id:mainWindow property alias device: dapDevice.device anchors.fill: parent Device { - id: dapDevice + id: dapDevice } } + + ///The image with the effect fast blur + Image + { + id: screenShotMainWindow + anchors.fill: parent + sourceSize: Qt.size(parent.width, parent.height) + smooth: true + visible: false + } + // Fast bluer application + FastBlur + { + id: fastBlurMainWindow + anchors.fill: screenShotMainWindow + source: screenShotMainWindow + radius: 50 + visible: false + } + } diff --git a/CellFrameDashboardGUI/qml.qrc b/CellFrameDashboardGUI/qml.qrc index f9c79da04e13827ae605d6f06a8f83e98bea412f..e70bb2d2aedbab22629c67d0bf3fadc26aaa5ce0 100755 --- a/CellFrameDashboardGUI/qml.qrc +++ b/CellFrameDashboardGUI/qml.qrc @@ -80,6 +80,15 @@ <file>res/icons/new-wallet_icon_dark.png</file> <file>res/icons/ic_arrow_drop_down.png</file> <file>res/icons/ic_arrow_drop_up.png</file> + <file>screen/desktop/Logs/DapLogsTab.qml</file> + <file>screen/desktop/Logs/DapLogsTabForm.ui.qml</file> + <file>screen/desktop/Logs/DapLogsTopPanel.qml</file> + <file>screen/desktop/Logs/DapLogsTopPanelForm.ui.qml</file> + <file>screen/desktop/Logs/DapLogsScreen.qml</file> + <file>screen/desktop/Logs/DapLogsScreenForm.ui.qml</file> + <file>screen/desktop/Logs/DapLogsRightPanel.qml</file> + <file>screen/desktop/Logs/DapLogsRightPanelForm.ui.qml</file> + <file>res/icons/icon_export.png</file> <file>screen/desktop/Dashboard/RightPanel/DapTransactionHistoryRightPanel.qml</file> <file>screen/desktop/Dashboard/RightPanel/DapTransactionHistoryRightPanelForm.ui.qml</file> <file>screen/desktop/Dashboard/RightPanel/DapInputNewWalletNameRightPanel.qml</file> diff --git a/CellFrameDashboardGUI/res/icons/icon_export.png b/CellFrameDashboardGUI/res/icons/icon_export.png new file mode 100644 index 0000000000000000000000000000000000000000..71ca310503c17c32b1765499a1829ffab8386f8c Binary files /dev/null and b/CellFrameDashboardGUI/res/icons/icon_export.png differ diff --git a/CellFrameDashboardGUI/screen/DapMainApplicationWindow.qml b/CellFrameDashboardGUI/screen/DapMainApplicationWindow.qml index 8ab8085d8cf51fd7a55ecda397135486d3d260ff..44893c95f2db92d1e17bada98835184f22fb74a1 100644 --- a/CellFrameDashboardGUI/screen/DapMainApplicationWindow.qml +++ b/CellFrameDashboardGUI/screen/DapMainApplicationWindow.qml @@ -10,6 +10,10 @@ DapMainApplicationWindowForm readonly property string historyScreen: "qrc:/screen/" + device + "/History/DapHistoryTab.qml" ///@detalis Path to the settings tab. readonly property string settingsScreen: "qrc:/screen/" + device + "/Settings/DapSettingsTab.qml" + ///@detalis Path to the logs tab. + readonly property string logsScreen: "qrc:/screen/" + device + "/Logs/DapLogsTab.qml" + + // Menu bar tab model @@ -46,6 +50,13 @@ DapMainApplicationWindowForm normalIcon: "qrc:/res/icons/icon_settings.png", hoverIcon: "qrc:/res/icons/icon_settings_hover.png" }) + + append ({ + name: qsTr("Logs"), + page: logsScreen, + normalIcon: "qrc:/res/icons/icon_logs.png", + hoverIcon: "qrc:/res/icons/icon_logs_hover.png" + }) } } diff --git a/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTopPanelForm.ui_BACKUP_6288.qml b/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTopPanelForm.ui_BACKUP_6288.qml deleted file mode 100644 index fe848398d7aec871a1b31e7fc6af9fa59ecad8d9..0000000000000000000000000000000000000000 --- a/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTopPanelForm.ui_BACKUP_6288.qml +++ /dev/null @@ -1,133 +0,0 @@ -import QtQuick 2.4 -import QtQuick.Controls 2.0 -<<<<<<< HEAD -import "qrc:/widgets" -======= ->>>>>>> develop -import "../../" - - -DapAbstractTopPanel -{ -<<<<<<< HEAD - anchors.fill: parent -======= - property alias testButton: button - Button - { - id: button - anchors.fill: parent - text: "Press" - } ->>>>>>> develop - - // Static text "Wallet" - Label - { - id:textHeaderWallet - text: qsTr("Wallet") - anchors.left: parent.left - anchors.leftMargin: 24 * pt - anchors.verticalCenter: parent.verticalCenter - font.family: DapMainApplicationWindow.dapFontRobotoRegular.name - font.pixelSize: 12 * pt - color: "#ACAAB5" - } - - // Wallet selection combo box - Rectangle - { - id: frameComboBox - - anchors.left: textHeaderWallet.right - anchors.verticalCenter: parent.verticalCenter - anchors.leftMargin: 30 * pt - width: 148 * pt - color: "transparent" - - DapComboBox - { - id: comboboxWallet - - model: ListModel{ - id:ÑonversionList - ListElement{text:"all wallets"} - ListElement{text:"Money for children"} - ListElement{text:"Money for education"} - ListElement{text:"Money for medicine"} - } - - indicatorImageNormal: "qrc:/res/icons/ic_arrow_drop_down.png" - indicatorImageActive: "qrc:/res/icons/ic_arrow_drop_up.png" - sidePaddingNormal:0 * pt - sidePaddingActive:16 * pt - topIndentActive:10 * pt - normalColorText:"#070023" - hilightColorText:"#FFFFFF" - normalColorTopText:"#FFFFFF" - hilightColorTopText:"#070023" - hilightColor: "#330F54" - normalTopColor: "#070023" - fontSizeComboBox: 14*px - widthPopupComboBoxNormal:148 * pt - widthPopupComboBoxActive:180 * pt - heightComboBoxNormal:24 * pt - heightComboBoxActive:44 * pt - bottomIntervalListElement:8 * pt - topEffect:false - x: popup.visible ? sidePaddingActive * (-1) : sidePaddingNormal - } - } - - // Static wallet balance text "Wallet balance" - Label - { - id: headerWalletBalance - text: qsTr("Wallet balance") - anchors.left: frameComboBox.right - anchors.leftMargin: 70 * pt - anchors.verticalCenter: parent.verticalCenter - font.family: DapMainApplicationWindow.dapFontRobotoRegular.name - font.pixelSize: 12 * pt - color: "#ACAAB5" - } - - // Dynamic wallet balance text - Label - { - id: textWalletBalance - text: "$ 3 050 745.3453289 USD" - anchors.left: headerWalletBalance.right - anchors.leftMargin: 18 * pt - anchors.verticalCenter: parent.verticalCenter - font.family: DapMainApplicationWindow.dapFontRobotoRegular.name - font.pixelSize: 16 * pt - color: "#FFFFFF" - } - - // Wallet create button - DapButton - { - id: addWalletButton - textButton: "New wallet" - anchors.right: parent.right - anchors.rightMargin: 24 * pt - anchors.verticalCenter: parent.verticalCenter - normalImageButton: "qrc:/res/icons/new-wallet_icon_dark.png" - hoverImageButton: "qrc:/res/icons/new-wallet_icon_dark_hover.png" - heightButton: 24 * pt - widthButton: 120 * pt - widthImageButton: 28 * pt - heightImageButton: 28 * pt - indentImageLeftButton: 10 * pt - colorBackgroundNormal:"#070023" - colorBackgroundHover: "#D51F5D" - colorButtonTextNormal: "#FFFFFF" - colorButtonTextHover: "#FFFFFF" - indentTextRight: 20 * pt - fontSizeButton: 14 * pt - existenceImage:true - borderColorButton: "#000000" - borderWidthButton: 0 - } -} diff --git a/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTopPanelForm.ui_BASE_6288.qml b/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTopPanelForm.ui_BASE_6288.qml deleted file mode 100644 index ea5ef5959e3cd220fa7a09b158bc0461f64ee4a3..0000000000000000000000000000000000000000 --- a/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTopPanelForm.ui_BASE_6288.qml +++ /dev/null @@ -1,18 +0,0 @@ -import QtQuick 2.4 -import "../../" - -DapAbstractTopPanel -{ - -} - - - - - - - -/*##^## Designer { - D{i:0;autoSize:true;height:480;width:640} -} - ##^##*/ diff --git a/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTopPanelForm.ui_LOCAL_6288.qml b/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTopPanelForm.ui_LOCAL_6288.qml deleted file mode 100644 index 1b689c1d6207418c18e1a9ad5ae9a8dd9f5d9c49..0000000000000000000000000000000000000000 --- a/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTopPanelForm.ui_LOCAL_6288.qml +++ /dev/null @@ -1,120 +0,0 @@ -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import "qrc:/widgets" -import "../../" - - -DapAbstractTopPanel -{ - anchors.fill: parent - - // Static text "Wallet" - Label - { - id:textHeaderWallet - text: qsTr("Wallet") - anchors.left: parent.left - anchors.leftMargin: 24 * pt - anchors.verticalCenter: parent.verticalCenter - font.family: DapMainApplicationWindow.dapFontRobotoRegular.name - font.pixelSize: 12 * pt - color: "#ACAAB5" - } - - // Wallet selection combo box - Rectangle - { - id: frameComboBox - - anchors.left: textHeaderWallet.right - anchors.verticalCenter: parent.verticalCenter - anchors.leftMargin: 30 * pt - width: 148 * pt - color: "transparent" - - DapComboBox - { - id: comboboxWallet - - model: ListModel{ - id:ÑonversionList - ListElement{text:"all wallets"} - ListElement{text:"Money for children"} - ListElement{text:"Money for education"} - ListElement{text:"Money for medicine"} - } - - indicatorImageNormal: "qrc:/res/icons/ic_arrow_drop_down.png" - indicatorImageActive: "qrc:/res/icons/ic_arrow_drop_up.png" - sidePaddingNormal:0 * pt - sidePaddingActive:16 * pt - topIndentActive:10 * pt - normalColorText:"#070023" - hilightColorText:"#FFFFFF" - normalColorTopText:"#FFFFFF" - hilightColorTopText:"#070023" - hilightColor: "#330F54" - normalTopColor: "#070023" - fontSizeComboBox: 14*px - widthPopupComboBoxNormal:148 * pt - widthPopupComboBoxActive:180 * pt - heightComboBoxNormal:24 * pt - heightComboBoxActive:44 * pt - bottomIntervalListElement:8 * pt - topEffect:false - x: popup.visible ? sidePaddingActive * (-1) : sidePaddingNormal - } - } - - // Static wallet balance text "Wallet balance" - Label - { - id: headerWalletBalance - text: qsTr("Wallet balance") - anchors.left: frameComboBox.right - anchors.leftMargin: 70 * pt - anchors.verticalCenter: parent.verticalCenter - font.family: DapMainApplicationWindow.dapFontRobotoRegular.name - font.pixelSize: 12 * pt - color: "#ACAAB5" - } - - // Dynamic wallet balance text - Label - { - id: textWalletBalance - text: "$ 3 050 745.3453289 USD" - anchors.left: headerWalletBalance.right - anchors.leftMargin: 18 * pt - anchors.verticalCenter: parent.verticalCenter - font.family: DapMainApplicationWindow.dapFontRobotoRegular.name - font.pixelSize: 16 * pt - color: "#FFFFFF" - } - - // Wallet create button - DapButton - { - id: addWalletButton - textButton: "New wallet" - anchors.right: parent.right - anchors.rightMargin: 24 * pt - anchors.verticalCenter: parent.verticalCenter - normalImageButton: "qrc:/res/icons/new-wallet_icon_dark.png" - hoverImageButton: "qrc:/res/icons/new-wallet_icon_dark_hover.png" - heightButton: 24 * pt - widthButton: 120 * pt - widthImageButton: 28 * pt - heightImageButton: 28 * pt - indentImageLeftButton: 10 * pt - colorBackgroundNormal:"#070023" - colorBackgroundHover: "#D51F5D" - colorButtonTextNormal: "#FFFFFF" - colorButtonTextHover: "#FFFFFF" - indentTextRight: 20 * pt - fontSizeButton: 14 * pt - existenceImage:true - borderColorButton: "#000000" - borderWidthButton: 0 - } -} diff --git a/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTopPanelForm.ui_REMOTE_6288.qml b/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTopPanelForm.ui_REMOTE_6288.qml deleted file mode 100644 index b58555259e7bc024f2f444000d92b2f0484c5839..0000000000000000000000000000000000000000 --- a/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTopPanelForm.ui_REMOTE_6288.qml +++ /dev/null @@ -1,26 +0,0 @@ -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import "../../" - -DapAbstractTopPanel -{ - property alias testButton: button - Button - { - id: button - anchors.fill: parent - text: "Press" - } - -} - - - - - - - -/*##^## Designer { - D{i:0;autoSize:true;height:480;width:640} -} - ##^##*/ diff --git a/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsRightPanel.qml b/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsRightPanel.qml new file mode 100644 index 0000000000000000000000000000000000000000..5321fc765d0c50b73dc315434050734935edde17 --- /dev/null +++ b/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsRightPanel.qml @@ -0,0 +1,6 @@ +import QtQuick 2.4 + +DapLogsRightPanelForm +{ + +} diff --git a/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsRightPanelForm.ui.qml b/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsRightPanelForm.ui.qml new file mode 100644 index 0000000000000000000000000000000000000000..765d2f13240609980946f68d0bf920165fe72042 --- /dev/null +++ b/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsRightPanelForm.ui.qml @@ -0,0 +1,9 @@ +import QtQuick 2.4 +import "../../" + +DapAbstractRightPanel +{ + width: 0 + height: 0 + visible: false +} diff --git a/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsScreen.qml b/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsScreen.qml new file mode 100644 index 0000000000000000000000000000000000000000..4a9b45784a8f1f782edf6ba9ca456528b2ef9cd1 --- /dev/null +++ b/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsScreen.qml @@ -0,0 +1,271 @@ +import QtQuick.Window 2.2 +import QtQuick.Controls 2.1 +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +DapLogsScreenForm +{ + ///@detalis firstMarginList First indent in the delegate to the first word. + property int firstMarginList: 16 * pt + ///@detalis secondMarginList Second indent between the first and second word. + property int secondMarginList: 18 * pt + ///@detalis thirdMarginList Third indent between the second and third word and the following. + property int thirdMarginList: 40 * pt + ///@detalis fifthMarginList Fifth indent between the second and third word and the following. + property int fifthMarginList: 20 * pt + ///@detalis fontSizeList Font size delegate. + property int fontSizeList: 16 * pt + ///@detalis fontSizeHeader Font size header. + property int fontSizeHeader: 12 * pt + ///@detalis fontFamily Font family. + property string fontFamily: "Roboto" + ///@detalis Font color. + property string fontColor: "#070023" + + ///In this block, the properties are only auxiliary for internal use. + QtObject + { + id: privateDate + //Day + property int day: 86400 + //Current time + property var today + property var todayDay + property var todayMonth + property var todayYear + property var stringTime + } + + //Creates a list model for the example + Component.onCompleted: { + dapLogsListViewIndex = -1; + privateDate.today = new Date(); + privateDate.todayDay = privateDate.today.getDate(); + privateDate.todayMonth = privateDate.today.getMonth(); + privateDate.todayYear = privateDate.today.getFullYear(); + var timeString = new Date(); + var day = new Date(86400); + var count = 1000 + for (var i = 0; i < count; i++) + { + var momentTime = timeString/1000 - (day/6) * i; + var momentDay = getDay(momentTime); + dapLogsModel.append({"type":"DBG"+i, "info":"Add problems"+i, "file":"dup_chein"+i, "time":getTime(momentTime), + "date":getDay(momentTime)}); + } + } + + ListModel + { + id:dapLogsModel + } + //The Component Header + Component + { + id:delegateLogsHeader + Rectangle + { + height: 30 * pt + width: dapLogsListView.width + color: "#908D9D" + + Text + { + anchors.fill: parent + anchors.topMargin: 8 * pt + anchors.bottomMargin: 8 * pt + anchors.leftMargin: firstMarginList + color: "#FFFFFF" + font.pixelSize: fontSizeHeader + font.family: fontFamily + text: section + } + } + } + + + //The component delegate + Component + { + id:delegateLogs + + //Frame delegate + Rectangle + { + height: 60 * pt + width: dapLogsListView.width + + color: + { + if(dapLogsListViewIndex === index) + { + return "#FAE5ED"; + } + else + { + return "#FFFFFF"; + } + } + + //Event container + Rectangle + { + anchors.fill: parent + anchors.topMargin: 20 * pt + anchors.bottomMargin: 20 * pt + anchors.leftMargin: firstMarginList + anchors.rightMargin: fifthMarginList + color: parent.color + + //Frame type log + Rectangle + { + id:frameTypeLog + anchors.left: parent.left + anchors.top: parent.top + anchors.bottom: parent.bottom + width: 43 * pt + color: parent.color + Text + { + id: typeLog + anchors.fill: parent + font.pixelSize: fontSizeList + font.family: fontFamily + color: fontColor + text: type + } + } + + // Frame text log + Rectangle + { + id:frameTextLog + anchors.left: frameTypeLog.right + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.leftMargin: secondMarginList + width: 488 * pt + color: parent.color + Text + { + id: textLog + anchors.fill: parent + font.pixelSize: fontSizeList + font.family: fontFamily + color: fontColor + text: info + } + } + + //Frame file log + Rectangle + { + id: frameFileLog + anchors.left: frameTextLog.right + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.leftMargin: thirdMarginList + width: 326 * pt + color: parent.color + Text + { + id: fileLog + anchors.fill: parent + font.pixelSize: 14 * pt + font.family: fontFamily + color: fontColor + text: file + } + } + + //Frame time log + Rectangle + { + id: frameTimeLog + anchors.left: frameFileLog.right + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.leftMargin: thirdMarginList + width: 62 * pt + color: parent.color + Text + { + id: timeLog + anchors.fill: parent + font.pixelSize: fontSizeList + font.family: fontFamily + color: fontColor + text: time + } + } + } + + //Underline bar + Rectangle + { + anchors.bottom: parent.bottom + color: "#E3E2E6" + width: parent.width + height: 1 * pt + } + + MouseArea + { + anchors.fill: parent + onClicked: + { + dapLogsListViewIndex = index; + } + } + } + } + + //This function converts the string representation of time to the Date format + function parceTime(thisTime) + { + var aDate = thisTime.split('-'); + var aDay = aDate[0].split('/'); + var aTime = aDate[1].split(':'); + privateDate.stringTime = new Date(20+aDay[2], aDay[0] - 1, aDay[1], aTime[0], aTime[1], aTime[2]); + } + + //Returns the time in the correct form for the delegate + function getTime(thisTime) + { + var tmpTime = new Date(thisTime * 1000) + var thisHour = tmpTime.getHours(); + var thisMinute = tmpTime.getMinutes(); + var thisSecond = tmpTime.getSeconds(); + if(thisMinute<10) thisMinute = '0' + thisMinute; + if(thisSecond<10) thisSecond = '0' + thisSecond; + return thisHour + ':' + thisMinute + ':' + thisSecond; + } + + //Returns the time in the correct form for the header + function getDay(thisTime) + { + var monthArray = ["January", "February", "March", "April", "May", "June", "July", "August", "September", + "October", "November", "December"]; + var tmpDate = new Date(thisTime*1000); + var thisMonth = tmpDate.getMonth(); + var thisDay = tmpDate.getDate(); + var thisYear = tmpDate.getFullYear(); + + if(thisYear === privateDate.todayYear) + { + if(thisMonth === privateDate.todayMonth) + { + switch(thisDay){ + case(privateDate.todayDay): return"Today"; + case(privateDate.todayDay-1): return"Yesterday"; + default: return monthArray[thisMonth] + ', ' + thisDay; + } + } + else + return monthArray[thisMonth] + ', ' + thisDay; + } + else + return monthArray[thisMonth] + ', ' + thisDay + ', ' + thisYear; + } +} diff --git a/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsScreenForm.ui.qml b/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsScreenForm.ui.qml new file mode 100644 index 0000000000000000000000000000000000000000..2a499ecf359067f3eb06987cbe484f8505f368ff --- /dev/null +++ b/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsScreenForm.ui.qml @@ -0,0 +1,34 @@ +import QtQuick 2.4 +import QtQuick.Controls 2.0 +import "../../" + +DapAbstractScreen +{ + + id: logsBoard + ///@detalis dapLogsListView Indicates an active item. + property alias dapLogsListViewIndex: dapLogsList.currentIndex + ///@detalis dapLogsListView Log list widget. + property alias dapLogsListView: dapLogsList + + ListView + { + id: dapLogsList + anchors.fill: parent + anchors.topMargin: 24 * pt + anchors.leftMargin: 24 * pt + anchors.rightMargin: 24 * pt + clip: true + model: dapLogsModel + delegate: delegateLogs + section.property: "date" + section.criteria: ViewSection.FullString + section.delegate: delegateLogsHeader + } +} + +/*##^## +Designer { + D{i:0;autoSize:true;height:480;width:640} +} +##^##*/ diff --git a/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsTab.qml b/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsTab.qml new file mode 100644 index 0000000000000000000000000000000000000000..8996c3b440e744a9fad1926386decf431d983ae3 --- /dev/null +++ b/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsTab.qml @@ -0,0 +1,6 @@ +import QtQuick 2.4 + +DapLogsTabForm +{ + +} diff --git a/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsTabForm.ui.qml b/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsTabForm.ui.qml new file mode 100644 index 0000000000000000000000000000000000000000..c9167d8121110203ea1ac39d109d789ebb8830e4 --- /dev/null +++ b/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsTabForm.ui.qml @@ -0,0 +1,14 @@ +import QtQuick 2.4 +import "qrc:/" +import "../../" + +DapAbstractTab +{ + id: logsTab + + dapTopPanel: DapLogsTopPanel { } + + dapScreen: DapLogsScreen { } + + dapRightPanel: DapLogsRightPanel { } +} diff --git a/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsTopPanel.qml b/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsTopPanel.qml new file mode 100644 index 0000000000000000000000000000000000000000..684fa7762bb5bafde4b236c627caeb7d7aa650af --- /dev/null +++ b/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsTopPanel.qml @@ -0,0 +1,54 @@ +import QtQuick 2.4 +import QtQuick.Dialogs 1.2 +import Qt.labs.platform 1.0 +import QtGraphicalEffects 1.0 +import "../../" + +DapLogsTopPanelForm +{ + ///Loader for the Save window. + Loader + { + id:saveWindow + } + + ///Component for the Save dialog box. + Component + { + id:saveFile + FileDialog + { + id: saveDialog + title: "Save the file" + fileMode: FileDialog.SaveFile + + onFileChanged: + { + setPropertyDefaultWindow(); + } + + onRejected: + { + setPropertyDefaultWindow(); + } + Component.onCompleted: visible = true; + } + } + + ///Creating a screenshot of a window + function grub() + { + var x = mainWindow.grabToImage(function(result){screenShotMainWindow.source = result.url;}, + Qt.size(mainWindow.width, mainWindow.height)); + fastBlurMainWindow.source = screenShotMainWindow + fastBlurMainWindow.visible = true + } + + ///Default window settings + function setPropertyDefaultWindow() + { + fastBlurMainWindow.visible = false; + saveWindow.sourceComponent = undefined; + buttonNormalColor = "#070023"; + } +} diff --git a/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsTopPanelForm.ui.qml b/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsTopPanelForm.ui.qml new file mode 100644 index 0000000000000000000000000000000000000000..4488c106b25027e1b1aad0c393321abb11d68e0a --- /dev/null +++ b/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsTopPanelForm.ui.qml @@ -0,0 +1,54 @@ +import QtQuick 2.4 +import QtQuick.Controls 2.0 +import "../../" +import "qrc:/widgets" + +DapAbstractTopPanel +{ + id:topLogsPanel + + property alias buttonNormalColor: exportLogButton.colorBackgroundNormal + + //Export log button + DapButton + { + id: exportLogButton + textButton: "Export log" + anchors.right: parent.right + anchors.rightMargin: 24 * pt + anchors.verticalCenter: parent.verticalCenter + normalImageButton: "qrc:/res/icons/icon_export.png" + hoverImageButton: "qrc:/res/icons/icon_export.png" + height: 36 * pt + width: 120 * pt + widthImageButton: 28 * pt + heightImageButton: 28 * pt + indentImageLeftButton: 10 * pt + colorBackgroundNormal:"#070023" + colorBackgroundHover: "#D2145D" + colorButtonTextNormal: "#FFFFFF" + colorButtonTextHover: "#FFFFFF" + indentTextRight: 10 * pt + borderColorButton: "#000000" + borderWidthButton: 0 + fontButton.family: "Roboto" + fontButton.pixelSize: 14 * pt + fontButton.weight: Font.Normal + horizontalAligmentText:Qt.AlignRight + colorTextButton: "#FFFFFF" + } + + ///Handler for clicking the button exportLogButton + Connections + { + target: exportLogButton + onClicked: + { + grub(); + exportLogButton.colorBackgroundNormal = "#D2145D" + saveWindow.sourceComponent = saveFile; + } + } + +} +