octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #44116] qt graphics toolkit not available with


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #44116] qt graphics toolkit not available with --no-gui option
Date: Sun, 05 Apr 2015 20:12:14 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0 SeaMonkey/2.15

Follow-up Comment #35, bug #44116 (project octave):

The advantage is that it is a more proper way of doing object-oriented
programming.  The overall strategy of OOP is sort of ground up, i.e., start
with smaller hunks of code and assemble the objects to create complexity. 
Passing in the start_gui variable to what is essentially supposed to be Qt
window layout means too much functionality is inside that main_window object. 
That came about because in the beginning the thought was the GUI was the main
end goal.  The building of the link is in the QMainWindow, the construction of
dialog-popups is in the QMainWindow, many things are in there that don't need
to be.

The reason the uigetfile is hanging is there is no slot connection to the
signal requesting a file-dialog be created when QMainWindow (main_window) is
not created.  The link sends out a signal and then waits for the answer.  It's
straightforward to move the pertinent code out of QMainWindow (main_window)
and associate it instead with the octave-qt-link; it's only a few lines of
code for each action.

If the Qt environment is going to be set up and working without QMainWindow
(first changeset), there's no need for widget/dialog code to be in
main-window.cc anymore (second changeset).  In fact, there is this comment in
main_window.cc I must have put in some time ago:


// Connect the signals emitted when the Octave thread wants to create
// a dialog box of some sort.  Perhaps a better place for this would be
// as part of the QUIWidgetCreator class.  However, mainWindow currently
// is not a global variable and not accessible for connecting.


Attached is a back-to-back changeset.  You will have to roll back to previous
changeset (or extract just the additional changeset from the attached file). 
There is always cleanup that can be done, but I simply connected the new slots
of QUIWidgetCreator to its own signals.  Seems odd, but that is the least
amount of code change.  Also, I'd rather leave it that way for now because I'm
anticipating someone will eventually request that the dialogs be non-modal and
it seems signals/slots is best for that.

(file #33550)
    _______________________________________________________

Additional Item Attachment:

File name: octave-qt_without_gui-djs2015apr05.patch Size:41 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44116>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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