23 valTable->setSelectionMode(QAbstractItemView::NoSelection);
24 valTable->setEditTriggers(QAbstractItemView::AllEditTriggers);
26 QPushButton *addButton =
new QPushButton(tr(
"Add"));
27 QPushButton *remButton =
new QPushButton(tr(
"Rem"));
29 addButton->setAutoDefault(
false );
30 remButton->setAutoDefault(
false );
32 addButton->setToolTip(tr(
"Add New Row"));
33 remButton->setToolTip(tr(
"Remove Selected Row"));
35 connect(addButton, SIGNAL(clicked()),
this, SLOT(
addValSet()));
36 connect(remButton, SIGNAL(clicked()),
this, SLOT(
remValSet()));
38 QVBoxLayout *buttonsLO =
new QVBoxLayout;
39 buttonsLO->addWidget(addButton);
40 buttonsLO->addWidget(remButton);
43 buttons->setLayout(buttonsLO);
46 QGridLayout *layout =
new QGridLayout;
48 layout->addWidget( buttons, 0, 1, Qt::AlignTop | Qt::AlignRight );
51 QGroupBox *groupBox =
new QGroupBox(tr(
"Edit Parameter Values"));
52 groupBox->setLayout(layout);
53 groupBox->setMinimumWidth(550);
54 groupBox->setMaximumHeight(600);
64 string _key =
_parent->item(
_parent->currentRow(), 0)->text().toStdString();
65 string _val =
_parent->item(
_parent->currentRow(), 1)->text().toStdString();
75 for(
int i=0; i<_ssize; i++ ){
76 valTable->horizontalHeader()->resizeSection(i, 90);
84 if(( tokens.
size() % _ssize ) != 0 ){
86 "]... Has an error: Number of parameters do not fit for the Set Size specified!!\n";
89 for(
unsigned int i=0; i<tokens.
size()/_ssize; i++ ){
92 for(
int j=0; j<_ssize; j++ ){
93 QTableWidgetItem *item =
new QTableWidgetItem( tokens[ (i*_ssize)+j ].c_str() );
111 string _key =
_parent->item(
_parent->currentRow(), 0)->text().toStdString();
119 for(
int i=0; i<_ssize; i++ ){
120 QTableWidgetItem *item =
new QTableWidgetItem(
"0" );
132 string _key =
_parent->item(
_parent->currentRow(), 0)->text().toStdString();
142 _parent->item(
_parent->currentRow(), 2)->setCheckState( Qt::Unchecked );
150 int ret = QMessageBox::warning(
this, tr(
"Remove Row"),
151 tr(
"Do you want to delete the entire row?"),
152 QMessageBox::Yes | QMessageBox::Default,
155 if( ret == QMessageBox::No ){
159 for(
int i=0; i<(int)vals.
size(); i++ ){
160 if( i < (
valTable->currentRow()*_ssize) || i > ((
valTable->currentRow()*_ssize)+(_ssize-1)) ){
this class is a Marlin Steering File consistency check Tool.
handles information about marlin processors and their collections needed by MarlinSteerCheck ...
const std::string getParamD(const std::string &type, const std::string &key)
returns the description of the parameter with the given key for the processor with the given type ...
void setOptionalParam(const std::string &key, bool optional=true)
Sets a parameter as optional (if optional=true parameter is written out as a comment) ...
NParamVecSet(const NParamVecSet &)=default
const std::string & getType()
Returns the Type of the processor.
const std::string & getName()
Returns the Name of the processor.
CMProcessor * getMProcs()
Returns the Marlin Processors.
void tokenize(const std::string str, StringVec &tokens, const std::string &delimiters=" ")
int getParamSetSize(const std::string &type, const std::string &key)
returns the set_size of the parameter with the given key for the processor with the given type ...
bool isParamOpt(const std::string &type, const std::string &key)
returns true if the parameter with the given key for the processor with the given type is optional ...
std::shared_ptr< StringParameters > getParameters()
Returns the string parameters for this processor.