Skip to content

Move plot code into a separate set of files #925

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

Merged
merged 1 commit into from
Jan 16, 2017
Merged

Conversation

MKleusberg
Copy link
Member

This cleans up the main window class a bit which was getting quite large
and a bit harder to maintain than necessary.

This commit also includes two minor fixes to the plot system:

  • The plot widgets are now disabled when no database file is opened.
  • The progress bar shown when fetching all data is now initialised with
    the correct row numbers.

Other than that this commit should in theory not change any
functionality.

I'm opening a PR for this, so hopefully some of you will test this before merging. In theory everything should behave just as before but I wouldn't want to count on it just yet 😃 Please let me know if you find any problems with this.

@@ -356,7 +356,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>473</width>
<width>607</width>
Copy link
Member

Choose a reason for hiding this comment

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

Don't think it's related.

@@ -866,7 +866,7 @@
</widget>
<widget class="QMenu" name="menuRemote">
<property name="title">
<string>Remote</string>
<string>Re&amp;mote</string>
Copy link
Member

Choose a reason for hiding this comment

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

Same.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, will look into those tomorrow or so! By the way, does anyone know how to prevent Qt Creator from adding keyboard shortcuts like these automatically?

@@ -1966,7 +1712,7 @@
</action>
<action name="fileExportJsonAction">
<property name="text">
<string>Table(s) to JSON...</string>
<string>Table(&amp;s) to JSON...</string>
Copy link
Member

Choose a reason for hiding this comment

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

Ditto.

@@ -1977,12 +1723,12 @@
</action>
<action name="actionOpen_Remote">
<property name="text">
<string>Open from Remote</string>
<string>&amp;Open from Remote</string>
Copy link
Member

Choose a reason for hiding this comment

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

Ditto.

</property>
</action>
<action name="actionSave_Remote">
<property name="text">
<string>Save to Remote</string>
<string>&amp;Save to Remote</string>
Copy link
Member

Choose a reason for hiding this comment

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

Ditto.

@justinclift
Copy link
Member

Not me. If we need to, we could ask on the Qt IRC channel.

This cleans up the main window class a bit which was getting quite large
and a bit harder to maintain than necessary.

This commit also includes two minor fixes to the plot system:
- The plot widgets are now disabled when no database file is opened.
- The progress bar shown when fetching all data is now initialised with
the correct row numbers.

Other than that this commit should in theory not change any
functionality.
@MKleusberg
Copy link
Member Author

Just updated the PR as requested 😃 Has anybody done some testing yet to check if it breaks some plotting functionality?

@vtronko
Copy link
Member

vtronko commented Jan 13, 2017

@MKleusberg never touched plots, sorry.

@revolter @chrisjlocke are you up for some testing?

@MKleusberg MKleusberg merged commit a6f2a7d into master Jan 16, 2017
@MKleusberg MKleusberg deleted the plotrefactoring branch January 16, 2017 11:47
@chrisjlocke
Copy link
Member

chrisjlocke commented Jan 16, 2017

Initial thoughts:

  • Widget is not disabled when a database is not open
  • When 'Browse Data' tab is clicked on, X axis gets unticked (ie, when user flips from execute SQL to Browse Data) Two 'rowid' rows momentarily exist in the grid, but this is just a quirk of the grid re-populating I think.
  • When an item in the X axis is ticked, ticking another item unticks the original item, but the item you clicked on is not ticked, so you have to click the item you want again.
  • When selecting 'row #' as the X axis, '65536' is displayed as a label, rather than 'row #'.

The above issues (apart from the widget not being disabled) are nothing much to do with this actual pull request, so can be ignored if required... ;)

@MKleusberg
Copy link
Member Author

Thanks for the tests, @chrisjlocke! :D I'll open a new issue for these problems, so they won't get lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants