PartSeg.common_gui¶
This module contains custom Qt based widgets. You may also use it in your project.
PartSeg.common_gui.main_window module¶
- class PartSeg.common_gui.main_window.BaseMainWindow(config_folder=None, title='PartSeg', settings=None, load_dict=None, signal_fun=None)[source]¶
Bases:
QMainWindow
Base for main windows of subprograms
- Variables
settings – store state of application. initial value is obtained from
settings_class
files_num – maximal number of files accepted by drag and rop event
- Parameters
config_folder (
Union
[str
,Path
,None
]) – path to directory in which application save state. If settings parameter is note then settings object is created with passing this path tosettings_class
. If this parameter and settings are None then constructor fail withValueError
.title – Window default title
settings (
Optional
[BaseSettings
]) – object to store application statesignal_fun – function which need to be called when window shown.
- dropEvent(event)[source]¶
Support for load files by drag and drop. At beginning it check number of files and if it greater than
files_num
it refuse loading. Otherwise it callread_drop()
method and this method should be overwritten in sub classes
- show_signal¶
Signal emitted when window has shown. Used to hide Launcher.