Menu

#50 BIG GUI update [r881]

Unstable_(example)
open
None
5
2017-06-15
2017-06-11
No

Multi-editors GUI

The user has now the ability to open multiple programs at the same time and to switch between them without saving and loading whenever he does so.

This is the central part of this update.


Graphics output window look

Add Clear Button to clear the content of the window after the program is stopped.
Thinner edges for window
ToolBar looks more like a tool bar now

Now:

Before:


Text output window look

Add Clear Button to clear the content of the window after the program is stopped, just like graph window
Thinner edges, better look

Now:

Before:


Fix Copy Image

Copy Image Button from Graphics window -> copy real displayed image, not internal one (under working layer)


Fix print image from graphics window

The PRINT button from graphics window prints the wrong picture before (not the displayed image, but internal one)


Fix crash when user stops program

Keep pressing F5 and click STOP to quickly RUN/STOP/RUN/STOP... After several times it will crash)
Now is fixed.

loop:
graphsize 600+rand*2-1,600+rand*2-1
goto loop

Icons without blur

Blurred icons in menu before

Better icons now

Blurred icons in Tool Bars before

Better icons now


add/change some icons


Graphic window with toolbar - scroll without toolbar

Before:

When user use the vertical or horizontal scoll bars, then the tool bal is scrolled too

After:

Tool bar stay on place


Add versionInfo for windows (support for multiple languages)


App Icon in windows up to 256x256 (clear the icon cash first or rename the exe to see the icon)

Also, the older icon was in fact a wrong image. :)


Non blocking check for update at start


Add Window menu


Fix some bugs when graph window is resized


FIX Graph window focus

Fix stealing focus by scrool bars for graphics window
Fix the impossibility to set focus to graphics window after loosing it

Run this program dock and undock graph window. Press a key. Even if user will click on graph window, the focus is lost.

loop:
print rand
gosub wait
goto loop

wait:
if key=0 then pause 0.1:goto wait
return

Add Save All/Close all


Move SYSTEM back to interpreter to avoid freezing GUI.

The procedure is safe for a QThread. Otherwise the GUI will cause interface to freeze and user will not be able to press STOP button.

QProcess provides a set of functions which allow it to be used without an event loop, by suspending the calling thread until certain signals are emitted:
waitForStarted() blocks until the process has started.
waitForFinished() blocks until the process has finished.
Calling these functions from the main thread (the thread that calls QApplication::exec()) may cause your user interface to freeze.


Highlight colors for current line:

  • keep yellow color for edit mode
  • red for read only mode (user know it is forbidden to change someting)
  • green for all debug mode

Prevent user to select another line in debug mode and by this to highlight another line to look just like the current debug line.
Highlight full line in debug mode, not only the first row of multiple row line


Update (enable/disable) Clear All Break Points action according to the existence of break points


Find button in Documentation window is a toggle button to show/hide find bar.


Allow to compile under linux even with older version of Qt.


Draw graph grid over the image to help user to design

If program uses a CLG color, the grid become useless for user (is drawed in background)

Before:

After (better):


Fix POLY and STAMP memory leak

Related

Commit: [r881]

Discussion

  • Jim Reneau

    Jim Reneau - 2017-06-12

    My old laptop went "Barf" and I am setting up a new Windows 10 environment. Will give this code a good hard look in the next couple of days.

    Also will figure out the compiling instructions for the RasberryPi 3 (Just bought one and IT IS COOL!!)

    Once we debug this and document the new sound stuff (at doc.basic256.org), are we ready for 3.0 and a new binary release? What do you think?

     
    • Florin Oprea

      Florin Oprea - 2017-06-12

      Hi Jim,

      It is a good idea to launch a new binary release.
      About RasberryPi 3... It would be great if BASIC256 could run on it!
      The price is so good... this can allow poor countries to use BASIC256 as
      educational tool in schools.
      I will buy such device soon. :))

      Let me know what you can do in the meantime with RasberryPi 3.

       

      Last edit: Florin Oprea 2017-06-13
      • Jim Reneau

        Jim Reneau - 2017-06-13

        I have it running on the PI 3 (with audio issues). See the COMPILING.txt
        file with the libraries that need included.

        Am having issued with the windows compile. When I open up preferences, I
        get a SEG fault. Looking at the backtrace, I see the thread start and call
        stack, but not where it originated or where the issue is. It is giving me
        a fault in the QT5.9 opengl stuff. Downloading 5.8 to see if that makes a
        difference. Will try to get a solution.

        Jim

        On Mon, Jun 12, 2017 at 1:24 PM, Florin Oprea junior-root@users.sf.net
        wrote:

        Hi Jim,

        It is a good idea to launch a new binary release.
        About RasberryPi 3... It would be great if BASIC256 could run on it!
        The price is so good... this can allow poor countries to use BASIC256 as
        educational tool in schools.
        I will buy such device soon. :))

        Let me know what you can do in the meantime with RasberryPi 3.

        2017-06-12 5:35 GMT+03:00 Jim Reneau renejm@users.sf.net:

        My old laptop went "Barf" and I am setting up a new Windows 10
        environment. Will give this code a good hard look in the next couple of
        days.

        Also will figure out the compiling instructions for the RasberryPi 3 (Just
        bought one and IT IS COOL!!)

        Once we debug this and document the new sound stuff (at doc.basic256.org),
        are we ready for 3.0 and a new binary release? What do you think?


        Status: open
        Group: Unstable_(example)
        Created: Sun Jun 11, 2017 07:40 PM UTC by Florin Oprea
        Last Updated: Sun Jun 11, 2017 07:40 PM UTC
        Owner: Florin Oprea
        Multi-editors GUI

        The user has now the ability to open multiple programs at the same time
        and to switch between them without saving and loading whenever he does so.

        This is the central part of this update.

        Graphics output window look

        Add Clear Button to clear the content of the window after the program is
        stopped.
        Thinner edges for window
        ToolBar looks more like a tool bar now
        Now:

        Before:

        Text output window look

        Add Clear Button to clear the content of the window after the program is
        stopped, just like graph window
        Thinner edges, better look
        Now:

        Before:

        Fix Copy Image

        Copy Image Button from Graphics window -> copy real displayed image, not
        internal one (under working layer)


        Fix print image from graphics window

        The PRINT button from graphics window prints the wrong picture before (not
        the displayed image, but internal one)


        Fix crash when user stops program

        Keep pressing F5 and click STOP to quickly RUN/STOP/RUN/STOP... After
        several times it will crash)
        Now is fixed.

        loop:graphsize 600+rand2-1,600+rand2-1goto loop

        Icons without blur Blurred icons in menu before

        Better icons now

        Blurred icons in Tool Bars before

        Better icons now

        add/change some icons

        Graphic window with toolbar - scroll without toolbar Before:

        When user use the vertical or horizontal scoll bars, then the tool bal is
        scrolled too
        After:
        Tool bar stay on place

        Add versionInfo for windows (support for multiple languages)

        App Icon in windows up to 256x256 (clear the icon cash first or rename the
        exe to see the icon)

        Also, the older icon was in fact a wrong image. :)

        Non blocking check for update at start Add Window menu Fix some bugs when
        graph window is resized

        FIX Graph window focus

        Fix stealing focus by scrool bars for graphics window
        Fix the impossibility to set focus to graphics window after loosing it

        Run this program dock and undock graph window. Press a key. Even if user
        will click on graph window, the focus is lost.

        loop:print randgosub waitgoto loop
        wait:if key=0 then pause 0.1:goto waitreturn


        Add Save All/Close all

        Move SYSTEM back to interpreter to avoid freezing GUI.

        The procedure is safe for a QThread. Otherwise the GUI will cause
        interface to freeze and user will not be able to press STOP button.

        QProcess provides a set of functions which allow it to be used without an
        event loop, by suspending the calling thread until certain signals are
        emitted:
        waitForStarted() blocks until the process has started.
        waitForFinished() blocks until the process has finished.
        Calling these functions from the main thread (the thread that calls
        QApplication::exec()) may cause your user interface to freeze.


        Highlight colors for current line:

        • keep yellow color for edit mode
        • red for read only mode (user know it is forbidden to change someting)
        • green for all debug mode

        Prevent user to select another line in debug mode and by this to highlight
        another line to look just like the current debug line.
        Highlight full line in debug mode, not only the first row of multiple row
        line


        Update (enable/disable) Clear All Break Points action according to the
        existence of break points


        Find button in Documentation window is a toggle button to show/hide find
        bar.


        Allow to compile under linux even with older version of Qt.

        Draw graph grid over the image to help user to design

        If program uses a CLG color, the grid become useless for user (is drawed
        in background)
        Before:

        After (better):

        Fix POLY and STAMP memory leak

        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/kidbasic/patches/50/

        To unsubscribe from further messages, please visit
        https://sourceforge.net/auth/subscriptions/


        Status: open
        Group: Unstable_(example)
        Created: Sun Jun 11, 2017 07:40 PM UTC by Florin Oprea
        Last Updated: Mon Jun 12, 2017 02:35 AM UTC
        Owner: Florin Oprea
        Multi-editors GUI

        The user has now the ability to open multiple programs at the same time
        and to switch between them without saving and loading whenever he does so.

        This is the central part of this update.


        Graphics output window look

        Add Clear Button to clear the content of the window after the program is
        stopped.
        Thinner edges for window
        ToolBar looks more like a tool bar now
        Now:

        Before:


        Text output window look

        Add Clear Button to clear the content of the window after the program is
        stopped, just like graph window
        Thinner edges, better look
        Now:

        Before:


        Fix Copy Image

        Copy Image Button from Graphics window -> copy real displayed image, not
        internal one (under working layer)


        Fix print image from graphics window

        The PRINT button from graphics window prints the wrong picture before (not
        the displayed image, but internal one)


        Fix crash when user stops program

        Keep pressing F5 and click STOP to quickly RUN/STOP/RUN/STOP... After
        several times it will crash)
        Now is fixed.

        loop:graphsize 600+rand2-1,600+rand2-1goto loop


        Icons without blur Blurred icons in menu before

        Better icons now

        Blurred icons in Tool Bars before

        Better icons now


        add/change some icons

        Graphic window with toolbar - scroll without toolbar Before:

        When user use the vertical or horizontal scoll bars, then the tool bal is
        scrolled too
        After:

        Tool bar stay on place

        Add versionInfo for windows (support for multiple languages)


        App Icon in windows up to 256x256 (clear the icon cash first or rename the
        exe to see the icon)

        Also, the older icon was in fact a wrong image. :)


        Non blocking check for update at start

        Add Window menu

        Fix some bugs when graph window is resized

        FIX Graph window focus

        Fix stealing focus by scrool bars for graphics window
        Fix the impossibility to set focus to graphics window after loosing it

        Run this program dock and undock graph window. Press a key. Even if user
        will click on graph window, the focus is lost.

        loop:print randgosub waitgoto loop
        wait:if key=0 then pause 0.1:goto waitreturn


        Add Save All/Close all

        Move SYSTEM back to interpreter to avoid freezing GUI.

        The procedure is safe for a QThread. Otherwise the GUI will cause
        interface to freeze and user will not be able to press STOP button.

        QProcess provides a set of functions which allow it to be used without an
        event loop, by suspending the calling thread until certain signals are
        emitted:
        waitForStarted() blocks until the process has started.
        waitForFinished() blocks until the process has finished.
        Calling these functions from the main thread (the thread that calls
        QApplication::exec()) may cause your user interface to freeze.


        Highlight colors for current line:

        • keep yellow color for edit mode
        • red for read only mode (user know it is forbidden to change someting)
        • green for all debug mode

        Prevent user to select another line in debug mode and by this to highlight
        another line to look just like the current debug line.
        Highlight full line in debug mode, not only the first row of multiple row
        line


        Update (enable/disable) Clear All Break Points action according to the
        existence of break points


        Find button in Documentation window is a toggle button to show/hide find
        bar.


        Allow to compile under linux even with older version of Qt.

        Draw graph grid over the image to help user to design

        If program uses a CLG color, the grid become useless for user (is drawed
        in background)
        Before:

        After (better):


        Fix POLY and STAMP memory leak

        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/kidbasic/patches/50/

        To unsubscribe from further messages, please visit
        https://sourceforge.net/auth/subscriptions/

         
  • Jim Reneau

    Jim Reneau - 2017-06-13

    Florian,

    Tried w QT5.8 and 5.9 on Windows 10 x64. When I start the program and open "Preferences" I get a SEG fault.

    I have looked at this dump and for the life of me can't quite figure out what is happening. I did find a reference to a potentialy missing "app" loop, but the main() starts the app correctly. Have you experienced this?

    Jim

    Program received signal SIGSEGV, Segmentation fault.
    0x091f9d05 in QOpenGLContext::surface (this=0x26085608) at kernel\qopenglcontext.cpp:1031
    1031 kernel\qopenglcontext.cpp: No such file or directory.
    (gdb) bt
    0 0x091f9d05 in QOpenGLContext::surface (this=0x26085608) at kernel\qopenglcontext.cpp:1031
    1 0x091cffbb in QWindow::event (this=0x28d63898, ev=0x1b4a184) at kernel\qwindow.cpp:2153
    2 0x1913ebac in QWidgetWindow::event (this=0x28d63898, event=0x1b4a184) at kernel\qwidgetwindow.cpp:334
    3 0x190ef9b2 in QApplicationPrivate::notify_helper (this=0x2227ab28, receiver=0x28d63898, e=0x1b4a184)
    at kernel\qapplication.cpp:3745
    4 0x190ecf9f in QApplication::notify (this=0x1b4fd70, receiver=0x28d63898, e=0x1b4a184)
    at kernel\qapplication.cpp:3105
    5 0x0203d719 in QCoreApplication::notifyInternal2 (receiver=0x28d63898, event=0x1b4a184)
    at kernel\qcoreapplication.cpp:988
    6 0x094c67b9 in QCoreApplication::sendEvent (receiver=0x28d63898, event=0x1b4a184)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
    7 0x091cf791 in QWindow::destroy (this=0x28d63898) at kernel\qwindow.cpp:1703
    8 0x19115e91 in QWidgetPrivate::deleteTLSysExtra (this=0x28d636c0) at kernel\qwidget.cpp:1908
    9 0x1912e1c7 in QWidget::destroy (this=0x28d63630, destroyWindow=true, destroySubWindows=true)
    at kernel\qwidget.cpp:12338
    10 0x19115624 in QWidget::~QWidget (this=0x28d63630, in_chrg=<optimized out="">) at kernel\qwidget.cpp:1699

    11 0x1945660b in QRollEffect::~QRollEffect (this=0x28d63630, in_chrg=<optimized out="">) at widgets\qeffects.cpp:340

    12 0x194565a3 in QRollEffect::~QRollEffect (this=0x28d63630, in_chrg=<optimized out="">) at widgets\qeffects.cpp:340

    13 0x02068134 in qDeleteInEventHandler (o=0x28d63630) at kernel\qobject.cpp:4552

    14 0x02060c15 in QObject::event (this=0x28d63630, e=0x28d63378) at kernel\qobject.cpp:1254

    15 0x1912868c in QWidget::event (this=0x28d63630, event=0x28d63378) at kernel\qwidget.cpp:9220

    16 0x190ef9b2 in QApplicationPrivate::notify_helper (this=0x2227ab28, receiver=0x28d63630, e=0x28d63378)

    at kernel\qapplication.cpp:3745
    

    17 0x190ef7f0 in QApplication::notify (this=0x1b4fd70, receiver=0x28d63630, e=0x28d63378)

    at kernel\qapplication.cpp:3708
    

    18 0x0203d719 in QCoreApplication::notifyInternal2 (receiver=0x28d63630, event=0x28d63378)

    at kernel\qcoreapplication.cpp:988
    

    19 0x02149163 in QCoreApplication::sendEvent (receiver=0x28d63630, event=0x28d63378)

    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
    

    ---Type <return> to continue, or q <return> to quit---

    20 0x0203e97d in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=52, data=0x2227ac30)

    at kernel\qcoreapplication.cpp:1648
    

    21 0x0203e43c in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=52) at kernel\qcoreapplication.cpp:1502

    22 0x01efb8c8 in QThreadPrivate::finish (arg=0x28d2f410, lockAnyway=false) at thread\qthread_win.cpp:395

    23 0x01efbe90 in QThread::wait (this=0x28d2f410, time=4294967295) at thread\qthread_win.cpp:624

    24 0x01ef9d39 in QThreadPoolPrivate::reset (this=0x28d2f140) at thread\qthreadpool.cpp:274

    25 0x01efa61a in QThreadPool::waitForDone (

    this=0x6805fe3c <(anonymous namespace)::Q_QGS_theHostInfoLookupManager::innerFunction()::holder+60>, msecs=-1)
    at thread\qthreadpool.cpp:625
    

    26 0x67ef3494 in QHostInfoLookupManager::clear (this=

    0x6805fe00 <(anonymous namespace)::Q_QGS_theHostInfoLookupManager::innerFunction()::holder>)
    at kernel\qhostinfo.cpp:582
    

    27 0x67ef3354 in QHostInfoLookupManager::~QHostInfoLookupManager (

    this=0x6805fe00 <(anonymous namespace)::Q_QGS_theHostInfoLookupManager::innerFunction()::holder>,
    in_chrg=<optimized out>) at kernel\qhostinfo.cpp:567
    

    28 0x67ef2673 in (anonymous namespace)::Q_QGS_theHostInfoLookupManager::Holder::~Holder (

    this=0x6805fe00 <(anonymous namespace)::Q_QGS_theHostInfoLookupManager::innerFunction()::holder>,
    in_chrg=<optimized out>) at kernel\qhostinfo.cpp:62
    

    29 0x67ef2690 in tcf_0 () at kernel\qhostinfo.cpp:62

    30 0x67e811b4 in _CRT_INIT@12 () from C:\Qt\5.8\mingw53_32\bin\Qt5Networkd.dll

    31 0x67e81325 in DllMainCRTStartup () from C:\Qt\5.8\mingw53_32\bin\Qt5Networkd.dll

    32 0x67e81433 in DllMainCRTStartup@12 () from C:\Qt\5.8\mingw53_32\bin\Qt5Networkd.dll

    33 0x776d1d26 in ntdll!RtlUshortByteSwap () from C:\WINDOWS\SYSTEM32\ntdll.dll

    34 0x67e80000 in ?? ()

    35 0x7769f28f in ntdll!RtlDeactivateActivationContextUnsafeFast () from C:\WINDOWS\SYSTEM32\ntdll.dll

    36 0x77697df3 in ntdll!LdrShutdownProcess () from C:\WINDOWS\SYSTEM32\ntdll.dll

    37 0x00000000 in ?? ()

    (gdb)

     
  • Florin Oprea

    Florin Oprea - 2017-06-13

    I will try to reproduce this.
    My current OS is Win7.
    I come back with details.

     
  • Florin Oprea

    Florin Oprea - 2017-06-15

    Hi Jim,

    I just install a fresh copy of Qt 5.9 on WIn10 x64.
    I managed to complile without problems.
    I even try to run with multiple monitors.

    Question: do you have a copy of "espeak-data" folder in release/debug directories?

     
    • Jim Reneau

      Jim Reneau - 2017-06-15

      You are right. Once I copied the missing folder it started working. Will
      get working on the sound and wav test suite.

      Jim

      On Thu, Jun 15, 2017 at 8:54 AM, Florin Oprea junior-root@users.sf.net
      wrote:

      Hi Jim,

      I just install a fresh copy of Qt 5.9 on WIn10 x64.
      I managed to complile without problems.
      I even try to run with multiple monitors.

      Question: do you have a copy of "espeak-data" folder in release/debug
      directories?


      Status: open
      Group: Unstable_(example)
      Created: Sun Jun 11, 2017 07:40 PM UTC by Florin Oprea
      Last Updated: Tue Jun 13, 2017 03:19 PM UTC
      Owner: Florin Oprea
      Multi-editors GUI

      The user has now the ability to open multiple programs at the same time
      and to switch between them without saving and loading whenever he does so.

      This is the central part of this update.


      Graphics output window look

      Add Clear Button to clear the content of the window after the program is
      stopped.
      Thinner edges for window
      ToolBar looks more like a tool bar now
      Now:

      Before:


      Text output window look

      Add Clear Button to clear the content of the window after the program is
      stopped, just like graph window
      Thinner edges, better look
      Now:

      Before:


      Fix Copy Image

      Copy Image Button from Graphics window -> copy real displayed image, not
      internal one (under working layer)


      Fix print image from graphics window

      The PRINT button from graphics window prints the wrong picture before (not
      the displayed image, but internal one)


      Fix crash when user stops program

      Keep pressing F5 and click STOP to quickly RUN/STOP/RUN/STOP... After
      several times it will crash)
      Now is fixed.

      loop:graphsize 600+rand2-1,600+rand2-1goto loop


      Icons without blur Blurred icons in menu before

      Better icons now

      Blurred icons in Tool Bars before

      Better icons now


      add/change some icons

      Graphic window with toolbar - scroll without toolbar Before:

      When user use the vertical or horizontal scoll bars, then the tool bal is
      scrolled too
      After:

      Tool bar stay on place

      Add versionInfo for windows (support for multiple languages)


      App Icon in windows up to 256x256 (clear the icon cash first or rename the
      exe to see the icon)

      Also, the older icon was in fact a wrong image. :)


      Non blocking check for update at start

      Add Window menu

      Fix some bugs when graph window is resized

      FIX Graph window focus

      Fix stealing focus by scrool bars for graphics window
      Fix the impossibility to set focus to graphics window after loosing it

      Run this program dock and undock graph window. Press a key. Even if user
      will click on graph window, the focus is lost.

      loop:print randgosub waitgoto loop
      wait:if key=0 then pause 0.1:goto waitreturn


      Add Save All/Close all

      Move SYSTEM back to interpreter to avoid freezing GUI.

      The procedure is safe for a QThread. Otherwise the GUI will cause
      interface to freeze and user will not be able to press STOP button.

      QProcess provides a set of functions which allow it to be used without an
      event loop, by suspending the calling thread until certain signals are
      emitted:
      waitForStarted() blocks until the process has started.
      waitForFinished() blocks until the process has finished.
      Calling these functions from the main thread (the thread that calls
      QApplication::exec()) may cause your user interface to freeze.


      Highlight colors for current line:

      • keep yellow color for edit mode
      • red for read only mode (user know it is forbidden to change someting)
      • green for all debug mode

      Prevent user to select another line in debug mode and by this to highlight
      another line to look just like the current debug line.
      Highlight full line in debug mode, not only the first row of multiple row
      line


      Update (enable/disable) Clear All Break Points action according to the
      existence of break points


      Find button in Documentation window is a toggle button to show/hide find
      bar.


      Allow to compile under linux even with older version of Qt.

      Draw graph grid over the image to help user to design

      If program uses a CLG color, the grid become useless for user (is drawed
      in background)
      Before:

      After (better):


      Fix POLY and STAMP memory leak

      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/kidbasic/patches/50/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.