Changed: Display directories in Settings, see #279

--HG--
branch : develop
feature/pipeline-tools
kervala 8 years ago
parent 388cb6445a
commit fd861467b6

@ -28,6 +28,10 @@ CSettingsDialog::CSettingsDialog(QWidget *parent):QDialog(parent)
CConfigFile *config = CConfigFile::getInstance();
m_installationDirectory = config->getInstallationDirectory();
updateInstallationDirectoryLabel();
// only 64 bits OS can switch between 32 and 64 bits
use64bitsClientsCheckBox->setEnabled(config->has64bitsOS());
@ -47,6 +51,11 @@ CSettingsDialog::~CSettingsDialog()
{
}
QString CSettingsDialog::getInstallationDirectory() const
{
return m_installationDirectory;
}
void CSettingsDialog::accept()
{
// TODO: add save code
@ -56,11 +65,16 @@ void CSettingsDialog::accept()
void CSettingsDialog::onInstallationDirectoryButtonClicked()
{
QString directory = QFileDialog::getExistingDirectory(this, tr("Please choose directory where to install Ryzom"));
QString directory = QFileDialog::getExistingDirectory(this, tr("Please choose directory where to install Ryzom"), m_installationDirectory);
if (directory.isEmpty()) return;
// m_dstDirectory = directory;
m_installationDirectory = directory;
updateInstallationDirectoryLabel();
}
// updateDestinationText();
void CSettingsDialog::updateInstallationDirectoryLabel()
{
installationDirectoryLabel->setText(m_installationDirectory);
}

@ -33,11 +33,18 @@ public:
CSettingsDialog(QWidget *parent = NULL);
virtual ~CSettingsDialog();
QString getInstallationDirectory() const;
public slots:
void onInstallationDirectoryButtonClicked();
private slots:
void accept();
private:
void updateInstallationDirectoryLabel();
QString m_installationDirectory;
};
#endif

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<width>428</width>
<height>150</height>
</rect>
</property>
@ -15,25 +15,36 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QFormLayout" name="formLayout">
<layout class="QGridLayout" name="gridLayout">
<item row="3" column="0">
<widget class="QCheckBox" name="use64bitsClientsCheckBox">
<property name="text">
<string>Use 64 bits client</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="installationDirectoryLabelTitle">
<property name="text">
<string>Base location of Ryzom files:</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<widget class="QLabel" name="languageLabel">
<property name="text">
<string>Language</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="languageComboBox"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<item row="2" column="2">
<widget class="QPushButton" name="oldDirectoryButton">
<property name="text">
<string>Base location of Ryzom files: %1</string>
<string>Browse...</string>
</property>
</widget>
</item>
<item row="1" column="1">
<item row="1" column="2">
<widget class="QPushButton" name="installationDirectoryButton">
<property name="text">
<string>Browse...</string>
@ -41,26 +52,29 @@
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<widget class="QLabel" name="oldDirectoryLabelTitle">
<property name="text">
<string>Location of source Ryzom files: %1</string>
<string>Location of source Ryzom files:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="pushButton_2">
<item row="1" column="1">
<widget class="QLabel" name="installationDirectoryLabel">
<property name="text">
<string>Browse...</string>
<string>D:\Ryzom</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="use64bitsClientsCheckBox">
<item row="2" column="1">
<widget class="QLabel" name="oldDirectoryLabel">
<property name="text">
<string>Use 64 bits client</string>
<string>E:\Ryzom</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QComboBox" name="languageComboBox"/>
</item>
</layout>
</item>
<item>

Loading…
Cancel
Save