Search found 31 matches

by cjh
Mon Oct 24, 2016 8:00 pm
Forum: QCAD Developers and Contributors
Topic: Implementing Abstract Qt Interfaces
Replies: 7
Views: 4017

Re: Implementing Abstract Qt Interfaces

Ahh I see! The generated ecma code is pretty powerful. It took me a little while to follow through the generated code but I understand it now. I'm not sure how much time I want to spend on learning all of the nuances of QtScript because its development has ceased. Do you have any plans of moving tow...
by cjh
Fri Oct 21, 2016 2:22 pm
Forum: QCAD Developers and Contributors
Topic: Implementing Abstract Qt Interfaces
Replies: 7
Views: 4017

Re: Implementing Abstract Qt Interfaces

Right - I see how the signals are working in the other adapter classes but I don't see any uses for them yet. Would you expect the BomModel.prototype.rowCount() to override the definition in AbstractTableModelAdapter? It currently isn't - I get a 10x10 table model as defined in AbstractTableModelAda...
by cjh
Thu Oct 20, 2016 9:13 pm
Forum: QCAD Developers and Contributors
Topic: Implementing Abstract Qt Interfaces
Replies: 7
Views: 4017

Re: Implementing Abstract Qt Interfaces

Here's what I've come up with. AbstractTableModelPlugin.h #ifndef ABSTRACTTABLEMODELPLUGIN_H #define ABSTRACTTABLEMODELPLUGIN_H #include <QObject> #include <QDebug> #include <QScriptEngine> #include <QAbstractTableModel> #include <string> #include "RPluginInterface.h" class AbstractTableModelAdapter...
by cjh
Wed Oct 19, 2016 8:44 pm
Forum: QCAD Developers and Contributors
Topic: Implementing Abstract Qt Interfaces
Replies: 7
Views: 4017

Implementing Abstract Qt Interfaces

I'm having trouble implementing abstract Qt interfaces in javascript files. Should I be doing this as a c++ plugin instead? With this implementation of a QAbstractTableModel I get the error: "Fatal: QAbstractTableModel::rowCount() is abstract!" when I call tableView.setModel() with the BomModel. fun...
by cjh
Fri Oct 14, 2016 7:46 pm
Forum: QCAD Developers and Contributors
Topic: Right Click Context Menu
Replies: 4
Views: 3276

Re: Right Click Context Menu

Ahhh that's why I couldn't find it!

I'll wait for the next release before working with it.

Thanks Andrew!
by cjh
Fri Oct 14, 2016 7:19 pm
Forum: QCAD Developers and Contributors
Topic: Right Click Context Menu
Replies: 4
Views: 3276

Re: Right Click Context Menu

The right-click context menu already shows different options for different entities, so that adjustment has to occur somewhere! I just can't trace it beyond when the RMainWindowQt emits contextmenu((int)entityId, pos) signal. If you right click a block, the context menu gives an Edit Block option at...
by cjh
Thu Oct 13, 2016 8:51 pm
Forum: QCAD Developers and Contributors
Topic: Right Click Context Menu
Replies: 4
Views: 3276

Right Click Context Menu

How do I add an action to the right click context menu?
If I right click a block, the "Edit Block" action is an option.
Where is that context menu defined?
I would like to add custom actions to the right click block context menu.

Connor
by cjh
Wed Sep 28, 2016 4:56 pm
Forum: QCAD 'How Do I' Questions
Topic: Enabling NTFS file support
Replies: 14
Views: 4116

Re: Enabling NTFS file support

Awesome - it'd be great to have everyone use it! The preference page was in my mind this whole time but I wasn't sure how to handle it. My first thought is adding a preference check in FileLockerPlugin.init() before registering FileLockerPlugin to the script environment. Then, when all of the FileLo...
by cjh
Tue Sep 27, 2016 9:07 pm
Forum: QCAD 'How Do I' Questions
Topic: Enabling NTFS file support
Replies: 14
Views: 4116

Re: Enabling NTFS file support

I was unable to use the available Listeners to handle file locking. I have edited the scripts as follows. The life of an existing QCAD file: 1. Open File a. results in a NewFile.createMdiChild() call b. I have added a FileLocker.lockFile() call after a successful import. This shows a dialog with loc...
by cjh
Wed Sep 21, 2016 9:12 pm
Forum: QCAD 'How Do I' Questions
Topic: Enabling NTFS file support
Replies: 14
Views: 4116

Re: Enabling NTFS file support

OK - I finally got back to working on this, had some other stuff come up! I've made a plugin that makes the interface below available to the QScriptEngine. A map of fileNames to QLockFile is maintained. #include <QObject> #include <QDebug> #include <QLockFile> class FileLocker : public QObject { Q_O...
by cjh
Tue Sep 13, 2016 3:38 pm
Forum: QCAD Developers and Contributors
Topic: Build and Compile QCAD on Windows 10 using QT-MingW
Replies: 4
Views: 3943

Re: Build and Compile QCAD on Windows 10 using QT-MingW

I had many issues with compiling qtwebkit. I found a useful tutorial by googling: "compiling qt 5.5.1 with qtwebkit". The first result (pempek.net) was very helpful. I don't think I can link to it here but I'll try: http://pempek.net/articles/2015/10/18/compiling-qt-5-5-1-with-visual-studio-2015/ . ...
by cjh
Tue Aug 23, 2016 8:22 pm
Forum: QCAD 'How Do I' Questions
Topic: Enabling NTFS file support
Replies: 14
Views: 4116

Re: Enabling NTFS file support

If I open a file using the Windows API call below, it should be opened as GENERIC_READ|GENERIC_WRITE, while allowing others to read it (FILE_SHARE_READ). HANDLE fh; fh = CreateFile(fName.toStdWString().c_str(), \ GENERIC_READ | GENERIC_WRITE, \ FILE_SHARE_READ, \ NULL, \ OPEN_EXISTING, \ FILE_ATTRIB...
by cjh
Thu Aug 18, 2016 6:26 pm
Forum: QCAD 'How Do I' Questions
Topic: Enabling NTFS file support
Replies: 14
Views: 4116

Re: Enabling NTFS file support

I still need to enforce only one user having a file editable at the same time. I'm on Windows, so I need to use the WINAPI to open a windows file handle when users open a file. Using #include <Windows.h> in a c++ file, this accomplishes registering a file as open for read/write in Windows: HANDLE fh...
by cjh
Wed Aug 17, 2016 6:15 pm
Forum: QCAD Installation and Upgrades
Topic: Pro Compiled From Source
Replies: 2
Views: 6376

Re: Pro Compiled From Source

Awesome - I had compiled QCAD 3.15.4.2 and my pro libraries are from 3.15.4.0.

Compiling QCAD 3.15.4.0 and copying the pro libraries over was successful.

Thanks Andrew!
by cjh
Tue Aug 16, 2016 9:20 pm
Forum: QCAD Installation and Upgrades
Topic: Pro Compiled From Source
Replies: 2
Views: 6376

Pro Compiled From Source

I finally got Qt 5.5.1 + Webkit + QCAD to compile from source on Windows 7 x64. That took me longer than I'm willing to admit! If anyone's curious as to my steps I'll outline them here. Is it possible to regain the file format functionality of QCAD Pro? Copying qcadproscripts.dll/qcaddwg.dll to the ...

Go to advanced search