Purging types from propertiesView

This commit is contained in:
Olivier Keshavjee 2016-03-30 10:18:09 +02:00
parent bc8b3027e2
commit 76dec8162e
3 changed files with 45 additions and 63 deletions

View file

@ -16,7 +16,6 @@ class propertiesView(QWidget, Ui_propertiesView):
self.cmbPOV.setModels(mdlCharacter, mdlOutline)
self.cmbLabel.setModels(mdlLabels, mdlOutline)
self.cmbStatus.setModels(mdlStatus, mdlOutline)
self.cmbType.setModel(mdlOutline)
self.chkCompile.setModel(mdlOutline)
self.txtTitle.setModel(mdlOutline)
self.txtGoal.setModel(mdlOutline)
@ -52,8 +51,6 @@ class propertiesView(QWidget, Ui_propertiesView):
self.txtTitle.setCurrentModelIndex(idx)
self.txtGoal.setCurrentModelIndex(idx)
self.cmbType.setCurrentModelIndex(idx)
else:
self.setEnabled(True)
self.setLabelsItalic(True)
@ -64,8 +61,6 @@ class propertiesView(QWidget, Ui_propertiesView):
self.cmbLabel.setCurrentModelIndexes(indexes)
self.cmbStatus.setCurrentModelIndexes(indexes)
self.cmbType.setCurrentModelIndexes(indexes)
def setLabelsItalic(self, value):
f = self.lblPOV.font()
f.setItalic(value)

View file

@ -2,8 +2,7 @@
# Form implementation generated from reading ui file 'manuskript/ui/views/propertiesView_ui.ui'
#
# Created: Thu Mar 3 17:26:11 2016
# by: PyQt5 UI code generator 5.2.1
# Created by: PyQt5 UI code generator 5.4.2
#
# WARNING! All changes made in this file will be lost!
@ -12,7 +11,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_propertiesView(object):
def setupUi(self, propertiesView):
propertiesView.setObjectName("propertiesView")
propertiesView.resize(192, 159)
propertiesView.resize(192, 186)
self.verticalLayout = QtWidgets.QVBoxLayout(propertiesView)
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.verticalLayout.setObjectName("verticalLayout")
@ -72,14 +71,14 @@ class Ui_propertiesView(object):
self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.cmbLabel)
self.lblCompile = QtWidgets.QLabel(self.page)
self.lblCompile.setObjectName("lblCompile")
self.formLayout.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.lblCompile)
self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.lblCompile)
self.chkCompile = chkOutlineCompile(self.page)
self.chkCompile.setText("")
self.chkCompile.setObjectName("chkCompile")
self.formLayout.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.chkCompile)
self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.chkCompile)
self.lblGoal = QtWidgets.QLabel(self.page)
self.lblGoal.setObjectName("lblGoal")
self.formLayout.setWidget(6, QtWidgets.QFormLayout.LabelRole, self.lblGoal)
self.formLayout.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.lblGoal)
self.txtGoal = lineEditView(self.page)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
@ -90,26 +89,14 @@ class Ui_propertiesView(object):
self.txtGoal.setStyleSheet("border-radius: 6px;")
self.txtGoal.setFrame(False)
self.txtGoal.setObjectName("txtGoal")
self.formLayout.setWidget(6, QtWidgets.QFormLayout.FieldRole, self.txtGoal)
self.lblLabel_2 = QtWidgets.QLabel(self.page)
self.lblLabel_2.setObjectName("lblLabel_2")
self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.lblLabel_2)
self.cmbType = cmbOutlineTypeChoser(self.page)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.cmbType.sizePolicy().hasHeightForWidth())
self.cmbType.setSizePolicy(sizePolicy)
self.cmbType.setFrame(False)
self.cmbType.setObjectName("cmbType")
self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.cmbType)
self.formLayout.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.txtGoal)
self.verticalLayout_2.addLayout(self.formLayout)
self.stack.addWidget(self.page)
self.page_2 = QtWidgets.QWidget()
self.page_2.setObjectName("page_2")
self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.page_2)
self.verticalLayout_3.setSpacing(0)
self.verticalLayout_3.setContentsMargins(0, 0, 0, 0)
self.verticalLayout_3.setSpacing(0)
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.formLayout_2 = QtWidgets.QFormLayout()
self.formLayout_2.setObjectName("formLayout_2")
@ -187,7 +174,6 @@ class Ui_propertiesView(object):
self.lblCompile.setText(_translate("propertiesView", "Compile"))
self.lblGoal.setText(_translate("propertiesView", "Goal"))
self.txtGoal.setPlaceholderText(_translate("propertiesView", "Word count"))
self.lblLabel_2.setText(_translate("propertiesView", "Text type:"))
self.lblPOV_2.setText(_translate("propertiesView", "POV"))
self.label_31.setText(_translate("propertiesView", "Status"))
self.label_34.setText(_translate("propertiesView", "Label"))
@ -195,9 +181,8 @@ class Ui_propertiesView(object):
self.label_36.setText(_translate("propertiesView", "Goal"))
self.txtGoalMulti.setPlaceholderText(_translate("propertiesView", "Word count"))
from manuskript.ui.views.lineEditView import lineEditView
from manuskript.ui.views.cmbOutlineCharacterChoser import cmbOutlineCharacterChoser
from manuskript.ui.views.cmbOutlineTypeChoser import cmbOutlineTypeChoser
from manuskript.ui.views.chkOutlineCompile import chkOutlineCompile
from manuskript.ui.views.cmbOutlineStatusChoser import cmbOutlineStatusChoser
from manuskript.ui.views.cmbOutlineCharacterChoser import cmbOutlineCharacterChoser
from manuskript.ui.views.cmbOutlineLabelChoser import cmbOutlineLabelChoser
from manuskript.ui.views.cmbOutlineStatusChoser import cmbOutlineStatusChoser
from manuskript.ui.views.lineEditView import lineEditView

View file

@ -7,14 +7,23 @@
<x>0</x>
<y>0</y>
<width>192</width>
<height>159</height>
<height>186</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="margin">
<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>
@ -40,7 +49,16 @@
</property>
<widget class="QWidget" name="page">
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="margin">
<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>
@ -105,28 +123,28 @@
</property>
</widget>
</item>
<item row="5" column="0">
<item row="4" column="0">
<widget class="QLabel" name="lblCompile">
<property name="text">
<string>Compile</string>
</property>
</widget>
</item>
<item row="5" column="1">
<item row="4" column="1">
<widget class="chkOutlineCompile" name="chkCompile">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="6" column="0">
<item row="5" column="0">
<widget class="QLabel" name="lblGoal">
<property name="text">
<string>Goal</string>
</property>
</widget>
</item>
<item row="6" column="1">
<item row="5" column="1">
<widget class="lineEditView" name="txtGoal">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
@ -148,26 +166,6 @@
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="lblLabel_2">
<property name="text">
<string>Text type:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="cmbOutlineTypeChoser" name="cmbType">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frame">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
@ -177,7 +175,16 @@
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<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>
@ -319,11 +326,6 @@
<extends>QComboBox</extends>
<header>manuskript.ui.views.cmbOutlineLabelChoser.h</header>
</customwidget>
<customwidget>
<class>cmbOutlineTypeChoser</class>
<extends>QComboBox</extends>
<header>manuskript.ui.views.cmbOutlineTypeChoser.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>