octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GUI, Windows terminal and QMdiArea tabbed widget


From: Michael Goffioul
Subject: GUI, Windows terminal and QMdiArea tabbed widget
Date: Tue, 15 Nov 2011 17:45:39 +0000

Hi Jacob (and others),

I've finally completed a first prototype of a windows terminal and
integrated it into octave-gui. The terminal is a rewrite from scratch,
based on the Console2 idea [1]. It's not fully functional yet, but I
found an issue with the way tabbed widgets are handled in QMdiArea:
whenever a tab is hidden, the contained widget is resized (I think it
switches between maximized and non maximized dimension). This is a
problem for the way the terminal widget is implemented in Windows [2]

This problem plus the fact that I'm not convinced by the use of a
tabbed QMdiArea [3] made me look for a fully QDockWidget-based
solution. Eventually, I built a prototype that is included in
attachment. In that prototype, every single component is dockable and
can be relocated anywhere. It also shows that a widget is not resized
when the tab is hidden, which is what I need. I think this provides
maximum flexibility about the arrangement of the docked windows within
the GUI.

What do you think?

Michael.

[1]: A rewrite was eventually easier than porting Console2 code, as
it's non-Qt, and depends on various tools like boost, ATL, WTL... even
though I did an actual port, it was too unstable. Moreover I had to
rewrite my own version of ATL, as this is only available in
professional version of Visual Studio. This would have been a problem
for MinGW anyway.

[2]: There's no PTY equivalent in Win32, neither any cursor-oriented
communication channel. The windows terminal works by mirroring a
hidden command prompt window onto a Qt widget. When the Qt widget is
resized, the hidden console window is also resized. The problem of the
tab widget in QMdiArea is that the content is constantly clipped
whenever the terminal widget is hidden (switching to another tab for
instance).

[3] You can't have the editor and the terminal side-by-side

Attachment: testdock.cpp
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]