当前位置: 首页>>代码示例>>C++>>正文


C++ enabledChanged函数代码示例

本文整理汇总了C++中enabledChanged函数的典型用法代码示例。如果您正苦于以下问题:C++ enabledChanged函数的具体用法?C++ enabledChanged怎么用?C++ enabledChanged使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了enabledChanged函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: QCoreApplication

QmlProfilerApplication::QmlProfilerApplication(int &argc, char **argv) :
    QCoreApplication(argc, argv),
    m_runMode(LaunchMode),
    m_process(0),
    m_hostName(QLatin1String("127.0.0.1")),
    m_port(3768),
    m_pendingRequest(REQUEST_NONE),
    m_verbose(false),
    m_recording(true),
    m_interactive(false),
    m_qmlProfilerClient(&m_connection),
    m_v8profilerClient(&m_connection),
    m_connectionAttempts(0),
    m_qmlDataReady(false),
    m_v8DataReady(false)
{
    m_connectTimer.setInterval(1000);
    connect(&m_connectTimer, SIGNAL(timeout()), this, SLOT(tryToConnect()));

    connect(&m_connection, SIGNAL(connected()), this, SLOT(connected()));
    connect(&m_connection, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(connectionStateChanged(QAbstractSocket::SocketState)));
    connect(&m_connection, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(connectionError(QAbstractSocket::SocketError)));

    connect(&m_qmlProfilerClient, SIGNAL(enabledChanged()), this, SLOT(traceClientEnabled()));
    connect(&m_qmlProfilerClient, SIGNAL(range(QQmlProfilerDefinitions::RangeType,QQmlProfilerDefinitions::BindingType,qint64,qint64,QStringList,QmlEventLocation)),
            &m_profilerData, SLOT(addQmlEvent(QQmlProfilerDefinitions::RangeType,QQmlProfilerDefinitions::BindingType,qint64,qint64,QStringList,QmlEventLocation)));
    connect(&m_qmlProfilerClient, SIGNAL(traceFinished(qint64)), &m_profilerData, SLOT(setTraceEndTime(qint64)));
    connect(&m_qmlProfilerClient, SIGNAL(traceStarted(qint64)), &m_profilerData, SLOT(setTraceStartTime(qint64)));
    connect(&m_qmlProfilerClient, SIGNAL(traceStarted(qint64)), this, SLOT(notifyTraceStarted()));
    connect(&m_qmlProfilerClient, SIGNAL(frame(qint64,int,int,int)), &m_profilerData, SLOT(addFrameEvent(qint64,int,int,int)));
    connect(&m_qmlProfilerClient, SIGNAL(sceneGraphFrame(QQmlProfilerDefinitions::SceneGraphFrameType,
                                         qint64,qint64,qint64,qint64,qint64,qint64)),
            &m_profilerData, SLOT(addSceneGraphFrameEvent(QQmlProfilerDefinitions::SceneGraphFrameType,
                                  qint64,qint64,qint64,qint64,qint64,qint64)));
    connect(&m_qmlProfilerClient, SIGNAL(pixmapCache(QQmlProfilerDefinitions::PixmapEventType,qint64,
                                                     QmlEventLocation,int,int,int)),
            &m_profilerData, SLOT(addPixmapCacheEvent(QQmlProfilerDefinitions::PixmapEventType,qint64,
                                                      QmlEventLocation,int,int,int)));
    connect(&m_qmlProfilerClient, SIGNAL(memoryAllocation(QQmlProfilerDefinitions::MemoryType,qint64,
                                                          qint64)),
            &m_profilerData, SLOT(addMemoryEvent(QQmlProfilerDefinitions::MemoryType,qint64,
                                                 qint64)));
    connect(&m_qmlProfilerClient, SIGNAL(inputEvent(QQmlProfilerDefinitions::EventType,qint64)),
            &m_profilerData, SLOT(addInputEvent(QQmlProfilerDefinitions::EventType,qint64)));

    connect(&m_qmlProfilerClient, SIGNAL(complete()), this, SLOT(qmlComplete()));

    connect(&m_v8profilerClient, SIGNAL(enabledChanged()), this, SLOT(profilerClientEnabled()));
    connect(&m_v8profilerClient, SIGNAL(range(int,QString,QString,int,double,double)),
            &m_profilerData, SLOT(addV8Event(int,QString,QString,int,double,double)));
    connect(&m_v8profilerClient, SIGNAL(complete()), this, SLOT(v8Complete()));

    connect(&m_profilerData, SIGNAL(error(QString)), this, SLOT(logError(QString)));
    connect(&m_profilerData, SIGNAL(dataReady()), this, SLOT(traceFinished()));

}
开发者ID:2gis,项目名称:2gisqt5android,代码行数:56,代码来源:qmlprofilerapplication.cpp

示例2: enabledChanged

void
PSMoveQt::setEnabled(bool enabled)
{
    if (enabled && !_timer.isActive()) {
        /* Activate */
        _timer.start();
        emit enabledChanged();
    } else if (!enabled && _timer.isActive()) {
        /* Deactivate */
        _timer.stop();
        emit enabledChanged();
    }
}
开发者ID:CarlKenner,项目名称:psmoveapi,代码行数:13,代码来源:psmoveqt.cpp

示例3: enabledChanged

void QQuickParticleEmitter::setEnabled(bool arg)
{
    if (m_enabled != arg) {
        m_enabled = arg;
        emit enabledChanged(arg);
    }
}
开发者ID:2gis,项目名称:2gisqt5android,代码行数:7,代码来源:qquickparticleemitter.cpp

示例4: enabledChanged

/*!
    \internal
*/
void QDeclarativeGeoMapGestureArea::setEnabled(bool enabled)
{
    if (enabled == enabled_)
        return;
    enabled_ = enabled;
    emit enabledChanged();
}
开发者ID:agunnarsson,项目名称:qtlocation,代码行数:10,代码来源:qdeclarativegeomapgesturearea.cpp

示例5: disconnect

void QQuickMenuItem::unbindFromAction(QObject *o)
{
    if (!o)
        return;

    if (o == m_boundAction)
        m_boundAction = 0;

    QQuickAction *action = qobject_cast<QQuickAction *>(o);
    if (!action)
        return;

    disconnect(action, SIGNAL(destroyed(QObject*)), this, SLOT(unbindFromAction(QObject*)));

    disconnect(action, SIGNAL(triggered()), this, SIGNAL(triggered()));
    disconnect(action, SIGNAL(toggled(bool)), this, SLOT(updateChecked()));
    disconnect(action, SIGNAL(exclusiveGroupChanged()), this, SIGNAL(exclusiveGroupChanged()));
    disconnect(action, SIGNAL(enabledChanged()), this, SLOT(updateEnabled()));
    disconnect(action, SIGNAL(textChanged()), this, SLOT(updateText()));
    disconnect(action, SIGNAL(shortcutChanged(QVariant)), this, SLOT(updateShortcut()));
    disconnect(action, SIGNAL(checkableChanged()), this, SIGNAL(checkableChanged()));
    disconnect(action, SIGNAL(iconNameChanged()), this, SLOT(updateIcon()));
    disconnect(action, SIGNAL(iconNameChanged()), this, SIGNAL(iconNameChanged()));
    disconnect(action, SIGNAL(iconSourceChanged()), this, SLOT(updateIcon()));
    disconnect(action, SIGNAL(iconSourceChanged()), this, SIGNAL(iconSourceChanged()));
}
开发者ID:xjohncz,项目名称:qt5,代码行数:26,代码来源:qquickmenuitem.cpp

示例6: mmDebug

void ModemManager::ModemLocationInterface::propertiesChanged(const QString & interface, const QVariantMap & properties)
{
    mmDebug() << interface << properties.keys();

    if (interface == QString("org.freedesktop.ModemManager.Modem.Location")) {
        QLatin1String capabilities("Capabilities");
        QLatin1String enabled("Enabled");
        QLatin1String signalsLocation("SignalsLocation");
        QLatin1String location("Location");

        QVariantMap::const_iterator it = properties.find(capabilities);
        if ( it != properties.end()) {
            emit capabilitiesChanged((ModemManager::ModemLocationInterface::Capability)it->toUInt());
        }
        it = properties.find(enabled);
        if ( it != properties.end()) {
            emit enabledChanged(it->toBool());
        }
        it = properties.find(signalsLocation);
        if ( it != properties.end()) {
            emit signalsLocationChanged(it->toBool());
        }
        it = properties.find(location);
        if ( it != properties.end()) {
            QVariant v = it.value();
            LocationInformationMap map;
            if (v.canConvert<LocationInformationMap>()) {
                map = v.value<LocationInformationMap>();
            } else {
                mmDebug() << "Error converting LocationInformationMap property";
            }
            emit locationChanged(map);
        }
    }
}
开发者ID:fredollinger,项目名称:libmm-qt5,代码行数:35,代码来源:modemlocationinterface.cpp

示例7: enabledChanged

void MInverseMouseArea::setEnabled(bool enabled)
{
    if (m_enabled != enabled) {
        m_enabled = enabled;
        emit enabledChanged();
    }
}
开发者ID:crowdos,项目名称:crowdos-mine,代码行数:7,代码来源:minversemousearea.cpp

示例8: enabledChanged

/*!
    Allows you to enable or disable an actuator.  If \a enabled is true, the actuator will be enabled,
    and otherwise it will be disabled.

    \note Some systems may not allow you to change whether an actuator is enabled.
    \since 1.1
*/
void QFeedbackActuator::setEnabled(bool enabled)
{
    if (isEnabled() != enabled) {
        QFeedbackHapticsInterface::instance()->setActuatorProperty(*this, QFeedbackHapticsInterface::Enabled, enabled);
        emit enabledChanged();
    }
}
开发者ID:RobinD42,项目名称:qt-mobility,代码行数:14,代码来源:qfeedbackactuator.cpp

示例9: QWidget

MaemoRunConfigurationWidget::MaemoRunConfigurationWidget(
        MaemoRunConfiguration *runConfiguration, QWidget *parent)
    : QWidget(parent), m_runConfiguration(runConfiguration)
{
    QVBoxLayout *topLayout = new QVBoxLayout(this);
    topLayout->setMargin(0);
    QWidget *topWidget = new QWidget;
    topLayout->addWidget(topWidget);
    QVBoxLayout *mainLayout = new QVBoxLayout(topWidget);
    mainLayout->setMargin(0);
    m_remoteLinuxRunConfigWidget = new RemoteLinuxRunConfigurationWidget(runConfiguration, parent);
    mainLayout->addWidget(m_remoteLinuxRunConfigWidget);
    m_subWidget = new QWidget;
    mainLayout->addWidget(m_subWidget);
    QVBoxLayout *subLayout = new QVBoxLayout(m_subWidget);
    subLayout->setMargin(0);
    addMountWidgets(subLayout);
    connect(m_runConfiguration->target(), SIGNAL(kitChanged()), this, SLOT(updateMountWarning()));
    connect(m_runConfiguration->extraAspect<Debugger::DebuggerRunConfigurationAspect>(),
            SIGNAL(debuggersChanged()),
            SLOT(updateMountWarning()));
    updateMountWarning();

    Core::Id devId = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(runConfiguration->target()->kit());
    m_mountDetailsContainer->setVisible(MaddeDevice::allowsRemoteMounts(devId));

    connect(m_runConfiguration, SIGNAL(enabledChanged()),
            this, SLOT(runConfigurationEnabledChange()));
    runConfigurationEnabledChange();
}
开发者ID:aizaimenghuangu,项目名称:QtTestor,代码行数:30,代码来源:maemorunconfigurationwidget.cpp

示例10: enabledChanged

void Plugin::setEnabled(bool enabled)
{
    if (enabled != d->isEnabled()) {
        d->setEnabled(enabled);
        emit enabledChanged(enabled);
    }
}
开发者ID:project-renard-survey,项目名称:utopia-documents-mirror,代码行数:7,代码来源:plugin.cpp

示例11: changeEvent

void CommentController::
        changeEvent ( QEvent * event )
{
    if (event->type() == QEvent::EnabledChange)
        if (!isEnabled())
            emit enabledChanged( isEnabled() );
}
开发者ID:aveminus,项目名称:freq,代码行数:7,代码来源:commentcontroller.cpp

示例12: enabledChanged

void HalSignal::setEnabled(bool arg)
{
    if (m_enabled != arg) {
        m_enabled = arg;
        emit enabledChanged(arg);
    }
}
开发者ID:ftkalcevic,项目名称:QtQuickVcp,代码行数:7,代码来源:halsignal.cpp

示例13: enabledChanged

void AdBlockManager::setEnabled(bool enabled)
{
    if (m_enabled == enabled) {
        return;
    }

    m_enabled = enabled;
    emit enabledChanged(enabled);

    Settings settings;
    settings.beginGroup("AdBlock");
    settings.setValue("enabled", m_enabled);
    settings.endGroup();

    load();
    mApp->reloadUserStyleSheet();

    QMutexLocker locker(&m_mutex);

    if (m_enabled) {
        m_matcher->update();
    } else {
        m_matcher->clear();
    }
}
开发者ID:Martii,项目名称:qupzilla,代码行数:25,代码来源:adblockmanager.cpp

示例14: OrgA11yStatusInterface

// We have the a11y registry on the session bus.
// Subscribe to updates about a11y enabled state.
// Find out the bus address
void DBusConnection::serviceRegistered()
{
    // listen to enabled changes
    QDBusConnection c = QDBusConnection::sessionBus();
    OrgA11yStatusInterface *a11yStatus = new OrgA11yStatusInterface(A11Y_SERVICE, A11Y_PATH, c, this);

    //The variable was introduced because on some embedded platforms there are custom accessibility
    //clients which don't set Status.ScreenReaderEnabled to true. The variable is also useful for
    //debugging.
    static const bool a11yAlwaysOn = qEnvironmentVariableIsSet("QT_LINUX_ACCESSIBILITY_ALWAYS_ON");

    // a11yStatus->isEnabled() returns always true (since Gnome 3.6)
    bool enabled = a11yAlwaysOn || a11yStatus->screenReaderEnabled();

    if (enabled != m_enabled) {
        m_enabled = enabled;
        if (m_a11yConnection.isConnected()) {
            emit enabledChanged(m_enabled);
        } else {
            QDBusConnection c = QDBusConnection::sessionBus();
            QDBusMessage m = QDBusMessage::createMethodCall(QLatin1String("org.a11y.Bus"),
                             QLatin1String("/org/a11y/bus"),
                             QLatin1String("org.a11y.Bus"), QLatin1String("GetAddress"));
            c.callWithCallback(m, this, SLOT(connectA11yBus(QString)), SLOT(dbusError(QDBusError)));
        }
    }

    //    connect(a11yStatus, ); QtDbus doesn't support notifications for property changes yet
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:32,代码来源:dbusconnection.cpp

示例15: enabledChanged

void
TrackMarker::onEnabledValueChanged(ViewSpec,
                                   int /*dimension*/,
                                   int reason)
{
    Q_EMIT enabledChanged(reason);
}
开发者ID:Kthulhu,项目名称:Natron,代码行数:7,代码来源:TrackMarker.cpp


注:本文中的enabledChanged函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。