Esempio n. 1
0
void QSoundProcessor::open_volume_dialog()
{
    QDialog dialog;
    dialog.setWindowTitle(tr("Volume level"));
    dialog.setFixedSize(160,80);

    QVBoxLayout Lcenter;
    QGroupBox GBbox(tr("Set volume level:"));
    QHBoxLayout layout;
    QSlider slider;
    slider.setOrientation(Qt::Horizontal);
    slider.setRange(1, VOLUME_STEPS);
    slider.setTickInterval(10);
    slider.setTickPosition(QSlider::TicksBothSides);
    QLabel lable(tr("error"));
    connect(&slider, SIGNAL(valueChanged(int)), &lable, SLOT(setNum(int)));
    if(pt_audioinput)
    {
        slider.setValue( VOLUME_STEPS * pt_audioinput->volume() );
    }
    connect(&slider, SIGNAL(sliderMoved(int)), this, SLOT(set_volume(int)));
    layout.addWidget(&slider);
    layout.addWidget(&lable, 2, Qt::AlignRight);
    GBbox.setLayout(&layout);
    Lcenter.addWidget(&GBbox);
    dialog.setLayout(&Lcenter);
    dialog.exec();
}
Esempio n. 2
0
void BiHeatmap::setSelectIds(std::set<long int>& IDs)
{
	std::set<long int> selectedIDs1;
	std::set<long int> selectedIDs2;
	std::set<long int>::iterator it;
	long int id;

	this->resetTree1();
	this->resetTree2();

	if(IDs.size() > 0)
	{
		this->localselection = true;
		for(it = IDs.begin(); it != IDs.end(); it++)
		{
			id = *it;
			if(id < this->tree1.coordinates.size())
				reselectIds1(selectedIDs1, id);
			else
				reselectIds2(selectedIDs2, id - this->tree1.coordinates.size());
		}
	}

	if(selectedIDs1.size() > 0)
	{
		for(int i = 0; i < this->num_cols; i++)
			selectedIDs2.insert(i);

		std::cout<<"I selected from tree1"<<std::endl;
		this->updataTree1();
		this->Selection2->select(selectedIDs2);
		this->Selection->select(selectedIDs1);
		emit lable(selectedIDs1);
	}
	else if(selectedIDs2.size() > 0)
	{
		//for(int i = 0; i<this->num_rows; i++)
		//	selectedIDs1.insert( indMapFromIndToVertex[i]);
		//std::cout<<"I selected from tree2"<<std::endl;
		//this->updataTree2();
		//this->Selection2->select(selectedIDs2);
		//this->Selection->select(selectedIDs1);
	}
	else
	{
		std::cout<<"I selected nothing"<<std::endl;
		this->Selection2->clear();
		this->Selection->clear();
	}
}
Esempio n. 3
0
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    QLabel lable("Hello World!\ndfdf\n\n");
    lable.show();

    MediaListCtrl *ctrl = MediaListCtrl::GetInstance();

    DramaPlayer dp;
    dp.show();

//    Player player;
//    player.show();


    return a.exec();
}
Esempio n. 4
0
void BiHeatmap::setselectedCellIds()
{
	if(this->treedata1 == true && this->treedata2 == true)
	{
		this->resetTree1();
		this->resetTree2();
	}
	std::set<long int> selectedIDs1;
	std::set<long int> selectedIDs2;
	for(int i = r2; i <= r1; i++)
		selectedIDs1.insert( indMapFromIndToVertex[ this->order1[i]]);
	for(int j = c1; j <= c2; j++)	
		selectedIDs2.insert(this->order2[j]);
		
	this->localselection = true;
	this->Selection2->select(selectedIDs2);
	this->Selection->select(selectedIDs1);
	emit lable(selectedIDs1);
}