Design mode/Qt Designer clean-up, part III: Resources.

Move resource code to new ResourceHandler class and
instantiate it on the form window.
This commit is contained in:
Friedemann Kleint
2010-03-09 17:01:34 +01:00
parent 8aae812558
commit c7e3e6adf3
14 changed files with 287 additions and 154 deletions

View File

@@ -93,12 +93,15 @@ int FormEditorStack::indexOf(const Core::IEditor *xmlEditor) const
return -1;
}
FormWindowEditor *FormEditorStack::activeFormWindow() const
EditorData FormEditorStack::activeEditor() const
{
if (QDesignerFormWindowInterface *afw = m_designerCore->formWindowManager()->activeFormWindow())
if (FormWindowEditor *fwe = formWindowEditorForFormWindow(afw))
return fwe;
return 0;
// Should actually be in sync with current index.
if (QDesignerFormWindowInterface *afw = m_designerCore->formWindowManager()->activeFormWindow()) {
const int index = indexOf(afw);
if (index >= 0)
return m_formEditors.at(index);
}
return EditorData();
}
Designer::FormWindowEditor *FormEditorStack::formWindowEditorForFormWindow(const QDesignerFormWindowInterface *fw) const