text
stringlengths 1
93.6k
|
|---|
print_indented(m.about)
|
if (m.syntax != None):
|
print('\nSYNTAX\n')
|
if (type(m.syntax) == type([])):
|
for s in m.syntax:
|
print(' %s %s' % (m.name, s))
|
else:
|
print(' %s %s' % (m.name, m.syntax))
|
if (m.help != None):
|
print('\nDETAILS\n')
|
print_indented(m.help)
|
if (m.example != None):
|
print('\nEXAMPLE\n')
|
print_indented(m.example, 0)
|
print()
|
def print_mod_syntax(modules, mod):
|
m = get_mod(modules, mod)
|
if (m == None):
|
print('Invalid module')
|
return
|
if (type(m.syntax) == type([])):
|
for s in m.syntax:
|
print('%s %s' % (m.name, s))
|
else:
|
print('%s %s' % (m.name, m.syntax))
|
def print_indented(str, wrap=1):
|
lines = str.lstrip().splitlines()
|
for line in lines:
|
line = line.lstrip()
|
if (line == ''):
|
print()
|
continue
|
if (wrap == 1):
|
wlines = [line[i:i+70] for i in range(0, len(line), 70)]
|
for wline in wlines:
|
print(' ', wline)
|
else:
|
print(' ', line)
|
if __name__ == "__main__":
|
main(sys.argv[1:])
|
# <FILESEP>
|
import os
|
from components import ThemedOptionCardPlane
|
from icons import IconDictionary
|
from PyQt5.Qt import QColor, QPoint
|
from PyQt5.QtCore import Qt, pyqtSignal, QCoreApplication
|
from PyQt5.QtWidgets import QGraphicsDropShadowEffect, QMainWindow, QTextEdit
|
from settings_parser import SettingsParser
|
from todos_parser import TODOParser
|
from siui.components.widgets import (
|
SiCheckBox,
|
SiDenseHContainer,
|
SiDenseVContainer,
|
SiLabel,
|
SiSimpleButton,
|
SiSvgLabel,
|
SiSwitch,
|
SiToggleButton,
|
)
|
from siui.core.animation import SiExpAnimation
|
from siui.core.color import Color
|
from siui.core.globals import NewGlobal, SiGlobal
|
from siui.gui.tooltip import ToolTipWindow
|
# 创建删除队列
|
SiGlobal.todo_list = NewGlobal()
|
SiGlobal.todo_list.delete_pile = []
|
# 创建锁定位置变量
|
SiGlobal.todo_list.position_locked = False
|
# 创建设置文件解析器并写入全局变量
|
SiGlobal.todo_list.settings_parser = SettingsParser("./options.ini")
|
SiGlobal.todo_list.todos_parser = TODOParser("./todos.ini")
|
def lock_position(state):
|
SiGlobal.todo_list.position_locked = state
|
# 主题颜色
|
def load_colors(is_dark=True):
|
if is_dark is True: # 深色主题
|
# 加载图标
|
SiGlobal.siui.icons.update(IconDictionary(color="#e1d9e8").icons)
|
# 设置颜色
|
SiGlobal.siui.colors["THEME"] = "#e1d9e8"
|
SiGlobal.siui.colors["PANEL_THEME"] = "#0F85D3"
|
SiGlobal.siui.colors["BACKGROUND_COLOR"] = "#252229"
|
SiGlobal.siui.colors["BACKGROUND_DARK_COLOR"] = SiGlobal.siui.colors["INTERFACE_BG_A"]
|
SiGlobal.siui.colors["BORDER_COLOR"] = "#3b373f"
|
SiGlobal.siui.colors["TOOLTIP_BG"] = "ef413a47"
|
SiGlobal.siui.colors["SVG_A"] = SiGlobal.siui.colors["THEME"]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.