diff --git a/README.md b/README.md index 9fcefc6..c3ab4eb 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,14 @@ Welcome to XDrawChem! Please visit the project page at http://www.woodsidelabs.com/chemistry/xdrawchem.php -Current release (1.9.10-1) source tarball and RPM are at SourceForge: https://sourceforge.net/projects/xdrawchem/files/xdrawchem/1.9.10/ +Current release (1.9.11-1) source tarball and RPM are at SourceForge: https://sourceforge.net/projects/xdrawchem/files/xdrawchem/1.9.10/ -This package conatins two versions of XDrawChem: +This repository conatins three (!) versions of XDrawChem: -xdrawchem - this is the main development version. It is based on Qt 3.x. +xdrawchem-qt5 - this is the main development and release version (1.9.11 onwards). It is based on Qt 5.x. +(Starting with 1.10.x, this will be "xdrawchem" and the legacy version will be "xdrawchem-qt3") + +xdrawchem - this is the legacy Qt3 version (1.9.10 and prior). It is based on Qt 3.x. xdrawchem-qt4 - this is a contributed version. It is based on Qt 4. Eventually, this will become the main version, but most distributions diff --git a/xdrawchem-qt5/SPECS/xdrawchem.spec b/xdrawchem-qt5/SPECS/xdrawchem.spec new file mode 100644 index 0000000..233ab27 --- /dev/null +++ b/xdrawchem-qt5/SPECS/xdrawchem.spec @@ -0,0 +1,47 @@ +Summary: XDrawChem is an application for drawing and analyzing chemical structures and reactions. +Name: xdrawchem +Version: 1.9.11 +Release: 1 +License: GPL +Group: Applications/Productivity +URL: http://www.woodsidelabs.com/chemistry/xdrawchem.php +Source0: https://sourceforge.net/projects/%{name}/files/%{name}/%{version}/%{name}-%{version}-%{release}.rpmsrc.tar.gz +Requires: openbabel qt5-qtbase +BuildRequires: openbabel openbabel-devel qt5-qtbase-devel +BuildRoot: /var/tmp/%{name}-buildroot + +%description +XDrawChem is an application for drawing and analyzing chemical structures and reactions. + +%prep +%setup -q + +%build +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT +qmake-qt5 PREFIX="/usr/local" +make + +%install +install -D -m 0755 bin/xdrawchem $RPM_BUILD_ROOT/usr/local/bin/xdrawchem +mkdir -p $RPM_BUILD_ROOT/usr/local/share/xdrawchem +chmod 0755 $RPM_BUILD_ROOT/usr/local/share/xdrawchem +cp ring/* $RPM_BUILD_ROOT/usr/local/share/xdrawchem +mkdir -p $RPM_BUILD_ROOT/usr/local/share/xdrawchem/doc +chmod 0755 $RPM_BUILD_ROOT/usr/local/share/xdrawchem/doc +cp doc/* $RPM_BUILD_ROOT/usr/local/share/xdrawchem/doc + +%clean +make clean +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%doc README.txt INSTALL.txt TODO.txt COPYRIGHT.txt +/usr/local/bin/xdrawchem +/usr/local/share/xdrawchem/* + +%changelog +* Sun Dec 11 2016 Bryan Herger +- initial version of spec file + diff --git a/xdrawchem-qt5/xdrawchem.pro b/xdrawchem-qt5/xdrawchem.pro index e9b392c..dd8eec9 100644 --- a/xdrawchem-qt5/xdrawchem.pro +++ b/xdrawchem-qt5/xdrawchem.pro @@ -1,5 +1,5 @@ TEMPLATE = app -TARGET = xdrawchem-qt5 +TARGET = xdrawchem # edit to match your OB install INCLUDEPATH += /usr/include/openbabel-2.0 @@ -29,6 +29,8 @@ doc.path = $${PREFIX}/share/xdrawchem/doc doc.files = doc/* INSTALLS += ringdir doc QMAKE_CXXFLAGS_DEBUG += -O0 -g3 +QMAKE_CXXFLAGS_GNUCXX11 = +QMAKE_CXXFLAGS_CXX11 = //DEFINES += QT_NO_CAST_TO_ASCII CONFIG += debug diff --git a/xdrawchem-qt5/xdrawchem/atom.h b/xdrawchem-qt5/xdrawchem/atom.h index 9e6b504..889adce 100644 --- a/xdrawchem-qt5/xdrawchem/atom.h +++ b/xdrawchem-qt5/xdrawchem/atom.h @@ -124,7 +124,7 @@ class Atom n->bondOrderSum = bondOrderSum; //System->arraycopy(nodeTable, 0, n->nodeTable, 0, 10); for (int f = 0; f < 10; f++) - n->nodeTable.insert(f, nodeTable[f]); // shallow copy! + n->nodeTable.replace(f, nodeTable[f]); // shallow copy! // the rest are deep copies. n->intnodeTable = intnodeTable; n->bondTable = bondTable; diff --git a/xdrawchem-qt5/xdrawchem/molecule_smiles.cpp b/xdrawchem-qt5/xdrawchem/molecule_smiles.cpp index eeba2e7..e0038b1 100644 --- a/xdrawchem-qt5/xdrawchem/molecule_smiles.cpp +++ b/xdrawchem-qt5/xdrawchem/molecule_smiles.cpp @@ -88,7 +88,7 @@ void Molecule::SDG( bool coord ) a1 = atoms.at( c1 ); for ( c2 = 0; c2 < tmp_pt->neighbors.count(); c2++ ) { refnum = tmp_pt->neighbors.at( c2 )->serial; - a1->nodeTable.insert( c2, atoms.at( refnum ) ); + a1->nodeTable.replace( c2, atoms.at( refnum ) ); a1->bondTable[c2] = tmp_pt->bondorder[c2]; a1->intnodeTable[c2] = refnum; } @@ -106,12 +106,12 @@ void Molecule::SDG( bool coord ) c2 = 0; for (tmp_pt = tmp_ring->first(); tmp_pt != 0; tmp_pt = tmp_ring->next()) { a1 = atoms.at(tmp_pt->serial); - ring1->insert(c2, a1); + ring1->replace(c2, a1); qInfo() << "RA" << c2 << ":" << tmp_pt->serial ; c2++; } ring1->sort2(); - s1.insert(c1, ring1); + s1.replace(c1, ring1); c1++; } */ @@ -463,7 +463,7 @@ void Molecule::FromSMILES(QString sm) { int ringnum = tmp_token.right(1).toInt(); flag = true; if (ring_array_status[ringnum] == false) { // save this atom - ring_closure_array.insert(ringnum, new_pt); + ring_closure_array.replace(ringnum, new_pt); ring_array_status[ringnum] = true; } else { // do ring closure tmp_pt = ring_closure_array.at(ringnum); diff --git a/xdrawchem-qt5/xdrawchem/sdg.h b/xdrawchem-qt5/xdrawchem/sdg.h index 18d86d7..df1dc33 100644 --- a/xdrawchem-qt5/xdrawchem/sdg.h +++ b/xdrawchem-qt5/xdrawchem/sdg.h @@ -68,11 +68,16 @@ class SPoint { y = (double)y1; } - /** Constructs a point as a dublicate of another point */ + /** Constructs a point as a duplicate of another point */ SPoint(const SPoint &p){ x = p.x; y = p.y; } + + /** return this SPoint as a QString */ + QString toString() { + return QString("(%1,%2)").arg(x).arg(y); + } }; /** Construct that stores the parameters needed for the placement of @@ -135,6 +140,7 @@ class SDG { ringTracker = 0; ddebug = 0; draw(); + drawStatus("at end"); } /** Performs the actual calculation of the coordinated based on a @@ -154,7 +160,7 @@ class SDG { atomSet[i]->status = 0; atomSet[i]->ringCounter = 0; } - + drawStatus("start"); sortBondList(); for (int f = 0; f < atomSet.count(); f++) { @@ -170,6 +176,7 @@ class SDG { sssr = sorf.findSSSR(atomSet); //should be passed from Molecule() sssr.sort(); sssr.makeNodeRingLists(atomSet); + drawStatus("after sssr"); if (sssr.size() > 0){ /* We have rings @@ -203,6 +210,7 @@ class SDG { } } positionRingAtoms(complRing, SPoint(0,0), (double)0, 0, complRingSize - 1); + drawStatus("208"); ring = sssr.at(complRing); ring->status = 1; @@ -215,6 +223,7 @@ class SDG { for (int f = 0; f < sssr.size(); f++){ if ((sssr.at(f))->status == 1) { positionRingSubstituents(f); + drawStatus("222"); //if (true) return; stillThere = true; } @@ -278,14 +287,21 @@ class SDG { int whatToDraw(){ for (int f = 0; f < atomSet.count(); f++){ if (atomSet[f]->status == 1){ - qDebug() << "whatToDraw(): " << f ; + qInfo() << "whatToDraw(): " << f ; return f; } } - qDebug() << "whatToDraw(): -1" ; + qInfo() << "whatToDraw(): -1" ; return -1; } + /** Scans the array of nodes for those that have not been finally drawn */ + + void drawStatus(QString note){ + // debug: what actually happened here? + for (int ii = 0; ii < atomSet.count(); ii++) { qInfo() << note << ":SDG pos:" << ii << ":status:" << atomSet[ii]->status << ":(" << atomSet[ii]->x << "," << atomSet[ii]->y << ")"; } + } + /** Takes care of drawing an ring-less graph once one start atom has been placed. */ @@ -399,7 +415,7 @@ class SDG { // ringType = 1 : spiro annulation requested; // ringType = 2 : regular 1-bond annulation requested; // ringType = 3 : annulation with more than two shared atoms - //System.out.println("Ring to substitute: " + ringIndex); + qInfo() << "Ring to substitute: " << ringIndex; double ph = 0.0174532925; Ring *ring = sssr.at(ringIndex); int k = ring->size(); @@ -435,6 +451,7 @@ class SDG { which already has been positioned by the calling method */ handleRestOfRingSubstituents(ringIndex); + drawStatus("451"); return; } @@ -458,7 +475,7 @@ class SDG { /* we found another ring to which atom belongs which is not yet positioned. Let's remember it. */ secondRing = sssr.at(tempRing); - qDebug() << "secondRing:" << secondRing->getSortedString() ; + qInfo() << "secondRing:" << secondRing->getSortedString() ; secondRingNumber = tempRing; size = (getIntersection(ring->getNodeNumberList(), secondRing->getNodeNumberList())).count(); if (secondRing->notAllPositioned(atomSet)){ @@ -530,7 +547,7 @@ class SDG { SPoint(atomSet[tempAtom]->x, atomSet[tempAtom]->y), rad); if (alph != (double) 0.0) - //qDebug() << "Invoking rot-Atom() from line 538" ; + //qInfo() << "Invoking rot-Atom() from line 538" ; tempPoint = rotAtom(SPoint(atomSet[tempAtom]->x, atomSet[tempAtom]->y), tempPoint, alph); secondRing->x = tempPoint.x; @@ -713,7 +730,7 @@ class SDG { //System.out.println("Bicyclo"); for (il = 0; il < km; il++) { if (atomSet[secondRing->getNodeNumber(il)]->status <= 0) { - //qDebug() << "Invoking rot-Atom() from line 719" ; + //qInfo() << "Invoking rot-Atom() from line 719" ; temp2Point = rotAtom(SPoint(secondRing->x,secondRing->y), tempPoint, alph); atomSet[secondRing->getNodeNumber(il)]->status = 1; atomSet[secondRing->getNodeNumber(il)]->x = temp2Point.x; @@ -777,7 +794,7 @@ class SDG { x2 = round(center2.x * roundFactor) / roundFactor; y2 = round(center2.y * roundFactor) / roundFactor; angle = 360 / (sssr.at(numberOfSecondRing))->size(); - qDebug() << "FRP:" << x1 << "," << y1 << ";" << x2 << "," << y2 ; + qInfo() << "FRP:" << x1 << "," << y1 << ";" << x2 << "," << y2 ; FusedRingParams fRP; // First block if (x2 > x1 && y2 >= y1){ @@ -963,6 +980,7 @@ class SDG { 'vector' in distance 'distance' from origin. Originally called 'neuat()' */ SPoint placeAtom(SPoint origin, SPoint vector, double distance){ + qInfo() << "placeAtom " << origin.toString() << " " << vector.toString() << " d=" << distance; double a, b, cc; a = vector.x - origin.x; b = vector.y - origin.y; @@ -974,11 +992,12 @@ class SDG { /** Rotates the atom at Point 'point' around the Point 'center' with the angle 'angle' */ SPoint rotAtom(SPoint center, SPoint point, double angle){ + qInfo() << "rotAtom " << center.toString() << " " << point.toString() << " a=" << angle; double ph = 0.0174532925; double p, co, si, x1, y1, x, y; // make aliphatics look good - //qDebug() << "ANGLE:" << angle; + //qInfo() << "ANGLE:" << angle; if (arerings == true) { if (ncalls == 0) { @@ -1010,7 +1029,7 @@ class SDG { } } - //qDebug() << " " << angle ; + //qInfo() << " " << angle ; // end aliphatics garbling p = ph * angle; @@ -1029,6 +1048,7 @@ class SDG { Returns "-1" if no ring was drawn or the ring number of the ring draw */ int positionAtomSubstituents(int atomIndex, SPoint point, SPoint helpPoint, QVector ilist, int modus, int ir, int igr){ + qInfo() << "positionAtomSubstituents:atomIndex=" << atomIndex; double ph = 0.0174532925; int i, ib, /*ibb, iii, iph,*/ k; double alph, /*b, phi,*/ rad/*, xx, yy*/; @@ -1073,9 +1093,12 @@ class SDG { for (i = 0; i < k; i++) { tempAtom = atomSet[atomIndex]->intnodeTable[i]; if (atomSet[tempAtom]->status <= 0) { + double thisRot = rot[i]; + if (thisRot > (double)359.9) thisRot = (double)0.0; + qInfo() << "placeAtom " << tempAtom << " status=" << atomSet[tempAtom]->status << " rot["<x = test.x; atomSet[tempAtom]->y = test.y; atomSet[tempAtom]->status = 1; @@ -1102,7 +1125,7 @@ class SDG { /* -------------------------------------------------------------*/ rad = bondLength/ 2 / sin(ph * (180.0 / igr)); tempPoint = placeAtom(SPoint(xh, yh), SPoint(x, y), rad); - //qDebug() << "Invoking rot-Atom() from line 1106" ; + //qInfo() << "Invoking rot-Atom() from line 1106" ; tempPoint = rotAtom(SPoint(x, y), tempPoint, alph); ring->x = tempPoint.x; ring->y = tempPoint.y; @@ -1312,7 +1335,7 @@ class SDG { /* rotate substituents by angle pp */ /* if more than one neighbor has to be drawn */ /*----------------------------------------------*/ - //qDebug() << "Invoking rot-Atom() from line 1317" ; + //qInfo() << "Invoking rot-Atom() from line 1317" ; tempPoint = rotAtom(SPoint(x, y), SPoint(xx, yy), pp); atomSet[atomSet[bridgeAtomNumber]->intnodeTable[i]]->x = tempPoint.x; atomSet[atomSet[bridgeAtomNumber]->intnodeTable[i]]->y = tempPoint.y; @@ -1330,7 +1353,7 @@ class SDG { /* rotate substituents by angle pp */ /* if more than one neighbor has to be drawn */ /*----------------------------------------------*/ - //qDebug() << "Invoking rot-Atom() from line 1335" ; + //qInfo() << "Invoking rot-Atom() from line 1335" ; tempPoint = rotAtom(SPoint(x, y), SPoint(xx, yy), pp); atomSet[atomSet[bridgeAtomNumber]->intnodeTable[i]]->x = tempPoint.x; atomSet[atomSet[bridgeAtomNumber]->intnodeTable[i]]->y = tempPoint.y; @@ -1389,6 +1412,7 @@ class SDG { } result = positionAtomSubstituents(ring->getNodeNumber(i), SPoint(atomSet[ring->getNodeNumber(i)]->x, atomSet[ring->getNodeNumber(i)]->y), SPoint(ring->x, ring->y), ilist, ring->size(), ir, igr); + drawStatus("1406"); } } } diff --git a/xdrawchem-qt5/xdrawchem/setofrings.h b/xdrawchem-qt5/xdrawchem/setofrings.h index 37af587..349787d 100644 --- a/xdrawchem-qt5/xdrawchem/setofrings.h +++ b/xdrawchem-qt5/xdrawchem/setofrings.h @@ -66,11 +66,9 @@ class setOfRings : public QVector s2 = ring->getSortedString(); qInfo() << s1 << "-vs-" << s2 ; if (s1 == s2){ - qInfo("true!"); return true; } } - qInfo("false!"); return false; } @@ -131,8 +129,8 @@ class setOfRings : public QVector void swap(int i, int j){ Ring *r; r = at(i); - insert(i, at(j)); - insert(j, r); + replace(i, at(j)); + replace(j, r); } /** Lists the rings in this set to the console */ @@ -146,6 +144,7 @@ class setOfRings : public QVector that it is part of. */ void makeNodeRingLists(QVector thisAtomSet){ + qInfo() << "makeNodeRingLists: size = " << thisAtomSet.size(); Ring *ring = 0; int nodeNo = -1; for (int f = 0; f < size(); f++){ diff --git a/xdrawchem-qt5/xdrawchem/sorf.h b/xdrawchem-qt5/xdrawchem/sorf.h index ca5db48..e7ab69a 100644 --- a/xdrawchem-qt5/xdrawchem/sorf.h +++ b/xdrawchem-qt5/xdrawchem/sorf.h @@ -52,7 +52,7 @@ class DataStructureTools { { if (thisSet[h]->number == thisSet[f]->nodeTable[g]->number) { - newAtomSet[f]->nodeTable.insert(g, newAtomSet[h]); + newAtomSet[f]->nodeTable.replace(g, newAtomSet[h]); break; } } @@ -202,6 +202,14 @@ class SetOfRingsFinder return sssr; } + QString printPath(QList atoms) { + QString thisPath; + for (int i = 0; i < atoms.size(); i++) { + if (i > 0) thisPath.append(" "); + thisPath.append( QString::number(atoms[i]->number) ); + } + return thisPath; + } /** finds the smallest ring of which rootNode is part of. This routine is called 'getRing() in Figueras original article */ Ring *findSRing(Atom *rootNode, QVector tempAtomSet){ @@ -257,10 +265,10 @@ class SetOfRingsFinder // we have found a valid ring closure // now let's prepare the path to // return in tempAtomSet - //qInfo("Ring closure found: " + m->number + ", source is " + source->number); - //qInfo(m + ", " + source); - //qInfo("Path of frontnode: " + path[frontNode.number]->toString()); - //qInfo("Path of m: " + path[m->number]->toString()); + qInfo() << "Ring closure found: " << m->number << ", source is " << source->number; + qInfo() << m << ", " << source; + qInfo() << "Path of frontnode: " << printPath(*path[frontNode->number]); + qInfo() << "Path of m: " << printPath(*path[m->number]); ring = getUnion(*path[frontNode->number], *path[m->number]); return prepareRing(ring, tempAtomSet); } @@ -268,7 +276,7 @@ class SetOfRingsFinder else { // if path[m] is not null // update the path[m] path.replace(m->number, merge(path[m->number], path[frontNode->number])); - path[m->number]->insert(0, m); + path[m->number]->insert(0, m); // no, we really mean insert here; well, "prepend" really, but this is what the old code did, exactly. // now push the node m onto the queue FGsource.replace(m->number, frontNode); queue.enqueue(m); @@ -331,14 +339,14 @@ class SetOfRingsFinder if (conn->nodeTable[g] == n){ if (g < (conn->nodeTable.size() - 1)){ for (int h = g; h < conn->degree - 1; h++){ - conn->nodeTable.insert(h, conn->nodeTable[h + 1]); + conn->nodeTable.replace(h, conn->nodeTable[h + 1]); } } - conn->nodeTable.insert(conn->degree - 1, 0); + conn->nodeTable.replace(conn->degree - 1, 0); conn->degree --; } } - n->nodeTable.insert(f, 0); + n->nodeTable.replace(f, 0); } n->degree = 0; // you are erased! Har, har, har..... >8-)=) @@ -354,16 +362,16 @@ class SetOfRingsFinder // remember the bond partner of the last bond Atom *partner = thisNode->nodeTable[degree - 1]; // now delete the bond - thisNode->nodeTable.insert(degree - 1, 0); + thisNode->nodeTable.replace(degree - 1, 0); thisNode->degree --; // find the same bond for 'partner' and delete it for (int f = 0; f < partner->degree; f++){ if (partner->nodeTable[f] == thisNode){ - partner->nodeTable.insert(f, 0); + partner->nodeTable.replace(f, 0); for (int g = f; g < partner->degree - 1; g++){ - partner->nodeTable.insert(g, partner->nodeTable[g+1]); + partner->nodeTable.replace(g, partner->nodeTable[g+1]); } - partner->nodeTable.insert(partner->degree - 1, 0); + partner->nodeTable.replace(partner->degree - 1, 0); partner->degree --; break; } @@ -377,9 +385,9 @@ class SetOfRingsFinder if (from->nodeTable[f] == to){ degree = from->degree; for (int g = f; g < from->degree - 1; g++){ - from->nodeTable.insert(g, from->nodeTable[g+1]); + from->nodeTable.replace(g, from->nodeTable[g+1]); } - from->nodeTable.insert(from->degree - 1, 0); + from->nodeTable.replace(from->degree - 1, 0); from->degree --; break; } @@ -387,9 +395,9 @@ class SetOfRingsFinder for (f = 0; f < to->degree; f++){ if (to->nodeTable[f] == from){ for (int g = f; g < to->degree - 1; g++){ - to->nodeTable.insert(g, to->nodeTable[g+1]); + to->nodeTable.replace(g, to->nodeTable[g+1]); } - to->nodeTable.insert(to->degree - 1, 0); + to->nodeTable.replace(to->degree - 1, 0); to->degree --; break; } @@ -399,9 +407,9 @@ class SetOfRingsFinder /** Restores a bond betwenn nodes 'from' and 'to' of an array of nodes 'tempAtomSet' */ void restoreBond(Atom *from, Atom *to, QVector tempAtomSet){ - from->nodeTable.insert(from->degree, to); + from->nodeTable.replace(from->degree, to); from->degree ++; - to->nodeTable.insert(to->degree, from); + to->nodeTable.replace(to->degree, from); to->degree ++; } diff --git a/xdrawchem-qt5/xdrawchem/text.cpp b/xdrawchem-qt5/xdrawchem/text.cpp index f13b78a..9c4b7f2 100644 --- a/xdrawchem-qt5/xdrawchem/text.cpp +++ b/xdrawchem-qt5/xdrawchem/text.cpp @@ -368,8 +368,8 @@ bool Text::isWithinRect( QRect n, bool shiftdown ) void Text::Render() { qDebug() << "Text::Render begin"; - - //qDebug() << "displayText.length():" << displayText.length(); +// r->drawString( "foobar", start->toQPoint(), QColor(0,0,0), QFont() ); return; + qDebug() << "displayText.length():" << displayText.length(); bool boldFlag = false, italicFlag = false, underlineFlag = false, superFlag = false, subFlag = false; QFont currentFont = font; @@ -397,7 +397,7 @@ void Text::Render() if ( displayText[cp1] == '>' ) { currentElement.append( displayText[cp1] ); if (!currentElement.contains("!DOCTYPE")) { - parseList.append( currentElement ); + parseList.append( currentElement ); } currentElement = ""; flag1 = false; @@ -418,7 +418,7 @@ void Text::Render() for ( QStringList::Iterator it = parseList.begin(); it != parseList.end(); ++it ) { currentElement = *it; - + qDebug() << "currentElement:" << currentElement; // dump the style tag! if ( currentElement == "" ) { styletag = false; @@ -529,7 +529,7 @@ void Text::Render() linewidth += b1.width(); } // end for? - + if ( lineheight > textheight ) textheight = lineheight; if ( linewidth > textwidth ) @@ -540,7 +540,6 @@ void Text::Render() qDebug() << "Text dimensions = " << textwidth << "," << textheight; //qDebug() << "Text check 1 ---"; - int supersub, subx; QFont supersubfont; QColor drawcolor; @@ -554,6 +553,7 @@ void Text::Render() b.translate( t.x(), t.y() ); // this guarantees that the text will not overlap other objects + // original code r->drawFillBox( b.topLeft(), b.bottomRight(), r->getBGColor(), false, QColor( 0, 0, 0 ), 1 ); // draw shape, if applicable diff --git a/xdrawchem-qt5/xdrawchem/text.h b/xdrawchem-qt5/xdrawchem/text.h index cd25cf0..95ebdb4 100644 --- a/xdrawchem-qt5/xdrawchem/text.h +++ b/xdrawchem-qt5/xdrawchem/text.h @@ -19,6 +19,7 @@ class Text : public Drawable public: Text( Render2D *, QObject *parent = 0 ); void Render(); // draw this object + void setRenderer(Render2D *r1) { r = r1; } int Type(); // return type of object bool Find( DPoint * ); // does this Text contain this DPoint? DPoint *FindNearestPoint( DPoint *, double & );