Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxGUI: refactoring: build GUI tools' status bars based on wx.StatusBar widget #1689

Conversation

lindakarlovska
Copy link
Contributor

@lindakarlovska lindakarlovska commented Jun 29, 2021

This PR builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame.
Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.

@lindakarlovska
Copy link
Contributor Author

@petrasovaa I have moved some methods to MapFrameBase, so we can expect a small conflict with #1704. After merging #1704, I am gonna look at this PR again and test it.

@lindakarlovska
Copy link
Contributor Author

lindakarlovska commented Jul 7, 2021

  • We could also make CreateStatusbar and IsPaneShown methods part of the MapFrameBase. What do you think? sbManager could be also initialized in the Base class. But I am not sure if we can assume that any Map Display will always have Statusbar. But probably yes because there is already "statusbarManager" used in some MapFrameBase methods. However, there is also the thing that CreateStatusbar methods are the same for swipe, mapdisplay, iclass but there is a small difference for GCP regarding statusbarItems. (But we could override this method in GCP class, it should not be a problem).

  • Or we do not have to put any methods aside, I do not have any strong opinion about it.

@lindakarlovska lindakarlovska marked this pull request as ready for review July 7, 2021 13:56
@petrasovaa
Copy link
Contributor

  • We could also make CreateStatusbar and IsPaneShown methods part of the MapFrameBase. What do you think? sbManager could be also initialized in the Base class. But I am not sure if we can assume that any Map Display will always have Statusbar. But probably yes because there is already "statusbarManager" used in some MapFrameBase methods. However, there is also the thing that CreateStatusbar methods are the same for swipe, mapdisplay, iclass but there is a small difference for GCP regarding statusbarItems. (But we could override this method in GCP class, it should not be a problem).
  • Or we do not have to put any methods aside, I do not have any strong opinion about it.

I think it makes sense to assume all derived classes have statusbar, so I think creating status bar could be moved. Initializing it with items sounds more like individual derived classes should do I think.

@lindakarlovska lindakarlovska marked this pull request as draft July 7, 2021 14:04
@lindakarlovska lindakarlovska force-pushed the wxGUI-refactoring-build-map-swipe-status-bar-based-on-wxStatusBar-widget branch from 3d84d76 to 23c5659 Compare July 7, 2021 14:33
@lindakarlovska lindakarlovska marked this pull request as ready for review July 7, 2021 16:36
@@ -267,72 +253,76 @@ def OnAutoRenderChanged(self, value):
style ^= wx.SP_LIVE_UPDATE
self.splitter.SetWindowStyle(style)

def AddToolbars(self):
def AddToolbar(self, name):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why not keep AddToolbars as it was. The ifs there don't make much sense, also passing the toolbar names in constructor is not particularly useful unless you create different mapswipe tools with different toolbars.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I just wanted to unify names and functionality since I call AddToolbar in ShowAllToolbars method in the base class.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is true that we do not need ShowAllToolbars method for Map Swipe but everything which in the base class could be generally usable in all childs. So, if we let AddToolbars the ShowAllToolbars method will need to override.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, that makes sense, so feel free to put it back. Perhaps the names of toolbars don't need to be in the constructor since they are fixed anyway,

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also for that case when AddToolbar would be used more times (while adding/removing), then you need to adjust the code to not create a new toolbar every time.

@petrasovaa
Copy link
Contributor

The same probably needs to be done for image2target/ii2t_mapdisplay.py, photo2image/ip2i_mapdisplay.py.

@lindakarlovska lindakarlovska marked this pull request as draft July 8, 2021 08:39
@lindakarlovska lindakarlovska marked this pull request as ready for review July 8, 2021 08:39
@lindakarlovska lindakarlovska marked this pull request as draft July 8, 2021 17:25
@lindakarlovska lindakarlovska marked this pull request as ready for review July 8, 2021 17:25
@lindakarlovska lindakarlovska marked this pull request as draft July 9, 2021 20:58
@lindakarlovska lindakarlovska marked this pull request as ready for review July 9, 2021 20:58
Copy link
Contributor

@petrasovaa petrasovaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good. I still want to test it little bit more though. Not sure about merging it now, it shouldn't go into release.

Copy link
Contributor

@petrasovaa petrasovaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check the order of toolbars. I just tested mapswipe and the order is different than it used to be.

@lindakarlovska
Copy link
Contributor Author

Please check the order of toolbars. I just tested mapswipe and the order is different than it used to be.

Should be okay now.

@petrasovaa petrasovaa merged commit 5f65aaa into OSGeo:master Jul 29, 2021
a0x8o added a commit to a0x8o/grass that referenced this pull request Jul 29, 2021
…r widget (OSGeo#1689)

Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame.
Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
lindakarlovska pushed a commit to lindakarlovska/grass that referenced this pull request Jul 29, 2021
lindakarlovska pushed a commit to lindakarlovska/grass that referenced this pull request Aug 3, 2021
lindakarlovska pushed a commit to lindakarlovska/grass that referenced this pull request Aug 28, 2021
lindakarlovska pushed a commit to lindakarlovska/grass that referenced this pull request Dec 8, 2021
@neteler neteler added this to the 8.0.0 milestone Dec 9, 2021
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Oct 26, 2022
…r widget (OSGeo#1689)

Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame.
Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Feb 17, 2023
…r widget (OSGeo#1689)

Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame.
Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
a0x8o added a commit to a0x8o/grass that referenced this pull request May 9, 2024
…r widget (OSGeo#1689)

Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame.
Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
a0x8o added a commit to a0x8o/grass that referenced this pull request May 21, 2024
…r widget (OSGeo#1689)

Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame.
Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jun 3, 2024
…r widget (OSGeo#1689)

Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame.
Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jun 17, 2024
…r widget (OSGeo#1689)

Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame.
Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jun 17, 2024
…r widget (OSGeo#1689)

Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame.
Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jun 27, 2024
…r widget (OSGeo#1689)

Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame.
Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jul 2, 2024
…r widget (OSGeo#1689)

Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame.
Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jul 10, 2024
…r widget (OSGeo#1689)

Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame.
Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jul 23, 2024
…r widget (OSGeo#1689)

Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame.
Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jul 23, 2024
…r widget (OSGeo#1689)

Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame.
Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
a0x8o added a commit to a0x8o/grass that referenced this pull request Jul 31, 2024
…r widget (OSGeo#1689)

Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame.
Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
a0x8o added a commit to a0x8o/grass that referenced this pull request Aug 13, 2024
…r widget (OSGeo#1689)

Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame.
Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
a0x8o added a commit to a0x8o/grass that referenced this pull request Aug 23, 2024
…r widget (OSGeo#1689)

Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame.
Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
a0x8o added a commit to a0x8o/grass that referenced this pull request Sep 5, 2024
…r widget (OSGeo#1689)

Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame.
Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
a0x8o added a commit to a0x8o/grass that referenced this pull request Sep 5, 2024
…r widget (OSGeo#1689)

Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame.
Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
a0x8o added a commit to a0x8o/grass that referenced this pull request Sep 5, 2024
…r widget (OSGeo#1689)

Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame.
Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
a0x8o added a commit to a0x8o/grass that referenced this pull request Sep 5, 2024
…r widget (OSGeo#1689)

Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame.
Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
a0x8o added a commit to a0x8o/grass that referenced this pull request Oct 16, 2024
…r widget (OSGeo#1689)

Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame.
Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
a0x8o added a commit to a0x8o/grass that referenced this pull request Oct 18, 2024
…r widget (OSGeo#1689)

Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame.
Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
a0x8o added a commit to a0x8o/grass that referenced this pull request Oct 21, 2024
…r widget (OSGeo#1689)

Builds status bars based on wx.StatusBar for SwipeMapFrame, IClassMapFrame, Image2Target Frame, Photo2Image Frame, and GCP manager MapFrame.
Some general methods related to a status bar and toolbars moved to gui_core class MapFrameBase.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gsoc Reserved for Google Summer of Code student(s) GUI wxGUI related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants