~ubuntu-branches/ubuntu/precise/kdemultimedia/precise

« back to all changes in this revision

Viewing changes to kmix/gui/viewbase.cpp

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2011-12-24 17:34:24 UTC
  • mfrom: (1.2.66)
  • Revision ID: package-import@ubuntu.com-20111224173424-v57lad2yyr90g8n0
Tags: 4:4.7.95-0ubuntu1
New upstream release candidate

Show diffs side-by-side

added added

removed removed

Lines of Context:
145
145
void ViewBase::rebuildFromProfile()
146
146
{
147
147
   emit rebuildGUI();
148
 
/*
149
 
   // Redo everything from scratch, as visibility and the order of the controls might have changed.
150
 
 
151
 
   // As the order of the controls is stored in the profile, we need
152
 
   // to rebuild the _mixSet 
153
 
kDebug() << "rebuild 1";
154
 
   _mixSet->clear();
155
 
kDebug() << "rebuild 2";
156
 
   _mdws.clear();
157
 
kDebug() << "rebuild 3";
158
 
   setMixSet();
159
 
kDebug() << "rebuild 4";
160
 
   createDeviceWidgets();
161
 
kDebug() << "rebuild 5";
162
 
   constructionFinished();
163
 
kDebug() << "rebuild 6";
164
 
*/
165
148
}
166
149
 
167
150
 
214
197
 
215
198
void ViewBase::controlsReconfigured( const QString& mixer_ID )
216
199
{
217
 
  // TODO Search _mixers for the correct Mixer*. After that, remove _mixer instance variable
218
 
    if ( _mixer->id() == mixer_ID )
219
 
    {
220
 
        kDebug(67100) << "ViewBase::controlsReconfigured() " << mixer_ID << " is being redrawn (mixset contains: " << _mixSet->count() << ")";
221
 
        setMixSet();
222
 
        kDebug(67100) << "ViewBase::controlsReconfigured() " << mixer_ID << ": Recreating widgets (mixset contains: " << _mixSet->count() << ")";
223
 
        createDeviceWidgets();
224
 
 
225
 
        // We've done the low level stuff our selves but let elements
226
 
        // above know what has happened so they can reload config etc.
227
 
        emit redrawMixer(mixer_ID);
228
 
    }
 
200
        // TODO Search _mixers for the correct Mixer*. After that, remove _mixer instance variable
 
201
        bool isRelevantMixer = (_mixer->id() == mixer_ID );
 
202
        //    if (!isRelevantMixer)
 
203
        //    {
 
204
        //      foreach ( Mixer* mixer , _mixers)
 
205
        //              {
 
206
        //              if ( mixer->id() == mixer_ID )
 
207
        //              {
 
208
        //                      isRelevantMixer = true;
 
209
        //                      break;
 
210
        //              }
 
211
        //              }
 
212
        //    }
 
213
 
 
214
        if (isRelevantMixer)
 
215
        {
 
216
                kDebug(67100) << "ViewBase::controlsReconfigured() " << mixer_ID << " is being redrawn (mixset contains: " << _mixSet->count() << ")";
 
217
                setMixSet();
 
218
                kDebug(67100) << "ViewBase::controlsReconfigured() " << mixer_ID << ": Recreating widgets (mixset contains: " << _mixSet->count() << ")";
 
219
                createDeviceWidgets();
 
220
 
 
221
                // We've done the low level stuff our selves but let elements
 
222
                // above know what has happened so they can reload config etc.
 
223
                emit redrawMixer(mixer_ID);
 
224
        }
229
225
}
230
226
 
231
227
void ViewBase::refreshVolumeLevels()