Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gui] GUI adjustments #14

Merged
merged 2 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
188 changes: 100 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,106 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="tabCopy">
<attribute name="title">
<string>Copy</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_2">
<item row="2" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>71</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>354</width>
<height>22</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0" colspan="2">
<layout class="QGridLayout" name="gridLayout">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item row="1" column="1">
<widget class="QRadioButton" name="radCreate">
<property name="text">
<string>Create new</string>
</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="2">
<widget class="QLineEdit" name="txtNewService">
<property name="placeholderText">
<string>New service name</string>
</property>
<property name="clearButtonEnabled">
<bool>false</bool>
</property>
</widget>
</item>
<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="0">
<widget class="QComboBox" name="cboSourceService">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="btnCopyService">
<property name="text">
<string>Copy service</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>
Expand Down