Esempio n. 1
0
// SIGNAL updateClusters
void KlustersView::updateClusters( QString t0, QValueList<int>& t1, ItemColors* t2, bool t3 )
{
    if ( signalsBlocked() )
	return;
    QConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 37 );
    if ( !clist )
	return;
    QUObject o[5];
    static_QUType_QString.set(o+1,t0);
    static_QUType_ptr.set(o+2,&t1);
    static_QUType_ptr.set(o+3,t2);
    static_QUType_bool.set(o+4,t3);
    activate_signal( clist, o );
}
Esempio n. 2
0
// SIGNAL mouseButtonClicked
void QListView::mouseButtonClicked( int t0, QListViewItem* t1, const QPoint& t2, int t3 )
{
    if ( signalsBlocked() )
	return;
    QConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 14 );
    if ( !clist )
	return;
    QUObject o[5];
    static_QUType_int.set(o+1,t0);
    static_QUType_ptr.set(o+2,t1);
    static_QUType_varptr.set(o+3,&t2);
    static_QUType_int.set(o+4,t3);
    activate_signal( clist, o );
}
Esempio n. 3
0
void QGameEntityNode::setName(const QString &name)
{
	if (signalsBlocked())
	{
		if( GameEngine::entityWorldID( qPrintable( name ) ) == 0 )
		{
			unsigned int entityID = GameEngine::entityWorldID(qPrintable(QGameEntityNode::name()));
			GameEngine::renameGameEntity(entityID, qPrintable(name));
			m_xmlNode.setAttribute("name", name);
		}
	}
	else if (name != QGameEntityNode::name())
		m_model->undoStack()->push(new QXmlNodePropertyCommand("Set Name", this, "Name", name, -1));
}
void QEmitterNode::setMaterial(const Material& material)
{
	if (signalsBlocked())
	{
		m_xmlNode.setAttribute("material", material.FileName);
		if (m_matResource != 0)
			h3dRemoveResource(m_matResource);
		m_matResource = h3dAddResource( H3DResTypes::Material, qPrintable(material.FileName), 0 );
		h3dutLoadResourcesFromDisk(".");
		h3dSetNodeParamI(m_hordeID, H3DEmitter::MatResI, m_matResource);
	}
	else if (material != QEmitterNode::material())
		m_model->undoStack()->push(new QXmlNodePropertyCommand("Set Material", this, "Material", QVariant::fromValue(material), EmitterMaterialID));
}
Esempio n. 5
0
// SIGNAL clicked
void QTable::clicked( int t0, int t1, int t2, const QPoint& t3 )
{
    if ( signalsBlocked() )
	return;
    QConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 1 );
    if ( !clist )
	return;
    QUObject o[5];
    static_QUType_int.set(o+1,t0);
    static_QUType_int.set(o+2,t1);
    static_QUType_int.set(o+3,t2);
    static_QUType_varptr.set(o+4,&t3);
    activate_signal( clist, o );
}
void
QvisLineWidthWidget::SetLineWidth(int width_)
{
    if(width_ < 0 || width_ > 9)
        return;

    lineWidthComboBox->blockSignals(true);
    lineWidthComboBox->setCurrentIndex(width_);
    lineWidthComboBox->blockSignals(false);

    // If signals are not blocked, emit the LineWidthChanged signal.
    if(!signalsBlocked())
        emit lineWidthChanged(width_);
}
void QEmitterNode::setEffect(const Effect& effect)
{
	if (signalsBlocked())
	{
		m_xmlNode.setAttribute("particleEffect", effect.FileName);
		if (m_effectResource != 0)
			h3dRemoveResource(m_effectResource);
		m_effectResource = h3dAddResource( H3DResTypes::ParticleEffect, qPrintable(effect.FileName), 0 );
		h3dutLoadResourcesFromDisk(".");
		h3dSetNodeParamI(m_hordeID, H3DEmitter::PartEffResI, m_effectResource);
	}
	else if (effect != QEmitterNode::effect())
		m_model->undoStack()->push(new QXmlNodePropertyCommand("Set Effect", this, "Effect", QVariant::fromValue(effect), EmitterMaterialID));
}
Esempio n. 8
0
void
QvisLineStyleWidget::SetLineStyle(int style)
{
    if(style < 0 || style > 3)
        return;

    lineStyleComboBox->blockSignals(true);
    lineStyleComboBox->setCurrentIndex(style);
    lineStyleComboBox->blockSignals(false);

    // If signals are not blocked, emit the LineStyleChanged signal.
    if(!signalsBlocked())
        emit lineStyleChanged(style);
}
void
QvisPointControl::typeComboBoxChanged(int type)
{
    // Get the values that are in the text field.
    ProcessSizeText(lastGoodPointType);

    lastGoodPointType = type;

    UpdateSizeText();
    UpdatePointType();

    if (!signalsBlocked())
        emit pointTypeChanged(type);
}
void QEmitterNode::setForce(const QVec3f &value)
{
	if (signalsBlocked())
	{
		m_xmlNode.setAttribute("forceX", value.X);
		m_xmlNode.setAttribute("forceY", value.Y);
		m_xmlNode.setAttribute("forceZ", value.Z);
		h3dSetNodeParamF(m_hordeID, H3DEmitter::ForceF3, 0, value.X);
		h3dSetNodeParamF(m_hordeID, H3DEmitter::ForceF3, 1, value.Y);
		h3dSetNodeParamF(m_hordeID, H3DEmitter::ForceF3, 2, value.Z);
	}
	else if (value != QEmitterNode::force())
		m_model->undoStack()->push(new QXmlNodePropertyCommand(tr("Set Force"), this, "Force", QVariant::fromValue(value), EmitterForceID));
}
// SIGNAL isBreakpointPossible
void ViewManager::isBreakpointPossible( bool& t0, const QString& t1, int t2 )
{
    if ( signalsBlocked() )
	return;
    QConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 6 );
    if ( !clist )
	return;
    QUObject o[4];
    static_QUType_bool.set(o+1,t0);
    static_QUType_QString.set(o+2,t1);
    static_QUType_int.set(o+3,t2);
    activate_signal( clist, o );
    t0 = static_QUType_bool.get(o+1);
}
Esempio n. 12
0
void KonqComboCompletionBox::setItems( const QStringList& items )
{
    bool block = signalsBlocked();
    blockSignals( true );

    int rowIndex = 0;

    if ( count() == 0 )
        insertStringList( items );
    else {
        //Keep track of whether we need to change anything,
        //so we can avoid a repaint for identical updates,
        //to reduce flicker
        bool dirty = false;

        QStringList::ConstIterator it = items.constBegin();
        const QStringList::ConstIterator itEnd = items.constEnd();

        for ( ; it != itEnd; ++it) {
            if ( rowIndex < count() ) {
                const bool changed = (static_cast<KonqListWidgetItem*>(item(rowIndex)))->reuse( *it );
                dirty = dirty || changed;
            }
            else {
                dirty = true;
                //Inserting an item is a way of making this dirty
                addItem( new KonqListWidgetItem( *it ) );
            }
            rowIndex++;
        }

        //If there is an unused item, mark as dirty -> less items now
        if ( rowIndex < count() )
            dirty = true;

        while ( rowIndex < count() ) {
            delete item(rowIndex);
        }

        //TODO KDE 4 - Port this
        //if ( dirty )
        //    triggerUpdate( false );
    }

    if ( isVisible() && size().height() != sizeHint().height() )
        sizeAndPosition();

    blockSignals( block );
}
Esempio n. 13
0
// SIGNAL notifyTransferStatus
void EvaFileManager::notifyTransferStatus( const unsigned int t0, const unsigned int t1, const unsigned int t2, const unsigned int t3, const int t4 )
{
    if ( signalsBlocked() )
	return;
    QConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 0 );
    if ( !clist )
	return;
    QUObject o[6];
    static_QUType_ptr.set(o+1,&t0);
    static_QUType_ptr.set(o+2,&t1);
    static_QUType_ptr.set(o+3,&t2);
    static_QUType_ptr.set(o+4,&t3);
    static_QUType_int.set(o+5,t4);
    activate_signal( clist, o );
}
Esempio n. 14
0
void ColorDialog::set_rgb()
{
    if ( !signalsBlocked() )
    {
        QColor col(
                p->ui.slide_red->value(),
                p->ui.slide_green->value(),
                p->ui.slide_blue->value()
            );
        if (col.saturation() == 0)
            col = QColor::fromHsv(p->ui.slide_hue->value(), 0, col.value());
        p->ui.wheel->setColor(col);
        update_widgets();
    }
}
Esempio n. 15
0
void QAdakDate::REFRESH_DATE()
{
    m_date_str = QDATE().toString(m_date_format);

    if ( m_date_str.isEmpty() EQ true ) {
        if ( m_old_date.isValid() EQ true ) {
            SET_DATE( m_old_date );
        }
        else {
            if (m_mali_yil_disable EQ false) {
                SET_DATE( MALI_YIL_FIRST_DATE());
            }
            else {
                SET_DATE( QDate::currentDate() );
            }
        }
        return;
    }

    if (m_date_str EQ line_edit->text()) {
        return;
    }

    if ( m_mali_yil_disable EQ true) {
        line_edit->setText( m_date_str );
    }
    else { // false ise
        if ( m_current_date >= MALI_YIL_FIRST_DATE() AND m_current_date <= MALI_ARRAY_LAST_DATE() ) {
            line_edit->setText( m_date_str );
        }
        else {
            if( m_date_changed EQ true ) {
                QMessageBox::information( this, tr( "Uyarı" ), tr("Girmiş olduğunuz tarih mali yıl içinde değil, lütfen yeni bir tarih girin.!"));
                m_date_changed = false;
            }
            if ( m_current_date < MALI_YIL_FIRST_DATE() ) {
                line_edit->setText( MALI_YIL_FIRST_DATE().toString( m_date_format ) );
            }
            else {
                line_edit->setText( MALI_ARRAY_LAST_DATE().toString( m_date_format ) );
            }
        }
    }

    if ( signalsBlocked() EQ false ) {
        emit SIGNAL_DATE_CHANGED();
    }
}
// SIGNAL statsChanged
void TrWindow::statsChanged( int t0, int t1, int t2, int t3, int t4, int t5 )
{
    if ( signalsBlocked() )
        return;
    QConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 0 );
    if ( !clist )
        return;
    QUObject o[7];
    static_QUType_int.set(o+1,t0);
    static_QUType_int.set(o+2,t1);
    static_QUType_int.set(o+3,t2);
    static_QUType_int.set(o+4,t3);
    static_QUType_int.set(o+5,t4);
    static_QUType_int.set(o+6,t5);
    activate_signal( clist, o );
}
Esempio n. 17
0
void KLSHistoryCombo::loadItems()
{
    clear();
    
    QStringList items = KLSConfig::comboUrlHistory();

    bool block = signalsBlocked();
    blockSignals( true );

    setHistoryItems(items);
    blockSignals(block);

    completionObject()->setItems(items);

    setCompletionMode(KGlobalSettings::completionMode());
}
void QvisPointControl::SetPointType(int type)
{
    if (type < 0 || type > 7)
        return;

    typeComboBox->blockSignals(true);
    typeComboBox->setCurrentIndex(type);
    typeComboBox->blockSignals(false);

    lastGoodPointType = type;
    UpdateSizeText();
    UpdatePointType();

    if (!signalsBlocked())
        emit pointTypeChanged(type);
}
Esempio n. 19
0
// SIGNAL notifyAgentRequest
void EvaFileManager::notifyAgentRequest( const unsigned int t0, const unsigned int t1, const unsigned int t2, const unsigned int t3, const unsigned short t4, const unsigned char t5 )
{
    if ( signalsBlocked() )
	return;
    QConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 1 );
    if ( !clist )
	return;
    QUObject o[7];
    static_QUType_ptr.set(o+1,&t0);
    static_QUType_ptr.set(o+2,&t1);
    static_QUType_ptr.set(o+3,&t2);
    static_QUType_ptr.set(o+4,&t3);
    static_QUType_ptr.set(o+5,&t4);
    static_QUType_ptr.set(o+6,&t5);
    activate_signal( clist, o );
}
Esempio n. 20
0
void KCompletionBox::popup()
{
    if ( count() == 0 )
        hide();
    else {
        bool block = signalsBlocked();
        blockSignals( true );
        setCurrentRow( -1 );
        blockSignals( block );
        clearSelection();
        if ( !isVisible() )
            show();
        else if ( size().height() != sizeHint().height() )
            sizeAndPosition();
    }
}
Esempio n. 21
0
    void Input::changeSelection(QModelIndex _index)
    {
      if (!dataModel() || signalsBlocked()) return;
      int _row = _index.row();

      if (_row < 1 || _row > dataModel()->inputs().numberOfChildren())
      {
          _row = -1;
      }

      if (itemId(_row) == dataModel()->inputs().currentId()) return;

      selectInputId(itemId(_row));
      showParameterWidget();
      emit inputIndexChanged();
    }
Esempio n. 22
0
void TransFunc1DRampEditor::updateRampWidth(int width) {
    int center = spinRampCenter_->value();
    float centerf = static_cast<float>(center) / maximumIntensity_;
    float widthf = static_cast<float>(width) / maximumIntensity_;

    bool unblock = false;
    if (signalsBlocked() && !transCanvas_->signalsBlocked()) {
        transCanvas_->blockSignals(true);
        unblock = true;
    }
    transCanvas_->setRampParameter(centerf, widthf);
    if (unblock)
        transCanvas_->blockSignals(false);

    syncRampSliders(center, width);
}
Esempio n. 23
0
void BasicTab::slotCapturedKeySequence(const QKeySequence& seq)
{
    if (signalsBlocked())
       return;
    KShortcut cut(seq, QKeySequence());
    if (_menuEntryInfo->isShortcutAvailable( cut ) && KHotKeys::present() )
    {
       _menuEntryInfo->setShortcut( cut );
    }
    else
    {
       // We will not assign the shortcut so reset the visible key sequence
       _keyEdit->setKeySequence(QKeySequence());
    }
    if (_menuEntryInfo)
       emit changed( _menuEntryInfo );
}
void AnnotationDialog::KDateEdit::setDate(const QDate& newDate)
{
    QString dateString = QString::fromLatin1("");
    if(newDate.isValid())
        dateString = DB::ImageDate( newDate ).toString( false );

    mTextChanged = false;

    // We do not want to generate a signal here, since we explicitly setting
    // the date
    bool b = signalsBlocked();
    blockSignals(true);
    setItemText(0, dateString);
    blockSignals(b);

    value = newDate;
}
void
QvisPointControl::processSizeText()
{
    if(ProcessSizeText(lastGoodPointType))
    {
        if(!signalsBlocked())
        {
            if(lastGoodPointType == POINT_TYPE_POINTS ||
               lastGoodPointType == POINT_TYPE_SPHERE)
            {
                emit pointSizePixelsChanged(lastGoodSizePixels);
            }
            else
                emit pointSizeChanged(lastGoodSize);
        }
    }
}
Esempio n. 26
0
void OCompletionBox::popup()
{
    if ( count() == 0 )
        hide();
    else {
        ensureCurrentVisible();
        bool block = signalsBlocked();
        blockSignals( true );
        setCurrentItem( 0 );
        blockSignals( block );
        clearSelection();
        if ( !isVisible() )
            show();
        else if ( size().height() < sizeHint().height() )
            resize( sizeHint() );
    }
}
Esempio n. 27
0
void DDateEdit::updateView()
{
    QString dateString;

    if ( d->date.isValid() )
    {
        dateString = KGlobal::locale()->formatDate( d->date, KLocale::ShortDate );
    }

    // We do not want to generate a signal here,
    // since we explicitly setting the date
    bool blocked = signalsBlocked();
    blockSignals( true );
    removeItem( 0 );
    insertItem( 0, dateString );
    blockSignals( blocked );
}
Esempio n. 28
0
// SIGNAL notifyTransferNormalInfo
void EvaFileManager::notifyTransferNormalInfo( const unsigned int t0, const unsigned int t1, EvaFileStatus t2, const QString t3, const QString t4, const unsigned int t5, const unsigned char t6 )
{
    if ( signalsBlocked() )
	return;
    QConnectionList *clist = receivers( staticMetaObject()->signalOffset() + 3 );
    if ( !clist )
	return;
    QUObject o[8];
    static_QUType_ptr.set(o+1,&t0);
    static_QUType_ptr.set(o+2,&t1);
    static_QUType_ptr.set(o+3,&t2);
    static_QUType_QString.set(o+4,t3);
    static_QUType_QString.set(o+5,t4);
    static_QUType_ptr.set(o+6,&t5);
    static_QUType_ptr.set(o+7,&t6);
    activate_signal( clist, o );
}
Esempio n. 29
0
void AddressEditWidget::updateAddressEdit()
{
  KABC::Address::List::Iterator it = mTypeCombo->selectedElement();

  bool block = signalsBlocked();
  blockSignals( true );

  mAddressField->setText( "" );

  if ( it != mAddressList.end() ) {
    KABC::Address a = *it;
    if ( !a.isEmpty() ) {
#if KDE_VERSION >= 319
      if ( a.type() & KABC::Address::Work && mAddressee.realName() != mAddressee.organization() ) {
        mAddressField->setText( a.formattedAddress( mAddressee.realName(),
                                   mAddressee.organization() ) );
      } else {
        mAddressField->setText( a.formattedAddress( mAddressee.realName() ) );
      }
#else
      QString text;
      if ( !a.street().isEmpty() )
        text += a.street() + "\n";

      if ( !a.postOfficeBox().isEmpty() )
        text += a.postOfficeBox() + "\n";

      text += a.locality() + QString(" ") + a.region();

      if ( !a.postalCode().isEmpty() )
        text += QString(", ") + a.postalCode();

      text += "\n";

      if ( !a.country().isEmpty() )
        text += a.country() + "\n";

      text += a.extended();

      mAddressField->setText( text );
#endif
    }
  }

  blockSignals( block );
}
Esempio n. 30
0
      bool Tuning::eventFilter(QObject *_obj, QEvent *_event)
      {
        if (signalsBlocked()) return QObject::eventFilter(_obj, _event);

        if ((_event->type() == QEvent::MouseMove) &&
            ((_obj == glView_.get()) || (_obj == titleBar_.get())))
        {
          startDrag();
        }

        /// Handle focus events
        if (_event->type() == QEvent::FocusIn)
        {
          setSelected(true);
        }

        return QObject::eventFilter(_obj, _event);
      }