TuiNodeEnum.cpp   TuiNodeEnum.cpp 
skipping to change at line 16 skipping to change at line 16
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#include "StelTranslator.hpp"
#include "TuiNodeEnum.hpp" #include "TuiNodeEnum.hpp"
#include <QKeyEvent> #include <QKeyEvent>
TuiNodeEnum::TuiNodeEnum(const QString& text, QObject* receiver, const char * method, QStringList items, TuiNodeEnum::TuiNodeEnum(const QString& text, QObject* receiver, const char * method, QStringList items,
QString defValue, TuiNode* parent, TuiNode* prev) QString defValue, TuiNode* parent, TuiNode* prev)
: TuiNodeEditable(text, parent, prev), stringList(items) : TuiNodeEditable(text, parent, prev), stringList(items)
{ {
this->connect(this, SIGNAL(setValue(QString)), receiver, method); this->connect(this, SIGNAL(setValue(QString)), receiver, method);
if (stringList.contains(defValue)) if (stringList.contains(defValue))
skipping to change at line 73 skipping to change at line 74
{ {
emit(setValue(stringList.at(currentIdx))); emit(setValue(stringList.at(currentIdx)));
response.accepted = true; response.accepted = true;
response.newNode = this; response.newNode = this;
} }
return response; return response;
} }
QString TuiNodeEnum::getDisplayText() QString TuiNodeEnum::getDisplayText()
{ {
QString value = q_(stringList.at(currentIdx));
if (!editing) if (!editing)
{ {
return displayText + QString(": %1").arg(stringList.at(curr entIdx)); return prefixText + q_(displayText) + QString(": %1").arg(v alue);
} }
else else
{ {
return displayText + QString(": >%1<").arg(stringList.at(cur rentIdx)); return prefixText + q_(displayText) + QString(": >%1<").arg( value);
} }
} }
 End of changes. 5 change blocks. 
3 lines changed or deleted 5 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/