mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-27 01:26:30 +00:00
Changed: Display client version on the same line as filename and add a Default button to use default client
This commit is contained in:
parent
24ca4f3e97
commit
ba24b553eb
3 changed files with 30 additions and 24 deletions
|
@ -31,6 +31,7 @@ CProfilesDialog::CProfilesDialog(QWidget *parent):QDialog(parent), m_currentProf
|
|||
connect(addButton, SIGNAL(clicked()), SLOT(onAddProfile()));
|
||||
connect(deleteButton, SIGNAL(clicked()), SLOT(onDeleteProfile()));
|
||||
connect(profilesListView, SIGNAL(clicked(QModelIndex)), SLOT(onProfileClicked(QModelIndex)));
|
||||
connect(executableDefaultButton, SIGNAL(clicked()), SLOT(onExecutableDefaultClicked()));
|
||||
connect(executableBrowseButton, SIGNAL(clicked()), SLOT(onExecutableBrowseClicked()));
|
||||
connect(directoryButton, SIGNAL(clicked()), SLOT(onProfileDirectoryClicked()));
|
||||
|
||||
|
@ -241,10 +242,21 @@ void CProfilesDialog::updateExecutableVersion(int index)
|
|||
|
||||
if (reg.indexIn(versionString) > -1)
|
||||
{
|
||||
executableVersionLabel->setText(reg.cap(2));
|
||||
executablePathLabel->setText(QString("%1 (%2)").arg(QFileInfo(executable).fileName()).arg(reg.cap(2)));
|
||||
}
|
||||
}
|
||||
|
||||
void CProfilesDialog::onExecutableDefaultClicked()
|
||||
{
|
||||
if (m_currentProfileIndex < 0) return;
|
||||
|
||||
CProfile &profile = m_model->getProfiles()[m_currentProfileIndex];
|
||||
|
||||
profile.executable.clear();
|
||||
|
||||
updateExecutableVersion(m_currentProfileIndex);
|
||||
}
|
||||
|
||||
void CProfilesDialog::onExecutableBrowseClicked()
|
||||
{
|
||||
if (m_currentProfileIndex < 0) return;
|
||||
|
|
|
@ -51,6 +51,7 @@ private slots:
|
|||
|
||||
void updateExecutableVersion(int index);
|
||||
|
||||
void onExecutableDefaultClicked();
|
||||
void onExecutableBrowseClicked();
|
||||
|
||||
private:
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>583</width>
|
||||
<height>348</height>
|
||||
<height>329</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -119,7 +119,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<layout class="QHBoxLayout" name="executableLayout" stretch="1,0">
|
||||
<layout class="QHBoxLayout" name="executableLayout" stretch="1,0,0">
|
||||
<item>
|
||||
<widget class="QLabel" name="executablePathLabel">
|
||||
<property name="text">
|
||||
|
@ -127,6 +127,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="executableDefaultButton">
|
||||
<property name="text">
|
||||
<string>Default</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="executableBrowseButton">
|
||||
<property name="text">
|
||||
|
@ -137,37 +144,23 @@
|
|||
</layout>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="clientVersionLabel">
|
||||
<property name="text">
|
||||
<string>Client version:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="executableVersionLabel">
|
||||
<property name="text">
|
||||
<string>FV 3.0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="argumentsLabel">
|
||||
<property name="text">
|
||||
<string>Arguments:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="argumentsEdit"/>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="commentsLabel">
|
||||
<property name="text">
|
||||
<string>Comments:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<item row="5" column="1">
|
||||
<widget class="QPlainTextEdit" name="commentsEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
|
@ -177,14 +170,14 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="directoryLabel">
|
||||
<property name="text">
|
||||
<string>Directory:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<item row="6" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0">
|
||||
<item>
|
||||
<widget class="QLabel" name="directoryPathLabel">
|
||||
|
@ -202,14 +195,14 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="shortcutsLabel">
|
||||
<property name="text">
|
||||
<string>Create shortcuts:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<item row="7" column="1">
|
||||
<layout class="QVBoxLayout" name="shortcutsLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="desktopShortcutCheckBox">
|
||||
|
|
Loading…
Reference in a new issue