Added view mode in Cross References - included Folio Field

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4491 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
dfochi
2016-05-20 20:16:28 +00:00
parent 90caaaffb9
commit 940a7230e3
7 changed files with 108 additions and 28 deletions

View File

@@ -89,8 +89,16 @@ QPainterPath CrossRefItem::shape() const{
* if @add_prefix is true, prefix (for power and delay contact) is added to the poistion text.
*/
QString CrossRefItem::elementPositionText(const Element *elmt, const bool &add_prefix) const{
QString txt;
txt += QString::number(elmt->diagram()->folioIndex() + 1);
XRefProperties::ViewMode vw = m_properties.viewMode();
if (vw == XRefProperties::Index)
{
txt += QString::number(elmt->diagram()->folioIndex() + 1);
}
else if (vw == XRefProperties::FolioLabel){
txt += elmt->diagram()->border_and_titleblock.folio();
}
txt += "-";
txt += elmt->diagram()->convertPosition(elmt -> scenePos()).toString();
if (add_prefix) {