TERuleQueryTab: remove unnecessary outer widget

Make the scroll area the top level widget for the tab.
This commit is contained in:
Chris PeBenito 2015-06-06 11:36:49 -04:00
parent d26101d041
commit 911e44d5d8
2 changed files with 873 additions and 901 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>TeRuleQueryTab</class> <class>TeRuleQueryTab</class>
<widget class="QWidget" name="TeRuleQueryTab"> <widget class="QScrollArea" name="TeRuleQueryTab">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
@ -10,33 +10,6 @@
<height>846</height> <height>846</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="sizeConstraint">
<enum>QLayout::SetNoConstraint</enum>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="sizeAdjustPolicy"> <property name="sizeAdjustPolicy">
<enum>QAbstractScrollArea::AdjustToContents</enum> <enum>QAbstractScrollArea::AdjustToContents</enum>
</property> </property>
@ -73,7 +46,7 @@
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="page"> <widget class="QWidget" name="table_page">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
@ -101,13 +74,13 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="page_2"> <widget class="QWidget" name="raw_page">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>98</width> <width>738</width>
<height>88</height> <height>210</height>
</rect> </rect>
</property> </property>
<attribute name="label"> <attribute name="label">
@ -451,7 +424,7 @@
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>200</width> <width>250</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
@ -628,7 +601,7 @@
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>200</width> <width>250</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
@ -683,7 +656,7 @@
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>200</width> <width>250</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
@ -785,7 +758,7 @@
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>200</width> <width>250</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
@ -840,7 +813,7 @@
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>213</width> <width>0</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -850,6 +823,9 @@
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="toolTip">
<string>Match the object class of the rule.</string>
</property>
<property name="selectionMode"> <property name="selectionMode">
<enum>QAbstractItemView::MultiSelection</enum> <enum>QAbstractItemView::MultiSelection</enum>
</property> </property>
@ -888,7 +864,7 @@
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>200</width> <width>250</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
@ -967,11 +943,7 @@
</layout> </layout>
</widget> </widget>
</widget> </widget>
</item>
</layout>
</widget>
<tabstops> <tabstops>
<tabstop>scrollArea</tabstop>
<tabstop>criteria_expander</tabstop> <tabstop>criteria_expander</tabstop>
<tabstop>allow</tabstop> <tabstop>allow</tabstop>
<tabstop>neverallow</tabstop> <tabstop>neverallow</tabstop>

View File

@ -21,7 +21,7 @@ import logging
from PyQt5.QtCore import Qt, QSortFilterProxyModel, QStringListModel from PyQt5.QtCore import Qt, QSortFilterProxyModel, QStringListModel
from PyQt5.QtGui import QPalette, QTextCursor from PyQt5.QtGui import QPalette, QTextCursor
from PyQt5.QtWidgets import QCompleter, QHeaderView, QWidget from PyQt5.QtWidgets import QCompleter, QHeaderView, QScrollArea
from setools import TERuleQuery from setools import TERuleQuery
from ..widget import SEToolsWidget from ..widget import SEToolsWidget
@ -29,7 +29,7 @@ from .rulemodels import TERuleListModel
from .models import PermListModel, SEToolsListModel from .models import PermListModel, SEToolsListModel
class TERuleQueryTab(SEToolsWidget, QWidget): class TERuleQueryTab(SEToolsWidget, QScrollArea):
def __init__(self, tab, policy): def __init__(self, tab, policy):
super(TERuleQueryTab, self).__init__(tab) super(TERuleQueryTab, self).__init__(tab)
self.log = logging.getLogger(self.__class__.__name__) self.log = logging.getLogger(self.__class__.__name__)