mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
Apply the default text with the removeNum_ofDiagram function. (sorry for the last comment, it's removeNum_ofDiagram function)
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2118 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -84,19 +84,15 @@ void ConductorAutoNumerotation::setNumStrategy() {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief ConductorAutoNumerotation::removeNum_ofDiagram
|
* @brief Set the default text to all conductors of the diagram
|
||||||
* @param dg the diagram to remove text of Conductor
|
* @param dg the diagram
|
||||||
*/
|
*/
|
||||||
void ConductorAutoNumerotation::removeNum_ofDiagram(Diagram *dg) {
|
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
|
// Get all conductors presents in diagram
|
||||||
QList<Conductor *> Conductors = dg -> content().conductors();
|
QList<Conductor *> Conductors = dg -> content().conductors();
|
||||||
// Browse all conductors and set the default value
|
// Browse all conductors and set the default value
|
||||||
for (int i=0; i<Conductors.count(); i++) {
|
for (int i=0; i<Conductors.count(); i++) {
|
||||||
Conductors.at(i) -> setText( Conductor_DefaultText );
|
Conductors.at(i) -> setText( dg ->defaultConductorProperties.text );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user