Sun, 29 Jan 2017 15:05:14 +0200
Major overhaul of object→document relationship: added the Model class which models the object buffer. Each object is to be included in a model (an invariant that currently does not hold). A document is a subclass of a model. The LDObject is also now agnostic about selection, and the selection is now a set. A lot of things are probably broken now but it's a major step forward.
The LDObject::destroy method is also now gone. The model decides when objects are destroyed and calls the destructor directly. The end result removes a lot of cruft and adds structure to LDObject relations.
Notes:
- Inlining does not currently work (nothing simply gets inlined in)
- More work is required to ensure that each object actually goes into a model
<?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>LDrawPathDialog</class> <widget class="QDialog" name="LDrawPathDialog"> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>344</width> <height>140</height> </rect> </property> <property name="windowTitle"> <string>Set LDraw Path</string> </property> <layout class="QVBoxLayout" name="verticalLayout"> <item> <widget class="QLabel" name="heading"> <property name="text"> <string>Please input your LDraw directory root to proceed:</string> </property> </widget> </item> <item> <layout class="QHBoxLayout" name="horizontalLayout"> <item> <widget class="QLabel" name="label"> <property name="text"> <string>LDraw Path:</string> </property> </widget> </item> <item> <widget class="QLineEdit" name="path"/> </item> <item> <widget class="QPushButton" name="searchButton"> <property name="text"> <string/> </property> <property name="icon"> <iconset resource="../../ldforge.qrc"> <normaloff>:/icons/folder.png</normaloff>:/icons/folder.png</iconset> </property> </widget> </item> </layout> </item> <item> <widget class="QLabel" name="status"> <property name="styleSheet"> <string notr="true">font-weight: bold</string> </property> <property name="text"> <string>[[ Information ]]</string> </property> </widget> </item> <item> <spacer name="verticalSpacer"> <property name="orientation"> <enum>Qt::Vertical</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>20</width> <height>40</height> </size> </property> </spacer> </item> <item> <widget class="QDialogButtonBox" name="buttonBox"> <property name="orientation"> <enum>Qt::Horizontal</enum> </property> <property name="standardButtons"> <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> </property> </widget> </item> </layout> </widget> <resources> <include location="../../ldforge.qrc"/> </resources> <connections/> </ui>