示例#1
0
    void SimulCore::setParticleSolver(ParticleSystemSolver* solver) {
        _solver = solver;

        const int nSubj = _solver->m_System.GetNumberOfSubjects();
        if (nSubj > 0) {
            ParticleSubject& subj0 = _solver->m_System[0];
            ParticleSubject& subj1 = _solver->m_System[1];

            _image[0] = subj0.GetImage();
            _imageItem[0] = showImage(0, _image[0]);
            _label[0] = subj0.GetLabel();
            if (_label[0].IsNotNull()) {
                _labelItem[0] = showLabel(0, _label[0]);
            }
            _image[1] = subj1.GetImage();
            _imageItem[1] = showImage(1, _image[1]);
            _label[1] = subj1.GetLabel();
            if (_label[1].IsNotNull()) {
                _labelItem[1] = showLabel(1, _label[1]);
            }
        }

        for (int i = 0; i < 2; i++) {
            _auxImageItem[i]->hide();
            for (int j = 0; j < _particleItem[i].size(); j++) {
                _scene[i]->removeItem(_particleItem[i][j]);
            }
            _particleItem[i].clear();
        }

        connectSignals();
    }
示例#2
0
文件: gui.cpp 项目: AlbrechtL/dab-rpi
void    RadioInterface::CheckFICTimerTimeout (void)
{
    if(isFICCRC)
    {
        // Tune to station
        switch (my_ficHandler -> kindofService (CurrentStation))
        {
               case AUDIO_SERVICE:
                  {
                    // Stop timer
                    CheckFICTimer.stop();
                    emit currentStation(CurrentStation.simplified());

                    audiodata d;
                    my_ficHandler	-> dataforAudioService (CurrentStation, &d);
                    my_mscHandler	-> set_audioChannel (&d);
                    showLabel (QString (" "));
                    emit stationType(get_programm_type_string (d.programType));
                    emit languageType(get_programm_language_string (d.language));
                    emit bitrate(d.bitRate);
                    //LabelServiceLabel -> setText (StationName. simplified ());
                    if(d.ASCTy == 077)
                        emit dabType("DAB+");
                    else
                        emit dabType("DAB");
                    break;
                  }
            }
    }
}
示例#3
0
void PPForest<L>::printDot(ostream &s) const
{
	size_type i,h;

	s << "digraph forest" << endl << "{" << endl;

	// edges
	for(i=0;i<m_size;i++)
	{
		s << i;
		if(m_noc[i])
		{
			s << " -> {";
			h=i+1;
			for(Uint r=0;r<getMaxLength(i+1);r++)
			{
				s << h << " ";
				h=m_rb[h];
			}
			s << "}";	  	     	    
		}
		s << endl;
	}

	// labels
	s << endl << endl;
	for(i=0;i<m_size;i++)
	{
		s << i << "[label=\"";
		showLabel(s,m_lb[i]);
		s << "\"]" << endl;
	}

	s << "}";
}
void MusicUserLineEdit::checkTheInput()
{
    switch(m_type)
    {
        case User:
             showLabel(4, 20);
             break;  
        case Passwd:
        case PwdConfirm:
             showLabel(6, 16);
             break;
        case Mail:
             showLabel();
             break;
    }
}
void StatGetterThread::onStart()
{
    setLabel("Retrieving files count..");
    emit showLabel();
    emit setProgressRange(0, 0);
    emit setProgressValue(0);
    emit showProgressBar();

    FillPreAnalysisTree();
    const size_t totalValue = preAnalysisTree_.size();

    setLabel("Calculating statistics..");
    emit setProgressRange(0, totalValue);
    emit setProgressValue(0);

    FillStatTreeByPath();
    GetSubdirsCount();

    emit setProgressValue(totalValue);

    emit hideLabel();
    emit hideProgressBar();

    emit finished();
}
示例#6
0
void ScriptDebugger::labelClickedIdx(const QModelIndex &idx)
{
	QStandardItem *item = labelModel->itemFromIndex(labelModel->index(idx.row(), 0));
	if (item)
	{
		showLabel(item->text());
	}
}
void LabeledPlainTextEdit::onTextChanged()
{
    QString text = toPlainText();
    if (text.isEmpty() && !hasFocus())
        showLabel();
    if (!text.isEmpty() && text != m_label)
        setStyleSheet("");
}
void LabeledPlainTextEdit::focusOutEvent(QFocusEvent *event)
{
    if (toPlainText().isEmpty()) {
        showLabel();
    }

    QPlainTextEdit::focusOutEvent(event);
}
示例#9
0
void ScriptDebugger::labelClicked()
{
	QItemSelectionModel *selected = labelView.selectionModel();
	if (selected)
	{
		QModelIndex idx = selected->currentIndex();
		QStandardItem *item = labelModel->itemFromIndex(labelModel->index(idx.row(), 0));
		if (item)
		{
			showLabel(item->text());
		}
	}
}
IProgressWorker::IProgressWorker(QProgressBar* progBar, QLabel* label,
         QObject* parent) :
    QObject(parent)
{
   connect(this, SIGNAL(setProgressRange(int,int)), progBar,
           SLOT(setRange(int,int)));
   connect(this, SIGNAL(setProgressValue(int)), progBar, SLOT(setValue(int)));
   connect(this, SIGNAL(showProgressBar()), progBar, SLOT(show()));
   connect(this, SIGNAL(hideProgressBar()), progBar, SLOT(hide()));

   connect(this, SIGNAL(setLabel(QString)), label, SLOT(setText(QString)));
   connect(this, SIGNAL(showLabel()), label, SLOT(show()));
   connect(this, SIGNAL(hideLabel()), label, SLOT(hide()));
}
示例#11
0
void PPForest<L>::print(ostream &s,size_type node,bool brackets) const
{
	if(brackets)
		s << "(";

	s <<  "{" << node << "}";
	showLabel(s,m_lb[node]);
	if(m_noc[node])
		print(s,node+1,true);
	if(m_rb[node])
		print(s,m_rb[node],false);

	if(brackets)
		s << ")";	
}
示例#12
0
文件: gui.cpp 项目: AlbrechtL/dab-rpi
void	RadioInterface::selectService (QModelIndex s) {
QString a;
//QString a = ensemble. data (s, Qt::DisplayRole). toString ();

	switch (my_ficHandler -> kindofService (a)) {
	   case AUDIO_SERVICE:
	      { audiodata d;
	        my_ficHandler	-> dataforAudioService (a, &d);
	        my_mscHandler	-> set_audioChannel (&d);
	        showLabel (QString (" "));
	        break;
	      }
	   case PACKET_SERVICE:
	      {  packetdata d;
	          my_ficHandler	-> dataforDataService (a, &d);
	         if ((d.  DSCTy == 0) || (d. bitRate == 0))
	            return;
	         my_mscHandler	-> set_dataChannel (&d);
	         switch (d. DSCTy) {
	            default:
	               showLabel (QString ("unimplemented Data"));
	               break;
	            case 5:
	               showLabel (QString ("Transp. Channel not implemented"));
	               break;
	            case 60:
	               showLabel (QString ("MOT partially implemented"));
	               break;
	            case 59: {
	                  QString text = QString ("Embedded IP: UDP data to ");
	                  text. append (ipAddress);
	                  text. append (" ");
	                  QString n = QString::number (port);
	                  text. append (n);
	                  showLabel (text);
	               }
	               break;
	            case 44:
	               showLabel (QString ("Journaline"));
	               break;
	         }
	        break;
	      }
	   default:
	      return;
	}
}
示例#13
0
void EditableLabel::updateText()
{
  m_label->setText( m_input->text() );
  showLabel();
}