#include "PrlItemInit.h" #include "PrimListItem.h" #include "STControlEngine.h" #include #include #include #include #include #include #include #include #include PrlItemInit::PrlItemInit( STControlEngine &in_engine, QWidget* parent, const char* , bool, Qt::WFlags fl ) : QDialog(parent,fl), m_engine(in_engine) { setupUi(this); QObject::connect(OKButt, SIGNAL(clicked()), this, SLOT(accept())); QObject::connect(CancButt, SIGNAL(clicked()), this, SLOT(reject())); // load primlist item types PrimListItem tmpIt(PrimListItem::DEF_SCAN, 999, "blah"); for(int type=0; type<(int)PrimListItem::MAX_PRL_TYPES; type++) prliType->insertItem(tmpIt.getTypeLabel((PrimListItem::PrimListTypes) type).c_str()); // load default scans PixScan *ps = new PixScan(PixScan::DIGITAL_TEST); for(std::map< std::string, int>::iterator itd = ps->getScanTypes().begin(); itd!=ps->getScanTypes().end(); itd++){ prliCustType->insertItem(("DEFAULT: "+itd->first).c_str()); } delete ps; // load the custom scan config items for(std::vector::const_iterator it = m_engine.getPixScanCfg().begin(); it != m_engine.getPixScanCfg().end(); it++) { std::string inq_name = TLogFile::GetNameFromPath(m_engine.getPixScanCfgDBName(*it).c_str()); prliCustType->insertItem(("USERDEF "+inq_name).c_str()); } setType(0); connect(prliType,SIGNAL(highlighted(int)), this, SLOT(setType(int))); } void PrlItemInit::setType(int type) { if(type==PrimListItem::CUST_SCAN){ prliCustType->show(); custLabel->show(); } else{ prliCustType->hide(); custLabel->hide(); } }