Merge pull request #174 from nyanpasu64/gui-rename

[gui] Rename terminology
pull/357/head
nyanpasu64 2019-02-01 06:06:13 -08:00 zatwierdzone przez GitHub
commit 8e028565be
2 zmienionych plików z 18 dodań i 18 usunięć

Wyświetl plik

@ -111,7 +111,7 @@ class MainWindow(qw.QMainWindow):
self.actionOpen.triggered.connect(self.on_action_open) self.actionOpen.triggered.connect(self.on_action_open)
self.actionSave.triggered.connect(self.on_action_save) self.actionSave.triggered.connect(self.on_action_save)
self.actionSaveAs.triggered.connect(self.on_action_save_as) self.actionSaveAs.triggered.connect(self.on_action_save_as)
self.actionPlay.triggered.connect(self.on_action_play) self.actionPreview.triggered.connect(self.on_action_preview)
self.actionRender.triggered.connect(self.on_action_render) self.actionRender.triggered.connect(self.on_action_render)
self.actionExit.triggered.connect(qw.QApplication.closeAllWindows) self.actionExit.triggered.connect(qw.QApplication.closeAllWindows)
@ -268,7 +268,7 @@ class MainWindow(qw.QMainWindow):
actionOpen: qw.QAction actionOpen: qw.QAction
actionSave: qw.QAction actionSave: qw.QAction
actionSaveAs: qw.QAction actionSaveAs: qw.QAction
actionPlay: qw.QAction actionPreview: qw.QAction
actionRender: qw.QAction actionRender: qw.QAction
actionExit: qw.QAction actionExit: qw.QAction
@ -333,7 +333,7 @@ class MainWindow(qw.QMainWindow):
else: else:
return False return False
def on_action_play(self): def on_action_preview(self):
""" Launch CorrScope and ffplay. """ """ Launch CorrScope and ffplay. """
error_msg = "Cannot play, another play/render is active" error_msg = "Cannot play, another play/render is active"
if self.corr_thread is not None: if self.corr_thread is not None:
@ -661,14 +661,14 @@ class ConfigModel(PresentationModel):
render__grid_color = color2hex_maybe_property("render__grid_color") render__grid_color = color2hex_maybe_property("render__grid_color")
@property @property
def render_video_size(self) -> str: def render_resolution(self) -> str:
render = self.cfg.render render = self.cfg.render
w, h = render.width, render.height w, h = render.width, render.height
return f"{w}x{h}" return f"{w}x{h}"
@render_video_size.setter @render_resolution.setter
def render_video_size(self, value: str): def render_resolution(self, value: str):
error = CorrError(f"invalid video size {value}, must be WxH") error = CorrError(f"invalid resolution {value}, must be WxH")
for sep in "x*,": for sep in "x*,":
width_height = value.split(sep) width_height = value.split(sep)

Wyświetl plik

@ -123,14 +123,14 @@
</property> </property>
<layout class="QFormLayout" name="formLayout_4"> <layout class="QFormLayout" name="formLayout_4">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="render_video_sizeL"> <widget class="QLabel" name="render_resolutionL">
<property name="text"> <property name="text">
<string>Video Size</string> <string>Resolution</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="BoundLineEdit" name="render_video_size"> <widget class="BoundLineEdit" name="render_resolution">
<property name="text"> <property name="text">
<string>vs</string> <string>vs</string>
</property> </property>
@ -321,7 +321,7 @@
<item> <item>
<widget class="QGroupBox" name="perfAll"> <widget class="QGroupBox" name="perfAll">
<property name="title"> <property name="title">
<string>Performance</string> <string>Preview and Render</string>
</property> </property>
<layout class="QFormLayout" name="formLayout_5"> <layout class="QFormLayout" name="formLayout_5">
<item row="0" column="0"> <item row="0" column="0">
@ -356,9 +356,9 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="perfPlayback"> <widget class="QGroupBox" name="perfPreview">
<property name="title"> <property name="title">
<string>Playback</string> <string>Preview Only</string>
</property> </property>
<layout class="QFormLayout" name="formLayout_3"> <layout class="QFormLayout" name="formLayout_3">
<item row="0" column="0"> <item row="0" column="0">
@ -378,7 +378,7 @@
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLabel" name="render__res_divisorL"> <widget class="QLabel" name="render__res_divisorL">
<property name="text"> <property name="text">
<string>Video Size Divisor</string> <string>Resolution Divisor</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -572,7 +572,7 @@
<addaction name="actionSave"/> <addaction name="actionSave"/>
<addaction name="actionSaveAs"/> <addaction name="actionSaveAs"/>
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="actionPlay"/> <addaction name="actionPreview"/>
<addaction name="actionRender"/> <addaction name="actionRender"/>
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="actionExit"/> <addaction name="actionExit"/>
@ -601,7 +601,7 @@
<addaction name="actionSave"/> <addaction name="actionSave"/>
<addaction name="actionSaveAs"/> <addaction name="actionSaveAs"/>
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="actionPlay"/> <addaction name="actionPreview"/>
<addaction name="actionRender"/> <addaction name="actionRender"/>
</widget> </widget>
<action name="actionOpen"> <action name="actionOpen">
@ -644,9 +644,9 @@
<string>Ctrl+Q</string> <string>Ctrl+Q</string>
</property> </property>
</action> </action>
<action name="actionPlay"> <action name="actionPreview">
<property name="text"> <property name="text">
<string>&amp;Play</string> <string>&amp;Preview</string>
</property> </property>
<property name="shortcut"> <property name="shortcut">
<string>Ctrl+P</string> <string>Ctrl+P</string>