mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-28 14:50:52 +01:00
added folder "company-titleblocks" \(incl. language-files\)
This commit is contained in:
@@ -147,6 +147,15 @@ GeneralConfigurationPage::GeneralConfigurationPage(QWidget *parent) :
|
||||
ui->m_company_elmt_path_cb->blockSignals(false);
|
||||
}
|
||||
|
||||
path = settings.value("elements-collections/company-tbt-path", "default").toString();
|
||||
if (path != "default")
|
||||
{
|
||||
ui->m_company_tbt_path_cb->blockSignals(true);
|
||||
ui->m_company_tbt_path_cb->setCurrentIndex(1);
|
||||
ui->m_company_tbt_path_cb->setItemData(1, path, Qt::DisplayRole);
|
||||
ui->m_company_tbt_path_cb->blockSignals(false);
|
||||
}
|
||||
|
||||
path = settings.value("elements-collections/custom-collection-path", "default").toString();
|
||||
if (path != "default")
|
||||
{
|
||||
@@ -280,6 +289,21 @@ void GeneralConfigurationPage::applyConf()
|
||||
QETApp::resetCollectionsPath();
|
||||
}
|
||||
|
||||
path = settings.value("elements-collections/company-tbt-path").toString();
|
||||
if (ui->m_company_tbt_path_cb->currentIndex() == 1)
|
||||
{
|
||||
QString path = ui->m_company_tbt_path_cb->currentText();
|
||||
QDir dir(path);
|
||||
settings.setValue("elements-collections/company-tbt-path",
|
||||
dir.exists() ? path : "default");
|
||||
}
|
||||
else {
|
||||
settings.setValue("elements-collections/company-tbt-path", "default");
|
||||
}
|
||||
if (path != settings.value("elements-collections/company-tbt-path").toString()) {
|
||||
QETApp::resetCollectionsPath();
|
||||
}
|
||||
|
||||
path = settings.value("elements-collections/custom-tbt-path").toString();
|
||||
if (ui->m_custom_tbt_path_cb->currentIndex() == 1)
|
||||
{
|
||||
@@ -450,6 +474,20 @@ void GeneralConfigurationPage::on_m_custom_elmt_path_cb_currentIndexChanged(int
|
||||
}
|
||||
}
|
||||
|
||||
void GeneralConfigurationPage::on_m_company_tbt_path_cb_currentIndexChanged(int index)
|
||||
{
|
||||
if (index == 1)
|
||||
{
|
||||
QString path = QFileDialog::getExistingDirectory(this, tr("Chemin des cartouches company"), QDir::homePath());
|
||||
if (!path.isEmpty()) {
|
||||
ui->m_company_tbt_path_cb->setItemData(1, path, Qt::DisplayRole);
|
||||
}
|
||||
else {
|
||||
ui->m_company_tbt_path_cb->setCurrentIndex(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GeneralConfigurationPage::on_m_custom_tbt_path_cb_currentIndexChanged(int index)
|
||||
{
|
||||
if (index == 1)
|
||||
|
||||
@@ -44,6 +44,7 @@ class GeneralConfigurationPage : public ConfigPage
|
||||
void on_m_common_elmt_path_cb_currentIndexChanged(int index);
|
||||
void on_m_company_elmt_path_cb_currentIndexChanged(int index);
|
||||
void on_m_custom_elmt_path_cb_currentIndexChanged(int index);
|
||||
void on_m_company_tbt_path_cb_currentIndexChanged(int index);
|
||||
void on_m_custom_tbt_path_cb_currentIndexChanged(int index);
|
||||
void on_m_indi_text_font_pb_clicked();
|
||||
void on_MaxPartsElementEditorList_sb_valueChanged(int value);
|
||||
|
||||
@@ -264,14 +264,14 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<widget class="QLabel" name="label_17">
|
||||
<property name="text">
|
||||
<string>Répertoire de la collection utilisateur</string>
|
||||
<string>Répertoire des cartouches company</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="m_custom_elmt_path_cb">
|
||||
<widget class="QComboBox" name="m_company_tbt_path_cb">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Par defaut</string>
|
||||
@@ -285,13 +285,34 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Répertoire de la collection utilisateur</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QComboBox" name="m_custom_elmt_path_cb">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Par defaut</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Parcourir...</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Répertoire des cartouches utilisateur</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="5" column="1">
|
||||
<widget class="QComboBox" name="m_custom_tbt_path_cb">
|
||||
<item>
|
||||
<property name="text">
|
||||
@@ -305,7 +326,7 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<item row="6" column="1">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>(Recharger les collections d'éléments pour appliquer les changements)</string>
|
||||
|
||||
Reference in New Issue
Block a user