-
Notifications
You must be signed in to change notification settings - Fork 34
/
HACKING
58 lines (47 loc) · 2.29 KB
/
HACKING
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
This file contains notes for developers of ktikz.
Translation:
------------
The translation specific issues are described in translations/README
Generating the documentation:
-----------------------------
For the KDE version, all you need to do is edit the doc/*.docbook files.
For the Qt-only version, the procedure is more complicated. After you have
edited the *.docbook files, you must run
./generate-qt-doc.sh
in the doc directory in order to regenerate the file doc/index.html. However,
if the documentation is edited or if some features are added, then it might be
necessary to change the "sed" lines in generate-qt-doc.sh before running this
script.
After generating the documentation, they will be compiled and installed when
you run (both for the Qt-only and the KDE version):
make
sudo make install
Generating the icons:
---------------------
The app/icons/qtikz.svg and app/icons/ktikz.svg icons are derived from the
accessories-text-editor icon in KDE's Oxygen icon set, in Inkscape the "Lorem
ipsum..." text is removed and the QtikZ/KtikZ text is added using the Prociono
font (http://www.fontsquirrel.com/fonts/Prociono). The PNG versions of these
icons in different sizes are all obtained by opening the SVG versions in the
GIMP, selecting the appropriate size when the SVG file is opened and saving
the file as PNG. The Windows qtikz.ico version is obtained by converting
qtikz.svg online at http://www.convertico.com (the free png2ico does not give
a result of similar quality). The other icons (except qt-logo-22.png which is
obtained from Qt) are obtained from KDE's Oxygen icon set.
Performance:
------------
- Use the QWidget's palette() function to obtain the current palette (which
is the default palette if the QWidget's palette has not yet been changed) or
QApplication::palette() instead of QApplication::style()->standardPalette()
which is significantly slower.
- In order to measure the execution speed, put
#include <QDebug>
#include <QTime>
and use
QTime t = QTime::currentTime();
and
qCritical() << t.msecsTo(QTime::currentTime());
to calculate the time spent between these two commands. Running
valgrind --tool=callgrind qtikz
on the command line and using kcachegrind to visualize the output generated
by valgrind also shows where time is spent during execution of the program.