mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-03-15 22:39:59 +01:00
Minor : indentation
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5630 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -61,7 +61,7 @@ void ReplaceElementDialog::setContext(DiagramContext context)
|
||||
DiagramContext ReplaceElementDialog::context() const
|
||||
{
|
||||
DiagramContext context;
|
||||
for (ElementInfoPartWidget *eipw : m_eipw_list) {
|
||||
for (ElementInfoPartWidget *eipw : m_eipw_list) {
|
||||
context.addValue(eipw->key(), eipw->text());
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ void ReplaceElementDialog::buildWidget()
|
||||
{
|
||||
ElementInfoPartWidget *eipw = new ElementInfoPartWidget(str, QETApp::elementTranslatedInfoKey(str), this);
|
||||
eipw->setEraseTextVisible(true);
|
||||
eipw->setPlaceHolderText(tr("Ne pas modifier"));
|
||||
eipw->setPlaceHolderText(tr("Ne pas modifier"));
|
||||
ui->m_scroll_layout->addWidget(eipw);
|
||||
m_eipw_list << eipw;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ TitleBlockProperties ReplaceFolioWidget::titleBlockProperties() const
|
||||
prop.title = ui->m_title_le ->text();
|
||||
prop.author = ui->m_author_le->text();
|
||||
prop.filename = ui->m_file_le ->text();
|
||||
prop.plant = ui->m_plant ->text();
|
||||
prop.plant = ui->m_plant ->text();
|
||||
prop.locmach = ui->m_loc ->text();
|
||||
prop.indexrev = ui->m_indice ->text();
|
||||
prop.folio = ui->m_folio_le ->text();
|
||||
@@ -78,7 +78,7 @@ void ReplaceFolioWidget::setTitleBlockProperties(const TitleBlockProperties &pro
|
||||
ui->m_title_le ->setText (properties.title);
|
||||
ui->m_author_le->setText (properties.author);
|
||||
ui->m_file_le ->setText (properties.filename);
|
||||
ui->m_plant ->setText (properties.plant);
|
||||
ui->m_plant ->setText (properties.plant);
|
||||
ui->m_loc ->setText (properties.locmach);
|
||||
ui->m_indice ->setText (properties.indexrev);
|
||||
ui->m_folio_le ->setText (properties.folio);
|
||||
@@ -148,31 +148,31 @@ void ReplaceFolioWidget::on_m_title_cb_clicked() {
|
||||
}
|
||||
|
||||
void ReplaceFolioWidget::on_m_author_cb_clicked() {
|
||||
ui->m_author_le->setText(ui->m_author_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString());
|
||||
ui->m_author_le->setText(ui->m_author_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString());
|
||||
ui->m_author_le->setDisabled(ui->m_author_cb->isChecked());
|
||||
}
|
||||
|
||||
void ReplaceFolioWidget::on_m_file_cb_clicked() {
|
||||
ui->m_file_le->setText(ui->m_file_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString());
|
||||
ui->m_file_le->setText(ui->m_file_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString());
|
||||
ui->m_file_le->setDisabled(ui->m_file_cb->isChecked());
|
||||
}
|
||||
|
||||
void ReplaceFolioWidget::on_m_folio_cb_clicked() {
|
||||
ui->m_folio_le->setText(ui->m_folio_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString());
|
||||
ui->m_folio_le->setText(ui->m_folio_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString());
|
||||
ui->m_folio_le->setDisabled(ui->m_folio_cb->isChecked());
|
||||
}
|
||||
|
||||
void ReplaceFolioWidget::on_m_plant_cb_clicked() {
|
||||
ui->m_plant->setText(ui->m_plant_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString());
|
||||
ui->m_plant->setDisabled(ui->m_plant_cb->isChecked());
|
||||
ui->m_plant->setText(ui->m_plant_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString());
|
||||
ui->m_plant->setDisabled(ui->m_plant_cb->isChecked());
|
||||
}
|
||||
|
||||
void ReplaceFolioWidget::on_m_loc_cb_clicked() {
|
||||
ui->m_loc->setText(ui->m_loc_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString());
|
||||
ui->m_loc->setText(ui->m_loc_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString());
|
||||
ui->m_loc->setDisabled(ui->m_loc_cb->isChecked());
|
||||
}
|
||||
|
||||
void ReplaceFolioWidget::on_m_indice_cb_clicked() {
|
||||
ui->m_indice->setText(ui->m_indice_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString());
|
||||
ui->m_indice->setText(ui->m_indice_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString());
|
||||
ui->m_indice->setDisabled(ui->m_indice_cb->isChecked());
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ class ReplaceFolioWidget : public QWidget
|
||||
void on_m_author_cb_clicked();
|
||||
void on_m_file_cb_clicked();
|
||||
void on_m_folio_cb_clicked();
|
||||
void on_m_plant_cb_clicked();
|
||||
void on_m_plant_cb_clicked();
|
||||
void on_m_loc_cb_clicked();
|
||||
void on_m_indice_cb_clicked();
|
||||
|
||||
|
||||
@@ -151,36 +151,36 @@ void SearchAndReplaceWidget::setUpTreeItems()
|
||||
|
||||
m_elements_qtwi = new QTreeWidgetItem(m_root_qtwi);
|
||||
m_elements_qtwi->setIcon(0, QET::Icons::Element);
|
||||
m_elements_qtwi->setText(0, tr("Eléments"));
|
||||
m_elements_qtwi->setText(0, tr("Eléments"));
|
||||
m_elements_qtwi->setCheckState(0, Qt::Checked);
|
||||
m_category_qtwi.append(m_elements_qtwi);
|
||||
|
||||
m_simple_elmt_qtwi = new QTreeWidgetItem(m_elements_qtwi);
|
||||
m_simple_elmt_qtwi->setText(0, tr("Eléments simple"));
|
||||
m_simple_elmt_qtwi->setText(0, tr("Eléments simple"));
|
||||
m_simple_elmt_qtwi->setIcon(0, QET::Icons::Element);
|
||||
m_simple_elmt_qtwi->setCheckState(0, Qt::Checked);
|
||||
m_qtwi_elmts.append(m_simple_elmt_qtwi);
|
||||
|
||||
m_master_elmt_qtwi= new QTreeWidgetItem(m_elements_qtwi);
|
||||
m_master_elmt_qtwi->setText(0, tr("Eléments maître"));
|
||||
m_master_elmt_qtwi->setText(0, tr("Eléments maître"));
|
||||
m_master_elmt_qtwi->setIcon(0, QET::Icons::ElementMaster);
|
||||
m_master_elmt_qtwi->setCheckState(0, Qt::Checked);
|
||||
m_qtwi_elmts.append(m_master_elmt_qtwi);
|
||||
|
||||
m_slave_elmt_qtwi = new QTreeWidgetItem(m_elements_qtwi);
|
||||
m_slave_elmt_qtwi->setText(0, tr("Eléments esclave"));
|
||||
m_slave_elmt_qtwi->setText(0, tr("Eléments esclave"));
|
||||
m_slave_elmt_qtwi->setIcon(0, QET::Icons::ElementSlave);
|
||||
m_slave_elmt_qtwi->setCheckState(0, Qt::Checked);
|
||||
m_qtwi_elmts.append(m_slave_elmt_qtwi);
|
||||
|
||||
m_report_elmt_qtwi = new QTreeWidgetItem(m_elements_qtwi);
|
||||
m_report_elmt_qtwi->setText(0, tr("Eléments report de folio"));
|
||||
m_report_elmt_qtwi->setText(0, tr("Eléments report de folio"));
|
||||
m_report_elmt_qtwi->setIcon(0, QET::Icons::FolioXrefComing);
|
||||
m_report_elmt_qtwi->setCheckState(0, Qt::Checked);
|
||||
m_qtwi_elmts.append(m_report_elmt_qtwi);
|
||||
|
||||
m_terminal_elmt_qtwi = new QTreeWidgetItem(m_elements_qtwi);
|
||||
m_terminal_elmt_qtwi->setText(0, tr("Eléments bornier"));
|
||||
m_terminal_elmt_qtwi->setText(0, tr("Eléments bornier"));
|
||||
m_terminal_elmt_qtwi->setIcon(0, QET::Icons::ElementTerminal);
|
||||
m_terminal_elmt_qtwi->setCheckState(0, Qt::Checked);
|
||||
m_qtwi_elmts.append(m_terminal_elmt_qtwi);
|
||||
@@ -659,7 +659,7 @@ QStringList SearchAndReplaceWidget::searchTerms(Diagram *diagram) const
|
||||
list.append(prop.title);
|
||||
list.append(prop.author);
|
||||
list.append(prop.filename);
|
||||
list.append(prop.plant);
|
||||
list.append(prop.plant);
|
||||
list.append(prop.locmach);
|
||||
list.append(prop.indexrev);
|
||||
list.append(prop.folio);
|
||||
@@ -692,7 +692,7 @@ QStringList SearchAndReplaceWidget::searchTerms(Element *element) const
|
||||
}
|
||||
|
||||
void SearchAndReplaceWidget::on_m_quit_button_clicked() {
|
||||
this->setHidden(true);
|
||||
this->setHidden(true);
|
||||
}
|
||||
|
||||
void SearchAndReplaceWidget::on_m_advanced_pb_toggled(bool checked) {
|
||||
@@ -701,7 +701,7 @@ void SearchAndReplaceWidget::on_m_advanced_pb_toggled(bool checked) {
|
||||
|
||||
void SearchAndReplaceWidget::on_m_tree_widget_itemDoubleClicked(QTreeWidgetItem *item, int column)
|
||||
{
|
||||
Q_UNUSED(column);
|
||||
Q_UNUSED(column);
|
||||
|
||||
if (m_diagram_hash.keys().contains(item))
|
||||
{
|
||||
@@ -856,8 +856,8 @@ void SearchAndReplaceWidget::on_m_folio_pb_clicked()
|
||||
if (result == QDialogButtonBox::AcceptRole)
|
||||
{
|
||||
QString text = ui->m_folio_pb->text();
|
||||
if (!text.endsWith(tr(" [édité]"))) {
|
||||
text.append(tr(" [édité]"));
|
||||
if (!text.endsWith(tr(" [édité]"))) {
|
||||
text.append(tr(" [édité]"));
|
||||
}
|
||||
ui->m_folio_pb->setText(text);
|
||||
m_worker.m_titleblock_properties = dialog->titleBlockProperties();
|
||||
@@ -865,8 +865,8 @@ void SearchAndReplaceWidget::on_m_folio_pb_clicked()
|
||||
else if (result == QDialogButtonBox::ResetRole)
|
||||
{
|
||||
QString text = ui->m_folio_pb->text();
|
||||
if (text.endsWith(tr(" [édité]"))) {
|
||||
text.remove(tr(" [édité]"));
|
||||
if (text.endsWith(tr(" [édité]"))) {
|
||||
text.remove(tr(" [édité]"));
|
||||
}
|
||||
ui->m_folio_pb->setText(text);
|
||||
m_worker.m_titleblock_properties = TitleBlockProperties();
|
||||
@@ -885,7 +885,7 @@ void SearchAndReplaceWidget::on_m_replace_pb_clicked()
|
||||
}
|
||||
if (!m_category_qtwi.contains(qtwi) && qtwi->checkState(0) == Qt::Checked)
|
||||
{
|
||||
if (ui->m_folio_pb->text().endsWith(tr(" [édité]")) &&
|
||||
if (ui->m_folio_pb->text().endsWith(tr(" [édité]")) &&
|
||||
m_diagram_hash.keys().contains(qtwi))
|
||||
{
|
||||
QPointer<Diagram> d = m_diagram_hash.value(qtwi);
|
||||
@@ -893,7 +893,7 @@ void SearchAndReplaceWidget::on_m_replace_pb_clicked()
|
||||
m_worker.replaceDiagram(d.data());
|
||||
}
|
||||
}
|
||||
else if (ui->m_element_pb->text().endsWith(tr(" [édité]")) &&
|
||||
else if (ui->m_element_pb->text().endsWith(tr(" [édité]")) &&
|
||||
m_element_hash.keys().contains(qtwi))
|
||||
{
|
||||
QPointer<Element> e = m_element_hash.value(qtwi);
|
||||
@@ -923,7 +923,7 @@ void SearchAndReplaceWidget::on_m_replace_pb_clicked()
|
||||
void SearchAndReplaceWidget::on_m_replace_all_pb_clicked()
|
||||
{
|
||||
//Replace folio
|
||||
if (ui->m_folio_pb->text().endsWith(tr(" [édité]")))
|
||||
if (ui->m_folio_pb->text().endsWith(tr(" [édité]")))
|
||||
{
|
||||
QList <Diagram *> diagram_list;
|
||||
for (QTreeWidgetItem *qtwi : m_diagram_hash.keys())
|
||||
@@ -939,7 +939,7 @@ void SearchAndReplaceWidget::on_m_replace_all_pb_clicked()
|
||||
m_worker.replaceDiagram(diagram_list);
|
||||
}
|
||||
//Replace text
|
||||
if (ui->m_element_pb->text().endsWith(tr(" [édité]")))
|
||||
if (ui->m_element_pb->text().endsWith(tr(" [édité]")))
|
||||
{
|
||||
QList <Element *> element_list;
|
||||
for (QTreeWidgetItem *qtwi : m_element_hash.keys())
|
||||
@@ -989,8 +989,8 @@ void SearchAndReplaceWidget::on_m_element_pb_clicked()
|
||||
if (result == QDialogButtonBox::AcceptRole)
|
||||
{
|
||||
QString text = ui->m_element_pb->text();
|
||||
if (!text.endsWith(tr(" [édité]"))) {
|
||||
text.append(tr(" [édité]"));
|
||||
if (!text.endsWith(tr(" [édité]"))) {
|
||||
text.append(tr(" [édité]"));
|
||||
}
|
||||
ui->m_element_pb->setText(text);
|
||||
m_worker.m_element_context = dialog->context();
|
||||
@@ -998,8 +998,8 @@ void SearchAndReplaceWidget::on_m_element_pb_clicked()
|
||||
else if (result == QDialogButtonBox::ResetRole)
|
||||
{
|
||||
QString text = ui->m_element_pb->text();
|
||||
if (text.endsWith(tr(" [édité]"))) {
|
||||
text.remove(tr(" [édité]"));
|
||||
if (text.endsWith(tr(" [édité]"))) {
|
||||
text.remove(tr(" [édité]"));
|
||||
}
|
||||
ui->m_element_pb->setText(text);
|
||||
m_worker.m_element_context = DiagramContext();
|
||||
@@ -1024,6 +1024,6 @@ void SearchAndReplaceWidget::on_m_mode_cb_currentIndexChanged(int index)
|
||||
*/
|
||||
void SearchAndReplaceWidget::on_m_case_sensitive_cb_stateChanged(int arg1)
|
||||
{
|
||||
Q_UNUSED(arg1);
|
||||
Q_UNUSED(arg1);
|
||||
search();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user