Mercurial > fife-parpg
view doc/editor_mockups/geometry_tool.ui @ 564:7d88eddd2ec7
Modified the addColored and addOutlined methods in the InstanceRenderer class to fix a memory leak. The new code attempts to insert the information in the proper map and if it already exists it will explicitly update the reference to the existing information. The new code no longer relies on the bracket operator of the std::map which was implicitly calling the equals operator of the ColoringInfo and OutlineInfo and causing the memory leak. fixes[ticket:472]
author | vtchill@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sat, 26 Jun 2010 00:42:14 +0000 |
parents | 4a0efb7baf70 |
children |
line wrap: on
line source
<ui version="4.0" > <class>Form</class> <widget class="QWidget" name="Form" > <property name="geometry" > <rect> <x>0</x> <y>0</y> <width>853</width> <height>507</height> </rect> </property> <property name="windowTitle" > <string>Form</string> </property> <widget class="QWidget" name="horizontalLayout_7" > <property name="geometry" > <rect> <x>10</x> <y>10</y> <width>831</width> <height>484</height> </rect> </property> <layout class="QHBoxLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item> <layout class="QVBoxLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item> <layout class="QVBoxLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item> <widget class="QLabel" name="label_15" > <property name="text" > <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><span style=" font-size:14pt;">Geometry browser:</span></p></body></html></string> </property> </widget> </item> <item> <layout class="QHBoxLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item> <widget class="QLabel" name="label_19" > <property name="text" > <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><span style=" font-size:12pt;">Load geometries:</span></p></body></html></string> </property> </widget> </item> <item> <widget class="QToolButton" name="toolButton" > <property name="text" > <string>...</string> </property> </widget> </item> </layout> </item> <item> <widget class="QListWidget" name="listWidget" > <item> <property name="text" > <string>Geometry #2</string> </property> </item> <item> <property name="text" > <string>Geometry #3</string> </property> </item> <item> <property name="text" > <string>Geometry #7</string> </property> </item> <item> <property name="text" > <string>Geometry #8</string> </property> </item> </widget> </item> <item> <spacer> <property name="orientation" > <enum>Qt::Horizontal</enum> </property> <property name="sizeHint" > <size> <width>40</width> <height>20</height> </size> </property> </spacer> </item> <item> <widget class="Line" name="line" > <property name="orientation" > <enum>Qt::Horizontal</enum> </property> </widget> </item> <item> <layout class="QVBoxLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item> <widget class="QLabel" name="label_14" > <property name="text" > <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><span style=" font-size:14pt;">Required information:</span></p></body></html></string> </property> </widget> </item> <item> <layout class="QVBoxLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item> <layout class="QGridLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item row="0" column="0" > <layout class="QHBoxLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item> <widget class="QLabel" name="label_2" > <property name="text" > <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><span style=" font-size:12pt;">ID #:</span></p></body></html></string> </property> </widget> </item> <item> <widget class="QLineEdit" name="lineEdit" > <property name="text" > <string>3</string> </property> </widget> </item> </layout> </item> <item row="4" column="0" > <widget class="QRadioButton" name="radioButton_2" > <property name="text" > <string>Rectangular</string> </property> </widget> </item> <item row="3" column="0" > <widget class="QRadioButton" name="radioButton" > <property name="text" > <string>Point</string> </property> </widget> </item> <item row="2" column="0" > <widget class="QLabel" name="label" > <property name="text" > <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">Type:</span></p></body></html></string> </property> </widget> </item> </layout> </item> <item> <widget class="QLabel" name="label_3" > <property name="text" > <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">Size:</span></p></body></html></string> </property> </widget> </item> <item> <layout class="QHBoxLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item> <layout class="QHBoxLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item> <layout class="QHBoxLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item> <widget class="QLabel" name="label_4" > <property name="text" > <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">X:</span></p></body></html></string> </property> </widget> </item> <item> <widget class="QLineEdit" name="lineEdit_2" /> </item> </layout> </item> <item> <widget class="QLabel" name="label_5" > <property name="text" > <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Y:</span></p></body></html></string> </property> </widget> </item> <item> <widget class="QLineEdit" name="lineEdit_3" /> </item> </layout> </item> </layout> </item> </layout> </item> </layout> </item> </layout> </item> </layout> </item> <item> <widget class="Line" name="line_4" > <property name="orientation" > <enum>Qt::Vertical</enum> </property> </widget> </item> <item> <spacer> <property name="orientation" > <enum>Qt::Vertical</enum> </property> <property name="sizeHint" > <size> <width>20</width> <height>40</height> </size> </property> </spacer> </item> <item> <layout class="QVBoxLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item> <layout class="QVBoxLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item> <layout class="QVBoxLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item> <widget class="QLabel" name="label_18" > <property name="text" > <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><span style=" font-size:14pt;">Geometry preview window:</span></p></body></html></string> </property> </widget> </item> <item> <widget class="QGraphicsView" name="graphicsView" /> </item> </layout> </item> <item> <spacer> <property name="orientation" > <enum>Qt::Horizontal</enum> </property> <property name="sizeHint" > <size> <width>40</width> <height>20</height> </size> </property> </spacer> </item> <item> <widget class="Line" name="line_3" > <property name="orientation" > <enum>Qt::Horizontal</enum> </property> </widget> </item> <item> <widget class="QLabel" name="label_17" > <property name="text" > <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><span style=" font-size:14pt;">Geometry preview options:</span></p></body></html></string> </property> </widget> </item> <item> <layout class="QHBoxLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item> <widget class="QPushButton" name="pushButton_5" > <property name="text" > <string>Update preview window</string> </property> </widget> </item> <item> <widget class="QPushButton" name="pushButton_6" > <property name="text" > <string>Show geometry in fullscreen</string> </property> </widget> </item> </layout> </item> </layout> </item> </layout> </item> <item> <spacer> <property name="orientation" > <enum>Qt::Vertical</enum> </property> <property name="sizeHint" > <size> <width>20</width> <height>40</height> </size> </property> </spacer> </item> <item> <widget class="Line" name="line_5" > <property name="orientation" > <enum>Qt::Vertical</enum> </property> </widget> </item> <item> <layout class="QVBoxLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item> <layout class="QVBoxLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item> <layout class="QGridLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item row="0" column="0" > <layout class="QVBoxLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item> <layout class="QVBoxLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item> <widget class="QLabel" name="label_13" > <property name="text" > <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><span style=" font-size:14pt;">Optional information:</span></p></body></html></string> </property> </widget> </item> <item> <widget class="QLabel" name="label_6" > <property name="text" > <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><span style=" font-size:12pt;">Transform:</span></p></body></html></string> </property> </widget> </item> <item> <layout class="QHBoxLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item> <layout class="QHBoxLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item> <layout class="QHBoxLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item> <widget class="QLabel" name="label_7" > <property name="text" > <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">X:</span></p></body></html></string> </property> </widget> </item> <item> <widget class="QLineEdit" name="lineEdit_4" /> </item> </layout> </item> <item> <widget class="QLabel" name="label_8" > <property name="text" > <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Y:</span></p></body></html></string> </property> </widget> </item> <item> <widget class="QLineEdit" name="lineEdit_5" /> </item> </layout> </item> </layout> </item> </layout> </item> <item> <widget class="QLabel" name="label_9" > <property name="text" > <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><span style=" font-size:12pt;">Shift:</span></p></body></html></string> </property> </widget> </item> <item> <layout class="QHBoxLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item> <layout class="QHBoxLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item> <layout class="QHBoxLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item> <widget class="QLabel" name="label_10" > <property name="text" > <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">X:</span></p></body></html></string> </property> </widget> </item> <item> <widget class="QLineEdit" name="lineEdit_6" /> </item> </layout> </item> <item> <widget class="QLabel" name="label_11" > <property name="text" > <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Y:</span></p></body></html></string> </property> </widget> </item> <item> <widget class="QLineEdit" name="lineEdit_7" /> </item> </layout> </item> </layout> </item> </layout> </item> <item row="8" column="0" > <layout class="QVBoxLayout" > <property name="margin" > <number>0</number> </property> <property name="spacing" > <number>6</number> </property> <item> <spacer> <property name="orientation" > <enum>Qt::Horizontal</enum> </property> <property name="sizeHint" > <size> <width>40</width> <height>20</height> </size> </property> </spacer> </item> <item> <widget class="Line" name="line_2" > <property name="orientation" > <enum>Qt::Horizontal</enum> </property> </widget> </item> <item> <widget class="QLabel" name="label_16" > <property name="text" > <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt;">Save / apply:</span></p></body></html></string> </property> </widget> </item> <item> <widget class="QPushButton" name="pushButton_2" > <property name="text" > <string>Save selected geometries to active map</string> </property> </widget> </item> <item> <widget class="QPushButton" name="pushButton_3" > <property name="text" > <string>Create new layer with the current geometry</string> </property> </widget> </item> <item> <widget class="QPushButton" name="pushButton_4" > <property name="text" > <string>Apply current geometry to active layer</string> </property> </widget> </item> </layout> </item> </layout> </item> </layout> </item> </layout> </item> </layout> </widget> </widget> <resources/> <connections/> </ui>