mirror of
https://github.com/SELinuxProject/setools
synced 2025-04-04 23:39:29 +00:00
parent
15c5d97b75
commit
acbccd31f9
@ -29,6 +29,8 @@ from ..models import SEToolsListModel, invert_list_selection
|
|||||||
from ..usermodel import UserTableModel, user_detail
|
from ..usermodel import UserTableModel, user_detail
|
||||||
from ..widget import SEToolsWidget
|
from ..widget import SEToolsWidget
|
||||||
from .queryupdater import QueryResultsUpdater
|
from .queryupdater import QueryResultsUpdater
|
||||||
|
from .workspace import load_checkboxes, load_lineedits, load_listviews, load_textedits, \
|
||||||
|
save_checkboxes, save_lineedits, save_listviews, save_textedits
|
||||||
|
|
||||||
|
|
||||||
class UserQueryTab(SEToolsWidget, QScrollArea):
|
class UserQueryTab(SEToolsWidget, QScrollArea):
|
||||||
@ -206,6 +208,30 @@ class UserQueryTab(SEToolsWidget, QScrollArea):
|
|||||||
self.range_.setToolTip("Error: " + str(ex))
|
self.range_.setToolTip("Error: " + str(ex))
|
||||||
self.range_.setPalette(self.error_palette)
|
self.range_.setPalette(self.error_palette)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Save/Load tab
|
||||||
|
#
|
||||||
|
def save(self):
|
||||||
|
"""Return a dictionary of settings."""
|
||||||
|
settings = {}
|
||||||
|
save_checkboxes(self, settings, ["criteria_expander", "notes_expander", "name_regex",
|
||||||
|
"roles_any", "roles_equal", "level_exact", "level_dom",
|
||||||
|
"level_domby", "range_exact", "range_overlap",
|
||||||
|
"range_subset", "range_superset"])
|
||||||
|
save_lineedits(self, settings, ["name", "level", "range_"])
|
||||||
|
save_listviews(self, settings, ["roles"])
|
||||||
|
save_textedits(self, settings, ["notes"])
|
||||||
|
return settings
|
||||||
|
|
||||||
|
def load(self, settings):
|
||||||
|
load_checkboxes(self, settings, ["criteria_expander", "notes_expander", "name_regex",
|
||||||
|
"roles_any", "roles_equal", "level_exact", "level_dom",
|
||||||
|
"level_domby", "range_exact", "range_overlap",
|
||||||
|
"range_subset", "range_superset"])
|
||||||
|
load_lineedits(self, settings, ["name", "level", "range_"])
|
||||||
|
load_listviews(self, settings, ["roles"])
|
||||||
|
load_textedits(self, settings, ["notes"])
|
||||||
|
|
||||||
#
|
#
|
||||||
# Results runner
|
# Results runner
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user