Skip to content

Commit

Permalink
[processing] better sizing of columns in batch interface
Browse files Browse the repository at this point in the history
fixes #12706
  • Loading branch information
volaya committed Jun 22, 2015
1 parent 438a61d commit b4edf8a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions python/plugins/processing/gui/BatchInputSelectionPanel.py
Expand Up @@ -53,6 +53,7 @@ def __init__(self, param, row, col, panel):
self.horizontalLayout.setSpacing(0)
self.horizontalLayout.setMargin(0)
self.text = QLineEdit()
self.text.setMinimumWidth(300)
self.text.setText('')
self.text.setSizePolicy(QSizePolicy.Expanding,
QSizePolicy.Expanding)
Expand Down
1 change: 1 addition & 0 deletions python/plugins/processing/gui/BatchOutputSelectionPanel.py
Expand Up @@ -56,6 +56,7 @@ def __init__(self, output, alg, row, col, panel):
self.horizontalLayout.setMargin(0)
self.text = QLineEdit()
self.text.setText('')
self.text.setMinimumWidth(300)
self.text.setSizePolicy(QSizePolicy.Expanding,
QSizePolicy.Expanding)
self.horizontalLayout.addWidget(self.text)
Expand Down
11 changes: 10 additions & 1 deletion python/plugins/processing/gui/BatchPanel.py
Expand Up @@ -28,7 +28,7 @@
import os

from PyQt4 import uic
from PyQt4.QtGui import QWidget, QIcon, QTableWidgetItem, QComboBox, QLineEdit
from PyQt4.QtGui import QWidget, QIcon, QTableWidgetItem, QComboBox, QLineEdit, QHeaderView

from qgis.core import QgsApplication

Expand Down Expand Up @@ -119,6 +119,15 @@ def initWidgets(self):
for i in xrange(3):
self.addRow()

self.tblParameters.horizontalHeader().setResizeMode(QHeaderView.Interactive)
self.tblParameters.horizontalHeader().setDefaultSectionSize(250)
self.tblParameters.horizontalHeader().setMinimumSectionSize(150)
self.tblParameters.horizontalHeader().setResizeMode(QHeaderView.ResizeToContents)
self.tblParameters.verticalHeader().setResizeMode(QHeaderView.ResizeToContents)
self.tblParameters.horizontalHeader().setStretchLastSection(True)



def getWidgetFromParameter(self, param, row, col):
if isinstance(param, (ParameterRaster, ParameterVector, ParameterTable,
ParameterMultipleInput)):
Expand Down

0 comments on commit b4edf8a

Please sign in to comment.