Add custom_control and custom_page_control variables to override the Qt widgets used by qtconsole #2007

Merged
merged 2 commits into from Jun 25, 2012

Conversation

Projects
None yet
4 participants
@ccordoba12
Contributor

ccordoba12 commented Jun 22, 2012

  • This will let other project to easily provide its own widgets
  • Try to fix #1920
Add custom_control and custom_page_control variables to override the …
…Qt widgets used by qtconsole

- This will let other project to easily provide its own widgets
- Try to fix #1920
@ccordoba12

This comment has been minimized.

Show comment
Hide comment
@ccordoba12

ccordoba12 Jun 22, 2012

Contributor

@fperez, I tried this approach in conjunction with Spyder and it works great, letting us easily use our subclass of QTextEdit.

Contributor

ccordoba12 commented Jun 22, 2012

@fperez, I tried this approach in conjunction with Spyder and it works great, letting us easily use our subclass of QTextEdit.

@fperez

This comment has been minimized.

Show comment
Hide comment
@fperez

fperez Jun 22, 2012

Member

Great, thanks for the report. @jdmarch, @epatters, since Enthought is likely the largest consumer of the Qt code, I'd like to make sure it doesn't cause any headaches for your gang before proceeding further...

Member

fperez commented Jun 22, 2012

Great, thanks for the report. @jdmarch, @epatters, since Enthought is likely the largest consumer of the Qt code, I'd like to make sure it doesn't cause any headaches for your gang before proceeding further...

@@ -989,7 +996,9 @@ def _create_control(self):
""" Creates and connects the underlying text widget.
"""
# Create the underlying control.
- if self.kind == 'plain':
+ if self.custom_control:
+ control = self.custom_control

This comment has been minimized.

@minrk

minrk Jun 23, 2012

Member

Shouldn't this be a callable? control = self.custom_control()

@minrk

minrk Jun 23, 2012

Member

Shouldn't this be a callable? control = self.custom_control()

This comment has been minimized.

@ccordoba12

ccordoba12 Jun 24, 2012

Contributor

I was planning to use it as: self.custom_control = SpyderControlWidget() but I think you're right. It would better match how you create control in the next line. I'm going to change it.

@ccordoba12

ccordoba12 Jun 24, 2012

Contributor

I was planning to use it as: self.custom_control = SpyderControlWidget() but I think you're right. It would better match how you create control in the next line. I'm going to change it.

@jdmarch

This comment has been minimized.

Show comment
Hide comment
@jdmarch

jdmarch Jun 24, 2012

Contributor

Looks fine to me. Handing it on to bleeding edgers for a look as well.

Contributor

jdmarch commented Jun 24, 2012

Looks fine to me. Handing it on to bleeding edgers for a look as well.

Call custom control variables when creating the widgets
- This better matches how they are normally created
@minrk

This comment has been minimized.

Show comment
Hide comment
@minrk

minrk Jun 24, 2012

Member

This looks fine to me now, so when we get one more OK from @jdmarch's beeding edgers, it's ready to go.

Member

minrk commented Jun 24, 2012

This looks fine to me now, so when we get one more OK from @jdmarch's beeding edgers, it's ready to go.

@fperez

This comment has been minimized.

Show comment
Hide comment
@fperez

fperez Jun 25, 2012

Member

Targeting for 0.13 then, @jdmarch let us know how things go so we can squeeze this one in before release.

Member

fperez commented Jun 25, 2012

Targeting for 0.13 then, @jdmarch let us know how things go so we can squeeze this one in before release.

@jdmarch

This comment has been minimized.

Show comment
Hide comment
@jdmarch

jdmarch Jun 25, 2012

Contributor

Got the ok - thanks @punchagan

Contributor

jdmarch commented Jun 25, 2012

Got the ok - thanks @punchagan

@fperez

This comment has been minimized.

Show comment
Hide comment
@fperez

fperez Jun 25, 2012

Member

Great, thanks! Merging now then.

Member

fperez commented Jun 25, 2012

Great, thanks! Merging now then.

fperez added a commit that referenced this pull request Jun 25, 2012

Merge pull request #2007 from ccordoba12/i1920
Add custom_control and custom_page_control variables to override the Qt widgets used by qtconsole. This will let other project to easily provide its own widgets, the work was driven by better Spyder integration with IPython, but can benefit other tools as well.

Closes #1920.

@fperez fperez merged commit 4abd769 into ipython:master Jun 25, 2012

@ccordoba12

This comment has been minimized.

Show comment
Hide comment
@ccordoba12

ccordoba12 Jun 26, 2012

Contributor

Thanks guys for your support and to Enthought guys for giving their OK.

Contributor

ccordoba12 commented Jun 26, 2012

Thanks guys for your support and to Enthought guys for giving their OK.

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014

Merge pull request #2007 from ccordoba12/i1920
Add custom_control and custom_page_control variables to override the Qt widgets used by qtconsole. This will let other project to easily provide its own widgets, the work was driven by better Spyder integration with IPython, but can benefit other tools as well.

Closes #1920.

@spyder-bot spyder-bot referenced this pull request in spyder-ide/spyder Feb 17, 2015

Closed

Which version of ipython is needed for Spyder 2.2.0? #1229

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment