| 23 | |
| 24 | |
| 25 | PluginGenerator::PluginGenerator(QWidget *parent, QString pluginDevPath, QString pluginPath, QString rootPath) : |
| 26 | QDialog(parent), |
| 27 | ui(new Ui::PluginGenerator) |
| 28 | { |
| 29 | ui->setupUi(this); |
| 30 | |
| 31 | _pluginDevPath = pluginDevPath; |
| 32 | _pluginPath = pluginPath; |
| 33 | _rootPath = rootPath; |
| 34 | |
| 35 | // only allow alphanumeric input |
| 36 | ui->inputClassName->setValidator(new QRegExpValidator(QRegExp("[A-Za-z0-9]*"))); |
| 37 | |
| 38 | // populate comboboxes |
| 39 | QStringList categoryNames; |
| 40 | categoryNames.push_back("CATEGORY_UNDEFINED"); |
| 41 | categoryNames.push_back("CATEGORY_IO"); |
| 42 | categoryNames.push_back("CATEGORY_CONVERSIONS"); |
| 43 | categoryNames.push_back("CATEGORY_ARITHMETIC"); |
| 44 | categoryNames.push_back("CATEGORY_GEOMETRY"); |
| 45 | categoryNames.push_back("CATEGORY_POINTOPERATIONS"); |
| 46 | categoryNames.push_back("CATEGORY_LOCALOPERATIONS"); |
| 47 | categoryNames.push_back("CATEGORY_MORPHOLOGY"); |
| 48 | categoryNames.push_back("CATEGORY_HISTOGRAM"); |
| 49 | categoryNames.push_back("CATEGORY_EDGES"); |
| 50 | categoryNames.push_back("CATEGORY_GRADIENTS"); |
| 51 | categoryNames.push_back("CATEGORY_FOURIER"); |
| 52 | categoryNames.push_back("CATEGORY_OBJECTS"); |
| 53 | ui->comboBoxCategory->addItems(categoryNames); |
| 54 | |
| 55 | QStringList openCVNames; |
| 56 | openCVNames.push_back("OPENCV_NONE"); |
| 57 | openCVNames.push_back("OPENCV_OPTIONAL"); |
| 58 | openCVNames.push_back("OPENCV_ONLY"); |
| 59 | ui->comboBoxOpenCV->addItems(openCVNames); |
| 60 | } |
| 61 | |
| 62 | PluginGenerator::~PluginGenerator() |
| 63 | { |