QGCoder / qgcoder

An interactive G-code editing GUI.
GNU General Public License v2.0
19 stars 4 forks source link

Add setting dialog, menu items and manage large files #14

Closed ArcEye closed 8 years ago

ArcEye commented 8 years ago

settings_dlg gathers paths for rs274, tooltable and temporary gcode file. If any of these are not set, pops up at launch and sets them in variables within the class.

File Open and File Save As added

Large file management by setting limits to initial amount of a file read into QGCodeEditor widget, with further blocks read in if cursor position nears the end of the current amount in the editor.

This reduces the time to load a 10,000 line file, from 30 seconds just for the editor to +/- 5secs for both editor and GLViewer combined

This is an interim measure. Full solution will be via changes to editor itself to do this irrespective of the input source.

Signed-off-by: Mick arceye@mgware.co.uk

ArcEye commented 8 years ago

This is just so you can have a play with the large file open stuff etc. A lot will come out when I have fixed up QGCodeEditor to do it for us

koppi commented 8 years ago

Quick review: I want to make GCoder work on Mac and perhaps Windows, too.

Please use QStandardPaths::HomeLocation instead of getpwuid() , see http://doc.qt.io/qt-5/qstandardpaths.html and replace code and the C headers:

struct passwd *pw = getpwuid(getuid());
const char *homedir = pw->pw_dir;
ArcEye commented 8 years ago

I have not updated this, so you need to revert or wait for the updated code.

Still finishing GUI stuff and testing

koppi commented 8 years ago

Ok, I'll wait then.

ArcEye commented 8 years ago

Should not be too long, those segfault errors took forever and I had to just walk away and come back fresh.