Ignore:
Timestamp:
03/07/14 09:24:09 (7 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0.1, releng/10.0.2, releng/10.0.3
Children:
92e8b9b
Parents:
86c3cc9
Message:

Finish up the new pc-mixer utility. The main Mixer GUI is done now, and it all works great!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-mixer/MixerGUI.cpp

    rcaf88c8 r0c784d0  
    1818  //Load the list of available devices 
    1919  QStringList devList = Mixer::getDevices(); 
    20   devList.sort(); 
     20  //devList.sort(); 
    2121  //Clear the UI 
    2222  ui->combo_default->disconnect(); 
    2323  ui->combo_default->clear(); 
    24    
     24  delete ui->scrollArea->widget(); //delete the widget and all children 
     25  ui->scrollArea->setWidget( new QWidget() ); //create a new widget in the scroll area 
     26  ui->scrollArea->widget()->setContentsMargins(0,0,0,0); 
     27  QHBoxLayout *layout = new QHBoxLayout; 
    2528  //Now Fill the UI with the devices 
    2629  QString cdefault = settings->value("tray-device", "vol").toString(); 
     
    3134    int Rval = devList[i].section(":",2,2).toInt(); 
    3235    //Now create the device widget 
    33            
     36    DeviceWidget *device = new DeviceWidget(this); 
     37      device->setupDevice(dev, Lval, Rval); 
     38      layout->addWidget(device); 
     39      connect(device, SIGNAL(deviceChanged(QString)), this, SLOT(itemChanged(QString)) ); 
    3440    //Now add the device to the default List 
    3541    ui->combo_default->addItem(dev); 
     
    3844    } 
    3945  } 
     46  layout->addStretch(); //add spacer to the end 
     47  layout->setContentsMargins(2,2,2,2); 
     48  layout->setSpacing(4); 
     49  ui->scrollArea->widget()->setLayout(layout); 
     50  ui->scrollArea->setMinimumHeight(ui->scrollArea->widget()->minimumSizeHint().height()+ui->scrollArea->horizontalScrollBar()->height()); 
    4051  //re-connect combobox signal 
    4152  connect(ui->combo_default, SIGNAL(currentIndexChanged(QString)), this, SLOT(changeDefaultTrayDevice(QString)) ); 
Note: See TracChangeset for help on using the changeset viewer.