SOURCE EDITOR
Header Editor
Demos
ProjectViewer
Source Editor
Menubar
Components
Attributes
Projects
Signals & Slots
Menubar Editor
Previous QtEZ Next


You can get to the source editor a number of ways.
1) From the menubar click windows | source editor.
2) Double click on the component you wish to work with in the source editor.
3) Press alt+s on the current working component (signified by 8 black squares around it's border).
4) Right click on the component you wish to work on, and select source editor.

Source Editor Screen Shot
The source editor should be very easy to navigate. On the left is a combo box full of available components (the current one showing) the second is full of members for the current active component. The right combobox also has a "key character" it displays in the left most position in the member definition. The signifigance is:

If a '-' shows then that means the prototype is for that of a signal, upon selection it will take you to the display described in Signals & Slots.

If a '*' is shows it means it is a regular member that can has source code behind it (ie upon selection it's contents will be displayed in the editor below the combo box)

If a '+' means that it means it is a normal member that is defined elsewhere. Thus the function is read only (this can be changed by going to file | member | modify member, and unchecking the defined else where box. If nothing shows it is a normal function with no source behind it, and will most likely not be in the final source that is dumped.

If a '^' appears there, then it means the item is READONLY and there is no way for you to edit that object (by editing source, deletion, or modification) But this doesn't mean an object is readonly, you can still edit the other members, as well as adding new ones.

Function Modifier Screen Shot Members can be easily added, modified, or deleted by selecting the apropriate option under file | members on in the menubar of the source editor. The dialog offers you a text box to type in the definition of the new member, then to select the protection mode the function will be declared, then if it's a virtual member, and finally it allows you to have members (for example signals) that are declared or defined elsewhere. A member that is defined elsewhere will be readonly though, it is just there so that QtEZ will realize it exists. There are two special kinds of members they are "constructor" and "destructor" if you give either of these as your function name (with any arguments that you wish) and give it's mode as public, you can then type in a base initilizer so it can call back to whatever inherits it, you can call a base initilizer init by doing such qtez will figure out what to call it based on what this widget inherits. (If you are very new to Qt then you can find out what your component inherits by looking at it's title in the left combobox, for example a pushbutton may look like "QPushButton *p"). A reminder: variables are just members as well they just have no source contents of course, so to add a class-wide variable just add it like any other member.

You will also find the classwide header on this dialog. In there you can define, include, or declare any globals settings you want for just this class this could be done in the globals editor but may be more satisfactory to put it into the class itself if you only need it in one place.

There is an additional feature to the source editor, when you run your program it will test for errors/warnings during compilation. If something occurs then The Source Editor will change, to accomodate a new list at the bottom of the dialog, in it is a list of messages the compiler gave you, simply click on any of the items in the list, and it will take you to the object, member, and line that the error occured on, if the compiler gave it such info for the message.