diff options
author | Ninad Sathaye <ninad@nanorex.com> | 2008-10-02 19:56:22 +0000 |
---|---|---|
committer | Ninad Sathaye <ninad@nanorex.com> | 2008-10-02 19:56:22 +0000 |
commit | 3ae43706510ea1e4b9df92af0bfb63c1da638c03 (patch) | |
tree | 81deb8681bd0ad56179d7415e9ab323e1a8a6f62 | |
parent | e51e205f8119fc18f63bdd5c48f4158568fee4c8 (diff) | |
download | nanoengineer-3ae43706510ea1e4b9df92af0bfb63c1da638c03.tar.gz nanoengineer-3ae43706510ea1e4b9df92af0bfb63c1da638c03.zip |
removed unused import , indentation fixes etc
-rwxr-xr-x | cad/src/commands/PlayMovie/Ui_MoviePropertyManager.py | 126 |
1 files changed, 61 insertions, 65 deletions
diff --git a/cad/src/commands/PlayMovie/Ui_MoviePropertyManager.py b/cad/src/commands/PlayMovie/Ui_MoviePropertyManager.py index 2d5fc4314..48657c1c7 100755 --- a/cad/src/commands/PlayMovie/Ui_MoviePropertyManager.py +++ b/cad/src/commands/PlayMovie/Ui_MoviePropertyManager.py @@ -1,12 +1,11 @@ -# Copyright 2007 Nanorex, Inc. See LICENSE file for details. +# Copyright 2007-2008 Nanorex, Inc. See LICENSE file for details. """ - The Ui_MoviePropertyManager class defines UI elements for the Property Manager of the B{Movie mode}. @author: Mark, Ninad -@copyright: 2007 Nanorex, Inc. See LICENSE file for details. +@copyright: 2007-2008 Nanorex, Inc. See LICENSE file for details. @version:$Id$ History: @@ -20,8 +19,6 @@ ninad 2007-09-11: Code clean up to use PM module classes from PyQt4 import QtGui from PyQt4.Qt import Qt - -from PM.PM_Dialog import PM_Dialog from PM.PM_GroupBox import PM_GroupBox from PM.PM_CheckBox import PM_CheckBox from PM.PM_Slider import PM_Slider @@ -42,19 +39,19 @@ class Ui_MoviePropertyManager(Command_PropertyManager): """ The Ui_MoviePropertyManager class defines UI elements for the Property Manager of the B{Movie mode}. - + @ivar title: The title that appears in the property manager header. @type title: str - + @ivar pmName: The name of this property manager. This is used to set the name of the PM_Dialog object via setObjectName(). @type name: str - + @ivar iconPath: The relative path to the PNG file that contains a 22 x 22 icon image that appears in the PM header. @type iconPath: str """ - + # The title(s) that appears in the property manager header. title = "Play Movie" # The name of this Property Manager. This will be set to @@ -62,25 +59,25 @@ class Ui_MoviePropertyManager(Command_PropertyManager): pmName = title # The full path to PNG file(s) that appears in the header. iconPath = "ui/actions/Simulation/Play_Movie.png" - + def __init__(self, command): """ Constructor for the B{Movie} property manager class that defines its UI. - + @param command: The parent mode where this Property Manager is used @type command: L{movieMode} """ _superclass.__init__(self, command) - + self.showTopRowButtons( PM_DONE_BUTTON | \ PM_CANCEL_BUTTON | \ PM_WHATS_THIS_BUTTON) - - + + msg = '' self.MessageGroupBox.insertHtmlMessage(msg, setAsDefault=False) - + def _addGroupBoxes(self): """ Add various group boxes to the Movie Property manager. @@ -89,7 +86,7 @@ class Ui_MoviePropertyManager(Command_PropertyManager): self._addMovieControlsGroupBox() self._addMovieOptionsGroupBox() self._addMovieFilesGroupBox() - + def _addMovieControlsGroupBox(self): """ Add Movie Controls groupbox @@ -98,27 +95,27 @@ class Ui_MoviePropertyManager(Command_PropertyManager): title = "Movie Controls" ) self._loadMovieControlsGroupBox(self.movieControlsGroupBox) - - + + def _addMovieOptionsGroupBox(self): """ Add Movie Options groupbox """ self.movieOptionsGroupBox = PM_GroupBox(self, - title = "Movie Options" - ) + title = "Movie Options" + ) self._loadMovieOptionsGroupBox(self.movieOptionsGroupBox) - - + + def _addMovieFilesGroupBox(self): """ Add Open / Save Movie File groupbox """ self.movieFilesGroupBox = PM_GroupBox(self, - title = "Open/Save Movie File" - ) + title = "Open/Save Movie File" + ) self._loadMovieFilesGroupBox(self.movieFilesGroupBox) - + def _loadMovieControlsGroupBox(self, inPmGroupBox): """ Load widgets in the Movie Controls group box. @@ -132,14 +129,14 @@ class Ui_MoviePropertyManager(Command_PropertyManager): minimum = 0, maximum = 999999, label = 'Current Frame: 0/900' - ) - + ) + self.movieFrameUpdateLabel = self.frameNumberSlider.labelWidget - + #Movie Controls - + self.movieButtonsToolBar = NE1ToolBar(inPmGroupBox) - + _movieActionList = [self.movieResetAction, self.moviePlayRevActiveAction, self.moviePlayRevAction, @@ -148,60 +145,60 @@ class Ui_MoviePropertyManager(Command_PropertyManager): self.moviePlayActiveAction, self.movieMoveToEndAction ] - + for _action in _movieActionList: self.movieButtonsToolBar.addAction(_action) - + self.moviePlayActiveAction.setVisible(0) self.moviePlayRevActiveAction.setVisible(0) - + WIDGET_LIST = [("PM_", self.movieButtonsToolBar, 0)] - + self.moviecontrolsWidgetRow = PM_WidgetRow(inPmGroupBox, widgetList = WIDGET_LIST, spanWidth = True) - + self.movieLoop_checkbox = PM_CheckBox(inPmGroupBox, text = "Loop", widgetColumn = 0, state = Qt.Unchecked) - + def _loadMovieOptionsGroupBox(self, inPmGroupBox): """ Load widgets in the Movie Options group box. @param inPmGroupBox: The Movie Options groupbox in the PM @type inPmGroupBox: L{PM_GroupBox} """ - + self.frameNumberSpinBox = PM_SpinBox(inPmGroupBox, label = "Go To Frame:", labelColumn = 0, value = 0, minimum = 1, maximum = 999999) - + self.frameSkipSpinBox = PM_SpinBox(inPmGroupBox, - label = "Skip:", - labelColumn = 0, - value = 0, - minimum = 1, - maximum = 9999, - suffix = ' Frame(s)') - + label = "Skip:", + labelColumn = 0, + value = 0, + minimum = 1, + maximum = 9999, + suffix = ' Frame(s)') + def _loadMovieFilesGroupBox(self, inPmGroupBox): """ Load widgets in the Open/Save Movie Files group box. @param inPmGroupBox: The Open/Save Movie Files groupbox in the PM @type inPmGroupBox: L{PM_GroupBox} """ - + for action in self.fileOpenMovieAction, self.fileSaveMovieAction: btn = PM_ToolButton(inPmGroupBox, text = str(action.text()), spanWidth = True) btn.setDefaultAction(action) btn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon) - + def _createAllActionWidgets(self): """ Creates all the QAction widgets that will end up as buttons in the PM. @@ -210,54 +207,54 @@ class Ui_MoviePropertyManager(Command_PropertyManager): self.movieResetAction.setObjectName("movieResetAction") self.movieResetAction.setIcon( geticon("ui/actions/Properties Manager/Movie_Reset.png")) - + self.moviePlayRevActiveAction = QtGui.QAction(self) self.moviePlayRevActiveAction.setObjectName("moviePlayRevActiveAction") self.moviePlayRevActiveAction.setIcon( geticon("ui/actions/Properties Manager/Movie_Play_Reverse_Active.png")) - + self.moviePlayRevAction = QtGui.QAction(self) self.moviePlayRevAction.setObjectName("moviePlayRevAction") self.moviePlayRevAction.setIcon( geticon("ui/actions/Properties Manager/Movie_Play_Reverse.png")) - + self.moviePauseAction = QtGui.QAction(self) self.moviePauseAction.setObjectName("moviePauseAction") self.moviePauseAction.setIcon( geticon("ui/actions/Properties Manager/Movie_Pause.png")) - + self.moviePlayAction = QtGui.QAction(self) self.moviePlayAction.setObjectName("moviePlayAction") self.moviePlayAction.setVisible(True) self.moviePlayAction.setIcon( geticon("ui/actions/Properties Manager/Movie_Play_Forward.png")) - + self.moviePlayActiveAction = QtGui.QAction(self) self.moviePlayActiveAction.setObjectName("moviePlayActiveAction") self.moviePlayActiveAction.setIcon( geticon("ui/actions/Properties Manager/Movie_Play_Forward_Active.png")) - + self.movieMoveToEndAction = QtGui.QAction(self) self.movieMoveToEndAction.setObjectName("movieMoveToEndAction") self.movieMoveToEndAction.setIcon( geticon("ui/actions/Properties Manager/Movie_Move_To_End.png")) - + self.fileOpenMovieAction = QtGui.QAction(self) self.fileOpenMovieAction.setObjectName("fileOpenMovieAction") self.fileOpenMovieAction.setIcon( geticon("ui/actions/Properties Manager/Open.png")) - + self.fileSaveMovieAction = QtGui.QAction(self) self.fileSaveMovieAction.setObjectName("fileSaveMovieAction") self.fileSaveMovieAction.setIcon( geticon("ui/actions/Properties Manager/Save.png")) - + self.fileSaveMovieAction.setText( QtGui.QApplication.translate("MainWindow", "Save Movie File...", None, QtGui.QApplication.UnicodeUTF8)) - + self.fileOpenMovieAction.setText( QtGui.QApplication.translate("MainWindow", "Open Movie File...", @@ -271,15 +268,14 @@ class Ui_MoviePropertyManager(Command_PropertyManager): geticon("ui/actions/Properties Manager/Movie_Info.png")) - + def _addWhatsThisText(self): - """ - What's This text for widgets in this Property Manager. - - """ - from ne1_ui.WhatsThisText_for_PropertyManagers import whatsThis_MoviePropertyManager - whatsThis_MoviePropertyManager(self) - + """ + What's This text for widgets in this Property Manager. + """ + from ne1_ui.WhatsThisText_for_PropertyManagers import whatsThis_MoviePropertyManager + whatsThis_MoviePropertyManager(self) + def _addToolTipText(self): """ Tool Tip text for widgets in this Property Manager. |