core: make context and widget IContext data members

This commit is contained in:
hjk
2011-04-13 13:00:30 +02:00
parent cbfaea1ed3
commit 70d392d235
55 changed files with 135 additions and 490 deletions

View File

@@ -73,11 +73,13 @@ QString ResourceEditorFile::mimeType() const
ResourceEditorW::ResourceEditorW(const Core::Context &context,
ResourceEditorPlugin *plugin,
QWidget *parent)
: m_context(context),
m_resourceEditor(new SharedTools::QrcEditor(parent)),
: m_resourceEditor(new SharedTools::QrcEditor(parent)),
m_resourceFile(new ResourceEditorFile(this)),
m_plugin(plugin)
{
setContext(context);
setWidget(m_resourceEditor);
m_resourceEditor->setResourceDragEnabled(true);
connect(m_resourceEditor, SIGNAL(dirtyChanged(bool)), this, SLOT(dirtyChanged(bool)));
@@ -242,11 +244,6 @@ void ResourceEditorW::dirtyChanged(bool dirty)
emit changed();
}
QWidget *ResourceEditorW::widget()
{
return m_resourceEditor; /* we know it's a subclass of QWidget...*/
}
void ResourceEditorW::onUndoStackChanged(bool canUndo, bool canRedo)
{
m_plugin->onUndoStackChanged(this, canUndo, canRedo);