本文整理汇总了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()));
}
示例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();
}
}
示例3: enabledChanged
void QQuickParticleEmitter::setEnabled(bool arg)
{
if (m_enabled != arg) {
m_enabled = arg;
emit enabledChanged(arg);
}
}
示例4: enabledChanged
/*!
\internal
*/
void QDeclarativeGeoMapGestureArea::setEnabled(bool enabled)
{
if (enabled == enabled_)
return;
enabled_ = enabled;
emit enabledChanged();
}
示例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()));
}
示例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);
}
}
}
示例7: enabledChanged
void MInverseMouseArea::setEnabled(bool enabled)
{
if (m_enabled != enabled) {
m_enabled = enabled;
emit enabledChanged();
}
}
示例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();
}
}
示例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();
}
示例10: enabledChanged
void Plugin::setEnabled(bool enabled)
{
if (enabled != d->isEnabled()) {
d->setEnabled(enabled);
emit enabledChanged(enabled);
}
}
示例11: changeEvent
void CommentController::
changeEvent ( QEvent * event )
{
if (event->type() == QEvent::EnabledChange)
if (!isEnabled())
emit enabledChanged( isEnabled() );
}
示例12: enabledChanged
void HalSignal::setEnabled(bool arg)
{
if (m_enabled != arg) {
m_enabled = arg;
emit enabledChanged(arg);
}
}
示例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();
}
}
示例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
}
示例15: enabledChanged
void
TrackMarker::onEnabledValueChanged(ViewSpec,
int /*dimension*/,
int reason)
{
Q_EMIT enabledChanged(reason);
}