mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-30 20:30:53 +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(addButton, SIGNAL(clicked()), SLOT(onAddProfile()));
|
||||||
connect(deleteButton, SIGNAL(clicked()), SLOT(onDeleteProfile()));
|
connect(deleteButton, SIGNAL(clicked()), SLOT(onDeleteProfile()));
|
||||||
connect(profilesListView, SIGNAL(clicked(QModelIndex)), SLOT(onProfileClicked(QModelIndex)));
|
connect(profilesListView, SIGNAL(clicked(QModelIndex)), SLOT(onProfileClicked(QModelIndex)));
|
||||||
|
connect(executableDefaultButton, SIGNAL(clicked()), SLOT(onExecutableDefaultClicked()));
|
||||||
connect(executableBrowseButton, SIGNAL(clicked()), SLOT(onExecutableBrowseClicked()));
|
connect(executableBrowseButton, SIGNAL(clicked()), SLOT(onExecutableBrowseClicked()));
|
||||||
connect(directoryButton, SIGNAL(clicked()), SLOT(onProfileDirectoryClicked()));
|
connect(directoryButton, SIGNAL(clicked()), SLOT(onProfileDirectoryClicked()));
|
||||||
|
|
||||||
|
@ -241,10 +242,21 @@ void CProfilesDialog::updateExecutableVersion(int index)
|
||||||
|
|
||||||
if (reg.indexIn(versionString) > -1)
|
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()
|
void CProfilesDialog::onExecutableBrowseClicked()
|
||||||
{
|
{
|
||||||
if (m_currentProfileIndex < 0) return;
|
if (m_currentProfileIndex < 0) return;
|
||||||
|
|
|
@ -51,6 +51,7 @@ private slots:
|
||||||
|
|
||||||
void updateExecutableVersion(int index);
|
void updateExecutableVersion(int index);
|
||||||
|
|
||||||
|
void onExecutableDefaultClicked();
|
||||||
void onExecutableBrowseClicked();
|
void onExecutableBrowseClicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>583</width>
|
<width>583</width>
|
||||||
<height>348</height>
|
<height>329</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -119,7 +119,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="3" column="1">
|
||||||
<layout class="QHBoxLayout" name="executableLayout" stretch="1,0">
|
<layout class="QHBoxLayout" name="executableLayout" stretch="1,0,0">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="executablePathLabel">
|
<widget class="QLabel" name="executablePathLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -127,6 +127,13 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="executableDefaultButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Default</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="executableBrowseButton">
|
<widget class="QPushButton" name="executableBrowseButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -137,37 +144,23 @@
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<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">
|
<widget class="QLabel" name="argumentsLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Arguments:</string>
|
<string>Arguments:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="1">
|
<item row="4" column="1">
|
||||||
<widget class="QLineEdit" name="argumentsEdit"/>
|
<widget class="QLineEdit" name="argumentsEdit"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="0">
|
<item row="5" column="0">
|
||||||
<widget class="QLabel" name="commentsLabel">
|
<widget class="QLabel" name="commentsLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Comments:</string>
|
<string>Comments:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="1">
|
<item row="5" column="1">
|
||||||
<widget class="QPlainTextEdit" name="commentsEdit">
|
<widget class="QPlainTextEdit" name="commentsEdit">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
@ -177,14 +170,14 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="0">
|
<item row="6" column="0">
|
||||||
<widget class="QLabel" name="directoryLabel">
|
<widget class="QLabel" name="directoryLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Directory:</string>
|
<string>Directory:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="1">
|
<item row="6" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0">
|
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="directoryPathLabel">
|
<widget class="QLabel" name="directoryPathLabel">
|
||||||
|
@ -202,14 +195,14 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="0">
|
<item row="7" column="0">
|
||||||
<widget class="QLabel" name="shortcutsLabel">
|
<widget class="QLabel" name="shortcutsLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Create shortcuts:</string>
|
<string>Create shortcuts:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="1">
|
<item row="7" column="1">
|
||||||
<layout class="QVBoxLayout" name="shortcutsLayout">
|
<layout class="QVBoxLayout" name="shortcutsLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="desktopShortcutCheckBox">
|
<widget class="QCheckBox" name="desktopShortcutCheckBox">
|
||||||
|
|
Loading…
Reference in a new issue