Skip to content

Commit

Permalink
[gui] Switch tab order (Edit tab first and Copy tab second)
Browse files Browse the repository at this point in the history
  • Loading branch information
gacarrillor authored and 3nids committed Apr 17, 2024
1 parent 78704de commit f67d269
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 90 deletions.
5 changes: 3 additions & 2 deletions pg_service_parser/gui/dlg_pg_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
from pg_service_parser.utils import get_ui_class

DIALOG_UI = get_ui_class("pg_service_dialog.ui")
COPY_TAB_INDEX = 0
EDIT_TAB_INDEX = 1
EDIT_TAB_INDEX = 0
COPY_TAB_INDEX = 1


class PgServiceDialog(QDialog, DIALOG_UI):
Expand Down Expand Up @@ -45,6 +45,7 @@ def __init__(self, parent):
self.cboEditService.currentIndexChanged.connect(self.__edit_service_changed)
self.btnUpdateService.clicked.connect(self.__update_service_clicked)

self.__initialize_edit_services()
self.__initialize_copy_services()
self.__update_target_controls(True)

Expand Down
176 changes: 88 additions & 88 deletions pg_service_parser/ui/pg_service_dialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -77,94 +77,6 @@
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tabCopy">
<attribute name="title">
<string>Copy</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QGridLayout" name="gridLayout">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item row="0" column="2">
<widget class="QComboBox" name="cboTargetService">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="editable">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QRadioButton" name="radOverwrite">
<property name="text">
<string>Overwrite</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QRadioButton" name="radCreate">
<property name="text">
<string>Create new</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QComboBox" name="cboSourceService">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLineEdit" name="txtNewService">
<property name="placeholderText">
<string>New service name</string>
</property>
<property name="clearButtonEnabled">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<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>
<item>
<widget class="QPushButton" name="btnCopyService">
<property name="text">
<string>Copy service</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabEdit">
<attribute name="title">
<string>Edit</string>
Expand Down Expand Up @@ -258,6 +170,94 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="tabCopy">
<attribute name="title">
<string>Copy</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QGridLayout" name="gridLayout">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item row="0" column="2">
<widget class="QComboBox" name="cboTargetService">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="editable">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QRadioButton" name="radOverwrite">
<property name="text">
<string>Overwrite</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QRadioButton" name="radCreate">
<property name="text">
<string>Create new</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QComboBox" name="cboSourceService">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLineEdit" name="txtNewService">
<property name="placeholderText">
<string>New service name</string>
</property>
<property name="clearButtonEnabled">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<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>
<item>
<widget class="QPushButton" name="btnCopyService">
<property name="text">
<string>Copy service</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
<item>
Expand Down

0 comments on commit f67d269

Please sign in to comment.