mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
New fields titleblock properties %machine and %locmach can now be called
in the element rules autonum git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4628 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -124,6 +124,14 @@ void NumerotationContextCommands::setNumStrategy(const QString &str) {
|
||||
strategy_ = new FolioNum (diagram_);
|
||||
return;
|
||||
}
|
||||
else if (str=="machine"){
|
||||
strategy_ = new MachineNum (diagram_);
|
||||
return;
|
||||
}
|
||||
else if (str=="locmach"){
|
||||
strategy_ = new LocmachNum (diagram_);
|
||||
return;
|
||||
}
|
||||
else if (str=="elementline"){
|
||||
strategy_ = new ElementLineNum (diagram_);
|
||||
return;
|
||||
@@ -488,6 +496,72 @@ NumerotationContext FolioNum::previous(const NumerotationContext &nc, const int
|
||||
return (nextString(nc, i));
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
MachineNum::MachineNum (Diagram *d):
|
||||
NumStrategy (d)
|
||||
{}
|
||||
|
||||
/**
|
||||
* @brief MachineNum::toRepresentedString
|
||||
* @return the represented string of folio
|
||||
*/
|
||||
QString MachineNum::toRepresentedString(const QString str) const {
|
||||
Q_UNUSED(str);
|
||||
return "%M";
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief MachineNum::next
|
||||
* @return the next NumerotationContext nc at position i
|
||||
*/
|
||||
NumerotationContext MachineNum::next (const NumerotationContext &nc, const int i) const {
|
||||
return (nextString(nc, i));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief MachineNum::previous
|
||||
* @return the previous NumerotationContext nc at posiiton i
|
||||
*/
|
||||
NumerotationContext MachineNum::previous(const NumerotationContext &nc, const int i) const {
|
||||
return (nextString(nc, i));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
LocmachNum::LocmachNum (Diagram *d):
|
||||
NumStrategy (d)
|
||||
{}
|
||||
|
||||
/**
|
||||
* @brief LocmachNum::toRepresentedString
|
||||
* @return the represented string of folio
|
||||
*/
|
||||
QString LocmachNum::toRepresentedString(const QString str) const {
|
||||
Q_UNUSED(str);
|
||||
return "%LM";
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief LocmachNum::next
|
||||
* @return the next NumerotationContext nc at position i
|
||||
*/
|
||||
NumerotationContext LocmachNum::next (const NumerotationContext &nc, const int i) const {
|
||||
return (nextString(nc, i));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief LocmachNum::previous
|
||||
* @return the previous NumerotationContext nc at posiiton i
|
||||
*/
|
||||
NumerotationContext LocmachNum::previous(const NumerotationContext &nc, const int i) const {
|
||||
return (nextString(nc, i));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user