TO-DO List
- Ability to select several objects. This may or may not include the ability to drag or move them. (DO NOT IMPLEMENT)
- Use QApplication::processEvents() to generate the source code.
- Do not allow user to drag from one window into another. This error creates a segmentation fault. (DONE) Solution: do not to delete the drag object.
- Warn the user if they are about to exit an unsaved session. (DONE)
- Open & Save functionality of QtNQC diagram code. Also design and implement a file format. (DONE)
- Right-clicking on the diagram should allow the user to view a listing of all items on that canvas. The panel should list the objects by name as well as their location. A "goto object" option should also be provided. Delete option also included. (DONE)
- Implement a Help section.
- Display coordinates when an object is selected. (DONE)
- Implement an undo feature.
- Functions and tasks can only be defined on the main canvas. (DONE)
- Allow user to rename functions and tasks, assign default names initially. (DONE)
- Implement the NQC API.
- Display a list of available functions and tasks. This will allow the user to select these functions when working outside the main canvas. Create a sub menu. (DONE)
- Allow user to add defined tasks and/or functions to canvases.
- Prepend an "f_" or a "t_" for functions and tasks during NQC generation.
- Allow user to rename variables. If the user renames a variable to a global variable's name, use the global variable's name. (DONE)
- Add a true/false case structure.
- Add an option to raise the main window. (DONE)
- Fix dragging & dropping after a scroll event. (DONE)
- Implement a wiring mechanism.
- Save progress to a temporary file, if possible, when exiting abnormally. Thus, set signal handlers for dangerous signals. This can already be handled by the auto-save mechanism. (DO NOT IMPLEMENT)
- Keep wires and objects together after a move.
- Prevent move/drag/add collisions. (DONE)
- Implement a "new" function. This should clear all containers. (DONE)
- Only allow user to wire an output to an input.
- Do not allow user to wire more than one object to an input.
- Implement the Delete cursor. (DONE)
- Scroll when dragging.
- Use a Constant's value as its name. (DONE)
- Verify input value for Constants. (DONE)
- Allow user to define Variables as globals. This should only be allowed in the main Editor. Global variables should be clearly marked. (DONE)
- Force all memory allocation failures to exit the program. (DONE)
- Set an atexit() function to handle abnormal exits.
- Double-clicking on an object should call its update method. (DONE)
- Allow user to save settings. Application should create a .qtnqc.conf file in their $HOME. The contents of the file should be text-based. Use the QSettings class.
- Implement the AI required to build the NQC code from the diagram.
- Correct inputs for the various loop structures. These should not be wired in values, but something the user needs to type in. These inputs will be the "conditions." (DONE)
- Add shortcut keys to file menus. (DONE)
- Provide the ability to resize the canvas of other objects. Currently, only the main canvas may be resized. (DONE)
- Implement a search utility. The search should run in the background, that is, use a separate thread.
- Create a splash panel. Not really necessary. (DO NOT IMPLEMENT)
- Allow user to display a grid on the canvas. (DO NOT IMPLEMENT)
- Make the rename_window class part of the editor class. (DONE)
- Variables defined on the main canvas will be global. Any variable having the same name as a variable on the main canvas will not be a local variable. If the user deletes or renames global variables, non-local variables having those names will become local variables.
- Look into fixing the color problems in the Tools & Functions dialogs. (DONE)
- Provide support for arrays.
- Create the if and switch statement objects.
- Create a thread which writes the contents of the current diagram to a temporary file in /tmp. The write interval should be user-defined.
- When adding a function or task from the "existing" submenu, add the object correctly, that is, this function must be implemented.
- Set a callback to the Window Close option. Use the quit(void) method. (DONE)
- Add a "Software Version" option. Use the libcurl library. (DONE)
- Save the size of the canvas to the data file. (DONE)
- Allow the user to copy & paste objects.
- Create an option that allows the user to upload the NQC program directly to the RCX brick. It should be able to display a progress bar. The location of the NQC executable should be configurable.
- Implement the break object. (DONE)
- Implement the subroutine object. (DONE)
- Implement the continue object. (DONE)
- Implement the return object. (DONE)
- Implement access controls and events.
- Implement the start and stop objects.
- Right-clicking on the canvas should not set the program in an unsaved state.
- Renaming functions, subroutines, and tasks should update the Canvas Items panel. (DONE)
- Reset the main canvas to its original size when creating a new diagram. (DONE)
- Implement "arguments" support for functions and tasks.
- Closing a loop's window should not close the window(s) of any children of that loop. This appears to be Qt's natural behaviour. (IGNORE)
- Items that should be configurable: a) Save contents every X number of seconds or minutes. b) Location of the main window. (DONE)
- Prompt the user for delete confirmation before deleting an object from the canvas. Add an "editing" tab to the program settings panel to disable to prompt. (DONE)
- Provide support for all of the robots that the NQC language supports. QtNQC will have to disable/enable certain functionality based on the robot type.
- Create a "project" panel. This panel is to be used for selecting the type of robot the project is intended for.
- Implement the paste functionality for loops.
- editor::cleanup() should delete the copied_item object and reset copied_item_type and selected_item_type. (DONE)
- Implement the paste functionality for variables.
- Investigate the cause of "warning: junk pointer, too high to make sense" after checking the version of the program. (DONE) Incorrect use of free in qtnqc_download_thread::run().