Changeset 5101 in ntrip
- Timestamp:
- Apr 12, 2013, 4:28:55 PM (12 years ago)
- Location:
- trunk/GnssCenter/inpedit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GnssCenter/inpedit/keyword.cpp
r5098 r5101 41 41 42 42 if (numVal == 1) { 43 _ values.append(in.readLine().trimmed());43 _origValues.append(in.readLine().trimmed()); 44 44 } 45 45 else if (numVal > 1) { 46 46 for (int ii = 0; ii < numVal; ii++) { 47 _ values.append(inStream.readLine().trimmed());47 _origValues.append(inStream.readLine().trimmed()); 48 48 } 49 49 } … … 76 76 // Remove leading and trailing double-quotes 77 77 // ----------------------------------------- 78 _ values.replaceInStrings(QRegExp("^\\s*\"|\"\\s*$"), QString());78 _origValues.replaceInStrings(QRegExp("^\\s*\"|\"\\s*$"), QString()); 79 79 } 80 80 } … … 97 97 if (widgetType == "checkbox") { 98 98 QCheckBox* chBox = new QCheckBox(); 99 if (_ values.size() && _values[0] == "1") {99 if (_origValues.size() && _origValues[0] == "1") { 100 100 chBox->setChecked(true); 101 101 } … … 105 105 QComboBox* cmbBox = new QComboBox(); 106 106 cmbBox->addItems(_desc.value("cards").split(QRegExp("\\s"), QString::SkipEmptyParts)); 107 if (_ values.size()) {108 int index = cmbBox->findText(_ values[0]);107 if (_origValues.size()) { 108 int index = cmbBox->findText(_origValues[0]); 109 109 if (index != -1) { 110 110 cmbBox->setCurrentIndex(index); … … 115 115 else if (widgetType == "lineedit") { 116 116 t_lineEdit* lineEdit = new t_lineEdit(); 117 if (_ values.size()) {118 lineEdit->setText(_ values[0]);117 if (_origValues.size()) { 118 lineEdit->setText(_origValues[0]); 119 119 } 120 120 _widget = lineEdit; … … 122 122 else if (widgetType == "radiobutton") { 123 123 QRadioButton* radButt = new QRadioButton(); 124 if (_ values.size() && _values[0] == "1") {124 if (_origValues.size() && _origValues[0] == "1") { 125 125 radButt->setChecked(true); 126 126 } … … 129 129 else if (widgetType == "selwin") { 130 130 t_selWin* selWin = new t_selWin(); 131 if (_ values.size()) {132 selWin->setFileName(_ values[0]);131 if (_origValues.size()) { 132 selWin->setFileName(_origValues[0]); 133 133 } 134 134 _widget = selWin; -
trunk/GnssCenter/inpedit/keyword.h
r5097 r5101 14 14 bool ok() const {return _ok;} 15 15 QWidget* createWidget(const QString& fldMask); 16 const QStringList& values() const {return _values;}16 const QStringList& values() const; 17 17 18 18 private: 19 19 bool _ok; 20 20 QString _name; 21 QStringList _ values;21 QStringList _origValues; 22 22 QWidget* _widget; 23 23 QMap<QString, QString> _desc;
Note:
See TracChangeset
for help on using the changeset viewer.