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

Printable schema #760

Open
3 of 13 tasks
chrisjlocke opened this issue Sep 1, 2016 · 17 comments
Open
3 of 13 tasks

Printable schema #760

chrisjlocke opened this issue Sep 1, 2016 · 17 comments
Assignees
Labels
diagrams enhancement Feature requests.

Comments

@chrisjlocke
Copy link
Member

chrisjlocke commented Sep 1, 2016

Details for the issue

I know the 'Database Structure' shows the database schema, and I print this out a lot when working on various databases. I work in Windows, so its easy to do a printscreen, slap it in Word or something, and print it out. However, one of the systems I'm working on is 17 tables, with one of these having 17 fields. Nothing 'major', but it means printing it from the 'Database Structure' is a pain. I use PicPick to help print scrollable windows, but it struggles on Qt widgets, so can't be used with DB4S.

In desperation, I knocked something up in VB.

image 3

This pulls in the database schema and creates a form of treeview controls. Its still manual, as I have to 'screenshot' it still, but PicPick is able to scroll it for me and capture it as one image. It also fills the page left to right, rather than the 'Database Structure' view, which for me, is just one long column - not efficient with paper usage.

Requirements for this for other users might be low, so just 'throwing it out there' to see what others think, but a schema view thats printable could be quite useful.

Useful extra information

I'm opening this issue because:

  • DB4S is crashing
  • DB4S has a bug
  • DB4S needs a feature
  • DB4S has another problem

I'm using DB4S on:

  • Windows
  • Linux: ( distro: ___ )
  • Mac OS
  • Other: ___

I'm using DB4S version:

  • 3.9.0
  • 3.8.0
  • Other: ___

I have also:

@justinclift
Copy link
Member

Seems like a good feature to have.

@chrisjlocke So.. this might be a good starter project for your C++/Qt learning? 😄

@chrisjlocke
Copy link
Member Author

Oh crap.... 😉

@mgrojo mgrojo added diagrams enhancement Feature requests. labels Jan 2, 2018
@sky5walk
Copy link

sky5walk commented Jan 2, 2018

Nice, that is a good start to my earlier schema diagram request.

@mgrojo mgrojo self-assigned this Sep 26, 2018
@mgrojo
Copy link
Member

mgrojo commented Sep 26, 2018

This is, more or less, one of the points that I've implemented so far for my issue #1525. The output is very simple, but it may fit your needs. @chrisjlocke, if you'd like to try, it's already in the nightly build.

@sky5walk
Copy link

I downloaded 180927 nightly and nothing happens when I click 'Database Structure - Print'?

@chrisjlocke
Copy link
Member Author

Ditto - nothing happens at all if I select 'Print' from any context menu.

@mgrojo
Copy link
Member

mgrojo commented Sep 27, 2018

Weird... Maybe we are affected by this Qt bug But it should be fixed in QT 5.2.1, if I understand it correctly.

@sky5walk
Copy link

Ok, can you bypass the print step and just export the canvas to an image and display it within the DB4S gui?

mgrojo added a commit that referenced this issue Sep 27, 2018
This adds a print preview step before printing in the Database Structure
tab.

This is nice to have, but it also aims to work around the problem found in
Windows, reported at issue #760.
@mgrojo
Copy link
Member

mgrojo commented Sep 27, 2018

Let's try with a Print Preview Dialog instead of a Print Dialog. Maybe it works around the problem and nevertheless, it's nice to have it. I've changed only the Database Structure tab for the moment. Could you test it again with tomorrow's nightly build?

@mgrojo
Copy link
Member

mgrojo commented Sep 29, 2018

I've reproduced the problem under Windows. At least the print preview version works until you press the Print icon; then only the PDF export is possible, the print dialog for choosing printers, PDF format and print settings doesn't show up.

It seems that Qt has portability problems in this regard. I'll use the print preview in all the scenarios and at least we'll have PDF support.

@mgrojo
Copy link
Member

mgrojo commented Sep 29, 2018

Reading the linked bug report:

yes, I followed the Deployment Guide for Windows and putted the platform and printsupport folder into the folder of my executable file as well as the Qt5*.dll's

I see that we distribute a Qt5PrintSupport.dll file, but no printsupport folder. Reading Qt for Windows - Deployment

Your application may also depend on one or more Qt plugins, such as the print support plugin, the JPEG image format plugin or a SQL driver plugin. Be sure to distribute any Qt plugins that you need with your application. Similar to the platform plugin, each type of plugin must be located within a specific subdirectory (such as printsupport, imageformats or sqldrivers) within your distribution directory.

@justinclift, can the printsupport plugin be distributed inside the nightly build? I guess that will solve the problem. This is similar to the image-formats case that you already solved, isn't it?

@karim
Copy link
Member

karim commented Sep 29, 2018

@mgrojo There's only one dll (windowsprintersupport.dll) inside printsupport folder. Do you mean adding this file?

@mgrojo
Copy link
Member

mgrojo commented Sep 29, 2018

@karim I suppose we have to add the complete folder with whatever it contains. If there's only that file inside, I guess that is the only one needed.

karim added a commit that referenced this issue Sep 29, 2018
@karim
Copy link
Member

karim commented Sep 29, 2018

Yes, there is only one file in my Qt 5.7.1 installation. I just added it.

@mgrojo
Copy link
Member

mgrojo commented Sep 29, 2018

Great. That should work. Let's see with tomorrow's nightly build.

@sky5walk
Copy link

sky5walk commented Oct 6, 2018

Tried latest nightly and the print action only creates a tabular listing of my database?
Was the graphical schema deployed or still in development?

@mgrojo
Copy link
Member

mgrojo commented Oct 6, 2018

No, sorry @sky5walk. I consider that another feature that it's covered in #913 and #1260. Through this development line I only plan to add icons to fields and maybe to tables, views, etc. This is just a print-out of the DB Structure view.

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

No branches or pull requests

5 participants