drc_hubo_creating_new_al_ap
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
drc_hubo_creating_new_al_ap [2016/11/19 14:28] – alvaropintado | drc_hubo_creating_new_al_ap [2016/11/19 14:52] (current) – alvaropintado | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== Creating a new AL for HUBO ==== | + | ====== Creating a New AL for HUBO ====== |
- | ---- | + | **Author:** Alvaro Pintado |
+ | \\ | ||
+ | **Date:** Last modified on 11/19/16 | ||
+ | \\ | ||
+ | **Keywords: | ||
+ | \\ | ||
+ | \\ | ||
Follow this lengthy set of steps in order to kind of create | Follow this lengthy set of steps in order to kind of create | ||
Line 15: | Line 22: | ||
- Add to Git version control | - Add to Git version control | ||
- Change AL Name to unique name | - Change AL Name to unique name | ||
- | - In main.cpp, declare | + | - In main.cpp, declare |
+ | enum{ | ||
+ | | ||
+ | }; </ | ||
- In PODOGUI subproject, add new > Qt > Designer Form Class | - In PODOGUI subproject, add new > Qt > Designer Form Class | ||
- Select Dialog with Buttons | - Select Dialog with Buttons | ||
- Name everything the same as the AL to make your life simpler when debugging | - Name everything the same as the AL to make your life simpler when debugging | ||
- In the projectdialog.h, | - In the projectdialog.h, | ||
- | - Declare a private int for enum commands | + | - Under private: < |
+ | | ||
- In Dialog.cpp include PODOALDialog.h | - In Dialog.cpp include PODOALDialog.h | ||
- Declare the same enum in the dialog.cpp | - Declare the same enum in the dialog.cpp | ||
- | - Set the dialog function, set the enum to = PODODialog:: | + | - Set the dialog function |
+ | [enum_identifier] | ||
- In dialog.ui, make a button | - In dialog.ui, make a button | ||
- In the QDialog menu, change the object name | - In the QDialog menu, change the object name | ||
- Right click the button and go to Slot, and select clicked() event | - Right click the button and go to Slot, and select clicked() event | ||
- | - In dialog.cpp, in button function clicked() add | + | - In dialog.cpp, in button function clicked() add < |
- | | + | USER_COMMAND cmd; |
- | | + | cmd.COMMAND_DATA_USER_COMMAND = [enum_identifier]; |
- | | + | cmd.COMMAND_TARGET = [int_identifier]; |
- | | + | pLan-> |
- In PODOGUI sub-project, | - In PODOGUI sub-project, | ||
- | - Under the //User Dialog section, make a pointer to the dialog class | + | - Under the //User Dialog section//, make a pointer to the dialog class |
- | - In GUIMainWindow.cpp, | + | - In GUIMainWindow.cpp, |
- | | + | ui-> |
- In the Ubuntu Software Center, download and install the SQL Database browser | - In the Ubuntu Software Center, download and install the SQL Database browser | ||
- Open it up and stuff and go to AL table > New Record | - Open it up and stuff and go to AL table > New Record | ||
Line 50: | Line 62: | ||
- Change to MOVE_RELATIVE | - Change to MOVE_RELATIVE | ||
- The line after is the " | - The line after is the " | ||
- | - Santiago Ricoy | + | - -//Santiago Ricoy// |
- Rebuild the project | - Rebuild the project | ||
drc_hubo_creating_new_al_ap.txt · Last modified: 2016/11/19 14:52 by alvaropintado