Feature Request: Add horizontal split view

A forum for research and development of the user interface of FreeCAD
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Feature Request: Add horizontal split view

Post by Joel_graff »

So I was considering implementation details for the transportation engineering module and given that roadway alignments tend to be long and horizontally aligned, it would be handy to provide two horizontal views: one for the horizontal alignment and one for the vertical alignment

h_v_align.png
h_v_align.png (56.1 KiB) Viewed 3787 times

At present, you can tile views in the Windows menu, which defaults to a side-by-side arrangement. Of course, I'd like it to be a top-bottom arrangement instead. I can do this manually, but the window dimension constraints are too large. On a 1080p display, it means they overlap. Of course, if I narrow or eliminate my Python console, I have all the space I need, but, of course, that doesn't help in development.

freecAD_SCREENSHOT.png
freecAD_SCREENSHOT.png (16.26 KiB) Viewed 3787 times

At a bare minimum, adding a top-bottom tile option to the Windows menu seems like it might be a good idea.

To achieve what I need for now, maybe I can manage it in Python?
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
User avatar
microelly2
Veteran
Posts: 4691
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Feature Request: Add horizontal split view

Post by microelly2 »

This is realy a good idea, I often need this kind of view for landscapes too.
I think, we can do some special window layout setters whcxi can be added to the freecad file
My idea is to have a "Window layout object" which can be clicked to activate,
in this category the quad view/single view macro should occur too.
User avatar
yorik
Founder
Posts: 13466
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Feature Request: Add horizontal split view

Post by yorik »

There is something I often wondered, is if Qt provides a way to arrange MDI views without their title bar, like these tiled window managers on linux... There are many apps out there that do that so it might be possible out of the box, but couldn't find anything...

In this request what would be cool would be that the Y position of the camera stays linked in the two views, so when you move the camera left/right in one of them, the other follows. That might be possible to do with pivy.
User avatar
Kunda1
Veteran
Posts: 13447
Joined: Thu Jan 05, 2017 9:03 pm

Re: Feature Request: Add horizontal split view

Post by Kunda1 »

Qt::Window | Qt::FramelessWindowHint
https://stackoverflow.com/questions/423 ... pplication
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
yorik
Founder
Posts: 13466
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Feature Request: Add horizontal split view

Post by yorik »

That's not exactly the same thing, it will just leave a QWidget without its window frame. But it would be cool to really have a tiling system, where you can move the separator between two subwindows.
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Feature Request: Add horizontal split view

Post by Joel_graff »

yorik wrote: Sat Nov 25, 2017 6:58 pm But it would be cool to really have a tiling system, where you can move the separator between two subwindows.
I had these same thoughts, but didn't want to push it too far - trying to keep the feature request in the realm of low-hanging fruit. :) A border-snapping feature, though, would be handy, as would having several common layouts pre-defined in the Windows menu - kind of like the way Eclipse and Blender have pre-defined layouts for specific types of work.
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
User avatar
yorik
Founder
Posts: 13466
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Feature Request: Add horizontal split view

Post by yorik »

Apparently this doesn't exist out of the box in qt. But maybe there is something implemented by someone else... Didn't find anything yet, though
User avatar
microelly2
Veteran
Posts: 4691
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Feature Request: Add horizontal split view

Post by microelly2 »

yorik wrote: Mon Nov 27, 2017 1:26 pm Apparently this doesn't exist out of the box in qt. But maybe there is something implemented by someone else... Didn't find anything yet, though
Learn to play with the widget geometry will be usefull.
having an on the fly configurable widget manager will also be useful for dialog management.
User avatar
Kunda1
Veteran
Posts: 13447
Joined: Thu Jan 05, 2017 9:03 pm

Re: Feature Request: Add horizontal split view

Post by Kunda1 »

Perhaps other FOSS projects have implemented something? Like Krita or QGIS ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
microelly2
Veteran
Posts: 4691
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Feature Request: Add horizontal split view

Post by microelly2 »

resizing and moving is not a big deal.
bp_638.png
bp_638.png (28.34 KiB) Viewed 3576 times
Edit: replaced code

Code: Select all



mw=FreeCADGui.getMainWindow()
mdiarea=mw.findChild(QtGui.QMdiArea)

sws=mdiarea.subWindowList()

print mdiarea.geometry()
a=mdiarea.geometry()
l=a.left()
r=a.right()
t=a.top()
b=a.bottom()
h=b-t
ls=len(sws)
hh=h//ls-ls

print "windows ..."
for i,w2 in enumerate(sws):
	print str(w2.windowTitle())
	print ("size",w2.size())
	w2.setGeometry(0,i*hh,r-l,hh)


 
Post Reply