| 111 | } |
| 112 | |
| 113 | Matrix* Workbook::currentMatrix() const { |
| 114 | #ifndef SDK |
| 115 | if (!m_view) |
| 116 | return nullptr; |
| 117 | |
| 118 | int index = reinterpret_cast<const WorkbookView*>(m_view)->currentIndex(); |
| 119 | if (index != -1) { |
| 120 | auto* aspect = child<AbstractAspect>(index); |
| 121 | return dynamic_cast<Matrix*>(aspect); |
| 122 | } |
| 123 | #endif |
| 124 | return nullptr; |
| 125 | } |
| 126 | |
| 127 | /*! |
| 128 | this slot is called when a workbook child is selected in the project explorer. |