-
Notifications
You must be signed in to change notification settings - Fork 2
/
icon.py
119 lines (91 loc) · 2.74 KB
/
icon.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# -*- coding: utf-8 -*-
import qtawesome as qta
from PySide6.QtCore import QSize
from PySide6.QtGui import QIcon
import os
class LogoIcon:
@staticmethod
def get_icon():
image_path = os.path.join(os.getcwd(), "image")
logo_icon_path = os.path.join(image_path, 'logo.png')
return QIcon(logo_icon_path)
@staticmethod
def get_pixmap(size = QSize(24, 24)):
return LogoIcon.get_icon().pixmap(size)
class MenuIcon:
@staticmethod
def get_close():
return qta.icon('mdi.close')
@staticmethod
def get_min():
return qta.icon('mdi.minus')
@staticmethod
def get_max():
return qta.icon('mdi.window-maximize')
@staticmethod
def get_restore():
return qta.icon('mdi.window-restore')
@staticmethod
def get_more():
return qta.icon('ri.more-2-fill')
@staticmethod
def get_theme():
return qta.icon('msc.symbol-color')
@staticmethod
def get_language():
return qta.icon('ri.global-line')
@staticmethod
def get_chinese():
return qta.icon('ri.emphasis-cn')
@staticmethod
def get_english():
return qta.icon('ri.emphasis')
@staticmethod
def get_feedback():
return qta.icon('ri.feedback-line')
@staticmethod
def get_about():
return qta.icon('mdi6.information-outline')
@staticmethod
def get_pdf2word():
return qta.icon('ri.file-word-fill', color='#3949ab')
@staticmethod
def get_word2pdf():
return qta.icon('ri.file-word-2-fill', color='#3949ab')
@staticmethod
def get_excel2pdf():
return qta.icon('ri.file-excel-2-fill', color='#3949ab')
@staticmethod
def get_ppt2pdf():
return qta.icon('ri.file-ppt-2-fill', color='#3949ab')
@staticmethod
def get_pdf_split():
return qta.icon('mdi.call-split', color='#3949ab')
@staticmethod
def get_pdf_merge():
return qta.icon('mdi.call-merge', color='#3949ab')
class LabelIcon:
@staticmethod
def get_pdf(size):
return qta.icon('mdi.file-pdf').pixmap(size)
@staticmethod
def get_word(size):
return qta.icon('mdi.file-word').pixmap(size)
@staticmethod
def get_excel(size):
return qta.icon('mdi.file-excel').pixmap(size)
@staticmethod
def get_ppt(size):
return qta.icon('mdi.file-powerpoint').pixmap(size)
@staticmethod
def get_file(size):
return qta.icon('mdi.file').pixmap(size)
@staticmethod
def get_folder(size):
return qta.icon('mdi.folder-open-outline').pixmap(size)
@staticmethod
def get_close(size):
return qta.icon('mdi.close').pixmap(size)
@staticmethod
def get_add(size):
return qta.icon('ri.add-fill').pixmap(size)