Mercurial > hg > svgui
comparison widgets/SubdividingMenu.cpp @ 587:4806715f7a19
Seems to be a bad idea to use plain DEBUG symbol on OS/X (system wants it)
author | Chris Cannam |
---|---|
date | Tue, 14 Jun 2011 15:27:05 +0100 |
parents | f4960f8ce798 |
children | 1a0dfcbffaf1 |
comparison
equal
deleted
inserted
replaced
586:1ae54a29e59e | 587:4806715f7a19 |
---|---|
65 | 65 |
66 for (set<QString>::const_iterator j = entries.begin(); | 66 for (set<QString>::const_iterator j = entries.begin(); |
67 j != entries.end(); | 67 j != entries.end(); |
68 ++j) { | 68 ++j) { |
69 | 69 |
70 // DEBUG << "SubdividingMenu::setEntries: j -> " << j->toStdString() << endl; | 70 // SVDEBUG << "SubdividingMenu::setEntries: j -> " << j->toStdString() << endl; |
71 | 71 |
72 m_nameToChunkMenuMap[*j] = chunkMenu; | 72 m_nameToChunkMenuMap[*j] = chunkMenu; |
73 | 73 |
74 set<QString>::iterator k = j; | 74 set<QString>::iterator k = j; |
75 ++k; | 75 ++k; |
174 m_pendingEntries[name] = action; | 174 m_pendingEntries[name] = action; |
175 return; | 175 return; |
176 } | 176 } |
177 | 177 |
178 if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) { | 178 if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) { |
179 // DEBUG << "SubdividingMenu::addAction(" << name << "): not found in name-to-chunk map, adding to main menu" << endl; | 179 // SVDEBUG << "SubdividingMenu::addAction(" << name << "): not found in name-to-chunk map, adding to main menu" << endl; |
180 QMenu::addAction(action); | 180 QMenu::addAction(action); |
181 return; | 181 return; |
182 } | 182 } |
183 | 183 |
184 // DEBUG << "SubdividingMenu::addAction(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl; | 184 // SVDEBUG << "SubdividingMenu::addAction(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl; |
185 m_nameToChunkMenuMap[name]->addAction(action); | 185 m_nameToChunkMenuMap[name]->addAction(action); |
186 } | 186 } |
187 | 187 |
188 QAction * | 188 QAction * |
189 SubdividingMenu::addAction(const QString &name) | 189 SubdividingMenu::addAction(const QString &name) |
193 m_pendingEntries[name] = action; | 193 m_pendingEntries[name] = action; |
194 return action; | 194 return action; |
195 } | 195 } |
196 | 196 |
197 if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) { | 197 if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) { |
198 // DEBUG << "SubdividingMenu::addAction(" << name << "): not found in name-to-chunk map, adding to main menu" << endl; | 198 // SVDEBUG << "SubdividingMenu::addAction(" << name << "): not found in name-to-chunk map, adding to main menu" << endl; |
199 return QMenu::addAction(name); | 199 return QMenu::addAction(name); |
200 } | 200 } |
201 | 201 |
202 // DEBUG << "SubdividingMenu::addAction(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl; | 202 // SVDEBUG << "SubdividingMenu::addAction(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl; |
203 return m_nameToChunkMenuMap[name]->addAction(name); | 203 return m_nameToChunkMenuMap[name]->addAction(name); |
204 } | 204 } |
205 | 205 |
206 void | 206 void |
207 SubdividingMenu::addAction(const QString &name, QAction *action) | 207 SubdividingMenu::addAction(const QString &name, QAction *action) |
210 m_pendingEntries[name] = action; | 210 m_pendingEntries[name] = action; |
211 return; | 211 return; |
212 } | 212 } |
213 | 213 |
214 if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) { | 214 if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) { |
215 // DEBUG << "SubdividingMenu::addAction(" << name << "): not found in name-to-chunk map, adding to main menu" << endl; | 215 // SVDEBUG << "SubdividingMenu::addAction(" << name << "): not found in name-to-chunk map, adding to main menu" << endl; |
216 QMenu::addAction(action); | 216 QMenu::addAction(action); |
217 return; | 217 return; |
218 } | 218 } |
219 | 219 |
220 // DEBUG << "SubdividingMenu::addAction(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl; | 220 // SVDEBUG << "SubdividingMenu::addAction(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl; |
221 m_nameToChunkMenuMap[name]->addAction(action); | 221 m_nameToChunkMenuMap[name]->addAction(action); |
222 } | 222 } |
223 | 223 |
224 void | 224 void |
225 SubdividingMenu::addMenu(QMenu *menu) | 225 SubdividingMenu::addMenu(QMenu *menu) |
230 m_pendingEntries[name] = menu; | 230 m_pendingEntries[name] = menu; |
231 return; | 231 return; |
232 } | 232 } |
233 | 233 |
234 if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) { | 234 if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) { |
235 // DEBUG << "SubdividingMenu::addMenu(" << name << "): not found in name-to-chunk map, adding to main menu" << endl; | 235 // SVDEBUG << "SubdividingMenu::addMenu(" << name << "): not found in name-to-chunk map, adding to main menu" << endl; |
236 QMenu::addMenu(menu); | 236 QMenu::addMenu(menu); |
237 return; | 237 return; |
238 } | 238 } |
239 | 239 |
240 // DEBUG << "SubdividingMenu::addMenu(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl; | 240 // SVDEBUG << "SubdividingMenu::addMenu(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl; |
241 m_nameToChunkMenuMap[name]->addMenu(menu); | 241 m_nameToChunkMenuMap[name]->addMenu(menu); |
242 } | 242 } |
243 | 243 |
244 QMenu * | 244 QMenu * |
245 SubdividingMenu::addMenu(const QString &name) | 245 SubdividingMenu::addMenu(const QString &name) |
250 m_pendingEntries[name] = menu; | 250 m_pendingEntries[name] = menu; |
251 return menu; | 251 return menu; |
252 } | 252 } |
253 | 253 |
254 if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) { | 254 if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) { |
255 // DEBUG << "SubdividingMenu::addMenu(" << name << "): not found in name-to-chunk map, adding to main menu" << endl; | 255 // SVDEBUG << "SubdividingMenu::addMenu(" << name << "): not found in name-to-chunk map, adding to main menu" << endl; |
256 return QMenu::addMenu(name); | 256 return QMenu::addMenu(name); |
257 } | 257 } |
258 | 258 |
259 // DEBUG << "SubdividingMenu::addMenu(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl; | 259 // SVDEBUG << "SubdividingMenu::addMenu(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl; |
260 return m_nameToChunkMenuMap[name]->addMenu(name); | 260 return m_nameToChunkMenuMap[name]->addMenu(name); |
261 } | 261 } |
262 | 262 |
263 void | 263 void |
264 SubdividingMenu::addMenu(const QString &name, QMenu *menu) | 264 SubdividingMenu::addMenu(const QString &name, QMenu *menu) |
267 m_pendingEntries[name] = menu; | 267 m_pendingEntries[name] = menu; |
268 return; | 268 return; |
269 } | 269 } |
270 | 270 |
271 if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) { | 271 if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) { |
272 // DEBUG << "SubdividingMenu::addMenu(" << name << "): not found in name-to-chunk map, adding to main menu" << endl; | 272 // SVDEBUG << "SubdividingMenu::addMenu(" << name << "): not found in name-to-chunk map, adding to main menu" << endl; |
273 QMenu::addMenu(menu); | 273 QMenu::addMenu(menu); |
274 return; | 274 return; |
275 } | 275 } |
276 | 276 |
277 // DEBUG << "SubdividingMenu::addMenu(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl; | 277 // SVDEBUG << "SubdividingMenu::addMenu(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl; |
278 m_nameToChunkMenuMap[name]->addMenu(menu); | 278 m_nameToChunkMenuMap[name]->addMenu(menu); |
279 } | 279 } |
280 | 280 |