camerauis/cameraxui/cxui/src/cxuisettingradiobuttonlistmodel.cpp
changeset 39 c5025ea871a1
parent 19 d9aefe59d544
child 37 64817133cd1d
equal deleted inserted replaced
38:0f0b4c1d7744 39:c5025ea871a1
    17 
    17 
    18 #include <QAbstractListModel>
    18 #include <QAbstractListModel>
    19 
    19 
    20 #include "cxutils.h" // debug
    20 #include "cxutils.h" // debug
    21 #include "cxuienums.h"
    21 #include "cxuienums.h"
       
    22 #include "cxuisettingsinfo.h"
    22 #include "cxuisettingradiobuttonlist.h"
    23 #include "cxuisettingradiobuttonlist.h"
    23 #include "cxuisettingradiobuttonlistmodel.h"
    24 #include "cxuisettingradiobuttonlistmodel.h"
    24 
    25 
    25 
    26 
    26 
    27 
    77 
    78 
    78         if (mListBoxType == CxuiSettingRadioButtonList::TwoLine) {
    79         if (mListBoxType == CxuiSettingRadioButtonList::TwoLine) {
    79             CX_DEBUG(("CxuiSettingRadioButtonListModel: Listbox type is TwoLineListBox"));
    80             CX_DEBUG(("CxuiSettingRadioButtonListModel: Listbox type is TwoLineListBox"));
    80             // two line list box
    81             // two line list box
    81             // get the two strings
    82             // get the two strings
    82             QStringList lines = setting.split(",");
    83             QStringList lines = setting.split(CxUiSettings::NEW_LINE_CHAR);
    83             QString first = lines[0];
    84             // Split returns always atleast a single element list.
    84             QString second = lines[1];
    85             list << lines[0];
    85             list << first << second ;
    86             if (lines.size() > 1) {
       
    87                 list << lines[1];
       
    88             }
    86         } else {
    89         } else {
    87             CX_DEBUG(("CxuiSettingRadioButtonListModel: Listbox type is SingleLine"));
    90             CX_DEBUG(("CxuiSettingRadioButtonListModel: Listbox type is SingleLine"));
    88             list << setting;
    91             list << setting;
    89         }
    92         }
    90 
    93