Example #1
0
void ModelView::doConnections()
{
	if( m_model != NULL )
	{
		QObject::connect( m_model, SIGNAL( dataChanged() ), widget(), SLOT( update() ) );
		QObject::connect( m_model, SIGNAL( propertiesChanged() ), widget(), SLOT( update() ) );
	}
}
Example #2
0
void InBandStream::setDataStanzaType(int AType)
{
	if (streamState() == IDataStreamSocket::Closed)
	{
		FStanzaType = AType;
		emit propertiesChanged();
	}
}
Example #3
0
void AutomatableModel::setStep( const float step )
{
	if( m_step != step )
	{
		m_step = step;
		emit propertiesChanged();
	}
}
Example #4
0
void InBandStream::setMaximumBlockSize(int ASize)
{
	if (ASize>=MINIMUM_BLOCK_SIZE && ASize<=USHRT_MAX)
	{
		FMaxBlockSize = ASize;
		emit propertiesChanged();
	}
}
Example #5
0
void InBandStream::setBlockSize(int ASize)
{
	if (streamState()==IDataStreamSocket::Closed && ASize>=MINIMUM_BLOCK_SIZE && ASize<=maximumBlockSize())
	{
		FBlockSize = ASize;
		emit propertiesChanged();
	}
}
Example #6
0
void MainWindow::setUpMainWindow()
{
    ui->checkBox_showTets->setChecked(true);
    ui->checkBox_showVerts->setChecked(true);
    ui->checkBox_showAxes->setChecked(true);
    ui->checkBox_showObject->setChecked(true);
    ui->checkBox_showGround->setChecked(true);
    propertiesChanged();
}
UnsignedDerivedImage::UnsignedDerivedImage(ImagePtr base) : Image(base->getUid()+"_u", vtkImageDataPtr(), base->getName())
{
    this->mBase = base;

    // redirected signals:
    connect(base.get(), SIGNAL(transformChanged()), this, SIGNAL(transformChanged()));
    connect(base.get(), SIGNAL(propertiesChanged()), this, SIGNAL(propertiesChanged()));
    connect(base.get(), SIGNAL(clipPlanesChanged()), this, SIGNAL(clipPlanesChanged()));
    connect(base.get(), SIGNAL(cropBoxChanged()), this, SIGNAL(cropBoxChanged()));

    // override signals:
    connect(base.get(), SIGNAL(transferFunctionsChanged()), this, SLOT(unsignedTransferFunctionsChangedSlot()));
    connect(base.get(), SIGNAL(vtkImageDataChanged()), this, SLOT(unsignedImageChangedSlot()));

	connect(this, SIGNAL(transferFunctionsChanged()), this, SLOT(testSlot()));
	this->unsignedImageChangedSlot();
    this->unsignedTransferFunctionsChangedSlot();
}
void QNetworkManagerInterfaceDeviceModem::propertiesSwap(QMap<QString,QVariant> map)
{
    QMapIterator<QString, QVariant> i(map);
    while (i.hasNext()) {
        i.next();
        propertyMap.insert(i.key(),i.value());
    }
    Q_EMIT propertiesChanged(map);
}
Example #9
0
void KnotsPlayer::onPropertiesUpdated()
{
    switch( _status )
    {
    case Playing:
    {
        emit durationChanged(_properties->_duration);
        emit positionChanged( _localPosition );
        emit propertiesChanged(*_properties);
        break;
    }

    default:
        emit propertiesChanged(*_properties);       
        break;
    };

}
ModemManager::ModemLocationInterface::ModemLocationInterface(const QString & path, QObject * parent)
    : ModemInterface(*new ModemLocationInterfacePrivate(path, this), parent)
{
    Q_D(const ModemLocationInterface);
    d->modemLocationIface.connection().connect(ModemManager::DBUS_SERVICE,
        path, QLatin1String("org.freedesktop.DBus.Properties"),
        QLatin1String("MmPropertiesChanged"), QLatin1String("sa{sv}"),
        this, SLOT(propertiesChanged(QString,QVariantMap)));
}
Example #11
0
void DataMetricRep::setDataMetric(DataMetricPtr value)
{
    if (mMetric)
	{
		disconnect(mMetric.get(), SIGNAL(transformChanged()), this, SLOT(setModified()));
		disconnect(mMetric.get(), SIGNAL(propertiesChanged()), this, SLOT(setModified()));
	}

    mMetric = value;

    if (mMetric)
	{
		connect(mMetric.get(), SIGNAL(propertiesChanged()), this, SLOT(setModified()));
		connect(mMetric.get(), SIGNAL(transformChanged()), this, SLOT(setModified()));
	}

    this->clear();
	this->setModified();
}
Example #12
0
void BaseInstance::setFlags(const QSet<InstanceFlag> &flags)
{
	I_D(BaseInstance);
	if (flags != d->m_flags)
	{
		d->m_flags = flags;
		emit flagsChanged();
		emit propertiesChanged(this);
	}
}
Example #13
0
void PropertiesDialog::apply()
{
    Properties::Instance()->colorScheme = colorSchemaCombo->currentText();
    Properties::Instance()->font = fontSampleLabel->font();//fontComboBox->currentFont();
    Properties::Instance()->guiStyle = (styleComboBox->currentText() == tr("System Default")) ?
                                       QString() : styleComboBox->currentText();

    Properties::Instance()->emulation = emulationComboBox->currentText();

    /* do not allow to go above 99 or we lose transparency option */
    (appTransparencyBox->value() >= 100) ?
            Properties::Instance()->appTransparency = 99
                :
            Properties::Instance()->appTransparency = appTransparencyBox->value();

    Properties::Instance()->termTransparency = termTransparencyBox->value();
    Properties::Instance()->highlightCurrentTerminal = highlightCurrentCheckBox->isChecked();

    Properties::Instance()->askOnExit = askOnExitCheckBox->isChecked();

    Properties::Instance()->savePosOnExit = savePosOnExitCheckBox->isChecked();
    Properties::Instance()->saveSizeOnExit = saveSizeOnExitCheckBox->isChecked();

    Properties::Instance()->useCWD = useCwdCheckBox->isChecked();

    Properties::Instance()->scrollBarPos = scrollBarPos_comboBox->currentIndex();
    Properties::Instance()->tabsPos = tabsPos_comboBox->currentIndex();
    Properties::Instance()->keyboardCursorShape = keybCursorShape_comboBox->currentIndex();
    Properties::Instance()->hideTabBarWithOneTab = hideTabBarCheckBox->isChecked();
    Properties::Instance()->menuVisible = showMenuCheckBox->isChecked();
    Properties::Instance()->m_motionAfterPaste = motionAfterPasting_comboBox->currentIndex();

    Properties::Instance()->historyLimited = historyLimited->isChecked();
    Properties::Instance()->historyLimitedTo = historyLimitedTo->value();

    saveShortcuts();

    Properties::Instance()->saveSettings();

    Properties::Instance()->dropShowOnStart = dropShowOnStartCheckBox->isChecked();
    Properties::Instance()->dropHeight = dropHeightSpinBox->value();
    Properties::Instance()->dropWidht = dropWidthSpinBox->value();
    Properties::Instance()->dropShortCut = QKeySequence(dropShortCutEdit->text());

    Properties::Instance()->useBookmarks = useBookmarksCheckBox->isChecked();
    Properties::Instance()->bookmarksFile = bookmarksLineEdit->text();
    saveBookmarksFile(Properties::Instance()->bookmarksFile);

    Properties::Instance()->terminalsPreset = terminalPresetComboBox->currentIndex();

    Properties::Instance()->changeWindowTitle = changeWindowTitleCheckBox->isChecked();
    Properties::Instance()->changeWindowIcon = changeWindowIconCheckBox->isChecked();

    emit propertiesChanged();
}
Example #14
0
void Service::propertyChanged(const QString &name, const QDBusVariant &value)
{
    qDebug() << "Service PropertyChanged" << name;

    m_properties[name] = value.variant();

    if (name == "State")
        emit stateChanged();

    emit propertiesChanged();
}
void QNetworkManagerInterfaceDeviceWireless::propertiesSwap(QMap<QString,QVariant> map)
{
    QMapIterator<QString, QVariant> i(map);
    while (i.hasNext()) {
        i.next();
        propertyMap.insert(i.key(),i.value());
        if (i.key() == QStringLiteral("ActiveAccessPoint")) { //DeviceWireless
            Q_EMIT propertiesChanged(map);
        }
    }
}
Example #16
0
void knob::doConnections()
{
	if( model() != NULL )
	{
		QObject::connect( model(), SIGNAL( dataChanged() ),
					this, SLOT( friendlyUpdate() ) );

		QObject::connect( model(), SIGNAL( propertiesChanged() ),
						this, SLOT( update() ) );
	}
}
void QNetworkManagerInterface::propertiesSwap(QMap<QString,QVariant> map)
{
    QMapIterator<QString, QVariant> i(map);
    while (i.hasNext()) {
        i.next();
        propertyMap.insert(i.key(),i.value());

        if (i.key() == QStringLiteral("State")) {
            quint32 state = i.value().toUInt();
            if (state == NM_DEVICE_STATE_ACTIVATED
                || state == NM_DEVICE_STATE_DISCONNECTED
                || state == NM_DEVICE_STATE_UNAVAILABLE
                || state == NM_DEVICE_STATE_FAILED) {
                Q_EMIT propertiesChanged(map);
                Q_EMIT stateChanged(state);
            }
        } else if (i.key() == QStringLiteral("ActiveConnections")) {
            Q_EMIT propertiesChanged(map);
        }
    }
}
void QNetworkManagerInterfaceDeviceWired::propertiesSwap(QMap<QString,QVariant> map)
{
    QMapIterator<QString, QVariant> i(map);
    while (i.hasNext()) {
        i.next();
        propertyMap.insert(i.key(),i.value());
        if (i.key() == QStringLiteral("Carrier")) {
            Q_EMIT carrierChanged(i.value().toBool());
        }
    }
    Q_EMIT propertiesChanged(map);
}
void MetricReferenceArgumentList::set(int index, DataPtr p)
{
	if (mArgument[index] == p)
		return;

	if (mArgument[index])
	{
		disconnect(mArgument[index].get(), SIGNAL(transformChanged()), this, SIGNAL(argumentsChanged()));
		disconnect(mArgument[index].get(), SIGNAL(propertiesChanged()), this, SIGNAL(argumentsChanged()));
	}

	mArgument[index] = p;

	if (mArgument[index])
	{
		connect(mArgument[index].get(), SIGNAL(transformChanged()), this, SIGNAL(argumentsChanged()));
		connect(mArgument[index].get(), SIGNAL(propertiesChanged()), this, SIGNAL(argumentsChanged()));
	}

	emit argumentsChanged();
}
Example #20
0
void ComboBoxModel::clear()
{
	setRange( 0, 0 );
	for( const Item& i : m_items )
	{
		delete i.second;
	}

	m_items.clear();

	emit propertiesChanged();
}
Example #21
0
void MetricNamesRep::setData(std::vector<DataPtr> data)
{
    std::vector<DataMetricPtr> metrics = this->convertToMetrics(data);

    if (this->equal(metrics, mMetrics))
        return;

    for (unsigned i=0; i<mMetrics.size(); ++i)
    {
        disconnect(mMetrics[i].get(), SIGNAL(transformChanged()), this, SLOT(setModified()));
        disconnect(mMetrics[i].get(), SIGNAL(propertiesChanged()), this, SLOT(setModified()));
    }

    mMetrics = metrics;

    for (unsigned i=0; i<mMetrics.size(); ++i)
    {
        connect(mMetrics[i].get(), SIGNAL(transformChanged()), this, SLOT(setModified()));
        connect(mMetrics[i].get(), SIGNAL(propertiesChanged()), this, SLOT(setModified()));
    }

    this->setColoredTextList(this->getAllMetricTexts(), Eigen::Array2d(0.98, 0.98));
}
Example #22
0
void TabWidget::changeScrollPosition(QAction *triggered)
{
    QActionGroup *scrollPosition = static_cast<QActionGroup *>(sender());
    if(!scrollPosition)
        qFatal("scrollPosition is NULL");


    Properties::Instance()->scrollBarPos =
            scrollPosition->actions().indexOf(triggered);

    Properties::Instance()->saveSettings();
    propertiesChanged();

}
//! Sets the normal property values.
void ObjectVersionCore::setProperties(
	const QJsonArray& properties
)
{
	// Protect access.
	{
		QMutexLocker lock( &m_mtx );

		// Properties.
		m_properties = ObjectVersionCore::normalizePropertyValues( All, properties );
	}

	// Properties changed.
	emit propertiesChanged();
}
void QNetworkManagerConnectionActive::propertiesSwap(QMap<QString,QVariant> map)
{
    QMapIterator<QString, QVariant> i(map);
    while (i.hasNext()) {
        i.next();
        propertyMap.insert(i.key(),i.value());
        if (i.key() == QStringLiteral("State")) {
            quint32 state = i.value().toUInt();
            if (state == NM_ACTIVE_CONNECTION_STATE_ACTIVATED
                || state == NM_ACTIVE_CONNECTION_STATE_DEACTIVATED) {
                Q_EMIT propertiesChanged(map);
            }
        }
    }
}
bool QNetworkManagerInterfaceDeviceWireless::setConnections()
{
    if(!isValid() )
        return false;

    QDBusConnection dbusConnection = QDBusConnection::systemBus();
    bool allOk = false;
    delete nmDBusHelper;
    nmDBusHelper = new QNmDBusHelper(this);
    connect(nmDBusHelper, SIGNAL(pathForPropertiesChanged(QString,QMap<QString,QVariant>)),
            this,SIGNAL(propertiesChanged(QString,QMap<QString,QVariant>)));

    connect(nmDBusHelper, SIGNAL(pathForAccessPointAdded(QString,QDBusObjectPath)),
            this,SIGNAL(accessPointAdded(QString,QDBusObjectPath)));

    connect(nmDBusHelper, SIGNAL(pathForAccessPointRemoved(QString,QDBusObjectPath)),
            this,SIGNAL(accessPointRemoved(QString,QDBusObjectPath)));

    if(!dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE),
                              d->path,
                              QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRELESS),
                              QLatin1String("AccessPointAdded"),
                              nmDBusHelper, SLOT(slotAccessPointAdded(QDBusObjectPath)))) {
        allOk = true;
    }


    if(!dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE),
                              d->path,
                              QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRELESS),
                              QLatin1String("AccessPointRemoved"),
                              nmDBusHelper, SLOT(slotAccessPointRemoved(QDBusObjectPath)))) {
        allOk = true;
    }


    if(!dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE),
                              d->path,
                              QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRELESS),
                              QLatin1String("PropertiesChanged"),
                              nmDBusHelper,SLOT(slotPropertiesChanged(QMap<QString,QVariant>)))) {
        allOk = true;
    }

    return allOk;
}
void BearerPropertiesTest::testBearerProperties()
{
    ModemManager::Modem::Ptr modemInterface = ModemManager::modemDevices().first()->modemInterface();
    ModemManager::Bearer::Ptr modemBearer = modemInterface->listBearers().first();

    bearer->setConnected(true);
    QSignalSpy connectedChangedSpy(modemBearer.data(), SIGNAL(connectedChanged(bool)));
    QVERIFY(connectedChangedSpy.wait());
    QCOMPARE(modemBearer->isConnected(), connectedChangedSpy.at(0).at(0).toBool());

    bearer->setInterface(QLatin1String("ttyUSB1"));
    QSignalSpy interfaceChangedSpy(modemBearer.data(), SIGNAL(interfaceChanged(QString)));
    QVERIFY(interfaceChangedSpy.wait());
    QCOMPARE(modemBearer->interface(), interfaceChangedSpy.at(0).at(0).toString());

    bearer->setIp4Config({{QLatin1String("method"), MM_BEARER_IP_METHOD_UNKNOWN}});
    QSignalSpy ip4ConfigChangedSpy(modemBearer.data(), SIGNAL(ip4ConfigChanged(ModemManager::IpConfig)));
    QVERIFY(ip4ConfigChangedSpy.wait());
    QCOMPARE(modemBearer->ip4Config().method(), ip4ConfigChangedSpy.at(0).at(0).value<ModemManager::IpConfig>().method());

    bearer->setIp6Config({{QLatin1String("method"), MM_BEARER_IP_METHOD_PPP}});
    QSignalSpy ip6ConfigChangedSpy(modemBearer.data(), SIGNAL(ip6ConfigChanged(ModemManager::IpConfig)));
    QVERIFY(ip6ConfigChangedSpy.wait());
    QCOMPARE(modemBearer->ip6Config().method(), ip6ConfigChangedSpy.at(0).at(0).value<ModemManager::IpConfig>().method());

    bearer->setIpTimeout(25);
    QSignalSpy ipTimeoutChangedSpy(modemBearer.data(), SIGNAL(ipTimeoutChanged(uint)));
    QVERIFY(ipTimeoutChangedSpy.wait());
    QCOMPARE(modemBearer->ipTimeout(), ipTimeoutChangedSpy.at(0).at(0).toUInt());

    bearer->setProperties({{QLatin1String("apn"),QLatin1String("internet2")},{QLatin1Literal("ip-type"), 2}, {QLatin1String("number"), QLatin1String("*98#")}});
    QSignalSpy propertiesChangedSpy(modemBearer.data(), SIGNAL(propertiesChanged(QVariantMap)));
    QVERIFY(propertiesChangedSpy.wait());
    QVERIFY(modemBearer->properties().contains(QLatin1String("apn")));
    QVERIFY(modemBearer->properties().contains(QLatin1String("number")));
    QVERIFY(modemBearer->properties().contains(QLatin1String("ip-type")));
    QCOMPARE(modemBearer->properties().value(QLatin1String("apn")).toString(), QLatin1String("internet2"));
    QCOMPARE(modemBearer->properties().value(QLatin1String("ip-type")).toUInt(), (uint)2);
    QCOMPARE(modemBearer->properties().value(QLatin1String("number")).toString(), QLatin1String("*98#"));

    bearer->setSuspended(true);
    QSignalSpy suspendedChangedSpy(modemBearer.data(), SIGNAL(suspendedChanged(bool)));
    QVERIFY(suspendedChangedSpy.wait());
    QCOMPARE(modemBearer->isSuspended(), suspendedChangedSpy.at(0).at(0).toBool());
}
Example #27
0
TermWidget::TermWidget(const QString & wdir, const QString & shell, QWidget * parent)
    : QWidget(parent)
{
    m_border = palette().color(QPalette::Window);
    m_term = new TermWidgetImpl(wdir, shell, this);
    setFocusProxy(m_term);

    m_layout = new QVBoxLayout;
    setLayout(m_layout);

    m_layout->addWidget(m_term);

    propertiesChanged();

    connect(m_term, SIGNAL(finished()), this, SIGNAL(finished()));
    connect(m_term, SIGNAL(termGetFocus()), this, SLOT(term_termGetFocus()));
    connect(m_term, SIGNAL(termLostFocus()), this, SLOT(term_termLostFocus()));
}
Example #28
0
void PropertyEditorNodeWrapper::remove()
{
    if ((m_editorValue && m_editorValue->modelNode().isValid())) {
        if (QmlDesigner::QmlObjectNode(m_modelNode).isValid())
            QmlDesigner::QmlObjectNode(m_modelNode).destroy();
        m_editorValue->modelNode().removeProperty(m_editorValue->name());
    } else {
        qWarning("PropertyEditorNodeWrapper::remove failed - node invalid");
    }
    m_modelNode = QmlDesigner::ModelNode();

    foreach (const QString &propertyName, m_valuesPropertyMap.keys())
        m_valuesPropertyMap.clear(propertyName);
    foreach (QObject *object, m_valuesPropertyMap.children())
        delete object;
    emit propertiesChanged();
    emit existsChanged();
}
Example #29
0
TermWidgetImpl::TermWidgetImpl(const QString & wdir, const QString & shell, QWidget * parent)
    : QTermWidget(0, parent)
{
    TermWidgetCount++;
    QString name("TermWidget_%1");
    setObjectName(name.arg(TermWidgetCount));

    setFlowControlEnabled(FLOW_CONTROL_ENABLED);
    setFlowControlWarningEnabled(FLOW_CONTROL_WARNING_ENABLED);

    propertiesChanged();

    setHistorySize(5000);

    if (!wdir.isNull())
        setWorkingDirectory(wdir);

    if (shell.isNull())
    {
        if (!Properties::Instance()->shell.isNull())
            setShellProgram(Properties::Instance()->shell);
    }
    else
    {
        qDebug() << "Settings custom shell program:" << shell;
        QStringList parts = shell.split(QRegExp("\\s+"), QString::SkipEmptyParts);
        qDebug() << parts;
        setShellProgram(parts.at(0));
        parts.removeAt(0);
        if (parts.count())
            setArgs(parts);
    }

    setMotionAfterPasting(Properties::Instance()->m_motionAfterPaste);

    setContextMenuPolicy(Qt::CustomContextMenu);
    connect(this, SIGNAL(customContextMenuRequested(const QPoint &)),
            this, SLOT(customContextMenuCall(const QPoint &)));

    connect(this, SIGNAL(urlActivated(QUrl)), this, SLOT(activateUrl(const QUrl&)));

    startShellProgram();
}
Example #30
0
bool QNetworkManagerConnectionActive::setConnections()
{
    if(!isValid() )
        return false;

    bool allOk = false;
    delete nmDBusHelper;
    nmDBusHelper = new QNmDBusHelper(this);
    connect(nmDBusHelper, SIGNAL(pathForPropertiesChanged(QString,QMap<QString,QVariant>)),
            this,SIGNAL(propertiesChanged(QString,QMap<QString,QVariant>)));
    if(nmConnection.connect(QLatin1String(NM_DBUS_SERVICE),
                            d->path,
                            QLatin1String(NM_DBUS_INTERFACE_ACTIVE_CONNECTION),
                            QLatin1String("PropertiesChanged"),
                            nmDBusHelper,SLOT(slotPropertiesChanged(QMap<QString,QVariant>))) )  {
        allOk = true;
    }

    return allOk;
}