Skip to content
Browse files

change loop widget to a QWidget and nest into an ordinary QDockWidget

  • Loading branch information...
1 parent 87de911 commit d7bf9089107c443efd0c4aa260ba8440a63db0cc @etiennesky committed Mar 16, 2012
View
5 Makefile
@@ -21,12 +21,11 @@
PLUGINNAME = loopvisiblelayers
-PY_FILES = loopvisiblelayers.py loopvisiblelayersdock.py __init__.py
+PY_FILES = loopvisiblelayers.py loopvisiblelayerswidget.py __init__.py
EXTRAS = icon.png icons/* metadata.txt README
-#UI_FILES = ui_loopvisiblelayers.py ui_loopvisiblelayersdock.py
-UI_FILES = ui_loopvisiblelayersdock.py
+UI_FILES = ui_loopvisiblelayerswidget.py
RESOURCE_FILES = resources_rc.py
View
1 README
@@ -19,6 +19,7 @@ The Controls are Play/Pause, Stop, Next.
============================================================
TODO
+- change config path
- 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
View
84 loopvisiblelayers.py
@@ -25,97 +25,63 @@
# Initialize Qt resources from file resources.py
import resources_rc
# Import the code for the dialog
-from loopvisiblelayersdock import LoopVisibleLayersDock
+from loopvisiblelayerswidget import LoopVisibleLayersWidget
class LoopVisibleLayers:
def __init__(self, iface):
# Save reference to the QGIS interface
self.iface = iface
+ self.loopWidget = None
self.dockWidget = None
def initGui(self):
# Create action that will start plugin configuration
- print('initGui')
self.action = QAction(QIcon(':/plugins/loopvisiblelayers/icon.png'), \
'Loop Visible Layers', self.iface.mainWindow())
- # connect the action to the run method
+ # connect the action
QObject.connect(self.action, SIGNAL('triggered()'), self.showHideDock)
# Add toolbar button and menu item
self.iface.addToolBarIcon(self.action)
#self.iface.addPluginToMenu('Loop Visible Layers', self.action)
-
- # show dock
- self.showDock()
+
+ # create the loop widget
+ self.loopWidget = LoopVisibleLayersWidget(self.iface)
+ self.restoreTimerDelay()
+ settings = QSettings()
+ if not settings.value('/Qgis/enable_render_caching').toBool():
+ self.loopWidget.setStatus( 'Enable render caching to improve performance' )
+
+ # create and show the dock
+ self.dockWidget = QDockWidget('Loop Visible Layers', self.iface.mainWindow() )
+ self.dockWidget.setObjectName('Loop Visible Layers')
+ self.dockWidget.setWidget(self.loopWidget)
+ QObject.connect(self.dockWidget, SIGNAL('topLevelChanged ( bool )'), self.resizeDock)
+ self.iface.addDockWidget(Qt.LeftDockWidgetArea, self.dockWidget)
def showHideDock(self):
if not self.dockWidget.isVisible():
- self.showDock()
+ self.dockWidget.setVisible( True )
else:
self.dockWidget.setVisible( False )
- # run method that performs all the real work
- def showDock(self):
- # 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()
-
+ #resize dock to minimum size if it is floating
+ def resizeDock(self, topLevel):
+ if topLevel:
+ self.dockWidget.resize( self.dockWidget.minimumSize() )
def unload(self):
# Remove the plugin menu item and icon
#self.iface.removePluginMenu('Loop Visible Layers',self.action)
self.iface.removeToolBarIcon(self.action)
#remove the dock
self.saveTimerDelay()
- self.saveDockLocation()
self.dockWidget.close()
- self.dockWidget.actionClose()
-
-
- def saveDockLocation(self):
- settings = QSettings()
- #code from dockable mirror map
- floating = self.dockWidget.isFloating()
-
- if floating:
- nFloating = 1
- position = '%s %s' % (self.dockWidget.pos().x(), self.dockWidget.pos().y())
- else:
- nFloating = 0
- position = u'%s' % self.dockWidget.getLocation()
-
- 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('/PythonPlugins/LoopVisibleLayers/floating').toBool()
- self.dockWidget.setFloating( floating )
- if not floating:
- 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)
- #position = Qt.LeftDockWidgetArea
- self.dockWidget.setLocation( position )
+ self.loopWidget.actionClose()
def saveTimerDelay(self):
- timerDelay = self.dockWidget.getTimerDelay()
+ timerDelay = self.loopWidget.getTimerDelay()
settings = QSettings()
timerDelayStr = settings.value('/PythonPlugins/LoopVisibleLayers/delay')
if ( timerDelayStr.toFloat()[0] != timerDelay ):
@@ -132,4 +98,4 @@ def restoreTimerDelay(self):
if timerDelay <= 0:
timerDelay = 1.0
- self.dockWidget.setTimerDelay( timerDelay )
+ self.loopWidget.setTimerDelay( timerDelay )
View
19 loopvisiblelayersdock.py → loopvisiblelayerswidget.py
@@ -25,18 +25,18 @@
from qgis.core import *
from qgis.gui import *
-from ui_loopvisiblelayersdock import Ui_LoopVisibleLayersDock as Ui_Widget
+from ui_loopvisiblelayerswidget import Ui_LoopVisibleLayersWidget as Ui_Widget
try:
_fromUtf8 = QString.fromUtf8
except AttributeError:
_fromUtf8 = lambda s: s
-# create the dock
-class LoopVisibleLayersDock(QtGui.QDockWidget, Ui_Widget):
- def __init__(self, parent, iface):
+# create the widget
+class LoopVisibleLayersWidget(QtGui.QWidget, Ui_Widget):
+ def __init__(self, iface):
- QtGui.QDockWidget.__init__(self, parent)
+ QtGui.QWidget.__init__(self)
# Set up the user interface from Designer.
self.setupUi(self)
@@ -48,7 +48,6 @@ def __init__(self, parent, iface):
self.groupRels = None
self.bakLayerIds = None
self.count = 0
- self.location = Qt.LeftDockWidgetArea
self.freeze = True
self.updateCount = 0
self.signalsLegendIface = False # are the new legendInterface() signals available?
@@ -74,7 +73,6 @@ def __init__(self, parent, iface):
self.setStatus( '' ) #invisible by default
# signals/slots
- QObject.connect(self, SIGNAL('dockLocationChanged(Qt::DockWidgetArea)'), self.setLocation)
QObject.connect(self, SIGNAL('topLevelChanged(bool)'), self.resizeMin)
QObject.connect(self.btnStart, SIGNAL('clicked()'), self.actionStartPause)
QObject.connect(self.btnForward, SIGNAL('clicked()'), self.actionForward)
@@ -97,6 +95,7 @@ def __init__(self, parent, iface):
QObject.connect( self.iface.legendInterface(), SIGNAL( 'itemRemoved()' ), self.checkGroupsChangedLegendIface )
QObject.connect( self.iface.legendInterface(), SIGNAL( 'groupRelationsChanged()' ), self.checkGroupsChangedLegendIface )
QObject.connect( self.iface.mapCanvas(), SIGNAL( 'stateChanged( int )' ), self.checkGroupsChanged )
+ #should we disconnect when unload?
#update groups on init
self.checkGroupsChanged()
@@ -372,12 +371,6 @@ def getTimerDelay(self):
def setTimerDelay(self,timerDelay):
self.spinDelay.setValue( timerDelay )
- def getLocation(self):
- return self.location
-
- def setLocation(self, location):
- self.location = location
-
# minimize widget
def resizeMin(self):
if self.isFloating():
View
222 ui_loopvisiblelayersdock.ui
@@ -1,222 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>LoopVisibleLayersDock</class>
- <widget class="QDockWidget" name="LoopVisibleLayersDock">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>365</width>
- <height>199</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Loop Visible Layers</string>
- </property>
- <widget class="QWidget" name="dockWidgetContents">
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="1">
- <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="4" column="0">
- <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="0" column="0">
- <widget class="QFrame" name="frame">
- <property name="frameShape">
- <enum>QFrame::StyledPanel</enum>
- </property>
- <layout class="QGridLayout" name="gridLayout_2">
- <item row="2" column="2">
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QDoubleSpinBox" name="spinDelay">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="decimals">
- <number>1</number>
- </property>
- <property name="minimum">
- <double>0.000000000000000</double>
- </property>
- <property name="maximum">
- <double>999.000000000000000</double>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label_4">
- <property name="text">
- <string>(sec.)</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item row="1" column="2">
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QPushButton" name="btnStart">
- <property name="toolTip">
- <string>Start / Pause</string>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="icon">
- <iconset resource="resources.qrc">
- <normaloff>:/plugins/loopvisiblelayers/icons/control_play.png</normaloff>:/plugins/loopvisiblelayers/icons/control_play.png</iconset>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="btnStop">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="toolTip">
- <string>Stop</string>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="icon">
- <iconset resource="resources.qrc">
- <normaloff>:/plugins/loopvisiblelayers/icons/control_stop.png</normaloff>:/plugins/loopvisiblelayers/icons/control_stop.png</iconset>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="btnBack">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="toolTip">
- <string>Back</string>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="icon">
- <iconset resource="resources.qrc">
- <normaloff>:/plugins/loopvisiblelayers/icons/control_rewind.png</normaloff>:/plugins/loopvisiblelayers/icons/control_rewind.png</iconset>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="btnForward">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="toolTip">
- <string>Forward</string>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="icon">
- <iconset resource="resources.qrc">
- <normaloff>:/plugins/loopvisiblelayers/icons/control_fastforward.png</normaloff>:/plugins/loopvisiblelayers/icons/control_fastforward.png</iconset>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Loop Delay</string>
- </property>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Select Group</string>
- </property>
- </widget>
- </item>
- <item row="0" column="2">
- <widget class="QComboBox" name="cbxGroup"/>
- </item>
- <item row="0" column="1">
- <spacer name="horizontalSpacer_3">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>10</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_3">
- <property name="text">
- <string>Controls</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="lblStatus">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="text">
- <string>Status</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
- <resources>
- <include location="resources.qrc"/>
- </resources>
- <connections/>
-</ui>
View
75 ui_loopvisiblelayersdock.py → ui_loopvisiblelayerswidget.py
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
-# Form implementation generated from reading ui file 'ui_loopvisiblelayersdock.ui'
+# Form implementation generated from reading ui file 'ui_loopvisiblelayerswidget.ui'
#
-# Created: Fri Mar 16 16:34:35 2012
+# Created: Fri Mar 16 18:58:04 2012
# by: PyQt4 UI code generator 4.8.5
#
# WARNING! All changes made in this file will be lost!
@@ -14,20 +14,24 @@
except AttributeError:
_fromUtf8 = lambda s: s
-class Ui_LoopVisibleLayersDock(object):
- def setupUi(self, LoopVisibleLayersDock):
- LoopVisibleLayersDock.setObjectName(_fromUtf8("LoopVisibleLayersDock"))
- LoopVisibleLayersDock.resize(365, 199)
- LoopVisibleLayersDock.setWindowTitle(QtGui.QApplication.translate("LoopVisibleLayersDock", "Loop Visible Layers", None, QtGui.QApplication.UnicodeUTF8))
- self.dockWidgetContents = QtGui.QWidget()
- self.dockWidgetContents.setObjectName(_fromUtf8("dockWidgetContents"))
- self.gridLayout = QtGui.QGridLayout(self.dockWidgetContents)
+class Ui_LoopVisibleLayersWidget(object):
+ def setupUi(self, LoopVisibleLayersWidget):
+ LoopVisibleLayersWidget.setObjectName(_fromUtf8("LoopVisibleLayersWidget"))
+ LoopVisibleLayersWidget.resize(365, 174)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(LoopVisibleLayersWidget.sizePolicy().hasHeightForWidth())
+ LoopVisibleLayersWidget.setSizePolicy(sizePolicy)
+ LoopVisibleLayersWidget.setWindowTitle(QtGui.QApplication.translate("LoopVisibleLayersWidget", "Form", None, QtGui.QApplication.UnicodeUTF8))
+ self.gridLayout = QtGui.QGridLayout(LoopVisibleLayersWidget)
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
- spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
- self.gridLayout.addItem(spacerItem, 0, 1, 1, 1)
- spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.gridLayout.addItem(spacerItem1, 4, 0, 1, 1)
- self.frame = QtGui.QFrame(self.dockWidgetContents)
+ self.frame = QtGui.QFrame(LoopVisibleLayersWidget)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.frame.sizePolicy().hasHeightForWidth())
+ self.frame.setSizePolicy(sizePolicy)
self.frame.setFrameShape(QtGui.QFrame.StyledPanel)
self.frame.setObjectName(_fromUtf8("frame"))
self.gridLayout_2 = QtGui.QGridLayout(self.frame)
@@ -46,16 +50,16 @@ def setupUi(self, LoopVisibleLayersDock):
self.spinDelay.setObjectName(_fromUtf8("spinDelay"))
self.horizontalLayout_2.addWidget(self.spinDelay)
self.label_4 = QtGui.QLabel(self.frame)
- self.label_4.setText(QtGui.QApplication.translate("LoopVisibleLayersDock", "(sec.)", None, QtGui.QApplication.UnicodeUTF8))
+ self.label_4.setText(QtGui.QApplication.translate("LoopVisibleLayersWidget", "(sec.)", None, QtGui.QApplication.UnicodeUTF8))
self.label_4.setObjectName(_fromUtf8("label_4"))
self.horizontalLayout_2.addWidget(self.label_4)
- spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
- self.horizontalLayout_2.addItem(spacerItem2)
+ spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+ self.horizontalLayout_2.addItem(spacerItem)
self.gridLayout_2.addLayout(self.horizontalLayout_2, 2, 2, 1, 1)
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.btnStart = QtGui.QPushButton(self.frame)
- self.btnStart.setToolTip(QtGui.QApplication.translate("LoopVisibleLayersDock", "Start / Pause", None, QtGui.QApplication.UnicodeUTF8))
+ self.btnStart.setToolTip(QtGui.QApplication.translate("LoopVisibleLayersWidget", "Start / Pause", None, QtGui.QApplication.UnicodeUTF8))
self.btnStart.setText(_fromUtf8(""))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/loopvisiblelayers/icons/control_play.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
@@ -64,7 +68,7 @@ def setupUi(self, LoopVisibleLayersDock):
self.horizontalLayout.addWidget(self.btnStart)
self.btnStop = QtGui.QPushButton(self.frame)
self.btnStop.setEnabled(False)
- self.btnStop.setToolTip(QtGui.QApplication.translate("LoopVisibleLayersDock", "Stop", None, QtGui.QApplication.UnicodeUTF8))
+ self.btnStop.setToolTip(QtGui.QApplication.translate("LoopVisibleLayersWidget", "Stop", None, QtGui.QApplication.UnicodeUTF8))
self.btnStop.setText(_fromUtf8(""))
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/loopvisiblelayers/icons/control_stop.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
@@ -73,7 +77,7 @@ def setupUi(self, LoopVisibleLayersDock):
self.horizontalLayout.addWidget(self.btnStop)
self.btnBack = QtGui.QPushButton(self.frame)
self.btnBack.setEnabled(False)
- self.btnBack.setToolTip(QtGui.QApplication.translate("LoopVisibleLayersDock", "Back", None, QtGui.QApplication.UnicodeUTF8))
+ self.btnBack.setToolTip(QtGui.QApplication.translate("LoopVisibleLayersWidget", "Back", None, QtGui.QApplication.UnicodeUTF8))
self.btnBack.setText(_fromUtf8(""))
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/loopvisiblelayers/icons/control_rewind.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
@@ -82,7 +86,7 @@ def setupUi(self, LoopVisibleLayersDock):
self.horizontalLayout.addWidget(self.btnBack)
self.btnForward = QtGui.QPushButton(self.frame)
self.btnForward.setEnabled(False)
- self.btnForward.setToolTip(QtGui.QApplication.translate("LoopVisibleLayersDock", "Forward", None, QtGui.QApplication.UnicodeUTF8))
+ self.btnForward.setToolTip(QtGui.QApplication.translate("LoopVisibleLayersWidget", "Forward", None, QtGui.QApplication.UnicodeUTF8))
self.btnForward.setText(_fromUtf8(""))
icon3 = QtGui.QIcon()
icon3.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/loopvisiblelayers/icons/control_fastforward.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
@@ -91,34 +95,37 @@ def setupUi(self, LoopVisibleLayersDock):
self.horizontalLayout.addWidget(self.btnForward)
self.gridLayout_2.addLayout(self.horizontalLayout, 1, 2, 1, 1)
self.label_2 = QtGui.QLabel(self.frame)
- self.label_2.setText(QtGui.QApplication.translate("LoopVisibleLayersDock", "Loop Delay", None, QtGui.QApplication.UnicodeUTF8))
+ self.label_2.setText(QtGui.QApplication.translate("LoopVisibleLayersWidget", "Loop Delay", None, QtGui.QApplication.UnicodeUTF8))
self.label_2.setObjectName(_fromUtf8("label_2"))
self.gridLayout_2.addWidget(self.label_2, 2, 0, 1, 1)
self.label = QtGui.QLabel(self.frame)
- self.label.setText(QtGui.QApplication.translate("LoopVisibleLayersDock", "Select Group", None, QtGui.QApplication.UnicodeUTF8))
+ self.label.setText(QtGui.QApplication.translate("LoopVisibleLayersWidget", "Select Group", None, QtGui.QApplication.UnicodeUTF8))
self.label.setObjectName(_fromUtf8("label"))
self.gridLayout_2.addWidget(self.label, 0, 0, 1, 1)
self.cbxGroup = QtGui.QComboBox(self.frame)
self.cbxGroup.setObjectName(_fromUtf8("cbxGroup"))
self.gridLayout_2.addWidget(self.cbxGroup, 0, 2, 1, 1)
- spacerItem3 = QtGui.QSpacerItem(10, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
- self.gridLayout_2.addItem(spacerItem3, 0, 1, 1, 1)
+ spacerItem1 = QtGui.QSpacerItem(10, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
+ self.gridLayout_2.addItem(spacerItem1, 0, 1, 1, 1)
self.label_3 = QtGui.QLabel(self.frame)
- self.label_3.setText(QtGui.QApplication.translate("LoopVisibleLayersDock", "Controls", None, QtGui.QApplication.UnicodeUTF8))
+ self.label_3.setText(QtGui.QApplication.translate("LoopVisibleLayersWidget", "Controls", None, QtGui.QApplication.UnicodeUTF8))
self.label_3.setObjectName(_fromUtf8("label_3"))
self.gridLayout_2.addWidget(self.label_3, 1, 0, 1, 1)
self.gridLayout.addWidget(self.frame, 0, 0, 1, 1)
- self.lblStatus = QtGui.QLabel(self.dockWidgetContents)
+ spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+ self.gridLayout.addItem(spacerItem2, 0, 1, 1, 1)
+ self.lblStatus = QtGui.QLabel(LoopVisibleLayersWidget)
self.lblStatus.setEnabled(True)
- self.lblStatus.setText(QtGui.QApplication.translate("LoopVisibleLayersDock", "Status", None, QtGui.QApplication.UnicodeUTF8))
+ self.lblStatus.setText(QtGui.QApplication.translate("LoopVisibleLayersWidget", "Status", None, QtGui.QApplication.UnicodeUTF8))
self.lblStatus.setObjectName(_fromUtf8("lblStatus"))
- self.gridLayout.addWidget(self.lblStatus, 3, 0, 1, 1)
- LoopVisibleLayersDock.setWidget(self.dockWidgetContents)
+ self.gridLayout.addWidget(self.lblStatus, 1, 0, 1, 1)
+ spacerItem3 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ self.gridLayout.addItem(spacerItem3, 2, 0, 1, 1)
- self.retranslateUi(LoopVisibleLayersDock)
- QtCore.QMetaObject.connectSlotsByName(LoopVisibleLayersDock)
+ self.retranslateUi(LoopVisibleLayersWidget)
+ QtCore.QMetaObject.connectSlotsByName(LoopVisibleLayersWidget)
- def retranslateUi(self, LoopVisibleLayersDock):
+ def retranslateUi(self, LoopVisibleLayersWidget):
pass
import resources_rc
View
232 ui_loopvisiblelayerswidget.ui
@@ -0,0 +1,232 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>LoopVisibleLayersWidget</class>
+ <widget class="QWidget" name="LoopVisibleLayersWidget">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>365</width>
+ <height>174</height>
+ </rect>
+ </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="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QFrame" name="frame">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="2" column="2">
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QDoubleSpinBox" name="spinDelay">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="decimals">
+ <number>1</number>
+ </property>
+ <property name="minimum">
+ <double>0.000000000000000</double>
+ </property>
+ <property name="maximum">
+ <double>999.000000000000000</double>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_4">
+ <property name="text">
+ <string>(sec.)</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="2">
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QPushButton" name="btnStart">
+ <property name="toolTip">
+ <string>Start / Pause</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="resources.qrc">
+ <normaloff>:/plugins/loopvisiblelayers/icons/control_play.png</normaloff>:/plugins/loopvisiblelayers/icons/control_play.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="btnStop">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip">
+ <string>Stop</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="resources.qrc">
+ <normaloff>:/plugins/loopvisiblelayers/icons/control_stop.png</normaloff>:/plugins/loopvisiblelayers/icons/control_stop.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="btnBack">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip">
+ <string>Back</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="resources.qrc">
+ <normaloff>:/plugins/loopvisiblelayers/icons/control_rewind.png</normaloff>:/plugins/loopvisiblelayers/icons/control_rewind.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="btnForward">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip">
+ <string>Forward</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="resources.qrc">
+ <normaloff>:/plugins/loopvisiblelayers/icons/control_fastforward.png</normaloff>:/plugins/loopvisiblelayers/icons/control_fastforward.png</iconset>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Loop Delay</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Select Group</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QComboBox" name="cbxGroup"/>
+ </item>
+ <item row="0" column="1">
+ <spacer name="horizontalSpacer_3">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>10</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Controls</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <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="0">
+ <widget class="QLabel" name="lblStatus">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Status</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <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>
+ </layout>
+ </widget>
+ <resources>
+ <include location="resources.qrc"/>
+ </resources>
+ <connections/>
+</ui>

0 comments on commit d7bf908

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