133 self.infoLabel.setText("") |
133 self.infoLabel.setText("") |
134 self.infoLabel.setObjectName("infoLabel") |
134 self.infoLabel.setObjectName("infoLabel") |
135 |
135 |
136 # place everything together |
136 # place everything together |
137 self.verticalLayout.addLayout(self.horizontalLayout1) |
137 self.verticalLayout.addLayout(self.horizontalLayout1) |
138 if widthForHeight: |
138 self.__addWidthForHeightLayout(widthForHeight) |
139 self.horizontalLayout1.addLayout(self.horizontalLayout2) |
|
140 else: |
|
141 self.verticalLayout.addLayout(self.horizontalLayout2) |
|
142 self.verticalLayout.addWidget(self.infoLabel) |
139 self.verticalLayout.addWidget(self.infoLabel) |
143 |
140 |
144 QMetaObject.connectSlotsByName(self) |
141 QMetaObject.connectSlotsByName(self) |
145 |
142 |
146 self.setTabOrder(self.findtextCombo, self.caseCheckBox) |
143 self.setTabOrder(self.findtextCombo, self.caseCheckBox) |
147 self.setTabOrder(self.caseCheckBox, self.wordCheckBox) |
144 self.setTabOrder(self.caseCheckBox, self.wordCheckBox) |
148 self.setTabOrder(self.wordCheckBox, self.findPrevButton) |
145 self.setTabOrder(self.wordCheckBox, self.findPrevButton) |
149 self.setTabOrder(self.findPrevButton, self.findNextButton) |
146 self.setTabOrder(self.findPrevButton, self.findNextButton) |
|
147 |
|
148 def setWidthForHeight(self, widthForHeight): |
|
149 """ |
|
150 Public method to set the 'width for height'. |
|
151 |
|
152 @param widthForHeight flag indicating to prefer width |
|
153 @type bool |
|
154 """ |
|
155 if self.__widthForHeight: |
|
156 self.horizontalLayout1.takeAt(self.__widthForHeightLayoutIndex) |
|
157 else: |
|
158 self.verticalLayout.takeAt(self.__widthForHeightLayoutIndex) |
|
159 self.__addWidthForHeightLayout(widthForHeight) |
|
160 |
|
161 self.__widthForHeight = widthForHeight |
|
162 |
|
163 def __addWidthForHeightLayout(self, widthForHeight): |
|
164 """ |
|
165 Private method to set the middle part of the layout. |
|
166 |
|
167 @param widthForHeight flag indicating to prefer width |
|
168 @type bool |
|
169 """ |
|
170 if widthForHeight: |
|
171 self.horizontalLayout1.addLayout(self.horizontalLayout2) |
|
172 self.__widthForHeightLayoutIndex = 2 |
|
173 else: |
|
174 self.verticalLayout.insertLayout(1, self.horizontalLayout2) |
|
175 self.__widthForHeightLayoutIndex = 1 |
150 |
176 |
151 def attachTextEdit(self, textedit, editType="QTextEdit"): |
177 def attachTextEdit(self, textedit, editType="QTextEdit"): |
152 """ |
178 """ |
153 Public method to attach a QTextEdit widget. |
179 Public method to attach a QTextEdit widget. |
154 |
180 |