test... · web viewnew test procedure create a new class with new test name. modify the name...

14
New test procedure 1. Create a new class with new test name. Modify the name putting “Source\” before testName.cpp and “Header\” before the .h file name.

Upload: leanh

Post on 30-Mar-2018

218 views

Category:

Documents


2 download

TRANSCRIPT

New test procedure1. Create a new class with new test name. Modify the name putting “Source\” before testName.cpp and

“Header\” before the .h file name.

2. Verify that the new file are called in the .pro project file.

3. Open the project folder and duplicate form Image directory the exempleTest folder.

4. Rename the new folder with the name of your class.

Operation on findialog.h

5. Call the new .h file in findialog.h. ( insert #include “newtest.h” )

6. Declare the new class

7. Declare in the dialog class a new obj variable of newTest type.

8. Declare a new private slot, that we call when we press the start button of the test.

9. Declare a new private function to generate the option page of the new test.

10. Declare a new widget to set the option. The widget need to have at lest the two obj:

a. Start button

b. Stop button

11. Declare any other option obj and in case the boxs that contain them.

Operation on finddialog.cpp

12. In findialog function make following changes:

a. Call the function to create the option page of the new test

b. Add the possibility to select the new test in the left side list

c. Add the new page to GUI ( right side of the GUI )

13. Define the function that initialize the page and that manage the test option ( copy the reference test

ones and modify as following ):

a. Find and replace “exempleTest” with the new test name

b. Verify thet the slot name is the same as that created at point 8.

14. Define the slot called by mouse click. (copy the reference test ones and modify as following ):

a. Find and replace “exempleTest” with the new test name. pay attention where you initialize and

recall the test; here also the first word need to be uppercase ).

15. In activateButton function enable start button

16. In stop Button function disable start button

Operation on .h class file:

17. Select the body of .h reference test and copy it

18. Select the new file .h body and paste the reference body code.

19. In the first two row and in the final line substitute the exemple test name with new test name with al

the letter upper case.

20. Find and replace “ExempleTest” with new class name.

Operation on class .cpp file

21. Select the reference .cpp body file

22. Open the new .cpp file, select all and past the previous copied code.

23. Find and repalce EmepleTest word with new class file name

Verify the project

24. Build and run the project.