mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 22:00:35 +01:00
(BETA) only available in debug mode: Add dialogconductorautonum and call to nomenclature
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2104 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2006-2013 The QElectroTech team
|
Copyright 2006-2013 The QElectroTech Team
|
||||||
This file is part of QElectroTech.
|
This file is part of QElectroTech.
|
||||||
|
|
||||||
QElectroTech is free software: you can redistribute it and/or modify
|
QElectroTech is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2006-2013 The QElectroTech team
|
Copyright 2006-2013 The QElectroTech Team
|
||||||
This file is part of QElectroTech.
|
This file is part of QElectroTech.
|
||||||
|
|
||||||
QElectroTech is free software: you can redistribute it and/or modify
|
QElectroTech is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -32,6 +32,9 @@
|
|||||||
#include "qetmessagebox.h"
|
#include "qetmessagebox.h"
|
||||||
#include "qetresult.h"
|
#include "qetresult.h"
|
||||||
#include "genericpanel.h"
|
#include "genericpanel.h"
|
||||||
|
#include "nomenclature.h"
|
||||||
|
|
||||||
|
#include "ui/dialogconductorautonum.h"
|
||||||
|
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
@@ -221,6 +224,8 @@ void QETDiagramEditor::actions() {
|
|||||||
prj_add_diagram = new QAction(QET::Icons::DiagramAdd, tr("Ajouter un sch\351ma"), this);
|
prj_add_diagram = new QAction(QET::Icons::DiagramAdd, tr("Ajouter un sch\351ma"), this);
|
||||||
prj_del_diagram = new QAction(QET::Icons::DiagramDelete, tr("Supprimer le sch\351ma"), this);
|
prj_del_diagram = new QAction(QET::Icons::DiagramDelete, tr("Supprimer le sch\351ma"), this);
|
||||||
prj_clean = new QAction(QET::Icons::EditClear, tr("Nettoyer le projet"), this);
|
prj_clean = new QAction(QET::Icons::EditClear, tr("Nettoyer le projet"), this);
|
||||||
|
prj_conductorANum = new QAction(QET::Icons::ConductorSettings, tr("Annoter les conducteurs (beta)"), this);
|
||||||
|
prj_nomenclature = new QAction(QET::Icons::DocumentExport, tr("Exporter une nomenclature (beta)"), this);
|
||||||
|
|
||||||
zoom_in = new QAction(QET::Icons::ZoomIn, tr("Zoom avant"), this);
|
zoom_in = new QAction(QET::Icons::ZoomIn, tr("Zoom avant"), this);
|
||||||
zoom_out = new QAction(QET::Icons::ZoomOut, tr("Zoom arri\350re"), this);
|
zoom_out = new QAction(QET::Icons::ZoomOut, tr("Zoom arri\350re"), this);
|
||||||
@@ -367,6 +372,8 @@ void QETDiagramEditor::actions() {
|
|||||||
connect(prj_add_diagram, SIGNAL(triggered()), this, SLOT(addDiagramToProject()) );
|
connect(prj_add_diagram, SIGNAL(triggered()), this, SLOT(addDiagramToProject()) );
|
||||||
connect(prj_del_diagram, SIGNAL(triggered()), this, SLOT(removeDiagramFromProject()) );
|
connect(prj_del_diagram, SIGNAL(triggered()), this, SLOT(removeDiagramFromProject()) );
|
||||||
connect(prj_clean, SIGNAL(triggered()), this, SLOT(cleanCurrentProject()) );
|
connect(prj_clean, SIGNAL(triggered()), this, SLOT(cleanCurrentProject()) );
|
||||||
|
connect(prj_conductorANum, SIGNAL(triggered()), this, SLOT(conductorAutoNumProject()) );
|
||||||
|
connect(prj_nomenclature, SIGNAL(triggered()), this, SLOT(nomenclatureProject()) );
|
||||||
connect(zoom_in, SIGNAL(triggered()), this, SLOT(slot_zoomIn()) );
|
connect(zoom_in, SIGNAL(triggered()), this, SLOT(slot_zoomIn()) );
|
||||||
connect(zoom_out, SIGNAL(triggered()), this, SLOT(slot_zoomOut()) );
|
connect(zoom_out, SIGNAL(triggered()), this, SLOT(slot_zoomOut()) );
|
||||||
connect(zoom_content, SIGNAL(triggered()), this, SLOT(slot_zoomContent()) );
|
connect(zoom_content, SIGNAL(triggered()), this, SLOT(slot_zoomContent()) );
|
||||||
@@ -482,6 +489,9 @@ void QETDiagramEditor::menus() {
|
|||||||
menu_project -> addAction(prj_add_diagram);
|
menu_project -> addAction(prj_add_diagram);
|
||||||
menu_project -> addAction(prj_del_diagram);
|
menu_project -> addAction(prj_del_diagram);
|
||||||
menu_project -> addAction(prj_clean);
|
menu_project -> addAction(prj_clean);
|
||||||
|
menu_project -> addSeparator();
|
||||||
|
menu_project -> addAction(prj_conductorANum);
|
||||||
|
menu_project -> addAction(prj_nomenclature);
|
||||||
|
|
||||||
main_bar -> toggleViewAction() -> setStatusTip(tr("Affiche ou non la barre d'outils principale"));
|
main_bar -> toggleViewAction() -> setStatusTip(tr("Affiche ou non la barre d'outils principale"));
|
||||||
view_bar -> toggleViewAction() -> setStatusTip(tr("Affiche ou non la barre d'outils Affichage"));
|
view_bar -> toggleViewAction() -> setStatusTip(tr("Affiche ou non la barre d'outils Affichage"));
|
||||||
@@ -1123,6 +1133,8 @@ void QETDiagramEditor::slot_updateActions() {
|
|||||||
prj_add_diagram -> setEnabled(editable_project);
|
prj_add_diagram -> setEnabled(editable_project);
|
||||||
prj_del_diagram -> setEnabled(editable_project);
|
prj_del_diagram -> setEnabled(editable_project);
|
||||||
prj_clean -> setEnabled(editable_project);
|
prj_clean -> setEnabled(editable_project);
|
||||||
|
prj_conductorANum -> setEnabled(editable_project);
|
||||||
|
prj_nomenclature -> setEnabled(editable_project);
|
||||||
import_diagram -> setEnabled(editable_project);
|
import_diagram -> setEnabled(editable_project);
|
||||||
export_diagram -> setEnabled(opened_diagram);
|
export_diagram -> setEnabled(opened_diagram);
|
||||||
print -> setEnabled(opened_diagram);
|
print -> setEnabled(opened_diagram);
|
||||||
@@ -1141,6 +1153,12 @@ void QETDiagramEditor::slot_updateActions() {
|
|||||||
add_row -> setEnabled(editable_diagram);
|
add_row -> setEnabled(editable_diagram);
|
||||||
remove_row -> setEnabled(editable_diagram);
|
remove_row -> setEnabled(editable_diagram);
|
||||||
|
|
||||||
|
//display the beta feature only in debug mode
|
||||||
|
#ifdef QT_NO_DEBUG
|
||||||
|
prj_conductorANum -> setVisible(false);
|
||||||
|
prj_nomenclature -> setVisible(false);
|
||||||
|
#endif
|
||||||
|
|
||||||
// affiche les actions correspondant au diagram view en cours
|
// affiche les actions correspondant au diagram view en cours
|
||||||
if (dv) {
|
if (dv) {
|
||||||
if (can_update_actions) {
|
if (can_update_actions) {
|
||||||
@@ -1692,6 +1710,29 @@ void QETDiagramEditor::cleanCurrentProject() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief launch AutoNumConductor dialog
|
||||||
|
*/
|
||||||
|
void QETDiagramEditor::conductorAutoNumProject() {
|
||||||
|
//TODO: Test dialog autonum CYRIL F.
|
||||||
|
DialogConductorAutoNum *dg = new DialogConductorAutoNum();
|
||||||
|
dg->setModal(true);
|
||||||
|
dg->exec();
|
||||||
|
|
||||||
|
delete dg;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief export nomemclature of schema
|
||||||
|
*/
|
||||||
|
void QETDiagramEditor::nomenclatureProject() {
|
||||||
|
//TODO: Test nomenclature CYRIL F.
|
||||||
|
nomenclature *nomencl= new nomenclature(currentProject()->project() ,this);
|
||||||
|
nomencl->saveToCSVFile();
|
||||||
|
|
||||||
|
delete nomencl;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Supprime le schema courant du projet courant
|
Supprime le schema courant du projet courant
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -146,6 +146,8 @@ class QETDiagramEditor : public QETMainWindow {
|
|||||||
void moveDiagramUp(Diagram *);
|
void moveDiagramUp(Diagram *);
|
||||||
void moveDiagramDown(Diagram *);
|
void moveDiagramDown(Diagram *);
|
||||||
void cleanCurrentProject();
|
void cleanCurrentProject();
|
||||||
|
void conductorAutoNumProject();
|
||||||
|
void nomenclatureProject();
|
||||||
void diagramWasAdded(DiagramView *);
|
void diagramWasAdded(DiagramView *);
|
||||||
void diagramIsAboutToBeRemoved(DiagramView *);
|
void diagramIsAboutToBeRemoved(DiagramView *);
|
||||||
void diagramWasRemoved(DiagramView *);
|
void diagramWasRemoved(DiagramView *);
|
||||||
@@ -202,6 +204,8 @@ class QETDiagramEditor : public QETMainWindow {
|
|||||||
QAction *prj_add_diagram; ///< Add a diagram to the current project.
|
QAction *prj_add_diagram; ///< Add a diagram to the current project.
|
||||||
QAction *prj_del_diagram; ///< Delete a diagram from the current project
|
QAction *prj_del_diagram; ///< Delete a diagram from the current project
|
||||||
QAction *prj_clean; ///< Clean the content of the curent project by removing useless items
|
QAction *prj_clean; ///< Clean the content of the curent project by removing useless items
|
||||||
|
QAction *prj_conductorANum; ///< Auto numerotation conductors
|
||||||
|
QAction *prj_nomenclature; ///< generate nomenclature
|
||||||
QAction *zoom_in; ///< Zoom in
|
QAction *zoom_in; ///< Zoom in
|
||||||
QAction *zoom_out; ///< Zoom out
|
QAction *zoom_out; ///< Zoom out
|
||||||
QAction *zoom_fit; ///< Adjust zoom to fit the whole diagram, including potential elements outside its borders, in the view
|
QAction *zoom_fit; ///< Adjust zoom to fit the whole diagram, including potential elements outside its borders, in the view
|
||||||
|
|||||||
16
sources/ui/dialogconductorautonum.cpp
Normal file
16
sources/ui/dialogconductorautonum.cpp
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#include "dialogconductorautonum.h"
|
||||||
|
#include "ui_dialogconductorautonum.h"
|
||||||
|
|
||||||
|
#include "conductorautonumerotation.h"
|
||||||
|
|
||||||
|
DialogConductorAutoNum::DialogConductorAutoNum(QWidget *parent) :
|
||||||
|
QDialog(parent),
|
||||||
|
ui(new Ui::DialogConductorAutoNum)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
DialogConductorAutoNum::~DialogConductorAutoNum()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
22
sources/ui/dialogconductorautonum.h
Normal file
22
sources/ui/dialogconductorautonum.h
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
#ifndef DIALOGCONDUCTORAUTONUM_H
|
||||||
|
#define DIALOGCONDUCTORAUTONUM_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class DialogConductorAutoNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
class DialogConductorAutoNum : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit DialogConductorAutoNum(QWidget *parent = 0);
|
||||||
|
~DialogConductorAutoNum();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::DialogConductorAutoNum *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // DIALOGCONDUCTORAUTONUM_H
|
||||||
116
sources/ui/dialogconductorautonum.ui
Normal file
116
sources/ui/dialogconductorautonum.ui
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>DialogConductorAutoNum</class>
|
||||||
|
<widget class="QDialog" name="DialogConductorAutoNum">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>523</width>
|
||||||
|
<height>313</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Annotation des conducteurs</string>
|
||||||
|
</property>
|
||||||
|
<property name="windowIcon">
|
||||||
|
<iconset resource="../../qelectrotech.qrc">
|
||||||
|
<normaloff>:/ico/oxygen-icons/32x32/apps/qelectrotech.png</normaloff>:/ico/oxygen-icons/32x32/apps/qelectrotech.png</iconset>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_Selection">
|
||||||
|
<property name="title">
|
||||||
|
<string>Sélection</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="radioButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>RadioButton</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="radioButton_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>RadioButton</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_Annotation">
|
||||||
|
<property name="title">
|
||||||
|
<string>Annotation</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>CheckBox</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_annotation">
|
||||||
|
<property name="text">
|
||||||
|
<string>Annotation</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_delete">
|
||||||
|
<property name="text">
|
||||||
|
<string>Supprimer l'annotation</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_close">
|
||||||
|
<property name="text">
|
||||||
|
<string>Fermer</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources>
|
||||||
|
<include location="../../qelectrotech.qrc"/>
|
||||||
|
</resources>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
Reference in New Issue
Block a user