7#include "GuiListParameter.h"
8#include "GuiComboBoxParameter.h"
9#include "GuiCubeParameter.h"
10#include "GuiFilenameParameter.h"
11#include "GuiStringParameter.h"
12#include "GuiIntegerParameter.h"
13#include "GuiDoubleParameter.h"
14#include "GuiBooleanParameter.h"
15#include "GuiParameterFactory.h"
16#include "UserInterface.h"
17#include "Application.h"
20 GuiParameter *GuiParameterFactory::Create(QGridLayout *grid,
22 int group,
int param) {
23 QString paramType = ui.ParamType(group, param);
25 GuiParameter *p = NULL;
26 if(ui.ParamListSize(group, param) > 0) {
27 if (paramType ==
"combo") {
28 p =
new GuiComboBoxParameter(grid, ui, group, param);
30 p =
new GuiListParameter(grid, ui, group, param);
33 else if(paramType ==
"cube") {
34 p =
new GuiCubeParameter(grid, ui, group, param);
36 else if(paramType ==
"filename") {
37 p =
new GuiFileNameParameter(grid, ui, group, param);
39 else if(paramType ==
"string") {
40 p =
new GuiStringParameter(grid, ui, group, param);
42 else if(paramType ==
"integer") {
43 p =
new GuiIntegerParameter(grid, ui, group, param);
45 else if(paramType ==
"double") {
46 p =
new GuiDoubleParameter(grid, ui, group, param);
48 else if(paramType ==
"boolean") {
49 p =
new GuiBooleanParameter(grid, ui, group, param);
52 QString msg =
"Invalid parameter type in XML [" + paramType +
"]";
@ Programmer
This error is for when a programmer made an API call that was illegal.
Command Line and Xml loader, validation, and access.
This is free and unencumbered software released into the public domain.