'Shortcut: Ctrl+Alt+Shift+M
First call: maximize current dockwidget
Second call (or restore=True): restore original window layout'

@Slot()
@Slot(bool)
def maximize_dockwidget(self, restore=False):

    if (self.state_before_maximizing is None):
        if restore:
            return
        self.state_before_maximizing = self.saveState()
        focus_widget = QApplication.focusWidget()
        for plugin in self.widgetlist:
            plugin.dockwidget.hide()
            if plugin.isAncestorOf(focus_widget):
                self.last_plugin = plugin
        self.last_plugin.dockwidget.toggleViewAction().setDisabled(True)
        self.setCentralWidget(self.last_plugin)
        self.last_plugin.ismaximized = True
        self.last_plugin.show()
        self.last_plugin.visibility_changed(True)
        if (self.last_plugin is self.editor):
            self.addDockWidget(Qt.RightDockWidgetArea, self.outlineexplorer.dockwidget)
            self.outlineexplorer.dockwidget.show()
    else:
        self.last_plugin.dockwidget.setWidget(self.last_plugin)
        self.last_plugin.dockwidget.toggleViewAction().setEnabled(True)
        self.setCentralWidget(None)
        self.last_plugin.ismaximized = False
        self.restoreState(self.state_before_maximizing)
        self.state_before_maximizing = None
        self.last_plugin.get_focus_widget().setFocus()
    self.__update_maximize_action()
