qcanvas 1.0.11__py3-none-any.whl → 2026.1.19__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- qcanvas/__init__.py +60 -0
- qcanvas/app.py +72 -0
- qcanvas/backend_connectors/frontend_resource_manager.py +13 -5
- qcanvas/backend_connectors/qcanvas_task_master.py +2 -2
- qcanvas/icons/__init__.py +55 -6
- qcanvas/icons/_icon_type.py +42 -0
- qcanvas/icons/icons.qrc +48 -8
- qcanvas/icons/rc_icons.py +2477 -566
- qcanvas/settings/__init__.py +6 -0
- qcanvas/{util/settings → settings}/_client_settings.py +15 -6
- qcanvas/settings/_course_settings.py +54 -0
- qcanvas/{util/settings → settings}/_mapped_setting.py +8 -6
- qcanvas/{util/settings → settings}/_ui_settings.py +5 -5
- qcanvas/theme.py +101 -0
- qcanvas/ui/course_viewer/content_tree.py +37 -19
- qcanvas/ui/course_viewer/course_tree/__init__.py +1 -0
- qcanvas/ui/course_viewer/course_tree/_course_icon_generator.py +86 -0
- qcanvas/ui/course_viewer/{course_tree.py → course_tree/course_tree.py} +29 -14
- qcanvas/ui/course_viewer/course_viewer.py +79 -46
- qcanvas/ui/course_viewer/tabs/assignment_tab/assignment_tab.py +107 -29
- qcanvas/ui/course_viewer/tabs/assignment_tab/assignment_tree.py +19 -18
- qcanvas/ui/course_viewer/tabs/content_tab.py +33 -39
- qcanvas/ui/course_viewer/tabs/file_tab/__init__.py +1 -0
- qcanvas/ui/course_viewer/tabs/file_tab/file_tab.py +46 -0
- qcanvas/ui/course_viewer/tabs/file_tab/file_tree.py +96 -0
- qcanvas/ui/course_viewer/tabs/file_tab/pages_file_tree.py +55 -0
- qcanvas/ui/course_viewer/tabs/mail_tab/mail_tab.py +50 -27
- qcanvas/ui/course_viewer/tabs/mail_tab/mail_tree.py +18 -19
- qcanvas/ui/course_viewer/tabs/page_tab/page_tab.py +3 -3
- qcanvas/ui/course_viewer/tabs/page_tab/page_tree.py +18 -16
- qcanvas/ui/course_viewer/tabs/resource_rich_browser.py +61 -74
- qcanvas/ui/course_viewer/tree_widget_data_item.py +22 -0
- qcanvas/ui/memory_tree/_tree_memory.py +45 -41
- qcanvas/ui/memory_tree/memory_tree_widget.py +22 -18
- qcanvas/ui/memory_tree/memory_tree_widget_item.py +3 -3
- qcanvas/ui/qcanvas_window/__init__.py +1 -0
- qcanvas/ui/qcanvas_window/course_viewer_container.py +95 -0
- qcanvas/ui/{main_ui → qcanvas_window}/options/auto_download_resources_option.py +8 -6
- qcanvas/ui/{main_ui → qcanvas_window}/options/quick_sync_option.py +7 -6
- qcanvas/ui/{main_ui → qcanvas_window}/options/sync_on_start_option.py +7 -6
- qcanvas/ui/{main_ui → qcanvas_window}/options/theme_selection_menu.py +12 -10
- qcanvas/ui/{main_ui → qcanvas_window}/qcanvas_window.py +74 -45
- qcanvas/ui/{main_ui → qcanvas_window}/status_bar_progress_display.py +20 -12
- qcanvas/ui/qml_components/__init__.py +4 -0
- qcanvas/ui/qml_components/attachments_pane.py +70 -0
- qcanvas/ui/qml_components/comments_pane.py +83 -0
- qcanvas/ui/qml_components/qml/AttachmentsList.ui.qml +15 -0
- qcanvas/ui/qml_components/qml/AttachmentsListDelegate.qml +77 -0
- qcanvas/ui/qml_components/qml/AttachmentsListModel.qml +19 -0
- qcanvas/ui/qml_components/qml/AttachmentsPane.qml +11 -0
- qcanvas/ui/qml_components/qml/CommentsList.ui.qml +15 -0
- qcanvas/ui/qml_components/qml/CommentsListDelegate.ui.qml +118 -0
- qcanvas/ui/qml_components/qml/CommentsListModel.qml +56 -0
- qcanvas/ui/qml_components/qml/CommentsPane.qml +11 -0
- qcanvas/ui/qml_components/qml/DecoratedText.ui.qml +44 -0
- qcanvas/ui/qml_components/qml/Spacer.ui.qml +7 -0
- qcanvas/ui/qml_components/qml/ThemedRectangle.qml +53 -0
- qcanvas/ui/qml_components/qml/__init__.py +3 -0
- qcanvas/ui/qml_components/qml/rc_qml.py +709 -0
- qcanvas/ui/qml_components/qml/rc_qml.qrc +16 -0
- qcanvas/ui/qml_components/qml_bridge_types.py +95 -0
- qcanvas/ui/qml_components/qml_pane.py +21 -0
- qcanvas/ui/setup/setup_checker.py +3 -3
- qcanvas/ui/setup/setup_dialog.py +173 -80
- qcanvas/util/__init__.py +0 -2
- qcanvas/util/auto_downloader.py +9 -8
- qcanvas/util/basic_fonts.py +2 -2
- qcanvas/util/context_dict.py +12 -0
- qcanvas/util/file_icons.py +46 -0
- qcanvas/util/html_cleaner.py +2 -0
- qcanvas/util/layouts.py +9 -8
- qcanvas/util/paths.py +26 -22
- qcanvas/util/qurl_util.py +1 -1
- qcanvas/util/runtime.py +20 -0
- qcanvas/util/ui_tools.py +121 -7
- qcanvas/util/url_checker.py +1 -1
- qcanvas-2026.1.19.dist-info/METADATA +95 -0
- qcanvas-2026.1.19.dist-info/RECORD +92 -0
- {qcanvas-1.0.11.dist-info → qcanvas-2026.1.19.dist-info}/WHEEL +1 -1
- qcanvas-2026.1.19.dist-info/entry_points.txt +3 -0
- qcanvas/app_start/__init__.py +0 -54
- qcanvas/icons/file-download-failed.svg +0 -6
- qcanvas/icons/file-downloaded.svg +0 -6
- qcanvas/icons/file-not-downloaded.svg +0 -6
- qcanvas/icons/file-unknown.svg +0 -6
- qcanvas/icons/main_icon.svg +0 -325
- qcanvas/icons/sync.svg +0 -7
- qcanvas/run.py +0 -30
- qcanvas/ui/main_ui/__init__.py +0 -0
- qcanvas/ui/main_ui/course_viewer_container.py +0 -52
- qcanvas/util/settings/__init__.py +0 -9
- qcanvas/util/themes.py +0 -24
- qcanvas-1.0.11.dist-info/METADATA +0 -61
- qcanvas-1.0.11.dist-info/RECORD +0 -68
- qcanvas-1.0.11.dist-info/entry_points.txt +0 -3
- /qcanvas/ui/course_viewer/tabs/{util.py → constants.py} +0 -0
- /qcanvas/ui/{main_ui → qcanvas_window}/options/__init__.py +0 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
This is a UI file (.ui.qml) that is intended to be edited in Qt Design Studio only.
|
|
5
|
+
It is supposed to be strictly declarative and only uses a subset of QML. If you edit
|
|
6
|
+
this file manually, you might introduce QML code that is not supported by Qt Design Studio.
|
|
7
|
+
Check out https://doc.qt.io/qtcreator/creator-quick-ui-forms.html for details on .ui.qml files.
|
|
8
|
+
*/
|
|
9
|
+
import QtQuick
|
|
10
|
+
import QtQuick.Controls
|
|
11
|
+
|
|
12
|
+
Control {
|
|
13
|
+
padding: 15
|
|
14
|
+
topInset: 5
|
|
15
|
+
bottomInset: 5
|
|
16
|
+
background: Rectangle {
|
|
17
|
+
color: palette.midlight
|
|
18
|
+
radius: 4
|
|
19
|
+
border.color: palette.dark
|
|
20
|
+
}
|
|
21
|
+
clip: true
|
|
22
|
+
height: delegate.height + padding * 2
|
|
23
|
+
anchors {
|
|
24
|
+
left: view.contentItem.left
|
|
25
|
+
right: view.contentItem.right
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
contentItem: Item {
|
|
29
|
+
id: delegate
|
|
30
|
+
height: column.height
|
|
31
|
+
anchors {
|
|
32
|
+
left: parent.left
|
|
33
|
+
right: parent.right
|
|
34
|
+
margins: padding
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
Column {
|
|
38
|
+
id: column
|
|
39
|
+
anchors {
|
|
40
|
+
left: parent.left
|
|
41
|
+
right: parent.right
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
Item {
|
|
45
|
+
height: authorText.height
|
|
46
|
+
anchors {
|
|
47
|
+
left: parent.left
|
|
48
|
+
right: parent.right
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
Text {
|
|
52
|
+
id: authorText
|
|
53
|
+
text: modelData.author
|
|
54
|
+
clip: true
|
|
55
|
+
color: palette.text
|
|
56
|
+
|
|
57
|
+
font {
|
|
58
|
+
pointSize: 12
|
|
59
|
+
bold: true
|
|
60
|
+
}
|
|
61
|
+
anchors {
|
|
62
|
+
left: parent.left
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
Text {
|
|
67
|
+
id: commentDate
|
|
68
|
+
text: modelData.date
|
|
69
|
+
verticalAlignment: Text.AlignVCenter
|
|
70
|
+
horizontalAlignment: Text.AlignRight
|
|
71
|
+
color: palette.text
|
|
72
|
+
clip: true
|
|
73
|
+
|
|
74
|
+
anchors {
|
|
75
|
+
left: authorText.right
|
|
76
|
+
right: parent.right
|
|
77
|
+
top: parent.top
|
|
78
|
+
bottom: parent.bottom
|
|
79
|
+
leftMargin: 5
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
Spacer {
|
|
85
|
+
size: 10
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
DecoratedText {
|
|
89
|
+
text: modelData.body
|
|
90
|
+
lineWidth: 2
|
|
91
|
+
anchors {
|
|
92
|
+
left: parent.left
|
|
93
|
+
right: parent.right
|
|
94
|
+
}
|
|
95
|
+
content {
|
|
96
|
+
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
Spacer {
|
|
101
|
+
size: 10
|
|
102
|
+
visible: modelData.attachments.length > 0
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
AttachmentsList {
|
|
106
|
+
id: attachmentsList
|
|
107
|
+
height: contentHeight
|
|
108
|
+
model: modelData.attachments
|
|
109
|
+
interactive: false
|
|
110
|
+
visible: modelData.attachments.length > 0
|
|
111
|
+
anchors {
|
|
112
|
+
left: parent.left
|
|
113
|
+
right: parent.right
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import QtQuick
|
|
2
|
+
|
|
3
|
+
ListModel {
|
|
4
|
+
ListElement {
|
|
5
|
+
body: "This is a comment. Gaze at it. Be amazed."
|
|
6
|
+
author: "I am Steve"
|
|
7
|
+
date: "2001-01-01 36:00"
|
|
8
|
+
attachments: [
|
|
9
|
+
ListElement {
|
|
10
|
+
file_name: "texas.pdf"
|
|
11
|
+
resource_id: "1"
|
|
12
|
+
download_state: "NOT_DOWNLOADED"
|
|
13
|
+
},
|
|
14
|
+
ListElement {
|
|
15
|
+
file_name: "oh_no_what_a_terribly_long_file_name_its_not_like_someone_would_actually_do_this.pdf"
|
|
16
|
+
resource_id: "2"
|
|
17
|
+
download_state: "FAILED"
|
|
18
|
+
},
|
|
19
|
+
ListElement {
|
|
20
|
+
file_name: "i was transported to another world where javascript doesn't exist.cbz"
|
|
21
|
+
resource_id: "3"
|
|
22
|
+
download_state: "DOWNLOADED"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
ListElement {
|
|
27
|
+
body: "If Morbius has a million fans, I am one of them.\nIf Morbius has 5 fans, I am one of them.\nIf Morbius has one fan, That one is me.\nIf Morbius has no fans, I am no longer alive.\nIf the world is against Morbius, I am against the world.\nTill my last breath, I'll love Morbius (2022)."
|
|
28
|
+
author: "Goku"
|
|
29
|
+
date: "1942-16-34 06:63"
|
|
30
|
+
attachments: [
|
|
31
|
+
ListElement {
|
|
32
|
+
file_name: "morbius_x264_1080.mkv"
|
|
33
|
+
resource_id: "blahblah"
|
|
34
|
+
download_state: "NOT_DOWNLOADED"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
ListElement {
|
|
39
|
+
body: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
|
|
40
|
+
author: "Word Wrap Test"
|
|
41
|
+
date: "2000-02-02"
|
|
42
|
+
attachments: []
|
|
43
|
+
}
|
|
44
|
+
ListElement {
|
|
45
|
+
body: "x264 forms the core of many web video services, such as Youtube, Facebook, Vimeo, and Hulu. It is widely used by television broadcasters and ISPs."
|
|
46
|
+
author: "BideoJAN Wordsblahblah"
|
|
47
|
+
date: "2027-07-28"
|
|
48
|
+
attachments: [
|
|
49
|
+
ListElement {
|
|
50
|
+
file_name: "Ass1_SOMEDUDE_48.pdf"
|
|
51
|
+
resource_id: "blah_v345"
|
|
52
|
+
download_state: "DOWNLOADED"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import QtQuick
|
|
2
|
+
import QtQuick.Controls
|
|
3
|
+
import QtQuick.Layouts
|
|
4
|
+
|
|
5
|
+
Item {
|
|
6
|
+
property alias text: content.text
|
|
7
|
+
property int lineWidth: 3
|
|
8
|
+
property color lineColour: palette.accent
|
|
9
|
+
property alias content: content
|
|
10
|
+
|
|
11
|
+
Layout.fillWidth: true
|
|
12
|
+
height: content.contentHeight
|
|
13
|
+
clip: true
|
|
14
|
+
|
|
15
|
+
Item {
|
|
16
|
+
anchors.fill: parent
|
|
17
|
+
height: content.contentHeight
|
|
18
|
+
|
|
19
|
+
Rectangle {
|
|
20
|
+
id: decoration
|
|
21
|
+
width: lineWidth
|
|
22
|
+
color: lineColour
|
|
23
|
+
radius: 1
|
|
24
|
+
anchors {
|
|
25
|
+
left: parent.left
|
|
26
|
+
top: parent.top
|
|
27
|
+
bottom: parent.bottom
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
Text/*Edit*/ {
|
|
32
|
+
id: content
|
|
33
|
+
Layout.fillWidth: true
|
|
34
|
+
color: palette.text
|
|
35
|
+
//readOnly: true
|
|
36
|
+
//textFormat: TextEdit.AutoText
|
|
37
|
+
anchors {
|
|
38
|
+
left: decoration.right
|
|
39
|
+
leftMargin: 10
|
|
40
|
+
right: parent.right
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import QtQuick
|
|
2
|
+
|
|
3
|
+
Rectangle {
|
|
4
|
+
property Palette theme: getTheme()
|
|
5
|
+
color: theme.base
|
|
6
|
+
|
|
7
|
+
function getTheme() {
|
|
8
|
+
if (appTheme.theme === "native")
|
|
9
|
+
return palette
|
|
10
|
+
else if (appTheme.dark_mode === true)
|
|
11
|
+
return darkTheme
|
|
12
|
+
else
|
|
13
|
+
return lightTheme
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
Palette {
|
|
17
|
+
id: lightTheme
|
|
18
|
+
base: "#f8f9fa"
|
|
19
|
+
window: "#f8f9fa"
|
|
20
|
+
midlight: "#f8f9fa"
|
|
21
|
+
accent: "#e02424"
|
|
22
|
+
link: accent
|
|
23
|
+
dark: "#dadce0"
|
|
24
|
+
text: "#4d5157"
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
Palette {
|
|
28
|
+
id: darkTheme
|
|
29
|
+
base: "#202124"
|
|
30
|
+
window: "#f8f9fa"
|
|
31
|
+
midlight: "#202124"
|
|
32
|
+
accent: "#e02424"
|
|
33
|
+
link: accent
|
|
34
|
+
dark: "#3f4042"
|
|
35
|
+
text: "#e4e7eb"
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
Connections {
|
|
39
|
+
target: appTheme
|
|
40
|
+
|
|
41
|
+
function onThemeChanged() {
|
|
42
|
+
updateTheme()
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function onDarkModeChanged() {
|
|
46
|
+
updateTheme()
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function updateTheme() {
|
|
50
|
+
theme = getTheme()
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|