demux: avi: check chunk size
[vlc.git] / modules / gui / qt / HACKING
bloba2652958652be35297f13635a64948f5c9ba5653
1 Small Hacking file for the Qt Interface
3 If you ever code for Qt interface, please read this before.
5 ** Code Conventions **
7 Please respect VLC code conventions here:
8  - NO trailing spaces
9  - NO tab
10  - Indentation is 4 spaces
11  - Braces ARE indented
12  - Space before and after operators
13  - Case labels are on the same column as the switch
15 Refer to http://wiki.videolan.org/Code_Conventions it should be up to date
17 ** Include order **
19 - VLC include/*.h includes
20 - Other VLC .h includes (gruiking :D)
21 - Qt module includes
22 - Qt includes
24 ** Naming **
25 This naming is stupid and inconsistent :D
27 Try to prefix with psz_, i_, b_, ui_ for the normal basic C/C++ styles.
29 If you have spare time, prefix QString with qs_.
31 Use aPointerName over a_pointer_name for long names.
33 ** QVLCFrame vs QVLCDialog **
35 A QVLCFrame is just a QWidget, without any parent and used as a Qt::Windows
36 A QVLCDialog is a QDialog.
38 This mean that the QVLCDialog is centered on the parent and ABOVE it, will be destroyed by the parent automatically.
39 This also mean that you have to destroy the QVLCFrame and to save its position/size.
41 So if your dialog is a dialog you are used to keep during a playing of a video, then use a QVLCFrame, else use a QVLCDialog, if this is something you do over anything else.
43 QVLCFrame: extended panel, messages...
44 QVLCDialog: preferences, open...
46 ** virtual vs Q_DECL_OVERRIDE **
47 Only mark functions with the virtual keyword if this is the initial virtual
48 declaration. Functions that override a virtual function should have the
49 Q_DECL_OVERRIDE macro appended (which expands to the override identifier
50 when compiled with Qt5 and C++11). This is a visual indicator to distinguish
51 virtual declarations from overriding implementations and will include a
52 compile-time check in C++11 language mode.
54 ** HIG for Qt **
55 We tend to use GNOME/KDE specs over Vista ones for capitalizations:
56 We use Header for:
57  - Menu
58  - Menu items
59  - GroupBox Titles
60  - Windows and dialog Titles
61 We use Sentence for:
62  - CheckBoxes
63  - ComboBox list
64  - ComboBox labels
65  - Tooltips
67 We use "..." after a menu item if it opens another dialog.