Skip to content

Commit

Permalink
migrate to PySide2, move core.uimailbox ==> gui.mailbox
Browse files Browse the repository at this point in the history
  • Loading branch information
amaork committed Mar 8, 2022
1 parent 454b6d6 commit c9d6197
Show file tree
Hide file tree
Showing 109 changed files with 475 additions and 574 deletions.
314 changes: 0 additions & 314 deletions chart/PyAppFramework.html

This file was deleted.

Binary file removed chart/PyAppFramework.png
Binary file not shown.
Binary file removed chart/PyAppFramework.xmind
Binary file not shown.
Binary file removed chart/PyAppFramework_files/images/BaseButton 2.jpg
Binary file not shown.
Binary file removed chart/PyAppFramework_files/images/BaseButton.jpg
Binary file not shown.
Binary file not shown.
Binary file removed chart/PyAppFramework_files/images/BasicDataType.jpg
Binary file not shown.
Binary file removed chart/PyAppFramework_files/images/ColorWidget 2.jpg
Binary file not shown.
Binary file removed chart/PyAppFramework_files/images/ColorWidget.jpg
Binary file not shown.
Binary file removed chart/PyAppFramework_files/images/PaintWidget 2.jpg
Binary file not shown.
Binary file removed chart/PyAppFramework_files/images/PaintWidget.jpg
Binary file not shown.
Binary file not shown.
Binary file removed chart/PyAppFramework_files/images/PyAppFramework.jpg
Binary file not shown.
Binary file removed chart/PyAppFramework_files/images/RectButton 2.jpg
Binary file not shown.
Binary file removed chart/PyAppFramework_files/images/RectButton.jpg
Binary file not shown.
Binary file removed chart/PyAppFramework_files/images/RoundButton 2.jpg
Binary file not shown.
Binary file removed chart/PyAppFramework_files/images/RoundButton.jpg
Binary file not shown.
Binary file not shown.
Binary file removed chart/PyAppFramework_files/images/binder 2.jpg
Binary file not shown.
Binary file removed chart/PyAppFramework_files/images/binder.jpg
Binary file not shown.
Binary file removed chart/PyAppFramework_files/images/button 2.jpg
Binary file not shown.
Binary file removed chart/PyAppFramework_files/images/button.jpg
Binary file not shown.
Binary file removed chart/PyAppFramework_files/images/container 2.jpg
Binary file not shown.
Binary file removed chart/PyAppFramework_files/images/container.jpg
Binary file not shown.
Binary file removed chart/PyAppFramework_files/images/core 2.jpg
Binary file not shown.
Binary file removed chart/PyAppFramework_files/images/core.jpg
Binary file not shown.
Binary file removed chart/PyAppFramework_files/images/datatype 2.jpg
Binary file not shown.
Binary file removed chart/PyAppFramework_files/images/datatype.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/dialog 2.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/dialog.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/ftp 2.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/ftp.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/gui 2.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/gui.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/misc 2.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/misc 3.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/misc.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/msgbox 2.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/msgbox.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/process.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/protocol 2.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/protocol.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/serialport.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/setup 2.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/setup.jpg
Diff not rendered.
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/showMessageBox.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/stransfer.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/tarmanager 2.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/tarmanager.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/timer.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/uimailbox 2.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/uimailbox.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/upgrade 2.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/upgrade.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/widget 2.jpg
Diff not rendered.
Binary file removed chart/PyAppFramework_files/images/widget.jpg
Diff not rendered.
2 changes: 1 addition & 1 deletion core/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__all__ = ['timer', 'datatype', 'uimailbox', 'database', 'threading', 'utils']
__all__ = ['timer', 'datatype', 'database', 'threading', 'utils']
16 changes: 8 additions & 8 deletions core/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def getTableDefault(self, name: str) -> List[Any]:
return [table_info.get(n)[self.TBL_DEF] for n in column_names]

def getTablePrimaryKey(self, name: str) -> Tuple[int, str, type]:
"""Get table primary key column if do not have pk return 0
"""Get table primary key column, don't have pk will return 0
:param name: table name
:return: (primary key column, primary key name, primary key data type)
Expand Down Expand Up @@ -249,7 +249,7 @@ def insertRecord(self, name: str, record: Union[list, tuple]):
raise SQLiteDatabaseError(error)

def updateRecord(self, name: str, record: Union[list, tuple, dict], condition: Optional[str] = None):
"""Update an exist recode
"""Update exist recode
:param name: table name
:param record: recode data could be list or dict (with column name and data)
Expand All @@ -272,7 +272,7 @@ def updateRecord(self, name: str, record: Union[list, tuple, dict], condition: O
if isinstance(record, (list, tuple)) and len(column_names) != len(record):
raise ValueError("recode length dis-matched")

# Pre process record
# Pre-process record
recode_data = list()
blob_records = list()

Expand Down Expand Up @@ -330,7 +330,7 @@ def selectRecord(self, name: str, columns: Optional[List[str]] = None, condition
if not isinstance(condition, str):
raise TypeError("conditions require string object")

# Pre process
# Pre-process
columns = ", ".join(columns) or "*"

# SQL
Expand Down Expand Up @@ -368,7 +368,7 @@ class SQLiteUserPasswordDatabase(object):
CIPHER_LEVEL_KEY = "level"

def __init__(self, magic: str = MAGIC_STR, path: str = DEF_PATH, self_check: bool = True):
"""SQLite user password database
"""SQLite base user password database
c1 = c1_encrypt_func(raw_password)
c2 = c2_encrypt_func(c1 + magic)
c3 = c3_encrypt_func(c1 + c2)
Expand Down Expand Up @@ -488,7 +488,7 @@ def addUser(self, user: str, password: str, desc: str = ""):
self.db.insertRecord(self.CIPHER_TBL, [level2, ""])
self.db.insertRecord(self.CIPHER_TBL, [level3, ""])

# Finally update user password
# Finally, update user password
self.updatePassword(user, password)
except SQLiteDatabaseError as error:
raise RuntimeError("添加用户「{}」,失败:{}!!!".format(user, error))
Expand Down Expand Up @@ -531,7 +531,7 @@ class SQLiteGeneralSettingsItem(DynamicObject):

def __init__(self, id_: int, name: str, data: Union[int, float],
min_: Union[int, float] = 0, max_: Union[int, float] = 0, precision: int = 0, desc: str = ""):
"""SQLite settings item
"""SQLite base settings item
:param id_: data index corresponding database row id
:param name: settings item name
Expand Down Expand Up @@ -909,7 +909,7 @@ def set_general_table_limit(self, table_name: str,
except (TypeError,):
raise RuntimeError("Error limit request a tuple list")
else:
# Id is column index
# id is column index
for column in range(len(limit)):
limit[column].id = column

Expand Down
Loading

0 comments on commit c9d6197

Please sign in to comment.