mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-26 04:30:53 +01:00
Add the removeDiagramFromProject methode for autonum (beta)
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2117 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "qetdiagrameditor.h"
|
||||
#include "QGraphicsView"
|
||||
#include "diagramcommands.h"
|
||||
#include "qetapp.h"
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@@ -82,6 +83,24 @@ void ConductorAutoNumerotation::setNumStrategy() {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief ConductorAutoNumerotation::removeNum_ofDiagram
|
||||
* @param dg the diagram to remove text of Conductor
|
||||
*/
|
||||
void ConductorAutoNumerotation::removeNum_ofDiagram(Diagram *dg) {
|
||||
// Setting of application
|
||||
QSettings &qet_settings = QETApp::settings();
|
||||
// Get the default text of conductor from conf file
|
||||
QString Conductor_DefaultText = qet_settings.value("defaultconductortext", "_").toString();
|
||||
// Get all conductors presents in diagram
|
||||
QList<Conductor *> Conductors = dg -> content().conductors();
|
||||
// Browse all conductors and set the default value
|
||||
for (int i=0; i<Conductors.count(); i++) {
|
||||
Conductors.at(i) -> setText( Conductor_DefaultText );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user