mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-24 03:10:52 +01:00
Add Checkbox to enable or disable the dialog to display the elpsaed time
of collection loading
This commit is contained in:
@@ -27,6 +27,7 @@
|
|||||||
#include <QtConcurrent>
|
#include <QtConcurrent>
|
||||||
#include <QFutureWatcher>
|
#include <QFutureWatcher>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
#include <QSettings>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief ElementsCollectionModel::ElementsCollectionModel
|
* @brief ElementsCollectionModel::ElementsCollectionModel
|
||||||
@@ -251,8 +252,13 @@ void ElementsCollectionModel::loadCollections(bool common_collection, bool custo
|
|||||||
emit loadingProgressValue(futur.progressValue());
|
emit loadingProgressValue(futur.progressValue());
|
||||||
}
|
}
|
||||||
int ms = t.elapsed();
|
int ms = t.elapsed();
|
||||||
|
|
||||||
|
QSettings settings;
|
||||||
|
if (settings.value("m_use_timer").toBool())
|
||||||
|
{
|
||||||
QMessageBox::about(nullptr, tr("Chargement collection d'élément"), tr("Le chargement de la collection d'éléments à été éffectué en %1 ms").arg(ms));
|
QMessageBox::about(nullptr, tr("Chargement collection d'élément"), tr("Le chargement de la collection d'éléments à été éffectué en %1 ms").arg(ms));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ GeneralConfigurationPage::GeneralConfigurationPage(QWidget *parent) :
|
|||||||
ui->DiagramEditor_xKeyGridFine_sb->setValue(settings.value("diagrameditor/key_fine_Xgrid", 1).toInt());
|
ui->DiagramEditor_xKeyGridFine_sb->setValue(settings.value("diagrameditor/key_fine_Xgrid", 1).toInt());
|
||||||
ui->DiagramEditor_yKeyGridFine_sb->setValue(settings.value("diagrameditor/key_fine_Ygrid", 1).toInt());
|
ui->DiagramEditor_yKeyGridFine_sb->setValue(settings.value("diagrameditor/key_fine_Ygrid", 1).toInt());
|
||||||
ui->m_use_system_color_cb->setChecked(settings.value("usesystemcolors", "true").toBool());
|
ui->m_use_system_color_cb->setChecked(settings.value("usesystemcolors", "true").toBool());
|
||||||
|
ui->m_use_timer_widget->setChecked(settings.value("m_use_timer", true).toBool());
|
||||||
bool tabbed = settings.value("diagrameditor/viewmode", "tabbed") == "tabbed";
|
bool tabbed = settings.value("diagrameditor/viewmode", "tabbed") == "tabbed";
|
||||||
if(tabbed)
|
if(tabbed)
|
||||||
ui->m_use_tab_mode_rb->setChecked(true);
|
ui->m_use_tab_mode_rb->setChecked(true);
|
||||||
@@ -127,7 +128,7 @@ GeneralConfigurationPage::GeneralConfigurationPage(QWidget *parent) :
|
|||||||
ui->m_custom_tbt_path_cb->blockSignals(false);
|
ui->m_custom_tbt_path_cb->blockSignals(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->m_use_pugi_xml->setChecked(settings.value("use_pugixml").toBool());
|
ui->m_use_pugi_xml->setChecked(settings.value("use_pugixml").toBool());
|
||||||
|
|
||||||
fillLang();
|
fillLang();
|
||||||
}
|
}
|
||||||
@@ -160,6 +161,7 @@ void GeneralConfigurationPage::applyConf()
|
|||||||
|
|
||||||
//DIAGRAM VIEW
|
//DIAGRAM VIEW
|
||||||
settings.setValue("diagramview/gestures", ui->m_use_gesture_trackpad->isChecked());
|
settings.setValue("diagramview/gestures", ui->m_use_gesture_trackpad->isChecked());
|
||||||
|
settings.setValue("m_use_timer", ui->m_use_timer_widget->isChecked());
|
||||||
|
|
||||||
//DIAGRAM COMMAND
|
//DIAGRAM COMMAND
|
||||||
settings.setValue("diagramcommands/erase-label-on-copy", ui->m_save_label_paste->isChecked());
|
settings.setValue("diagramcommands/erase-label-on-copy", ui->m_save_label_paste->isChecked());
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>727</width>
|
<width>727</width>
|
||||||
<height>510</height>
|
<height>535</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab_3">
|
<widget class="QWidget" name="tab_3">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@@ -328,7 +328,14 @@ Vous pouvez spécifier ici la valeur par défaut de ce champ pour les éléments
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="m_use_pugi_xml">
|
<widget class="QCheckBox" name="m_use_pugi_xml">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Utiliser pugi xml pour le chargement des collections.</string>
|
<string>Utiliser pugiXml pour le chargement des collections.</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="m_use_timer_widget">
|
||||||
|
<property name="text">
|
||||||
|
<string>Afficher le temps de chargement des collections</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
Reference in New Issue
Block a user