1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206
|
/*! \mainpage QScintilla - a Port to Qt v4 and Qt v5 of Scintilla
<h2>Introduction</h2>
<a href="http://www.riverbankcomputing.com/software/qscintilla/">QScintilla</a>
is a port to Qt of the <a href="http://www.scintilla.org/">Scintilla</a>
editing component.
As well as features found in standard text editing components, Scintilla
includes features especially useful when editing and debugging source code:
<ul>
<li>syntax styling with support for over 70 languages
<li>error indicators
<li>code completion
<li>call tips
<li>code folding
<li>margins can contain markers like those used in debuggers to indicate
breakpoints and the current line.
<li>recordable macros
<li>multiple views
<li>printing.
</ul>
QScintilla is a port or Scintilla to the Qt GUI toolkit from
<a href="http://www.qt.io">The Qt Company</a> and runs on any operating system
supported by Qt (eg. Windows, Linux, OS X, iOS and Android). QScintilla works
with Qt v4 and v5.
QScintilla also includes language bindings for
<a href="http://www.python.org">Python</a>. These require that
<a href="http://www.riverbankcomputing.com/software/pyqt/">PyQt</a> v4 or v5 is
also installed.
This version of QScintilla is based on Scintilla v3.5.4.
<h2>Licensing</h2>
QScintilla is available under the
<a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License v3</a>
and the Riverbank Commercial License.
The commercial license allows closed source applications using QScintilla to be
developed and distributed. At the moment the commercial version of QScintilla
is bundled with, but packaged separately from, the commercial version of
<a href="http://www.riverbankcomputing.com/software/pyqt/">PyQt</a>.
The Scintilla code within QScintilla is released under the following license:
<pre>
License for Scintilla and SciTE
Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation.
NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
OR PERFORMANCE OF THIS SOFTWARE.
</pre>
<h2>Installation</h2>
As supplied QScintilla will be built as a shared library/DLL and installed in
the same directories as the Qt libraries and include files.
If you wish to build a static version of the library then pass
<tt>CONFIG+=staticlib</tt> on the <tt>qmake</tt> command line.
If you want to make more significant changes to the configuration then edit the
file <tt>qscintilla.pro</tt> in the <tt>Qt4Qt5</tt> directory.
If you do make changes, specifically to the names of the installation
directories or the name of the library, then you may also need to update the
<tt>Qt4Qt5/features/qscintilla2.prf</tt> file.
See your <tt>qmake</tt> documentation for more details.
To build and install QScintilla, run:
<pre>
cd Qt4Qt5
qmake qscintilla.pro
make
make install
</pre>
If you have multiple versions of Qt installed then make sure you use the
correct version of <tt>qmake</tt>.
<h3>Installation on Windows</h3>
Before compiling QScintilla on Windows you should remove the <tt>Qsci</tt>
directory containing the QScintilla header files from any previous
installation. This is because the <tt>Makefile</tt> generated by
<tt>qmake</tt> will find these older header files instead of the new ones.
Depending on the compiler you are using you may need to run <tt>nmake</tt>
rather than <tt>make</tt>.
If you have built a Windows DLL then you probably also want to run:
<pre>
copy %%QTDIR%\\lib\\qscintilla2.dll %%QTDIR%\\bin
</pre>
<h3>Installation on MacOS/X</h3>
On MacOS/X you may need to pass <tt>-spec macx-g++</tt> in order to generate a
Makefile, otherwise an XCode project file may be created. In particular the
Qt Designer plugin will not load if you do not do this.
<h2>Integration with <tt>qmake</tt></h2>
To configure <tt>qmake</tt> to find your QScintilla installation, add the
following line to your application's <tt>.pro</tt> file:
<pre>
CONFIG += qscintilla2
</pre>
<h2>Example Application</h2>
The example application provided is a port of the standard Qt
<tt>application</tt> example with the QsciScintilla class being used instead of
Qt's QTextEdit class.
The example does not demonstrate all of the extra features of QScintilla.
To build the example, run:
<pre>
cd example-Qt4Qt5
qmake application.pro
make
</pre>
On Windows (and depending on the compiler you are using) you may need to run
<tt>nmake</tt> rather than <tt>make</tt>.
<h2>Python Bindings</h2>
The Python bindings are in the <tt>Python</tt> directory. You must have either
PyQt v4 or v5 already installed. QScintilla must also already be built and
installed.
The configure, build and install the bindings for PyQt v4, run:
<pre>
python configure.py
make
make install
</pre>
On Windows (and depending on the compiler you are using) you may need to run
<tt>nmake</tt> rather than <tt>make</tt>.
If you want to build the bindings for PyQt v5 then pass <tt>--pyqt=PyQt5</tt>
as an argument to <tt>configure.py</tt>.
<tt>configure.py</tt> supports a number of other arguments. Pass <tt>-h</tt>
to display a list of the supported arguments.
<tt>configure.py</tt> was re-written for QScintilla v2.7.1 to make use of new
features of PyQt v4.10. The old version is still provided as
<tt>configure-old.py</tt>. The new <tt>configure.py</tt> will automatically
invoke <tt>configure-old.py</tt> if it detects a version of PyQt earlier than
v4.10. You may of course explicitly run <tt>configure-old.py</tt>.
<h2>Qt Designer Plugin</h2>
QScintilla includes an optional plugin for Qt Designer that allows QScintilla
instances to be included in GUI designs just like any other Qt widget.
To build the plugin on all platforms, make sure QScintilla is installed and
then run (as root or administrator):
<pre>
cd designer-Qt4Qt5
qmake designer.pro
make
make install
</pre>
On Windows (and depending on the compiler you are using) you may need to run
<tt>nmake</tt> rather than <tt>make</tt>.
*/
|