Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Latest commit

 

History

History
46 lines (28 loc) · 1.31 KB

README.md

File metadata and controls

46 lines (28 loc) · 1.31 KB

Mantle

mantle_icon

MIT License

Feature

Mantle is a standalone tool base sets. This is simply made to make develop, release and support easier as organized. Mantle contains basic dynamic widget import from packages directory. So we just have to follow a few rules to let Mantle import our toools.

Usage

In the packages directory, Mantle automatically loads packages inside of it. The required function which has to be written in packages' __init__.py:

import os
from PySide import QtGui

import module

_CURRENTPATH = os.path.dirname(os.path.realpath(__file__))

def getWidget(parent):
    widget = gui.SubmitterWindow(parent)
    icon   = QtGui.QIcon(os.path.join(_CURRENTPATH, 'static', 'icon.svg'))
    title  = 'ModuleTitle'
    return widget, icon, title

getWidget : [REQUIRED] This loads widget from package modules.

widget : [REQUIRED] This returns widget that will be automatically added in the Mantle tab list.

icon : [OPTIONAL] This returns icon QtGui.QIcon object. This can be None if icon is not prepared.

title : [REQUIRED] This returns title name that is displayed as Tab Name.

Images