~ubuntu-branches/ubuntu/trusty/manaplus/trusty-proposed

« back to all changes in this revision

Viewing changes to src/gui/widgets/setuptouchitem.cpp

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi
  • Date: 2013-07-11 10:09:41 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20130711100941-f0rwuvcwgl8ulqo8
Tags: 1.3.7.7.1-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
}
86
86
 
87
87
 
88
 
SetupActionDropDown::SetupActionDropDown(std::string text,
89
 
                                         std::string description,
90
 
                                         std::string keyName,
 
88
SetupActionDropDown::SetupActionDropDown(const std::string &text,
 
89
                                         const std::string &description,
 
90
                                         const std::string &keyName,
91
91
                                         SetupTabScroll *const parent,
92
 
                                         std::string eventName,
 
92
                                         const std::string &eventName,
93
93
                                         TouchActionsModel *const model,
94
 
                                         int width,
 
94
                                         const int width,
95
95
                                         const bool mainConfig) :
96
96
    SetupItem(text, description, keyName, parent, eventName, mainConfig),
97
97
    mHorizont(nullptr),
104
104
    createControls();
105
105
}
106
106
 
107
 
SetupActionDropDown::SetupActionDropDown(std::string text,
108
 
                                         std::string description,
109
 
                                         std::string keyName,
 
107
SetupActionDropDown::SetupActionDropDown(const std::string &text,
 
108
                                         const std::string &description,
 
109
                                         const std::string &keyName,
110
110
                                         SetupTabScroll *const parent,
111
 
                                         std::string eventName,
 
111
                                         const std::string &eventName,
112
112
                                         TouchActionsModel *const model,
113
 
                                         int width,
114
 
                                         std::string def,
 
113
                                         const int width,
 
114
                                         const std::string &def,
115
115
                                         const bool mainConfig) :
116
116
    SetupItem(text, description, keyName, parent, eventName, def, mainConfig),
117
117
    mHorizont(nullptr),
135
135
 
136
136
void SetupActionDropDown::createControls()
137
137
{
 
138
    if (!mModel)
 
139
        return;
 
140
 
138
141
    load();
139
142
    mHorizont = new HorizontContainer(this, 32, 2);
140
143
 
159
162
 
160
163
void SetupActionDropDown::fromWidget()
161
164
{
162
 
    if (!mDropDown)
 
165
    if (!mDropDown || !mModel)
163
166
        return;
164
167
 
165
168
    mValue = toString(mModel->getActionFromSelection(
168
171
 
169
172
void SetupActionDropDown::toWidget()
170
173
{
171
 
    if (!mDropDown)
 
174
    if (!mDropDown || !mModel)
172
175
        return;
173
176
 
174
177
    mDropDown->setSelected(mModel->getSelectionFromAction(