Open the PODO project (including PODOGUI, ALTutorial, sub-projects)
Check for correct build settings
Create a sub-project (Qt console application
Copy the Basic Files folder from src/ALPrograms/ALTutorial into the sub-project folder
Navigate to the main.cpp
Open the ALTutorial project and copy the code in main.cpp into the sub-projects main.cpp to utilize as a template
Rebuild your sub-project
Add to Git version control
Change AL Name to unique name
In main.cpp, declare
enum{
enum = [enum_identifier];
};
In PODOGUI subproject, add new > Qt > Designer Form Class
Select Dialog with Buttons
Name everything the same as the AL to make your life simpler when debugging
In the projectdialog.h, include CommonHeader.h
Under private:
int [int_identifier];
In Dialog.cpp include PODOALDialog.h
Declare the same enum in the dialog.cpp
Set the dialog function
[enum_identifier] = PODODialog::GetALNumFromFileName("ALName")
In dialog.ui, make a button
In the QDialog menu, change the object name
Right click the button and go to Slot, and select clicked() event
In dialog.cpp, in button function clicked() add
USER_COMMAND cmd;
cmd.COMMAND_DATA_USER_COMMAND = [enum_identifier];
cmd.COMMAND_TARGET = [int_identifier];
pLan->SendCommand(cmd);
In PODOGUI sub-project, under GUIMainWindow.h and include dialog.h
Under the User Dialog section, make a pointer to the dialog class
In GUIMainWindow.cpp, under the section under
Expandable Dialogs add
ui->MAIN_TAB->addTab((QWidget*))dialogpointer, "tab name");
In the Ubuntu Software Center, download and install the SQL Database browser
Open it up and stuff and go to AL table > New Record
Add [ALName], FileName, and set the Pathname (similar to the ones before it)
In General Table, increment PODO AL amount by 1
Write Changes