2015-06-30 05:51:55 +00:00
|
|
|
##########################################################################
|
|
|
|
#
|
|
|
|
# pgAdmin 4 - PostgreSQL Tools
|
|
|
|
#
|
2020-01-02 14:43:50 +00:00
|
|
|
# Copyright (C) 2013 - 2020, The pgAdmin Development Team
|
2015-06-30 05:51:55 +00:00
|
|
|
# This software is released under the PostgreSQL Licence
|
|
|
|
#
|
|
|
|
##########################################################################
|
|
|
|
|
2015-06-29 07:54:05 +00:00
|
|
|
PRIORITY = 100
|
|
|
|
|
2015-06-29 06:58:41 +00:00
|
|
|
|
2016-06-21 13:21:06 +00:00
|
|
|
class MenuItem(object):
|
2015-06-29 06:58:41 +00:00
|
|
|
def __init__(self, **kwargs):
|
|
|
|
self.__dict__.update(**kwargs)
|
2015-06-29 07:54:05 +00:00
|
|
|
|
|
|
|
|
2016-06-21 13:21:06 +00:00
|
|
|
class Panel(object):
|
2018-01-31 13:58:55 +00:00
|
|
|
def __init__(
|
2020-07-09 13:25:33 +00:00
|
|
|
self, name, title, content='', width=500, height=600, is_iframe=True,
|
|
|
|
show_title=True, is_closeable=True, is_private=False, priority=None,
|
|
|
|
icon=None, data=None, events=None, limit=None, can_hide=False
|
2018-01-31 13:58:55 +00:00
|
|
|
):
|
2015-06-29 07:54:05 +00:00
|
|
|
self.name = name
|
|
|
|
self.title = title
|
|
|
|
self.content = content
|
|
|
|
self.width = width
|
|
|
|
self.height = height
|
2020-07-09 13:25:33 +00:00
|
|
|
self.isIframe = is_iframe
|
|
|
|
self.showTitle = show_title
|
|
|
|
self.isCloseable = is_closeable
|
|
|
|
self.isPrivate = is_private
|
2015-06-30 05:51:55 +00:00
|
|
|
self.icon = icon
|
2016-05-05 15:42:16 +00:00
|
|
|
self.data = data
|
|
|
|
self.events = events
|
2017-06-30 09:11:34 +00:00
|
|
|
self.limit = limit
|
2020-07-09 13:25:33 +00:00
|
|
|
self.canHide = can_hide
|
2015-06-29 07:54:05 +00:00
|
|
|
if priority is None:
|
|
|
|
global PRIORITY
|
|
|
|
PRIORITY += 100
|
|
|
|
priority = PRIORITY
|
|
|
|
self.priority = priority
|