Skip to content
Browse files

0.2.0, see README

  • Loading branch information...
1 parent caee24d commit 90088ad95d6496094850b9cbe4590a7fda95be63 @etiennesky committed Mar 15, 2012
Showing with 240 additions and 133 deletions.
  1. +20 −3 README
  2. +1 −1 __init__.py
  3. +19 −14 loopvisiblelayers.py
  4. +119 −52 loopvisiblelayersdock.py
  5. +1 −1 metadata.txt
  6. +21 −16 ui_loopvisiblelayersdock.py
  7. +59 −46 ui_loopvisiblelayersdock.ui
View
23 README
@@ -19,10 +19,19 @@ The Controls are Play/Pause, Stop, Next.
============================================================
TODO
-- fix groups - cannot have identical names and nested groups are added to groups/layers to loop unnecessarily
-- add one-shot timers instead of programmed one
-- update the groups list (and internal representations) automatically
+- fix nested group handling - nested groups are added to loop list unnecessarily
+- use one-shot timers instead of programmed one
+- create rendering/canvas cache for each loop, instead of rendering each time
+ - is this possible with qgis api?
+ - maybe not necessary when layer caching is activated (show warning if not activated)
+- update the groups list and relations automatically (patches in my QGis repos. fix this)
+ - get this pulled to qgis
+ - find a way to test for this and print status "groups not updated automatically" if not implemented
+- modify qgis so new groups have unique names (group1,group2,...) - done in my repos.
+
+- check redraw of vector layers when user changes visibility in the layers legend (control rendering order?)
+- check blank page when looping over groups with vector layers
============================================================
CREDITS
@@ -35,3 +44,11 @@ CHANGELOG
0.1 initial release
0.1.1 add missing files
0.1.2 added README ; Makefile fixes
+0.2.0 2012/03/15
+ - freeze canvas before changing layer visibility
+ - add auto-update of groups (reqs. QGis fixes)
+ - add status bar
+ - keep group selection when updating group selector
+ - check for duplicate group names
+ - update UI stretching behaviour when docked
+
View
2 __init__.py
@@ -24,7 +24,7 @@ def name():
def description():
return "Loop Visible Layers"
def version():
- return "Version 0.1.2"
+ return "Version 0.2.0"
def icon():
return "icon.png"
def qgisMinimumVersion():
View
33 loopvisiblelayers.py
@@ -39,13 +39,18 @@ def __init__(self, iface):
def initGui(self):
# Create action that will start plugin configuration
- self.action = QAction(QIcon(":/plugins/loopvisiblelayers/icon.png"), \
- "Loop Visible Layers", self.iface.mainWindow())
+ self.action = QAction(QIcon(':/plugins/loopvisiblelayers/icon.png'), \
+ 'Loop Visible Layers', self.iface.mainWindow())
# create and show the dock
self.dockWidget = LoopVisibleLayersDock(self.iface.mainWindow(), self.iface)
self.restoreDockLocation()
self.restoreTimerDelay()
+
+ settings = QSettings()
+ if not settings.value('/Qgis/enable_render_caching').toBool():
+ self.dockWidget.setStatus( 'Enable render caching to improve performance' )
+
self.iface.addDockWidget(self.dockWidget.getLocation(), self.dockWidget)
# show the dialog
#dlg.show()
@@ -66,41 +71,41 @@ def saveDockLocation(self):
if floating:
nFloating = 1
- position = "%s %s" % (self.dockWidget.pos().x(), self.dockWidget.pos().y())
+ position = '%s %s' % (self.dockWidget.pos().x(), self.dockWidget.pos().y())
else:
nFloating = 0
- position = u"%s" % self.dockWidget.getLocation()
+ position = u'%s' % self.dockWidget.getLocation()
- settings.setValue( "/plugins/LoopVisibleLayers/floating", floating )
- settings.setValue( "/plugins/LoopVisibleLayers/position", QString(position) )
- #size = "%s %s" % (dockwidget.size().width(), dockwidget.size().height())
- #QgsProject.instance().writeEntry( "DockableMirrorMap", "/mirror%s/size" % i, QString(size) )
+ settings.setValue( '/PythonPlugins/LoopVisibleLayers/floating', floating )
+ settings.setValue( '/PythonPlugins/LoopVisibleLayers/position', QString(position) )
+ #size = '%s %s' % (dockwidget.size().width(), dockwidget.size().height())
+ #QgsProject.instance().writeEntry( 'DockableMirrorMap', '/mirror%s/size' % i, QString(size) )
def restoreDockLocation(self):
settings = QSettings()
- floating = settings.value("/plugins/LoopVisibleLayers/floating").toBool()
+ floating = settings.value('/PythonPlugins/LoopVisibleLayers/floating').toBool()
self.dockWidget.setFloating( floating )
if not floating:
- position = settings.value( "/plugins/LoopVisibleLayers/position" ).toString()
+ position = settings.value( '/PythonPlugins/LoopVisibleLayers/position' ).toString()
if position is None or position=='':
position = Qt.LeftDockWidgetArea
else:
- #position = int(position.split(" ")[0])
+ #position = int(position.split(' ')[0])
position = int(position)
#position = Qt.LeftDockWidgetArea
self.dockWidget.setLocation( position )
def saveTimerDelay(self):
timerDelay = self.dockWidget.getTimerDelay()
settings = QSettings()
- timerDelayStr = settings.value("/plugins/LoopVisibleLayers/delay")
+ timerDelayStr = settings.value('/PythonPlugins/LoopVisibleLayers/delay')
if ( timerDelayStr.toFloat()[0] != timerDelay ):
- settings.setValue( "/plugins/LoopVisibleLayers/delay", timerDelay )
+ settings.setValue( '/PythonPlugins/LoopVisibleLayers/delay', timerDelay )
def restoreTimerDelay(self):
settings = QSettings()
- timerDelayStr = settings.value("/plugins/LoopVisibleLayers/delay")
+ timerDelayStr = settings.value('/PythonPlugins/LoopVisibleLayers/delay')
if timerDelayStr is None or timerDelayStr != '':
timerDelay = timerDelayStr.toFloat()[0]
View
171 loopvisiblelayersdock.py
@@ -19,7 +19,6 @@
***************************************************************************/
"""
-#from PyQt4 import QtCore, QtGui
from PyQt4.QtCore import *
from PyQt4 import QtGui
#from PyQt4.QtGui import *
@@ -46,56 +45,79 @@ def __init__(self, parent, iface):
self.iface = iface
# variables
- self.groups = list()
- self.groupRels = list()
- self.bakLayerId = list()
- self.bakGroupName = list()
- self.bakGroupId = list()
+ self.groupNames = None
+ self.groupRels = None
+ self.bakLayerIds = None
self.count = 0
self.location = Qt.LeftDockWidgetArea
-
+ self.freeze = True
+ self.updateCount=0
+
# objects
self.timer = QTimer(self)
- QObject.connect(self.timer, SIGNAL("timeout()"), self.actionNext)
+ QObject.connect(self.timer, SIGNAL('timeout()'), self.actionNext)
self.state='stop'
self.iconStart = QIcon()
- self.iconStart.addPixmap(QPixmap(_fromUtf8(":/plugins/loopvisiblelayers/icons/control_play.png")), QIcon.Normal, QIcon.Off)
+ self.iconStart.addPixmap(QPixmap(_fromUtf8(':/plugins/loopvisiblelayers/icons/control_play.png')), QIcon.Normal, QIcon.Off)
self.iconPause = QIcon()
- self.iconPause.addPixmap(QPixmap(_fromUtf8(":/plugins/loopvisiblelayers/icons/control_pause.png")), QIcon.Normal, QIcon.Off)
+ self.iconPause.addPixmap(QPixmap(_fromUtf8(':/plugins/loopvisiblelayers/icons/control_pause.png')), QIcon.Normal, QIcon.Off)
self.loopCursor = QtGui.QCursor(QtGui.QPixmap(_fromUtf8(':/plugins/loopvisiblelayers/icons/icon_small.png')))
- QObject.connect( iface.legendInterface(), SIGNAL( "groupIndexChanged ( int, int )" ), self.groupsChanged )
- #QObject.connect(self, SIGNAL( "closed(PyQt_PyObject)" ), self.actionClose)
- self.connect(self, SIGNAL("dockLocationChanged(Qt::DockWidgetArea)"), self.setLocation)
- self.connect(self, SIGNAL("topLevelChanged(bool)"), self.resizeMin)
-
- QObject.connect(self.ui.btnStart, SIGNAL("clicked()"), self.actionStartPause)
- QObject.connect(self.ui.btnNext, SIGNAL("clicked()"), self.actionNext)
- QObject.connect(self.ui.btnStop, SIGNAL("clicked()"), self.actionStop)
- QObject.connect( self.ui.btnRefresh, SIGNAL( "clicked()" ), self.groupsChanged )
-
- self.groupsChanged()
+ #self.legend = self.iface.mainWindow().legend() #not accessible...
- #get timer delay - default 1.0
+ # UI
timerDelay = self.getTimerDelay( )
self.ui.spinDelay.setValue( timerDelay )
+ self.setStatus( '' ) #invisible by default
+
+ # signals/slots
+ self.connect(self, SIGNAL('dockLocationChanged(Qt::DockWidgetArea)'), self.setLocation)
+ self.connect(self, SIGNAL('topLevelChanged(bool)'), self.resizeMin)
+ QObject.connect(self.ui.btnStart, SIGNAL('clicked()'), self.actionStartPause)
+ QObject.connect(self.ui.btnNext, SIGNAL('clicked()'), self.actionNext)
+ QObject.connect(self.ui.btnStop, SIGNAL('clicked()'), self.actionStop)
+
+ # signals mapped to groupsChanged (btnRefresh, layers changed)
+ # TODO: how to detect that groups and relationships have changed?
+ # need something like QTreeWidget::itemChanged() but there is no interface for that
+ # changes in my repos. fix this and are required for auto update - https://github.com/etiennesky/Quantum-GIS
+ QObject.connect( self.ui.btnRefresh, SIGNAL( 'clicked()' ), self.groupsChanged )
+ #QObject.connect( self.iface.legendInterface(), SIGNAL( 'groupIndexChanged ( int, int )' ), self.groupsChanged )
+ QObject.connect( self.iface.legendInterface(), SIGNAL( 'itemAdded( int )' ), self.groupsChanged )
+ QObject.connect( self.iface.legendInterface(), SIGNAL( 'itemRemoved()' ), self.groupsChanged )
+ QObject.connect( self.iface.legendInterface(), SIGNAL( 'groupRelationsChanged()' ), self.groupsChanged )
+ #QObject.connect( QgsMapLayerRegistry.instance(), SIGNAL( 'layerWasAdded( QgsMapLayer* )' ), self.groupsChanged )
+ #QObject.connect( QgsMapLayerRegistry.instance(), SIGNAL( 'layerWillBeRemoved( QString )' ), self.groupsChanged )
+ #QObject.connect( QgsMapLayerRegistry.instance(), SIGNAL( 'removedAll()' ), self.groupsChanged )
+ #QObject.connect( self.iface.mapCanvas(), SIGNAL( 'layersChanged()' ), self.groupsChanged)
+ QObject.connect( self.iface.mapCanvas(), SIGNAL( 'stateChanged( int )' ), self.groupsChanged )
+ #update groups
+ self.groupsChanged()
def groupsChanged(self):
- self.groups = self.iface.legendInterface().groups()
+
+ #print('loopvisiblelayersdoc: groupsChanged() '+str(self.updateCount))
+ self.updateCount = self.updateCount+1
+
+ self.groupNames = self.qstrlist2list( self.iface.legendInterface().groups() )
self.groupRels = self.iface.legendInterface().groupLayerRelationship()
cbxGroup = self.ui.cbxGroup
if not cbxGroup is None:
+ curItem = cbxGroup.currentText()
cbxGroup.clear()
cbxGroup.addItem('<Visible Layers>')
cbxGroup.addItem('<Root>')
- cbxGroup.addItems( self.groups )
-# for group in self.groups:
-# cbxGroup.addItem( group )
+ cbxGroup.addItems( self.iface.legendInterface().groups() )
+ curIdx = cbxGroup.findText(curItem)
+ if curIdx != -1:
+ cbxGroup.setCurrentIndex( curIdx )
def actionClose(self):
+ if self.state!='stop':
+ self.state='close'
+ self.actionStop()
self.state='close'
- self.actionStop()
def actionStartPause(self):
if self.state=='stop':
@@ -108,17 +130,17 @@ def actionStartPause(self):
def actionStart(self):
# save visible layers
- self.bakLayerId = list()
+ self.bakLayerIds = list()
for layer in self.iface.mapCanvas().layers():
- self.bakLayerId.append( layer.id() )
-# print('bakLayerId: '+str(self.bakLayerId))
+ self.bakLayerIds.append( layer.id() )
+# print('bakLayerIds: '+str(self.bakLayerIds))
selGroupIndex = self.ui.cbxGroup.currentIndex()
selGroupName = self.ui.cbxGroup.currentText()
# print('start, delay='+str(self.getTimerDelay( ))+' current= '+str(selGroupIndex))
# print('size(cbxGroup)='+str(self.ui.cbxGroup.count())+' size(groups)='+str(self.groups.count()))
- #print('group: '+ self.groups[selGroupIndex])
+ # print('group: '+ self.groups[selGroupIndex])
# print('groups: ')
# print(str(self.groups))
# print('relationships: ')
@@ -127,8 +149,12 @@ def actionStart(self):
# get layers to show
self.selLayerId = list()
if selGroupName == '<Visible Layers>':
- self.selLayerId = self.bakLayerId
+ self.selLayerId = self.bakLayerIds
else:
+ #look for duplicate group names
+ if len(self.groupNames) != len(set(self.groupNames)):
+ QtGui.QMessageBox.critical(self, 'Error', 'Loop Visible Layers Plugin \n\nGroup names must be unique')
+ return
for grp, rels in self.groupRels:
if ( grp == '' and selGroupName == '<Root>' ) or ( grp == selGroupName ):
for rel in rels:
@@ -137,9 +163,8 @@ def actionStart(self):
self.selLayerId.append(grp)
if len(self.selLayerId) <= 1:
-# QgsMessageLog.logMessage('Loop Visible Layers Plugin : must select more than one layer.', 'Plugins')
- QtGui.QMessageBox.critical(self, "Error", 'Loop Visible Layers Plugin : must select more than one layer.')
- #print('Error, must select more than one layer')
+ #QgsMessageLog.logMessage('Loop Visible Layers Plugin : must select more than one layer.', 'Plugins')
+ QtGui.QMessageBox.critical(self, 'Error', 'Loop Visible Layers Plugin \n\nMust select more than one layer')
return
# else:
# print('selLayerId= '+str(self.selLayerId))
@@ -148,9 +173,13 @@ def actionStart(self):
self.ui.btnStart.setIcon( self.iconPause )
self.ui.btnNext.setEnabled( False )
+ # set override cursor
QtGui.QApplication.setOverrideCursor( self.loopCursor )
- # first hide all layers
+ # freeze the canvas
+ self.freezeCanvas( True )
+
+ # hide all layers
ifaceLegend = self.iface.legendInterface()
ifaceLayers = QgsMapLayerRegistry.instance().mapLayers()
for layerName, layer in ifaceLayers.iteritems():
@@ -167,20 +196,21 @@ def actionNext(self):
ifaceLegend = self.iface.legendInterface()
ifaceLayers = QgsMapLayerRegistry.instance().mapLayers()
+ # update loop counter
i=0
if self.count > len(self.selLayerId)-1:
self.count = 0
- # get all layers and all groups as lists
+# print('TMP ET actionNext() i='+str(i)+' count='+str(self.count))
+
+ # get all layers and all groups as lists
# slightly ineficient but I want to work with python lists exclusively here
- self.allLayerIds = list()
- for key in ifaceLayers.keys():
- self.allLayerIds.append(str(key) )
-# print(str('layers: '+str(self.allLayerIds)))
- self.allGroupIds = list()
- for key in self.groups:
- self.allGroupIds.append( str(key) )
-# print(str('groups: '+str(self.allGroupIds)))
+ self.allLayerIds = self.qstrlist2list( ifaceLayers )
+ #print(str('layers: '+str(self.allLayerIds)))
+ #print(str('groups: '+str(self.groupNames)))
+
+ # freeze the canvas
+ self.freezeCanvas( True )
# show all items in self.selLayerId
for layerId in self.selLayerId:
@@ -190,44 +220,59 @@ def actionNext(self):
layerVisible = False
if layerId in self.allLayerIds:
layer = ifaceLayers[QString(layerId)]
-# print('layerID '+str(layerId)+' is a layer')
-# print('i= '+str(i)+' count= '+str(self.count))
+ #print('layerID '+str(layerId)+' is a layer')
+ #print('i= '+str(i)+' count= '+str(self.count))
ifaceLegend.setLayerVisible( layer, layerVisible )
i = i + 1
- elif layerId in self.allGroupIds:
-# print('layerID '+str(layerId))
-# print('i= '+str(i)+' count= '+str(self.count))
+ elif layerId in self.groupNames:
+ #print('layerID '+str(layerId))
+ #print('i= '+str(i)+' count= '+str(self.count))
self.setGroupVisible(layerId,layerVisible)
i = i + 1
else:
QgsMessageLog.logMessage('Loop Visible Layers Plugin : layerId '+str(layerId)+' is not a layer nor a group...', 'Plugins')
+ self.setStatus( 'invalid layer '+layerId )
+
+ # thaw the canvas
+ self.freezeCanvas( False )
+ #update loop counter
self.count = self.count + 1
def setGroupVisible(self,layerId,layerVisible):
+
# print('setGroupVisible('+str(layerId)+', '+str(layerVisible))
for grp, rels in self.groupRels:
# print('tmp grp='+str(grp))
if ( grp == '' and layerId == '<Root>' ) or ( grp == layerId ):
# print('relationships: '+str(rels))
for tmpLayerId in rels:
- if tmpLayerId in self.allGroupIds:
+ if tmpLayerId in self.groupNames:
self.setGroupVisible(tmpLayerId,layerVisible)
else:
layer = QgsMapLayerRegistry.instance().mapLayers()[QString(tmpLayerId)]
self.iface.legendInterface().setLayerVisible( layer, layerVisible )
def actionStop(self):
+
self.timer.stop()
+ # freeze the canvas
+ self.freezeCanvas( True )
+
#restore old layers visibility
for layerName, layer in QgsMapLayerRegistry.instance().mapLayers().iteritems():
- if layer.id() in self.bakLayerId:
+ if layer.id() in self.bakLayerIds:
self.iface.legendInterface().setLayerVisible( layer, True )
else:
self.iface.legendInterface().setLayerVisible( layer, False )
+
+ # thaw the canvas
+ self.freezeCanvas( False )
+
+ # restore override cursor
QtGui.QApplication.restoreOverrideCursor()
self.count = 0
@@ -278,3 +323,25 @@ def resizeMin(self):
if self.isFloating():
self.resize( self.minimumSize() )
+ def setStatus(self, status):
+ if status is None or status=='':
+ self.ui.lblStatus.setText( '' )
+ self.ui.lblStatus.setVisible( False )
+ else:
+ self.ui.lblStatus.setText( status )
+ self.ui.lblStatus.setVisible( True )
+
+ def freezeCanvas(self, setFreeze):
+ if self.freeze:
+ if setFreeze:
+ if not self.iface.mapCanvas().isFrozen():
+ self.iface.mapCanvas().freeze( True )
+ else:
+ if self.iface.mapCanvas().isFrozen():
+ self.iface.mapCanvas().freeze( False )
+
+ def qstrlist2list(self, qstrlist):
+ tmplist = list()
+ for key in qstrlist:
+ tmplist.append( str(key) )
+ return tmplist
View
2 metadata.txt
@@ -12,7 +12,7 @@
name=Loop Visible Layers
qgisMinimumVersion=1.7
description=Allows for layers or groups to be displayed in a loop
-version=0.1.2
+version=0.2.0
# end of mandatory metadata
View
37 ui_loopvisiblelayersdock.py
@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'ui_loopvisiblelayersdock.ui'
#
-# Created: Wed Mar 14 17:01:45 2012
+# Created: Thu Mar 15 00:03:07 2012
# by: PyQt4 UI code generator 4.8.5
#
# WARNING! All changes made in this file will be lost!
@@ -17,7 +17,7 @@
class Ui_LoopVisibleLayersDock(object):
def setupUi(self, LoopVisibleLayersDock):
LoopVisibleLayersDock.setObjectName(_fromUtf8("LoopVisibleLayersDock"))
- LoopVisibleLayersDock.resize(305, 173)
+ LoopVisibleLayersDock.resize(317, 185)
LoopVisibleLayersDock.setWindowTitle(QtGui.QApplication.translate("LoopVisibleLayersDock", "Loop Visible Layers", None, QtGui.QApplication.UnicodeUTF8))
self.dockWidgetContents = QtGui.QWidget()
self.dockWidgetContents.setObjectName(_fromUtf8("dockWidgetContents"))
@@ -26,18 +26,18 @@ def setupUi(self, LoopVisibleLayersDock):
self.label = QtGui.QLabel(self.dockWidgetContents)
self.label.setText(QtGui.QApplication.translate("LoopVisibleLayersDock", "Select Group", None, QtGui.QApplication.UnicodeUTF8))
self.label.setObjectName(_fromUtf8("label"))
- self.gridLayout.addWidget(self.label, 2, 0, 1, 1)
+ self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
self.cbxGroup = QtGui.QComboBox(self.dockWidgetContents)
self.cbxGroup.setObjectName(_fromUtf8("cbxGroup"))
- self.gridLayout.addWidget(self.cbxGroup, 2, 2, 1, 1)
+ self.gridLayout.addWidget(self.cbxGroup, 0, 2, 1, 1)
self.label_2 = QtGui.QLabel(self.dockWidgetContents)
self.label_2.setText(QtGui.QApplication.translate("LoopVisibleLayersDock", "Loop Delay (sec.)", None, QtGui.QApplication.UnicodeUTF8))
self.label_2.setObjectName(_fromUtf8("label_2"))
- self.gridLayout.addWidget(self.label_2, 3, 0, 1, 1)
+ self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
self.label_3 = QtGui.QLabel(self.dockWidgetContents)
self.label_3.setText(QtGui.QApplication.translate("LoopVisibleLayersDock", "Controls", None, QtGui.QApplication.UnicodeUTF8))
self.label_3.setObjectName(_fromUtf8("label_3"))
- self.gridLayout.addWidget(self.label_3, 5, 0, 1, 1)
+ self.gridLayout.addWidget(self.label_3, 3, 0, 1, 1)
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.btnStart = QtGui.QPushButton(self.dockWidgetContents)
@@ -65,22 +65,16 @@ def setupUi(self, LoopVisibleLayersDock):
self.btnNext.setIcon(icon2)
self.btnNext.setObjectName(_fromUtf8("btnNext"))
self.horizontalLayout.addWidget(self.btnNext)
- self.gridLayout.addLayout(self.horizontalLayout, 5, 2, 1, 1)
- spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.gridLayout.addItem(spacerItem, 1, 2, 1, 1)
- spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.gridLayout.addItem(spacerItem1, 6, 2, 1, 1)
- spacerItem2 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.gridLayout.addItem(spacerItem2, 0, 2, 1, 1)
+ self.gridLayout.addLayout(self.horizontalLayout, 3, 2, 1, 1)
self.horizontalLayout_2 = QtGui.QHBoxLayout()
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
self.spinDelay = QtGui.QDoubleSpinBox(self.dockWidgetContents)
self.spinDelay.setDecimals(1)
self.spinDelay.setMinimum(0.1)
self.spinDelay.setObjectName(_fromUtf8("spinDelay"))
self.horizontalLayout_2.addWidget(self.spinDelay)
- spacerItem3 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
- self.horizontalLayout_2.addItem(spacerItem3)
+ spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+ self.horizontalLayout_2.addItem(spacerItem)
self.btnRefresh = QtGui.QPushButton(self.dockWidgetContents)
self.btnRefresh.setToolTip(QtGui.QApplication.translate("LoopVisibleLayersDock", "Refresh Groups", None, QtGui.QApplication.UnicodeUTF8))
self.btnRefresh.setText(_fromUtf8(""))
@@ -89,7 +83,18 @@ def setupUi(self, LoopVisibleLayersDock):
self.btnRefresh.setIcon(icon3)
self.btnRefresh.setObjectName(_fromUtf8("btnRefresh"))
self.horizontalLayout_2.addWidget(self.btnRefresh)
- self.gridLayout.addLayout(self.horizontalLayout_2, 3, 2, 1, 1)
+ self.gridLayout.addLayout(self.horizontalLayout_2, 1, 2, 1, 1)
+ self.lblStatus = QtGui.QLabel(self.dockWidgetContents)
+ self.lblStatus.setEnabled(True)
+ self.lblStatus.setText(_fromUtf8(""))
+ self.lblStatus.setObjectName(_fromUtf8("lblStatus"))
+ self.gridLayout.addWidget(self.lblStatus, 4, 0, 1, 3)
+ spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ self.gridLayout.addItem(spacerItem1, 5, 2, 1, 1)
+ spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+ self.gridLayout.addItem(spacerItem2, 1, 3, 1, 1)
+ spacerItem3 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+ self.gridLayout.addItem(spacerItem3, 1, 1, 1, 1)
LoopVisibleLayersDock.setWidget(self.dockWidgetContents)
self.retranslateUi(LoopVisibleLayersDock)
View
105 ui_loopvisiblelayersdock.ui
@@ -6,40 +6,40 @@
<rect>
<x>0</x>
<y>0</y>
- <width>305</width>
- <height>173</height>
+ <width>317</width>
+ <height>185</height>
</rect>
</property>
<property name="windowTitle">
<string>Loop Visible Layers</string>
</property>
<widget class="QWidget" name="dockWidgetContents">
<layout class="QGridLayout" name="gridLayout">
- <item row="2" column="0">
+ <item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Select Group</string>
</property>
</widget>
</item>
- <item row="2" column="2">
+ <item row="0" column="2">
<widget class="QComboBox" name="cbxGroup"/>
</item>
- <item row="3" column="0">
+ <item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Loop Delay (sec.)</string>
</property>
</widget>
</item>
- <item row="5" column="0">
+ <item row="3" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Controls</string>
</property>
</widget>
</item>
- <item row="5" column="2">
+ <item row="3" column="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="btnStart">
@@ -89,45 +89,6 @@
</layout>
</item>
<item row="1" column="2">
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="6" column="2">
- <spacer name="verticalSpacer_2">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="0" column="2">
- <spacer name="verticalSpacer_3">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="3" column="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QDoubleSpinBox" name="spinDelay">
@@ -168,6 +129,58 @@
</item>
</layout>
</item>
+ <item row="4" column="0" colspan="3">
+ <widget class="QLabel" name="lblStatus">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="2">
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="3">
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="1">
+ <spacer name="horizontalSpacer_3">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
</layout>
</widget>
</widget>

0 comments on commit 90088ad

Please sign in to comment.
Something went wrong with that request. Please try again.